驳回处理,以及流程测试

master
shijie 4 years ago
parent b0c11c5e1d
commit 886a432781
  1. 8
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java
  3. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CrmsCompanyPersonalServiceImpl.java
  4. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java
  5. 43
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  6. 128
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java
  7. 124
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java
  8. 92
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java
  9. 2
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml
  10. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java
  11. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -60,7 +61,12 @@ public class CrmsCompanyPersonalController {
if(crmsCustomerRelated.getRelatedId()!=null && crmsCustomerRelated.getCustomerId()!=null){ if(crmsCustomerRelated.getRelatedId()!=null && crmsCustomerRelated.getCustomerId()!=null){
boolean bindRelated = crmsCustomerRelatedService.save(crmsCustomerRelated); boolean bindRelated = crmsCustomerRelatedService.save(crmsCustomerRelated);
} }
return result ? ResponseResult.SUCCESS("返回的关联人id="+crmsCompanyPersonal.getId()) : ResponseResult.FAIL(); //获取返回列表
CrmsCompanyPersonal companyPersonal = crmsCompanyPersonalService.selectById(crmsCompanyPersonal.getId());
List<CrmsCompanyPersonal> companyPersonalList = new ArrayList();
companyPersonalList.add(companyPersonal);
return result ? ResponseResult.SUCCESS(companyPersonalList) : ResponseResult.FAIL();
} }
/** /**

@ -17,4 +17,6 @@ public interface ICrmsCompanyPersonalService extends IService<CrmsCompanyPersona
PageUtils queryPage(Integer page, Integer size, Integer customerId); PageUtils queryPage(Integer page, Integer size, Integer customerId);
boolean updateIsExistRelated(Integer id, Integer isExistRelated); boolean updateIsExistRelated(Integer id, Integer isExistRelated);
CrmsCompanyPersonal selectById(Long id);
} }

@ -37,4 +37,9 @@ public class CrmsCompanyPersonalServiceImpl extends ServiceImpl<CrmsCompanyPerso
public boolean updateIsExistRelated(Integer id, Integer isExistRelated) { public boolean updateIsExistRelated(Integer id, Integer isExistRelated) {
return this.getBaseMapper().updateIsExistRelated(id,isExistRelated); return this.getBaseMapper().updateIsExistRelated(id,isExistRelated);
} }
@Override
public CrmsCompanyPersonal selectById(Long id) {
return this.getBaseMapper().selectById(id);
}
} }

@ -2,6 +2,7 @@ package com.daqing.financial.guarantee.model.response;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -38,5 +39,8 @@ public class GuaranteeDetailResponse implements Serializable {
@ApiModelProperty(value = "附件详细") @ApiModelProperty(value = "附件详细")
private DgEnclosureInfoResponse dgEnclosureInfo; private DgEnclosureInfoResponse dgEnclosureInfo;
@ApiModelProperty(value = "担保详细")
private DgGuaranteeAssignUser assignUser;
} }

@ -112,7 +112,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//申请贷款相关信息 //申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId());
dgApplyAmountInfo.setPresenterId(5);//Integer.parseInt(userId) dgApplyAmountInfo.setPresenterId(Integer.parseInt(userId));
dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度 dgApplyAmountInfo.setApplyAmount(businessApplication.getApplyAmount());//申请额度
dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限 dgApplyAmountInfo.setApplyTime(businessApplication.getApplyTime());//申请期限
dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行 dgApplyAmountInfo.setBank(businessApplication.getBank());//贷款银行
@ -128,8 +128,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
//新增到业务列表 //新增到业务列表
DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); DgApplyAmountList dgApplyAmountList = new DgApplyAmountList();
dgApplyAmountList.setBusinessId(dgApplyAmountInfo.getId()); dgApplyAmountList.setBusinessId(dgApplyAmountInfo.getId());
dgApplyAmountList.setPresenterId(5);//Integer.parseInt(userId) dgApplyAmountList.setPresenterId(Integer.parseInt(userId));
dgApplyAmountList.setEmpId(5);//Integer.parseInt(userId) dgApplyAmountList.setEmpId(Integer.parseInt(userId));
dgApplyAmountList.setRoleId(PromptSuccess.DB_YWY_ID); dgApplyAmountList.setRoleId(PromptSuccess.DB_YWY_ID);
dgApplyAmountList.setType(1);//类型为担保业务员 dgApplyAmountList.setType(1);//类型为担保业务员
@ -476,26 +476,47 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>() dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",dgApplyAmountList1.getBusinessId())); .eq("business_id",dgApplyAmountList1.getBusinessId()));
//如果是A,B角驳回的情况,此处审核通过之后不经过指派A,B角的操作,直接到调查
//根据业务id查询A,B角的操作状态是否是已处理,如果是,则为A,B角已驳回的数据
DgGuaranteeAssignUser assignUser = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 1));
DgGuaranteeAssignUser assignUser2 = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 2));
if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(dgApplyAmountList1.getBusinessId()); processStatus.setBusinessId(dgApplyAmountList1.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决 processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>() dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId())); .eq("business_id",processStatus.getBusinessId()));
} }else if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况
if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况
//担保业务员状态改为驳回,操作状态为已处理 //担保业务员状态改为驳回,操作状态为已处理
DgApplyAmountList applyAmount = new DgApplyAmountList(); DgApplyAmountList applyAmount = new DgApplyAmountList();
applyAmount.setStatus(status); applyAmount.setStatus(status);
applyAmount.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态改为待处理 applyAmount.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态改为待处理
dgApplyAmountListMapper.update(applyAmount,new QueryWrapper<DgApplyAmountList>() dgApplyAmountListMapper.update(applyAmount,new QueryWrapper<DgApplyAmountList>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1)); .eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1));
} }else if(assignUser != null && assignUser2 != null){
if((assignUser.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)&& assignUser.getStatus().equals(StatusCode.SP_REJECT))
||(assignUser2.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)) && assignUser2.getStatus().equals(StatusCode.SP_REJECT)){
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审 //此处为AB角驳回情况,如果审核通过,则修改A,B角操作状态为待处理,状态为审核中
if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){ if(status.equals(StatusCode.SP_REVIEWED)){
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);
user.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeAssignUserMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1));
dgGuaranteeAssignUserMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",2));
//担保部经理处,驳回状态改为审核中
DgGuaranteeAssignUser user2 = new DgGuaranteeAssignUser();
user2.setStatus(StatusCode.SP_IN_REVIEW);
dgGuaranteeAssignUserMapper.update(user2,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",3));
}
}
}else if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){
//如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审
//新增一条记录到担保部 //新增一条记录到担保部
DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser();
guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id

@ -24,6 +24,7 @@ import com.daqing.framework.model.response.PromptSuccess;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import com.daqing.framework.utils.excel.ExcelUtil; import com.daqing.framework.utils.excel.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -139,16 +140,19 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>() DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectOne(new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id", assetsResponse.getBusinessId()).eq("type", 1)); .eq("business_id", assetsResponse.getBusinessId()).eq("type", 1));
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); if(assetsInvestigation != null){
// assetsResponse.setAmount(assetsInvestigation.getAmount()); BeanUtils.copyProperties(assetsInvestigation,assetsResponse);
// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); }
// assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); /* assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
// assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); assetsResponse.setAmount(assetsInvestigation.getAmount());
// assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount());
// assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); assetsResponse.setApplyContent(assetsInvestigation.getApplyContent());
// assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode());
// assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); assetsResponse.setAssetsName(assetsInvestigation.getAssetsName());
// assetsResponse.setAuditName(assetsInvestigation.getAuditName()); assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime());
assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount());
assetsResponse.setAuditCode(assetsInvestigation.getAuditCode());
assetsResponse.setAuditName(assetsInvestigation.getAuditName());*/
//结束--------------------------------------------------------------------- //结束---------------------------------------------------------------------
//根据业务id查询评估价值List //根据业务id查询评估价值List
@ -217,6 +221,25 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
assetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 assetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>() this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2)); .eq("business_id",dgAssetsInvestigation.getBusinessId()).eq("type",2));
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.update(money,new QueryWrapper<DgAssetsMoney>()
.eq("business_id",dgAssetsInvestigation.getBusinessId()));
}else{
//根据业务id批量新增数据到评估价值列表
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.insert(money);
} }
//资产部调查员调查,修改审核意见以及状态,修改其他数据 //资产部调查员调查,修改审核意见以及状态,修改其他数据
@ -244,17 +267,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(investigateAssetsRequest.getEnGuaranteeMeasures())); dgApplyAmountInfo.setEnGuaranteeMeasures(ArraysUtil.toString(investigateAssetsRequest.getEnGuaranteeMeasures()));
dgApplyAmountInfoMapper.updateById(dgApplyAmountInfo); dgApplyAmountInfoMapper.updateById(dgApplyAmountInfo);
//根据业务id批量新增数据到评估价值列表
//dgAssetsAssessmentAssetsLogMapper.insertAssetsList(investigateAssetsRequest.getAssessmentList());
DgAssetsMoney money = new DgAssetsMoney();
money.setBusinessId(dgAssetsInvestigation.getBusinessId());
money.setHouseMoney(investigateAssetsRequest.getHouseMoney());
money.setCarMoney(investigateAssetsRequest.getCarMoney());
money.setEquipmentMoney(investigateAssetsRequest.getEquipmentMoney());
money.setOtherMoney(investigateAssetsRequest.getOtherMoney());
dgAssetsMoneyMapper.insert(money);
//判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理 //判断资产部调查员是否调查通过,如果通过,修改资产部经理操作状态为待处理
if(investigateAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW){//状态为审核中 if(investigateAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW){//状态为审核中
DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation(); DgAssetsInvestigation assetsInvestigation2= new DgAssetsInvestigation();
@ -276,20 +288,6 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id查询资产部记录 //根据主键id查询资产部记录
DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId()); DgAssetsInvestigation assetsInvestigation = this.baseMapper.selectById(approvalAssetsRequest.getId());
//此处为资产部经理审核的操作
//如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){
DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()));
DgAssetsInvestigation assets2 = new DgAssetsInvestigation();
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3));
}
DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation(); DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation();
dgAssetsInvestigation.setId(approvalAssetsRequest.getId()); dgAssetsInvestigation.setId(approvalAssetsRequest.getId());
dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -303,16 +301,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
//根据主键id修改资产部记录 //根据主键id修改资产部记录
this.baseMapper.updateById(dgAssetsInvestigation); this.baseMapper.updateById(dgAssetsInvestigation);
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 DgAssetsInvestigation dgAssets = new DgAssetsInvestigation();
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); dgAssets.setStatus(StatusCode.SP_REJECT);//驳回
processStatus.setBusinessId(assetsInvestigation.getBusinessId()); dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
//驳回情况
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT)){ if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT)){
//驳回情况
//修改资产部调查下该业务的所有审批状态为驳回 //修改资产部调查下该业务的所有审批状态为驳回
DgAssetsInvestigation assets = new DgAssetsInvestigation(); DgAssetsInvestigation assets = new DgAssetsInvestigation();
assets.setStatus(StatusCode.SP_REJECT);//驳回 assets.setStatus(StatusCode.SP_REJECT);//驳回
@ -320,24 +314,36 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
.eq("business_id",assetsInvestigation.getBusinessId())); .eq("business_id",assetsInvestigation.getBusinessId()));
} }
DgAssetsInvestigation dgAssets = new DgAssetsInvestigation(); //此处为资产部经理审核的操作
dgAssets.setStatus(StatusCode.SP_REJECT);//驳回 //如果数据为驳回状态,审核通过,则处理资产部调查下该业务的审批状态为审核中,设置资产部领导的操作状态为待处理
dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 if(assetsInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalAssetsRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && assetsInvestigation.getType()==2){
//资产部经理驳回情况 DgAssetsInvestigation assets = new DgAssetsInvestigation();
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){ assets.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()));
DgAssetsInvestigation assets2 = new DgAssetsInvestigation();
assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(assets2,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3));
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(assetsInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){
//资产部经理驳回情况
//资产部专员调查审批状态为驳回,操作状态为待处理 //资产部专员调查审批状态为驳回,操作状态为待处理
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>() this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",1)); .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",1));
} }else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){
//资产部领导驳回情况 //资产部领导驳回情况
if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){
//资产部经理审批状态设置为驳回,操作状态设置为待处理 //资产部经理审批状态设置为驳回,操作状态设置为待处理
this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>() this.baseMapper.update(dgAssets,new QueryWrapper<DgAssetsInvestigation>()
.eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2)); .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2));
} }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
//如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过
//根据主键id查询业务id //根据主键id查询业务id
DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId()); DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId());
@ -354,12 +360,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl<DgAssetsInvest
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部经理",approvalAssetsRequest.getApplyContent(),3); AuditProcessUtil.save(assetsInvestigation.getBusinessId(),account,"资产部经理",approvalAssetsRequest.getApplyContent(),3);
} }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
//待完善 DgAssetsInvestigation investigationAssets = new DgAssetsInvestigation();
if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过 investigationAssets.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(investigationAssets,new QueryWrapper<DgAssetsInvestigation>().eq("business_id",assetsInvestigation.getBusinessId()));
//查看担保部分管领导是否审核通过 //查看担保部分管领导是否审核通过
int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>() int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",assetsInvestigation.getBusinessId()) .eq("business_id",assetsInvestigation.getBusinessId())

@ -158,10 +158,15 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13)); dgEnclosureInfo.setMarriageCopyList((List<String>) arr1List2.get(13));
System.out.println("附件详细=============="+dgEnclosureInfo); System.out.println("附件详细=============="+dgEnclosureInfo);
//查询担保部经理审核的金额和期限
DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3));
GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse(); GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse();
guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo);
guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo);
guaranteeDetailResponse.setLinkedHashMap(linkedList); guaranteeDetailResponse.setLinkedHashMap(linkedList);
guaranteeDetailResponse.setAssignUser(assignUser);
return guaranteeDetailResponse; return guaranteeDetailResponse;
} }
@ -171,22 +176,28 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id查询业务id //根据主键id查询业务id
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(investigateGuaranteeRequest.getId());
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum = i+n;
//如果是属于驳回的数据,并且调查通过 //如果是属于驳回的数据,并且调查通过
if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){ if(guaranteeAssignUser.getStatus().equals(StatusCode.SP_REJECT)){
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(StatusCode.SP_REJECT);//状态为驳回
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
int i = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",1).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED));
int n = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_REJECT).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum = i+n;
//如果A或B调查通过,审批状态仍然是驳回,操作状态改为已处理
if(sum == 1){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setId(investigateGuaranteeRequest.getId());//主键id
assignUser.setStatus(StatusCode.SP_REJECT);//驳回
this.baseMapper.updateById(assignUser);
}
//判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中 //判断AB角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中
if(sum == 2){ if(sum == 2){
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
@ -194,6 +205,14 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeAssignUser.getBusinessId())); .eq("business_id",guaranteeAssignUser.getBusinessId()));
} }
}else{
//AB角调查,修改审核意见以及状态
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(investigateGuaranteeRequest.getId());//主键id
dgGuaranteeAssignUser.setStatus(investigateGuaranteeRequest.getStatus());//状态
dgGuaranteeAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态设置为已处理
dgGuaranteeAssignUser.setRemark(investigateGuaranteeRequest.getApplyContent());//审核意见
this.baseMapper.updateById(dgGuaranteeAssignUser);
} }
if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理 if(investigateGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况处理
@ -237,8 +256,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
dgEnclosureInfoMapper.insert(dgEnclosureInfo); dgEnclosureInfoMapper.insert(dgEnclosureInfo);
//判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理 //判断A角和B角是否都调查通过,如果都审核通过,修改担保部经理操作状态为待处理
int a = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
if(sum==2){ .eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int b = this.baseMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeAssignUser.getBusinessId())
.eq("type",2).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED));
int sum2 = a+b;
if(sum2==2){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中
@ -261,18 +284,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id查询担保部记录 //根据主键id查询担保部记录
DgGuaranteeAssignUser guaranteeUser = this.baseMapper.selectById(approvalGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeUser = this.baseMapper.selectById(approvalGuaranteeRequest.getId());
//如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4));
}
DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser();
dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId()); dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId());
dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -286,16 +297,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
//根据主键id修改担保部记录 //根据主键id修改担保部记录
this.baseMapper.updateById(dgGuaranteeAssignUser); this.baseMapper.updateById(dgGuaranteeAssignUser);
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 DgGuaranteeAssignUser dgAssignUser = new DgGuaranteeAssignUser();
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回
processStatus.setBusinessId(guaranteeUser.getBusinessId()); dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
//驳回情况 if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){
//修改担保部调查下该业务的所有审批状态为驳回 //修改担保部调查下该业务的所有审批状态为驳回
DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
assignUser.setStatus(StatusCode.SP_REJECT);//驳回 assignUser.setStatus(StatusCode.SP_REJECT);//驳回
@ -303,25 +309,36 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
.eq("business_id",guaranteeUser.getBusinessId())); .eq("business_id",guaranteeUser.getBusinessId()));
} }
DgGuaranteeAssignUser dgAssignUser = new DgGuaranteeAssignUser(); //如果是处理驳回数据,如果审核通过,则将担保部调查业务下所有审批状态设置为审核中,担保领导这条记录操作状态设置为待处理
dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回 if(guaranteeUser.getStatus().equals(StatusCode.SP_REJECT) && approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && guaranteeUser.getType()==3){
dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser();
//担保部经理驳回情况 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审核中
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){ this.baseMapper.update(assignUser,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",4));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(guaranteeUser.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){
//担保部经理驳回情况
//A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理 //A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",1)); .eq("business_id",guaranteeUser.getBusinessId()).eq("type",1));
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",2)); .eq("business_id",guaranteeUser.getBusinessId()).eq("type",2));
} }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){
//担保部领导驳回情况 //担保部领导驳回情况
if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){
//担保部经理审批状态设置为驳回,操作状态设置为待处理 //担保部经理审批状态设置为驳回,操作状态设置为待处理
this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>() this.baseMapper.update(dgAssignUser,new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",guaranteeUser.getBusinessId()).eq("type",3)); .eq("business_id",guaranteeUser.getBusinessId()).eq("type",3));
} }else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过
//如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核
if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过
//根据主键id查询业务id //根据主键id查询业务id
DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId());
@ -338,11 +355,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl<DgGuaranteeAss
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部经理",approvalGuaranteeRequest.getApplyContent(),2); AuditProcessUtil.save(guaranteeAssignUser.getBusinessId(),account,"担保部经理",approvalGuaranteeRequest.getApplyContent(),2);
} }else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
//待完善 DgGuaranteeAssignUser user = new DgGuaranteeAssignUser();
if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==4) {//担保部领导审核通过 user.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(user,new QueryWrapper<DgGuaranteeAssignUser>().eq("business_id",guaranteeUser.getBusinessId()));
//查看信息部分管领导是否审核通过 //查看信息部分管领导是否审核通过
int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>() int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",guaranteeUser.getBusinessId()) .eq("business_id",guaranteeUser.getBusinessId())

@ -224,8 +224,24 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
dgMessageInvestigation.setFile(ArraysUtil.toString(investigateMessageRequest.getFile())); dgMessageInvestigation.setFile(ArraysUtil.toString(investigateMessageRequest.getFile()));
this.baseMapper.updateById(dgMessageInvestigation); this.baseMapper.updateById(dgMessageInvestigation);
//判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理 //如果是信息部经理驳回情况
if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){ if(messageInvestigation.getOperatingStatus().equals(StatusCode.CZ_ON_HAND) && messageInvestigation.getStatus().equals(StatusCode.SP_REJECT)){
//修改信息部调查员的审批状态为审核中,操作状态为已处理
DgMessageInvestigation investigation = new DgMessageInvestigation();
investigation.setOperatingStatus(StatusCode.CZ_PROCESSED);//已处理
investigation.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(investigation,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",1));
//修改信息部经理的审核状态为审核中,操作状态为待处理
DgMessageInvestigation dgInvestigation = new DgMessageInvestigation();
dgInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
dgInvestigation.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(dgInvestigation,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",2));
}else if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){
//判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理
DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation(); DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation();
messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND); messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND);
this.baseMapper.update(messageInvestigation2,new QueryWrapper<DgMessageInvestigation>() this.baseMapper.update(messageInvestigation2,new QueryWrapper<DgMessageInvestigation>()
@ -247,19 +263,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id查询信息部记录 //根据主键id查询信息部记录
DgMessageInvestigation messageInvestigation = this.baseMapper.selectById(approvalMessageRequest.getId()); DgMessageInvestigation messageInvestigation = this.baseMapper.selectById(approvalMessageRequest.getId());
//如果数据为驳回状态,审核通过,则处理信息部调查下该业务的审批状态为审核中,设置信息部领导的操作状态为待处理
if(messageInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && messageInvestigation.getType()==2){
DgMessageInvestigation message = new DgMessageInvestigation();
message.setStatus(StatusCode.SP_IN_REVIEW);//审核中
this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()));
DgMessageInvestigation message2 = new DgMessageInvestigation();
message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 ));
}
DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation(); DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation();
dgMessageInvestigation.setId(approvalMessageRequest.getId()); dgMessageInvestigation.setId(approvalMessageRequest.getId());
dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId()));
@ -269,17 +272,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
//根据主键id修改信息部记录 //根据主键id修改信息部记录
this.baseMapper.updateById(dgMessageInvestigation); this.baseMapper.updateById(dgMessageInvestigation);
DgMessageInvestigation dgMessage = new DgMessageInvestigation();
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回
dgMessage.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(messageInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}
//驳回情况
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT)){ if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT)){
//驳回情况
//修改信息部调查下该业务的所有审批状态为驳回 //修改信息部调查下该业务的所有审批状态为驳回
DgMessageInvestigation message = new DgMessageInvestigation(); DgMessageInvestigation message = new DgMessageInvestigation();
message.setStatus(StatusCode.SP_REJECT);//驳回 message.setStatus(StatusCode.SP_REJECT);//驳回
@ -287,24 +285,35 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
.eq("business_id",messageInvestigation.getBusinessId())); .eq("business_id",messageInvestigation.getBusinessId()));
} }
DgMessageInvestigation dgMessage = new DgMessageInvestigation(); //如果数据为驳回状态,审核通过,则处理信息部调查下该业务的审批状态为审核中,设置信息部领导的操作状态为待处理
dgMessage.setStatus(StatusCode.SP_REJECT);//驳回 if(messageInvestigation.getStatus().equals(StatusCode.SP_REJECT) && approvalMessageRequest.getStatus().equals(StatusCode.SP_IN_REVIEW) && messageInvestigation.getType()==2){
dgMessage.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 DgMessageInvestigation message = new DgMessageInvestigation();
//信息部经理驳回情况 message.setStatus(StatusCode.SP_IN_REVIEW);//审核中
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==2){ this.baseMapper.update(message,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()));
DgMessageInvestigation message2 = new DgMessageInvestigation();
message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理
this.baseMapper.update(message2,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 ));
}else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决
DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus();
processStatus.setBusinessId(messageInvestigation.getBusinessId());
processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决
dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper<DgBusinessProcessStatus>()
.eq("business_id",processStatus.getBusinessId()));
}else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==2){
//信息部经理驳回情况
//信息部专员审批状态设置为驳回,操作状态为待处理 //信息部专员审批状态设置为驳回,操作状态为待处理
this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>() this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",1)); .eq("business_id",messageInvestigation.getBusinessId()).eq("type",1));
} }else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){
//信息部领导驳回情况 //信息部领导驳回情况
if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){
//信息部经理审批状态设置为驳回,操作状态为待处理 //信息部经理审批状态设置为驳回,操作状态为待处理
this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>() this.baseMapper.update(dgMessage,new QueryWrapper<DgMessageInvestigation>()
.eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2));
} }else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过
//如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核
//如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核
if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过
//根据主键id查询业务id //根据主键id查询业务id
DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId()); DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId());
@ -321,11 +330,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl<DgMessageInve
String account = dgApplyAmountInfoController.getAccount(); String account = dgApplyAmountInfoController.getAccount();
AuditProcessUtil.save(messageInvestigation2.getBusinessId(),account,"信息部经理",approvalMessageRequest.getRemark(),4); AuditProcessUtil.save(messageInvestigation2.getBusinessId(),account,"信息部经理",approvalMessageRequest.getRemark(),4);
} }else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过
//如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据
//如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态
//待完善 DgMessageInvestigation investigation = new DgMessageInvestigation();
if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过 investigation.setStatus(StatusCode.SP_REVIEWED);//已审核
this.baseMapper.update(investigation,new QueryWrapper<DgMessageInvestigation>().eq("business_id",messageInvestigation.getBusinessId()));
//查看担保部分管领导是否审核通过 //查看担保部分管领导是否审核通过
int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>() int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper<DgGuaranteeAssignUser>()
.eq("business_id",messageInvestigation.getBusinessId()) .eq("business_id",messageInvestigation.getBusinessId())

@ -33,7 +33,7 @@
AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')) AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%'))
</if> </if>
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
AND (au.emp_id =#{userId} or au.emp_id is null) AND (au.emp_id =#{userId} or au.emp_id is null or au.emp_id ='')
</if> </if>
</where> </where>
</select> </select>

@ -99,7 +99,7 @@ public class CompanyCustomerEntity implements Serializable {
private String registerAddr; private String registerAddr;
@ApiModelProperty(value = "法人-身份证号") @ApiModelProperty(value = "法人-身份证号")
private Integer legalIdNumber; private String legalIdNumber;
@ApiModelProperty(value = "法人-户口所在地") @ApiModelProperty(value = "法人-户口所在地")
private String legalHukouAddr; private String legalHukouAddr;

@ -115,7 +115,7 @@ public class CustomerCompanyDTO implements Serializable {
private String legalName; private String legalName;
@ApiModelProperty(value = "法人-性别 1、男,0、女") @ApiModelProperty(value = "法人-性别 1、男,0、女")
private String legalGender; private Integer legalGender;
@ApiModelProperty(value = "法人-身份证号") @ApiModelProperty(value = "法人-身份证号")
private String legalIdNumber; private String legalIdNumber;

Loading…
Cancel
Save