From 886a432781399dcaeea0fb896b0614bfcc18bee2 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 8 Dec 2020 17:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=B3=E5=9B=9E=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=B5=81=E7=A8=8B=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CrmsCompanyPersonalController.java | 8 +- .../service/ICrmsCompanyPersonalService.java | 2 + .../impl/CrmsCompanyPersonalServiceImpl.java | 5 + .../response/GuaranteeDetailResponse.java | 4 + .../impl/DgApplyAmountInfoServiceImpl.java | 43 ++++-- .../DgAssetsInvestigationServiceImpl.java | 128 +++++++++--------- .../DgGuaranteeAssignUserServiceImpl.java | 124 +++++++++-------- .../DgMessageInvestigationServiceImpl.java | 92 +++++++------ .../guarantee/DgApplyAmountListMapper.xml | 2 +- .../domain/crms/CompanyCustomerEntity.java | 2 +- .../domain/crms/ext/CustomerCompanyDTO.java | 2 +- 11 files changed, 242 insertions(+), 170 deletions(-) diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java index 2cae92ac..35036ca2 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java @@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -60,7 +61,12 @@ public class CrmsCompanyPersonalController { if(crmsCustomerRelated.getRelatedId()!=null && crmsCustomerRelated.getCustomerId()!=null){ boolean bindRelated = crmsCustomerRelatedService.save(crmsCustomerRelated); } - return result ? ResponseResult.SUCCESS("返回的关联人id="+crmsCompanyPersonal.getId()) : ResponseResult.FAIL(); + //获取返回列表 + CrmsCompanyPersonal companyPersonal = crmsCompanyPersonalService.selectById(crmsCompanyPersonal.getId()); + + List companyPersonalList = new ArrayList(); + companyPersonalList.add(companyPersonal); + return result ? ResponseResult.SUCCESS(companyPersonalList) : ResponseResult.FAIL(); } /** diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java index 6ee22d18..12ef340d 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/ICrmsCompanyPersonalService.java @@ -17,4 +17,6 @@ public interface ICrmsCompanyPersonalService extends IService() .eq("business_id",dgApplyAmountList1.getBusinessId())); + //如果是A,B角驳回的情况,此处审核通过之后不经过指派A,B角的操作,直接到调查 + //根据业务id查询A,B角的操作状态是否是已处理,如果是,则为A,B角已驳回的数据 + DgGuaranteeAssignUser assignUser = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper() + .eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 1)); + DgGuaranteeAssignUser assignUser2 = dgGuaranteeAssignUserMapper.selectOne(new QueryWrapper() + .eq("business_id", dgApplyAmountList1.getBusinessId()).eq("type", 2)); + if(status.equals(StatusCode.SP_REFUSE)){//如果为拒绝,业务状态则为已否决 DgBusinessProcessStatus processStatus = new DgBusinessProcessStatus(); processStatus.setBusinessId(dgApplyAmountList1.getBusinessId()); processStatus.setBusinessStatus(StatusCode.YW_REJECTED);//业务状态设置为已否决 dgBusinessProcessStatusMapper.update(processStatus,new QueryWrapper() .eq("business_id",processStatus.getBusinessId())); - } - - if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况 + }else if(status.equals(StatusCode.SP_REJECT)){//状态为驳回情况 //担保业务员状态改为驳回,操作状态为已处理 DgApplyAmountList applyAmount = new DgApplyAmountList(); applyAmount.setStatus(status); applyAmount.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态改为待处理 dgApplyAmountListMapper.update(applyAmount,new QueryWrapper() .eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1)); - } - - - //如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审 - if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){ + }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(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() + .eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",1)); + dgGuaranteeAssignUserMapper.update(user,new QueryWrapper() + .eq("business_id",dgApplyAmountList1.getBusinessId()).eq("type",2)); + //担保部经理处,驳回状态改为审核中 + DgGuaranteeAssignUser user2 = new DgGuaranteeAssignUser(); + user2.setStatus(StatusCode.SP_IN_REVIEW); + dgGuaranteeAssignUserMapper.update(user2,new QueryWrapper() + .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(); guaranteeAssignUser.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index eba61dc4..e1d22e08 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -24,6 +24,7 @@ import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.excel.ExcelUtil; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -139,16 +140,19 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() .eq("business_id", assetsResponse.getBusinessId()).eq("type", 1)); -// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); -// assetsResponse.setAmount(assetsInvestigation.getAmount()); -// assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); -// assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); -// assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); -// assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); -// assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); -// assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); -// assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); -// assetsResponse.setAuditName(assetsInvestigation.getAuditName()); + if(assetsInvestigation != null){ + BeanUtils.copyProperties(assetsInvestigation,assetsResponse); + } +/* assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); + assetsResponse.setAmount(assetsInvestigation.getAmount()); + assetsResponse.setAssetsAmount(assetsInvestigation.getAssetsAmount()); + assetsResponse.setApplyContent(assetsInvestigation.getApplyContent()); + assetsResponse.setAssetsCode(assetsInvestigation.getAssetsCode()); + assetsResponse.setAssetsName(assetsInvestigation.getAssetsName()); + assetsResponse.setAssetsTime(assetsInvestigation.getAssetsTime()); + assetsResponse.setAuditAmount(assetsInvestigation.getAuditAmount()); + assetsResponse.setAuditCode(assetsInvestigation.getAuditCode()); + assetsResponse.setAuditName(assetsInvestigation.getAuditName());*/ //结束--------------------------------------------------------------------- //根据业务id查询评估价值List @@ -217,6 +221,25 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() .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() + .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() - .eq("business_id",assetsInvestigation.getBusinessId())); - - DgAssetsInvestigation assets2 = new DgAssetsInvestigation(); - assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - this.baseMapper.update(assets2,new QueryWrapper() - .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",3)); - } - DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation(); dgAssetsInvestigation.setId(approvalAssetsRequest.getId()); dgAssetsInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); @@ -303,16 +301,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() - .eq("business_id",processStatus.getBusinessId())); - } + DgAssetsInvestigation dgAssets = new DgAssetsInvestigation(); + dgAssets.setStatus(StatusCode.SP_REJECT);//驳回 + dgAssets.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - //驳回情况 if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT)){ + //驳回情况 //修改资产部调查下该业务的所有审批状态为驳回 DgAssetsInvestigation assets = new DgAssetsInvestigation(); assets.setStatus(StatusCode.SP_REJECT);//驳回 @@ -320,24 +314,36 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl() + .eq("business_id",assetsInvestigation.getBusinessId())); + + DgAssetsInvestigation assets2 = new DgAssetsInvestigation(); + assets2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 + this.baseMapper.update(assets2,new QueryWrapper() + .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() + .eq("business_id",processStatus.getBusinessId())); + }else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==2){ + //资产部经理驳回情况 //资产部专员调查审批状态为驳回,操作状态为待处理 this.baseMapper.update(dgAssets,new QueryWrapper() .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",1)); - } - //资产部领导驳回情况 - if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){ + }else if(approvalAssetsRequest.getStatus().equals(StatusCode.SP_REJECT) && assetsInvestigation.getType()==3){ + //资产部领导驳回情况 //资产部经理审批状态设置为驳回,操作状态设置为待处理 this.baseMapper.update(dgAssets,new QueryWrapper() .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",2)); - } - - //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 - if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过 + }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==2){//资产部经理审核通过 + //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgAssetsInvestigation assetsInvestigation2 = this.getBaseMapper().selectById(approvalAssetsRequest.getId()); @@ -354,12 +360,12 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl().eq("business_id",assetsInvestigation.getBusinessId())); //查看担保部分管领导是否审核通过 int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper() .eq("business_id",assetsInvestigation.getBusinessId()) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java index 592f46b4..658c041f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java @@ -158,10 +158,15 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl) arr1List2.get(13)); System.out.println("附件详细=============="+dgEnclosureInfo); + + //查询担保部经理审核的金额和期限 + DgGuaranteeAssignUser assignUser = this.baseMapper.selectOne(new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); GuaranteeDetailResponse guaranteeDetailResponse= new GuaranteeDetailResponse(); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setLinkedHashMap(linkedList); + guaranteeDetailResponse.setAssignUser(assignUser); return guaranteeDetailResponse; } @@ -171,22 +176,28 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().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().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)){ + //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().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().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角是否都调查通过,如果通过,则将担保部经理的状态改为待处理,同时所有的审批状态都变成审核中 if(sum == 2){ DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); @@ -194,6 +205,14 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() .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)){//驳回情况处理 @@ -237,8 +256,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeAssignUser.getBusinessId()) + .eq("type",1).eq("status",StatusCode.SP_IN_REVIEW).eq("operating_status",StatusCode.CZ_PROCESSED)); + int b = this.baseMapper.selectCount(new QueryWrapper().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(); assignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理 assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 @@ -261,18 +284,6 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeUser.getBusinessId())); - - DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); - user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 - this.baseMapper.update(assignUser,new QueryWrapper() - .eq("business_id",guaranteeUser.getBusinessId()).eq("type",4)); - } - DgGuaranteeAssignUser dgGuaranteeAssignUser = new DgGuaranteeAssignUser(); dgGuaranteeAssignUser.setId(approvalGuaranteeRequest.getId()); dgGuaranteeAssignUser.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); @@ -286,16 +297,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() - .eq("business_id",processStatus.getBusinessId())); - } + DgGuaranteeAssignUser dgAssignUser = new DgGuaranteeAssignUser(); + dgAssignUser.setStatus(StatusCode.SP_REJECT);//驳回 + dgAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - //驳回情况 - if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){ + if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT)){//驳回情况 //修改担保部调查下该业务的所有审批状态为驳回 DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); assignUser.setStatus(StatusCode.SP_REJECT);//驳回 @@ -303,25 +309,36 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeUser.getBusinessId())); + + DgGuaranteeAssignUser user = new DgGuaranteeAssignUser(); + user.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(user,new QueryWrapper() + .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() + .eq("business_id",processStatus.getBusinessId())); + }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==3){ + //担保部经理驳回情况 //A,B角调查部分审批状态统一设置驳回,操作状态设置为待处理 this.baseMapper.update(dgAssignUser,new QueryWrapper() .eq("business_id",guaranteeUser.getBusinessId()).eq("type",1)); this.baseMapper.update(dgAssignUser,new QueryWrapper() .eq("business_id",guaranteeUser.getBusinessId()).eq("type",2)); - } - //担保部领导驳回情况 - if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){ + }else if(approvalGuaranteeRequest.getStatus().equals(StatusCode.SP_REJECT) && guaranteeUser.getType()==4){ + //担保部领导驳回情况 //担保部经理审批状态设置为驳回,操作状态设置为待处理 this.baseMapper.update(dgAssignUser,new QueryWrapper() .eq("business_id",guaranteeUser.getBusinessId()).eq("type",3)); - } - //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 - if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过 + }else if(approvalGuaranteeRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgGuaranteeAssignUser.getOperatingStatus()==StatusCode.CZ_PROCESSED && guaranteeUser.getType()==3){//担保部经理审核通过 + //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgGuaranteeAssignUser guaranteeAssignUser = this.getBaseMapper().selectById(approvalGuaranteeRequest.getId()); @@ -338,11 +355,12 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id",guaranteeUser.getBusinessId())); //查看信息部分管领导是否审核通过 int a=dgMessageInvestigationMapper.selectCount(new QueryWrapper() .eq("business_id",guaranteeUser.getBusinessId()) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java index b80a6bb2..d85d6e5f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgMessageInvestigationServiceImpl.java @@ -224,8 +224,24 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() + .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() + .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); + + }else if(investigateMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW ){ + //判断信息部专员是否调查通过,如果通过,修改信息部经理操作状态为待处理 DgMessageInvestigation messageInvestigation2 = new DgMessageInvestigation(); messageInvestigation2.setOperatingStatus(StatusCode.CZ_ON_HAND); this.baseMapper.update(messageInvestigation2,new QueryWrapper() @@ -247,19 +263,6 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() - .eq("business_id",messageInvestigation.getBusinessId())); - - DgMessageInvestigation message2 = new DgMessageInvestigation(); - message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 - this.baseMapper.update(message,new QueryWrapper() - .eq("business_id",messageInvestigation.getBusinessId()).eq("type",3 )); - } - DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation(); dgMessageInvestigation.setId(approvalMessageRequest.getId()); dgMessageInvestigation.setEmpId(Integer.parseInt(dgApplyAmountInfoController.getUserId())); @@ -269,17 +272,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() - .eq("business_id",processStatus.getBusinessId())); - } - - //驳回情况 if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT)){ + //驳回情况 //修改信息部调查下该业务的所有审批状态为驳回 DgMessageInvestigation message = new DgMessageInvestigation(); message.setStatus(StatusCode.SP_REJECT);//驳回 @@ -287,24 +285,35 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() + .eq("business_id",messageInvestigation.getBusinessId())); + + DgMessageInvestigation message2 = new DgMessageInvestigation(); + message2.setOperatingStatus(StatusCode.CZ_ON_HAND);//待处理 + this.baseMapper.update(message2,new QueryWrapper() + .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() + .eq("business_id",processStatus.getBusinessId())); + }else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==2){ + //信息部经理驳回情况 //信息部专员审批状态设置为驳回,操作状态为待处理 this.baseMapper.update(dgMessage,new QueryWrapper() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",1)); - } - //信息部领导驳回情况 - if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){ + }else if(approvalMessageRequest.getStatus().equals(StatusCode.SP_REJECT) && messageInvestigation.getType()==3){ + //信息部领导驳回情况 //信息部经理审批状态设置为驳回,操作状态为待处理 this.baseMapper.update(dgMessage,new QueryWrapper() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",2)); - } - - //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核 - if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 + }else if(approvalMessageRequest.getStatus()==StatusCode.SP_IN_REVIEW && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==2){//信息部经理审核通过 + //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核 //根据主键id查询业务id DgMessageInvestigation messageInvestigation2 = this.getBaseMapper().selectById(approvalMessageRequest.getId()); @@ -321,11 +330,12 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl().eq("business_id",messageInvestigation.getBusinessId())); //查看担保部分管领导是否审核通过 int a=dgGuaranteeAssignUserMapper.selectCount(new QueryWrapper() .eq("business_id",messageInvestigation.getBusinessId()) diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml index edce6461..733a6998 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml @@ -33,7 +33,7 @@ AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')) - 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 ='') diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java index 19aeee27..44a46267 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java @@ -99,7 +99,7 @@ public class CompanyCustomerEntity implements Serializable { private String registerAddr; @ApiModelProperty(value = "法人-身份证号") - private Integer legalIdNumber; + private String legalIdNumber; @ApiModelProperty(value = "法人-户口所在地") private String legalHukouAddr; diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java index 68f593af..464ecb07 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyDTO.java @@ -115,7 +115,7 @@ public class CustomerCompanyDTO implements Serializable { private String legalName; @ApiModelProperty(value = "法人-性别 1、男,0、女") - private String legalGender; + private Integer legalGender; @ApiModelProperty(value = "法人-身份证号") private String legalIdNumber;