From 59fe81347beb1f16844defcf4d621ac710ea85a5 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Thu, 17 Dec 2020 14:51:56 +0800 Subject: [PATCH 1/6] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoController.java | 3 - .../DgGuaranteeAssignUserResponse.java | 101 ++++++++++++++++++ .../response/GuaranteeDetailResponse.java | 2 +- .../impl/DgApplyAmountInfoServiceImpl.java | 8 +- .../DgGuaranteeAssignUserServiceImpl.java | 37 +++++-- 5 files changed, 135 insertions(+), 16 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/DgGuaranteeAssignUserResponse.java 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/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() + 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; } @@ -221,7 +235,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl Date: Thu, 17 Dec 2020 15:02:01 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gGuaranteeLetterAssignUserServiceImpl.java | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index 3d554f11..1fc5bb7d 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.financial.guarantee.controller.DgApplyAmountInfoController; +import com.daqing.financial.guarantee.mapper.DgGuaranteeAssignUserMapper; import com.daqing.financial.guarantee.mapper.DgGuaranteeLetterAssignUserMapper; import com.daqing.financial.guarantee.mapper.DgLoanCommitteeConsiderMapper; import com.daqing.financial.guarantee.mapper.DgPaymentConfirmationConsiderMapper; @@ -14,6 +15,7 @@ import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResp import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.daqing.financial.guarantee.util.AuditProcessUtil; +import com.daqing.framework.domain.guarantee.DgGuaranteeAssignUser; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; import com.daqing.framework.domain.guarantee.DgLoanCommitteeConsider; import com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider; @@ -55,6 +57,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl 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,7 +200,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); @@ -220,18 +236,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; @@ -459,7 +478,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.setOperatingStatus(StatusCode.CZ_PROCESSED); guaranteeLetterAssignUser.setAuditOpinion(auditOpinion); //获取公司id @@ -540,7 +558,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 +606,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 +687,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); From 5b31b236263ad9141799737ebab55fdb05f3f4a5 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 17 Dec 2020 20:30:19 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgGuaranteeLetterAssignUserController.java | 5 ++++- .../guarantee/controller/DgLoanNoticeController.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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); From 14d7894e5a256132c35ff3ec681c7fd9dc5029ff Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 18 Dec 2020 09:36:49 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DgGuaranteeLetterAssignUserServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index 1fc5bb7d..69046448 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -207,6 +207,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl Date: Fri, 18 Dec 2020 10:50:42 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E3=80=82=E3=80=82?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DgGuaranteeLetterAssignUserServiceImpl.java | 1 + .../impl/DgPaymentConfirmationConsiderServiceImpl.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java index 69046448..8c00f813 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java @@ -306,6 +306,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl 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); From 090369a9e42fd3d9399a3ebcbd4e18a4f0d26da1 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 18 Dec 2020 11:02:28 +0800 Subject: [PATCH 6/6] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgAssetsInvestigationServiceImpl.java | 30 ++++++++++---- .../DgGuaranteeAssignUserServiceImpl.java | 41 +++++++++++++------ .../DgMessageInvestigationServiceImpl.java | 30 ++++++++++---- .../resources/mapper/hrms/EmployeeDao.xml | 4 +- 4 files changed, 73 insertions(+), 32 deletions(-) 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 c7a9e66b..8ef88598 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 @@ -355,18 +355,30 @@ public class DgAssetsInvestigationServiceImpl 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 18f0d69b..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 @@ -208,7 +208,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl().eq("business_id", guaranteeAssignUser.getBusinessId()) @@ -233,7 +233,7 @@ 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())); @@ -443,18 +448,30 @@ 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) {//担保部领导审核通过 //如果担保部分管领导审核通过,同时判断资产部分管领导审核以及信息部分管领导审核是否通过,如果通过就往合规调查中插入一条数据 //如果信息部领导审核通过,则该子业务流程下的所有审批状态都为已审核状态 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-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 @@