diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 1a5a7dd2..9c816553 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -154,14 +154,11 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA */ @GetMapping("/deleteServerFile") public boolean deleteServerFile(@RequestParam("filePath")String filePath){ - log.info("filePath=========="+filePath); boolean delete_flag = false; String certainPath =PromptSuccess.FILE_URL_PATH; filePath = certainPath + filePath; - System.out.println("filePath============"+filePath); File file = new File(filePath); if (!file.exists()) { - System.out.println("file==============="+file.getName()); return delete_flag; } try{ diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java index e8ca89d2..bdf08d5b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgGuaranteeLetterAssignUserController.java @@ -91,7 +91,10 @@ public class DgGuaranteeLetterAssignUserController { String loanTern = response.getLoanTern(); Date passingTime = response.getPassingTime(); String time = DateUtil.dateFormat(passingTime); - XWPFTemplate template = XWPFTemplate.compile("D:\\template\\template.docx").render( + //本地测试开启 + // XWPFTemplate template = XWPFTemplate.compile("D:\\template\\template.docx").render( + //服务器测试 + XWPFTemplate template = XWPFTemplate.compile("//usr//local//template//template.docx").render( new HashMap(){{ put("bankName", bank); put("clientName", name); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java index e19ac6b6..20404331 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgLoanNoticeController.java @@ -84,7 +84,10 @@ public class DgLoanNoticeController { Double loanMoney = response.getLoanMoney(); BigDecimal numberOfMoney = new BigDecimal(loanMoney*10000); String money = NumberToCN.number2CNMontrayUnit(numberOfMoney); - XWPFTemplate template = XWPFTemplate.compile("D:\\template\\templateTwo.docx").render( + //本地测试开启 + // XWPFTemplate template = XWPFTemplate.compile("D:\\template\\templateTwo.docx").render( + //服务器测试 + XWPFTemplate template = XWPFTemplate.compile("//usr//local//template//templateTwo.docx").render( new HashMap(){{ put("bankName", bank); put("clientName", name); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgGuaranteeAssignUserResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgGuaranteeAssignUserResponse.java new file mode 100644 index 00000000..43717ad3 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgGuaranteeAssignUserResponse.java @@ -0,0 +1,101 @@ +package com.daqing.financial.guarantee.model.response; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + *

+ * 担保部记录 + *

+ * + * @author Qyq + * @since 2020-11-05 + */ +@Data +@TableName("dg_guarantee_assign_user") +public class DgGuaranteeAssignUserResponse implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 业务id + */ + private Integer businessId; + + /** + * 角色id + */ + private Integer roleId; + + /** + * 企业id + */ + private Integer companyId; + + /** + * 用户id + */ + private Integer empId; + + /** + * 类型(1:第一审批人 2:指派人AB角 3:第一审批人审核 3:经理) + */ + private Integer type; + + /** + * 状态(1:待指派 2:审核中 3:审核通过 4:审核不通过 5:驳回) + */ + private Integer status; + + /** + * 操作状态: 0->已发起;2->待处理;3->已处理; + */ + private Integer operatingStatus; + + /** + * 审核金额 + */ + private BigDecimal amount; + + /** + * 期限 + */ + private String term; + + /** + * 补充调查原因 + */ + private List remark; + + private String remarks; + + /** + * 其他原因 + */ + private String otherRemark; + + /** + * 审核意见 + */ + private String applyContent; + + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java index 3b2e0354..423594cf 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/GuaranteeDetailResponse.java @@ -43,7 +43,7 @@ public class GuaranteeDetailResponse implements Serializable { * 担保详情 */ @ApiModelProperty(value = "担保详细") - private DgGuaranteeAssignUser assignUser; + private DgGuaranteeAssignUserResponse assignUser; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index a990b74a..d696bc31 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -199,9 +199,11 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl() .eq("business_id",assetsInvestigation.getBusinessId()).eq("type",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()); - DgAssetsInvestigation assets = new DgAssetsInvestigation(); - assets.setBusinessId(assetsInvestigation2.getBusinessId()); - assets.setCompanyId(assetsInvestigation2.getCompanyId()); - assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导 - assets.setType(3);//分管领导审核 - assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(assets); + //如果逐级驳回,且资产部经理审核通过,首先查看资产领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", assetsInvestigation2.getBusinessId()).eq("type", 3)); + + if(count>0){//资产领导有数据,则直接修改领导状态 + DgAssetsInvestigation assignUser = new DgAssetsInvestigation(); + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(assignUser,new QueryWrapper() + .eq("business_id",assetsInvestigation2.getBusinessId()).eq("type",3)); + }else { + //如果资产部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 + DgAssetsInvestigation assets = new DgAssetsInvestigation(); + assets.setBusinessId(assetsInvestigation2.getBusinessId()); + assets.setCompanyId(assetsInvestigation2.getCompanyId()); + assets.setRoleId(PromptSuccess.ZC_LD_ID);//资产部分管领导 + assets.setType(3);//分管领导审核 + assets.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + assets.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(assets); + } }else if(approvalAssetsRequest.getStatus()==StatusCode.SP_REVIEWED && dgAssetsInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && assetsInvestigation.getType()==3) {//资产部分管领导审核通过 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果担保部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 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 140b7015..f9ae8af4 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 @@ -28,6 +28,7 @@ import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.RedisUtil; import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.excel.ExcelUtil; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -167,16 +168,29 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() + DgGuaranteeAssignUser assignUser1 = this.baseMapper.selectOne(new QueryWrapper() .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 3)); - guaranteeAssignUser.setAmount(assignUser.getAmount()); - guaranteeAssignUser.setTerm(assignUser.getTerm()); + guaranteeAssignUser.setAmount(assignUser1.getAmount()); + guaranteeAssignUser.setTerm(assignUser1.getTerm()); + DgGuaranteeAssignUserResponse assignUser = new DgGuaranteeAssignUserResponse(); + BeanUtils.copyProperties(guaranteeAssignUser,assignUser); + assignUser.setRemarks(assignUser1.getRemark()); + + String remarks = assignUser1.getRemark(); + if(remarks != null){ + if (remarks.length() > 0) { + String a = remarks.substring(1, remarks.length() - 1); + String arry[] = a.split(","); + List demoList = Arrays.asList(arry); + assignUser.setRemark(demoList); + } + } GuaranteeDetailResponse guaranteeDetailResponse = new GuaranteeDetailResponse(); guaranteeDetailResponse.setDgApplyAmountInfo(dgApplyAmountInfo); guaranteeDetailResponse.setDgEnclosureInfo(dgEnclosureInfo); guaranteeDetailResponse.setLinkedHashMap(linkedList); - guaranteeDetailResponse.setAssignUser(guaranteeAssignUser); + guaranteeDetailResponse.setAssignUser(assignUser); return guaranteeDetailResponse; } @@ -194,7 +208,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId()) @@ -219,15 +233,15 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId())); dgEnclosureInfo.setOtherFile(dgEnclosureInfo1.getOtherFile());//其他附件 + dgEnclosureInfo.setCompanyCredit(dgEnclosureInfo1.getCompanyCredit());//企业信用报告 + dgEnclosureInfo.setCreditReport(dgEnclosureInfo1.getCreditReport()); + dgEnclosureInfo.setCertificateAuthorization(dgEnclosureInfo1.getCertificateAuthorization()); + dgEnclosureInfo.setTaxCertificate(dgEnclosureInfo1.getTaxCertificate()); + dgEnclosureInfo.setAssessmentReport(dgEnclosureInfo1.getAssessmentReport()); //根据业务id删除对应的附件信息 dgEnclosureInfoMapper.delete(new QueryWrapper().eq("business_id", guaranteeAssignUser.getBusinessId())); @@ -360,10 +379,11 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl() .eq("business_id", guaranteeUser.getBusinessId()).eq("type", 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()); - DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); - assignUser.setBusinessId(guaranteeAssignUser.getBusinessId()); - assignUser.setCompanyId(guaranteeAssignUser.getCompanyId()); - assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导 - assignUser.setType(4);//分管领导审核 - assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(assignUser); + //如果逐级驳回,且担保部经理审核通过,首先查看担保领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", guaranteeAssignUser.getBusinessId()).eq("type", 4)); + + if(count>0){//担保领导有数据,则直接修改领导状态 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(assignUser,new QueryWrapper() + .eq("business_id",guaranteeAssignUser.getBusinessId()).eq("type",4)); + }else{ + //如果担保部经理审核通过,则往担保部分管领导处加一条记录,由分管领导审核 + DgGuaranteeAssignUser assignUser = new DgGuaranteeAssignUser(); + assignUser.setBusinessId(guaranteeAssignUser.getBusinessId()); + assignUser.setCompanyId(guaranteeAssignUser.getCompanyId()); + assignUser.setRoleId(PromptSuccess.DB_LD_ID);//担保部分管领导 + assignUser.setType(4);//分管领导审核 + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(assignUser); + } } else if (approvalGuaranteeRequest.getStatus() == StatusCode.SP_REVIEWED && dgGuaranteeAssignUser.getOperatingStatus() == StatusCode.CZ_PROCESSED && guaranteeUser.getType() == 4) {//担保部领导审核通过 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 @@ -583,6 +615,10 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); @@ -168,13 +172,25 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ + //获取之前指定的a角用户 + QueryWrapper wrapperA = new QueryWrapper<>(); + wrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); + DgGuaranteeAssignUser dgGuaranteeAssignUserA = guaranteeAssignUserMapper.selectOne(wrapperA); + Integer userA = dgGuaranteeAssignUserA.getEmpId(); //添加a角 DgGuaranteeLetterAssignUser guaranteeLetterUser = new DgGuaranteeLetterAssignUser(); guaranteeLetterUser.setRoleId(PromptSuccess.DB_A_ID); + guaranteeLetterUser.setUserId(userA); guaranteeLetterUser.setBusinessId(businessId); guaranteeLetterUser.setCompanyId(companyId); baseMapper.insert(guaranteeLetterUser); + //获取之前指定的a角用户 + QueryWrapper wrapperB = new QueryWrapper<>(); + wrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); + DgGuaranteeAssignUser dgGuaranteeAssignUserB = guaranteeAssignUserMapper.selectOne(wrapperB); + Integer userB = dgGuaranteeAssignUserB.getEmpId(); //添加b角 + guaranteeLetterUser.setUserId(userB); guaranteeLetterUser.setRoleId(PromptSuccess.DB_B_ID); int insert = baseMapper.insert(guaranteeLetterUser); //更新成功,返回操作结果 @@ -184,13 +200,14 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapper); //操作用户为当前用户 guaranteeLetterAssignUser.setUserId(currentUser); + guaranteeLetterAssignUser.setStatus(StatusCode.SP_IN_REVIEW); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); //根据当前用户更新审核状态和操作状态及审核意见 @@ -220,18 +237,21 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl guaranteeLetterAssignUserQueryWrapperZc = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapperZc.eq("business_id",businessId).eq("role_id",PromptSuccess.ZC_JL_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserZc = baseMapper.selectOne(guaranteeLetterAssignUserQueryWrapperZc); - dgGuaranteeLetterAssignUserZc.setStatus(StatusCode.SP_IN_REVIEW); - dgGuaranteeLetterAssignUserZc.setOperatingStatus(StatusCode.CZ_ON_HAND); - //清空上次的审批意见 - dgGuaranteeLetterAssignUserZc.setAuditOpinion(""); - int update = baseMapper.updateById(dgGuaranteeLetterAssignUserZc); + //查询为空不作操作 + if (dgGuaranteeLetterAssignUserZc!=null){ + dgGuaranteeLetterAssignUserZc.setStatus(StatusCode.SP_IN_REVIEW); + dgGuaranteeLetterAssignUserZc.setOperatingStatus(StatusCode.CZ_ON_HAND); + //清空上次的审批意见 + dgGuaranteeLetterAssignUserZc.setAuditOpinion(""); + baseMapper.updateById(dgGuaranteeLetterAssignUserZc); + } //更新成功,返回操作结果 log.info(update > 0 ? "驳回后法规部经理成功生成担保函" : "驳回后法规部经理生成担保函失败"); return update > 0; @@ -286,6 +306,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperUser = new QueryWrapper<>(); queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); - guaranteeLetterAssignUser.setUserId(currentUser); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); //获取公司id @@ -540,7 +560,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperUser = new QueryWrapper<>(); queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); - guaranteeLetterAssignUser.setUserId(currentUser); guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); @@ -589,7 +608,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperUser = new QueryWrapper<>(); queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); - guaranteeLetterAssignUser.setUserId(currentUser); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); //获取公司id @@ -671,7 +689,6 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapperUser = new QueryWrapper<>(); queryWrapperUser.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); DgGuaranteeLetterAssignUser guaranteeLetterAssignUser = baseMapper.selectOne(queryWrapperUser); - guaranteeLetterAssignUser.setUserId(currentUser); guaranteeLetterAssignUser.setStatus(StatusCode.SP_REJECT); guaranteeLetterAssignUser.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); 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 91c396c6..ccb15db8 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 @@ -339,18 +339,30 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl() .eq("business_id",messageInvestigation.getBusinessId()).eq("type",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()); - DgMessageInvestigation message = new DgMessageInvestigation(); - message.setBusinessId(messageInvestigation2.getBusinessId()); - message.setCompanyId(messageInvestigation2.getCompanyId()); - message.setRoleId(PromptSuccess.XX_LD_ID);//担保部分管领导 - message.setType(3);//分管领导审核 - message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 - message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 - this.baseMapper.insert(message); + //如果逐级驳回,且资产部经理审核通过,首先查看资产领导是否有数据,如果有数据,则修改不新增 + Integer count = this.baseMapper.selectCount(new QueryWrapper() + .eq("business_id", messageInvestigation2.getBusinessId()).eq("type", 3)); + + if(count>0){//资产领导有数据,则直接修改领导状态 + DgMessageInvestigation assignUser = new DgMessageInvestigation(); + assignUser.setStatus(StatusCode.SP_IN_REVIEW);//审批状态为审核中 + assignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + this.baseMapper.update(assignUser,new QueryWrapper() + .eq("business_id",messageInvestigation2.getBusinessId()).eq("type",3)); + }else { + //如果信息部经理审核通过,则往信息部分管领导处加一条记录,由分管领导审核 + DgMessageInvestigation message = new DgMessageInvestigation(); + message.setBusinessId(messageInvestigation2.getBusinessId()); + message.setCompanyId(messageInvestigation2.getCompanyId()); + message.setRoleId(PromptSuccess.XX_LD_ID);//担保部分管领导 + message.setType(3);//分管领导审核 + message.setStatus(StatusCode.SP_IN_REVIEW);//审批状态设置为审核中 + message.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态设置为待处理 + this.baseMapper.insert(message); + } }else if(approvalMessageRequest.getStatus()==StatusCode.SP_REVIEWED && dgMessageInvestigation.getOperatingStatus()==StatusCode.CZ_PROCESSED && messageInvestigation.getType()==3) {//信息部领导审核通过 //如果信息部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java index 4477d338..bd5e98d5 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgPaymentConfirmationConsiderServiceImpl.java @@ -1,6 +1,7 @@ package com.daqing.financial.guarantee.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; @@ -269,7 +270,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperCwb = new QueryWrapper<>(); queryWrapperCwb.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); - DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapper); + DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapperCwb); paymentConfirmationConsiderCwb.setStatus(StatusCode.SP_REVIEWED); baseMapper.updateById(paymentConfirmationConsiderCwb); @@ -301,7 +302,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperCwb = new QueryWrapper<>(); queryWrapperCwb.eq("business_id",businessId).eq("role_id", PromptSuccess.CWB_ID); - DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapper); + DgPaymentConfirmationConsider paymentConfirmationConsiderCwb = baseMapper.selectOne(queryWrapperCwb); paymentConfirmationConsiderCwb.setStatus(StatusCode.SP_REVIEWED); baseMapper.updateById(paymentConfirmationConsiderCwb); diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml index 74723a99..5667b1b7 100644 --- a/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml +++ b/dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml @@ -605,7 +605,7 @@