From 6314a583b9dc5f1c324311374d1be2b17444e32e Mon Sep 17 00:00:00 2001 From: 18792927508 <1322446236@qq.com> Date: Mon, 8 Apr 2024 15:46:26 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/utils/SmsUtils.java | 2 +- .../vo/mscase/MsCaseApplicationReq.java | 2 +- .../impl/MsCaseApplicationServiceImpl.java | 50 ++++++++++++------- .../mscase/impl/MsSignSealServiceImpl.java | 20 +++++++- 4 files changed, 51 insertions(+), 23 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java index 18f3771..c89b03b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SmsUtils.java @@ -59,7 +59,7 @@ public class SmsUtils { } public static JSONObject sendSms(Long caseId,String templateId,String phone,String[] templateParamSet) { JSONObject jsonObject = new JSONObject(); - SmsUtils1.SendSmsRequest request = new SmsUtils1.SendSmsRequest(phone,templateId,templateParamSet,caseId); + SendSmsRequest request = new SendSmsRequest(phone,templateId,templateParamSet,caseId); Credential cred = new Credential(SECRET_ID, SECRET_KEY ); SmsClient client = new SmsClient(cred, "ap-guangzhou"); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java index 8129d65..db8600d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java @@ -124,5 +124,5 @@ public class MsCaseApplicationReq { * 是否需要用印,0-不需要,1-需要 */ // todo 等会放开 - private Integer sealFlag=0; + private Integer sealFlag=1; } \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java index 92f4ebd..097882e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java @@ -280,50 +280,62 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService { StringBuilder applicantName = new StringBuilder(); StringBuilder respondentName = new StringBuilder(); for (MsCaseAffiliate affiliate : affiliates) { - // 当前用户是操作人 - if(affiliate.getUserId()!=null && affiliate.getUserId().equals(loginUserId) - && affiliate.getRoleType()!=null && affiliate.getOperatorFlag()!=null && affiliate.getOperatorFlag()==1) { - if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType()==1 || affiliate.getRoleType()==2)) { - // 设置申请操作人标记 - vo.setAppOperatorFlag(1); - } - if (vo.getResOperatorFlag() == null && (affiliate.getRoleType()==3 || affiliate.getRoleType()==4)) { - // 设置被申请操作人标记 - vo.setResOperatorFlag(1); + // 当前用户是操作人 + if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) { + if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 2)) { + // 申请人操作人 + if(affiliate.getUserId().equals(loginUserId) &&!vo.getCaseStatusName().equals("待签名")){ + vo.setAppOperatorFlag(1); + }else if(vo.getCaseStatusName().equals("待签名")) { + if(affiliate.getUserId().equals(loginUserId)){ + vo.setAppOperatorFlag(1); + }else { + vo.setAppOperatorFlag(0); + } + } + } + if (vo.getResOperatorFlag() == null && (affiliate.getRoleType() == 3 || affiliate.getRoleType() == 4)) { + // 申请人操作人 + if(Objects.equals(affiliate.getUserId(), loginUserId) &&!vo.getCaseStatusName().equals("待签名")){ + vo.setResOperatorFlag(1); + }else if(vo.getCaseStatusName().equals("待签名")) { + if(Objects.equals(affiliate.getUserId(), loginUserId)){ + vo.setResOperatorFlag(1); + }else { + vo.setResOperatorFlag(0); + } + } + + } } - } if(vo.getOrganizeFlag()==null || vo.getOrganizeFlag()!=1) { if (StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("申请人") && affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getName()) - && !applicantName.toString().contains(affiliate.getName())) { + && !applicantName.toString().contains(affiliate.getName()+Constants.CN_SPLIT_COMMA)) { applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA); } }else { // 组织机构 if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName()) - && !applicantName.toString().contains(affiliate.getApplicantOrgName())) { + && !applicantName.toString().contains(affiliate.getApplicantOrgName()+Constants.CN_SPLIT_COMMA)) { applicantName.append(affiliate.getApplicantOrgName()).append(Constants.CN_SPLIT_COMMA); } } if(vo.getOrganizeFlag()==null || vo.getOrganizeFlag()!=1) { if (StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人") && affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getName()) - && !respondentName.toString().contains(affiliate.getName())) { + && !respondentName.toString().contains(affiliate.getName()+Constants.CN_SPLIT_COMMA)) { respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA); } }else { // 组织机构 - if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())&& !respondentName.toString().contains(affiliate.getApplicantOrgName())) { + if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())&& !respondentName.toString().contains(affiliate.getApplicantOrgName()+Constants.CN_SPLIT_COMMA)) { respondentName.append(affiliate.getApplicantOrgName()).append(Constants.CN_SPLIT_COMMA); } } -// if(StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人") -// && affiliate.getRoleType()!=null && affiliate.getRoleType()==3&&StrUtil.isNotEmpty(affiliate.getName())){ -// respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA); -// } } vo.setApplicationName(removeLastComma(applicantName.toString(),Constants.CN_SPLIT_COMMA)); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java index 93f19d8..ef9eb6a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java @@ -767,7 +767,15 @@ public class MsSignSealServiceImpl implements MsSignSealService { if(signStatusApply!=null&&signStatusApply.intValue()==1&& signStatusMediator!=null&&signStatusMediator.intValue()==1){ // 根据流程id查找下一个流程节点 - MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue()); + // 根据流程id查找下一个流程节点 + MsCaseFlow nextFlow=null; + if(caseApplicationselect.getSealFlag()!=null&&caseApplicationselect.getSealFlag()==1) { + // 需要用印 + nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue()); + }else { + // 不需要用印 + nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue()); + } MsCaseApplication application = new MsCaseApplication(); application.setId(caseApplicationselect.getId()); application.setCaseFlowId(nextFlow.getId()); @@ -801,7 +809,15 @@ public class MsSignSealServiceImpl implements MsSignSealService { if(signStatusApply!=null&&signStatusApply.intValue()==1&& signStatusResponse!=null&&signStatusResponse.intValue()==1){ // 根据流程id查找下一个流程节点 - MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue()); + // 根据流程id查找下一个流程节点 + MsCaseFlow nextFlow=null; + if(caseApplicationselect.getSealFlag()!=null&&caseApplicationselect.getSealFlag()==1) { + // 需要用印 + nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue()); + }else { + // 不需要用印 + nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue()); + } MsCaseApplication application = new MsCaseApplication(); application.setId(caseApplicationselect.getId()); application.setCaseFlowId(nextFlow.getId()); -- 2.54.0