From e39c8ffe30ee6b5901d1f872bd7d2ecde5d35639 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Fri, 18 Dec 2020 16:26:06 +0800 Subject: [PATCH] =?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 --- ...DgGuaranteeLetterAssignUserController.java | 7 +++++ .../controller/DgLoanNoticeController.java | 7 +++++ ...PaymentConfirmationConsiderController.java | 7 +++++ .../impl/DgApplyAmountInfoServiceImpl.java | 6 ++-- .../DgAssetsInvestigationServiceImpl.java | 4 +-- .../DgComplianceInvestigationServiceImpl.java | 24 +++++++------- .../DgGuaranteeAssignUserServiceImpl.java | 6 ++-- ...gGuaranteeLetterAssignUserServiceImpl.java | 31 ++++++++++--------- .../DgLoanCommitteeConsiderServiceImpl.java | 6 ++-- .../service/impl/DgLoanNoticeServiceImpl.java | 4 +-- .../DgMessageInvestigationServiceImpl.java | 4 +-- ...aymentConfirmationConsiderServiceImpl.java | 18 +++++------ .../DgWorkConferenceConsiderServiceImpl.java | 8 ++--- .../guarantee/util/AuditProcessUtil.java | 5 ++- .../domain/guarantee/DgAuditProcess.java | 9 ++++++ .../domain/hrms/response/HrmsCode.java | 2 ++ 16 files changed, 92 insertions(+), 56 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 bdf08d5b..58c4031a 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 @@ -6,6 +6,9 @@ import com.daqing.financial.guarantee.model.request.GuaranteeLetterUpdateStatusR import com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse; import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserService; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; +import com.daqing.framework.domain.hrms.response.HrmsCode; +import com.daqing.framework.exception.ExceptionCast; +import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.DateUtil; import com.daqing.framework.utils.PageUtils; @@ -73,6 +76,10 @@ public class DgGuaranteeLetterAssignUserController { public ResponseResult updateStatus( @ApiParam(name = "guaranteeLetterUpdateStatusRequest", value = "更新确认状态请求", required = true) @RequestBody GuaranteeLetterUpdateStatusRequest guaranteeLetterUpdateStatusRequest) { + //如果为驳回操作且无审核意见,抛出异常 + if (StatusCode.SP_REJECT.equals(guaranteeLetterUpdateStatusRequest.getStatus()) && guaranteeLetterUpdateStatusRequest.getAuditOpinion().length()==0){ + ExceptionCast.cast(HrmsCode.EMPTY_OPINION); + } boolean result = guaranteeLetterAssignUserService.updateGuaranteeLetterStatus(guaranteeLetterUpdateStatusRequest); return result ? ResponseResult.SUCCESS("确认成功!"):ResponseResult.FAIL(40005,"确认失败!"); } 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 20404331..41c982bf 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 @@ -8,6 +8,9 @@ import com.daqing.financial.guarantee.service.IDgGuaranteeLetterAssignUserServic import com.daqing.financial.guarantee.service.IDgLoanNoticeService; import com.daqing.financial.guarantee.service.impl.DgGuaranteeLetterAssignUserServiceImpl; import com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser; +import com.daqing.framework.domain.hrms.response.HrmsCode; +import com.daqing.framework.exception.ExceptionCast; +import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.DateUtil; import com.daqing.framework.utils.NumberToCN; @@ -67,6 +70,10 @@ public class DgLoanNoticeController { public ResponseResult updateLoanNotice( @ApiParam(name = "loanNoticeUpdateRequest", value = "更新放款通知请求", required = true) @RequestBody LoanNoticeUpdateRequest loanNoticeUpdateRequest) { + //如果为驳回操作且无审核意见,抛出异常 + if (StatusCode.SP_REJECT.equals(loanNoticeUpdateRequest.getStatus()) && loanNoticeUpdateRequest.getAuditOpinion().length()==0){ + ExceptionCast.cast(HrmsCode.EMPTY_OPINION); + } boolean result = loanNoticeService.updateLoanNotice(loanNoticeUpdateRequest); return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!"); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java index f2cf9131..5ceb9ae3 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgPaymentConfirmationConsiderController.java @@ -5,6 +5,9 @@ import com.daqing.financial.guarantee.model.request.PaymentConfirmationQueryRequ import com.daqing.financial.guarantee.model.request.PaymentConfirmationUpdateRequest; import com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse; import com.daqing.financial.guarantee.service.IDgPaymentConfirmationConsiderService; +import com.daqing.framework.domain.hrms.response.HrmsCode; +import com.daqing.framework.exception.ExceptionCast; +import com.daqing.framework.model.StatusCode; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; import io.swagger.annotations.Api; @@ -58,6 +61,10 @@ public class DgPaymentConfirmationConsiderController { public ResponseResult updatePaymentConfirmation( @ApiParam(name = "paymentConfirmationUpdateRequest", value = "更新回款确认请求", required = true) @RequestBody PaymentConfirmationUpdateRequest paymentConfirmationUpdateRequest) { + //如果为驳回操作且无审核意见,抛出异常 + if (StatusCode.SP_REJECT.equals(paymentConfirmationUpdateRequest.getStatus()) && paymentConfirmationUpdateRequest.getAuditOpinion().length()==0){ + ExceptionCast.cast(HrmsCode.EMPTY_OPINION); + } boolean result = paymentConfirmationConsiderService.updatePaymentConfirmation(paymentConfirmationUpdateRequest); return result ? ResponseResult.SUCCESS("更新成功!"):ResponseResult.FAIL(40005,"更新失败!"); } 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 d696bc31..32a1ed71 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 @@ -202,7 +202,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl guaranteeLetterVO = null; @@ -169,7 +170,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //获取之前指定的a角用户 @@ -214,7 +215,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新a角 @@ -273,7 +274,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //根据业务id查询贷审会数据 @@ -313,7 +314,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -427,7 +428,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -489,7 +490,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "首次a角用户确认担保函更新成功" : "首次a角用户确认担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,"","",""); //更新成功后,判断b角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -506,8 +507,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理添加成功" : "资产部经理添加失败"); + //b用户审核没通过,返回结果 return insert > 0; - //b用户审核没通过,返回结果 }else { return true; } @@ -527,7 +528,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "驳回后a角用户确认担保函更新成功" : "驳回后a角用户确认担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,"","",""); //更新成功后,判断b角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -547,8 +548,8 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "资产部经理更新成功" : "资产部经理更新失败"); - return update > 0; //b用户审核没通过,返回结果 + return update > 0; }else { return true; } @@ -568,7 +569,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "a角用户驳回担保函更新成功" : "a角用户驳回担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派A角",auditOpinion,8,"","",""); //更新成功后,更新b角数据及更新法规部经理数据 if (i > 0){ //更新b用户的审核状态为驳回,操作状态为已处理 @@ -617,7 +618,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "首次b角用户确认担保函更新成功" : "首次b角用户确认担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,"","",""); //更新成功后,判断a角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -656,7 +657,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "驳回后b角用户确认担保函更新成功" : "驳回后b角用户确认担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,"","",""); //更新成功后,判断a角用户是否确认 if (i > 0){ QueryWrapper tempB = new QueryWrapper<>(); @@ -697,7 +698,7 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl 0 ? "b角用户驳回担保函更新成功" : "b角用户驳回担保函更新失败"); //同时往审核流程进程表新增一条记录 String account = DgApplyAmountInfoController.getAccount(); - AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8); + AuditProcessUtil.save(businessId,account,"指派B角",auditOpinion,8,"","",""); //更新成功后,更新a角数据及更新法规部经理数据 if (i > 0){ //更新a用户的审核状态为驳回,操作状态为已处理 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java index fc304d29..6556b219 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanCommitteeConsiderServiceImpl.java @@ -146,7 +146,7 @@ public class DgLoanCommitteeConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper businessProcessStatusQueryWrapper = new QueryWrapper<>(); @@ -142,7 +142,7 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapper = new QueryWrapper<>(); 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..7342c2dd 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 @@ -278,7 +278,7 @@ public class DgMessageInvestigationServiceImpl extends ServiceImpl 0){ @@ -172,7 +172,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper wrapperTemp = new QueryWrapper<>(); @@ -201,7 +201,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ //更新法规部经理数据 @@ -209,7 +209,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl guaranteeLetterAssignUserQueryWrapperFg = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapperFg.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserFg = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperFg); - dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REVIEWED); + dgGuaranteeLetterAssignUserFg.setStatus(StatusCode.SP_REJECT); guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserFg); //更新a角 @@ -217,7 +217,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl guaranteeLetterAssignUserQueryWrapperA = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapperA.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_A_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserA = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperA); - dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REVIEWED); + dgGuaranteeLetterAssignUserA.setStatus(StatusCode.SP_REJECT); guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserA); //更新b角 @@ -225,7 +225,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl guaranteeLetterAssignUserQueryWrapperB = new QueryWrapper<>(); guaranteeLetterAssignUserQueryWrapperB.eq("business_id",businessId).eq("role_id",PromptSuccess.DB_B_ID); DgGuaranteeLetterAssignUser dgGuaranteeLetterAssignUserB = guaranteeLetterAssignUserMapper.selectOne(guaranteeLetterAssignUserQueryWrapperB); - dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); + dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REJECT); guaranteeLetterAssignUserMapper.updateById(dgGuaranteeLetterAssignUserB); QueryWrapper guaranteeLetterAssignUserQueryWrapper = new QueryWrapper<>(); @@ -264,7 +264,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ @@ -297,7 +297,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperCwb = new QueryWrapper<>(); @@ -332,7 +332,7 @@ public class DgPaymentConfirmationConsiderServiceImpl extends ServiceImpl 0){ QueryWrapper queryWrapperT = new QueryWrapper<>(); diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java index a5917a38..12e5d5a2 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgWorkConferenceConsiderServiceImpl.java @@ -155,7 +155,7 @@ public class DgWorkConferenceConsiderServiceImpl extends ServiceImpl 0; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java index 5dde560d..104a86cb 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAuditProcess.java @@ -49,4 +49,13 @@ public class DgAuditProcess implements Serializable { @ApiModelProperty(value = "审批意见") private String auditOpinion; + @ApiModelProperty(value = "驳回原因") + private String reason; + + @ApiModelProperty(value = "申请金额") + private String loanMoney; + + @ApiModelProperty(value = "申请期限") + private String loanTern; + } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java index ad6ee94d..fe84df77 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java @@ -77,6 +77,8 @@ public enum HrmsCode implements ResultCode { ROLE_NAME_EXIST(false,44002,"该角色名称已存在,请重新输入!"), EMP_POSITION_EXSIT(false, 22006, "该职位下已关联员工!"), + EMPTY_OPINION(false, 10000, "请填写审核意见!"), + EMP_SAME(false, 51001, "A,B角不能选同一个人!"), EMP_TO_BE_CHOOSE(false, 51002, "该用户已经被指派!");