Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev
This commit was merged in pull request #148.
This commit is contained in:
+27
-17
@@ -431,9 +431,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
return AjaxResult.error("未找到案件相关人员");
|
||||
}
|
||||
// 申请操作人
|
||||
Optional<MsCaseAffiliate> applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
|
||||
Optional<MsCaseAffiliate> applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
|
||||
// 被申请操作人
|
||||
Optional<MsCaseAffiliate> resAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
|
||||
Optional<MsCaseAffiliate> resAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
|
||||
if (!applicantAffiliateOpt.isPresent() || !resAffiliateOpt.isPresent()) {
|
||||
throw new ServiceException("未找到案件操作人员");
|
||||
}
|
||||
@@ -459,20 +459,6 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sendEmail(caseApplication1, sysUser, "调解系统文件签收", content);
|
||||
}
|
||||
}, executor);
|
||||
CompletableFuture.runAsync(() -> {
|
||||
SysUser sysUser = sysUserMapper.selectUserById(resAffiliateOpt.get().getUserId());
|
||||
MeetingInfoVO meetingInfoVO = MeetingInfoVO.builder().userId(sysUser.getUserId()).userName(sysUser.getUserName()).caseId(caseApplication1.getId()).systemType("TJ").build();
|
||||
String roomUuid = shortMessageService.buildMeetingInfoRecord(meetingInfoVO);
|
||||
if (StrUtil.isNotEmpty(sysUser.getPhonenumber())) {
|
||||
SmsUtils.sendSms(caseApplication1,"2126313", sysUser.getPhonenumber(),new String[]{sysUser.getNickName(),caseApplication1.getCaseNum(),"authId="+ roomUuid});
|
||||
}else if(StrUtil.isNotEmpty(sysUser.getEmail())){
|
||||
String content = "尊敬的"+sysUser.getNickName()+"用户,您的" + caseApplication1.getCaseNum() + "文件已发送至邮箱,请点击链接进行确认签收https://txroom.xayunmei.com/#/sign?" + "authId="+ roomUuid + ",如非本人操作,请忽略本短信";
|
||||
emailOutUtil.sendMessage(sysUser.getEmail(), "调解系统文件签收", content, null, null);
|
||||
sendEmail(caseApplication1, sysUser, "调解系统文件签收", content);
|
||||
}
|
||||
}, executor);
|
||||
|
||||
|
||||
CaseLogUtils.insertCaseLog(caseApplication1.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
|
||||
|
||||
}
|
||||
@@ -496,6 +482,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sendMailRecord.setCreateTime(new Date());
|
||||
sendMailRecord.setMailSubject(subject);
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
sendMailRecord.setCaseNum(application.getCaseNum());
|
||||
if (emailFlag) {
|
||||
sendMailRecord.setSendStatus(1);
|
||||
} else {
|
||||
@@ -529,7 +516,12 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if(CollectionUtil.isEmpty(msCaseAffiliates)){
|
||||
return AjaxResult.error("未找到案件相关人员");
|
||||
}
|
||||
|
||||
// 被申请操作人
|
||||
Optional<MsCaseAffiliate> resAffiliateOpt = msCaseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
|
||||
ExecutorService executor = ThreadUtil.createThreadPool();
|
||||
if(!resAffiliateOpt.isPresent()){
|
||||
return AjaxResult.error("案件相关人员不完整");
|
||||
}
|
||||
for (MsCaseAffiliate affiliate : msCaseAffiliates) {
|
||||
// 申请人签收,根据流程id查找下一个流程节点
|
||||
if(affiliate.getUserId()!=null
|
||||
@@ -540,6 +532,21 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
|
||||
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), null);
|
||||
// 发送被申请人签收短信
|
||||
CompletableFuture.runAsync(() -> {
|
||||
MsCaseAffiliate caseAffiliate = resAffiliateOpt.get();
|
||||
SysUser sysUser = sysUserMapper.selectUserById(caseAffiliate.getUserId());
|
||||
MeetingInfoVO meetingInfoVO = MeetingInfoVO.builder().userId(sysUser.getUserId()).userName(sysUser.getUserName()).caseId(caseApplicationselect.getId()).systemType("TJ").build();
|
||||
String roomUuid = shortMessageService.buildMeetingInfoRecord(meetingInfoVO);
|
||||
if (StrUtil.isNotEmpty(sysUser.getPhonenumber())) {
|
||||
SmsUtils.sendSms(caseApplicationselect, "2126313", sysUser.getPhonenumber(), new String[]{sysUser.getNickName(), caseApplicationselect.getCaseNum(), "authId=" + roomUuid});
|
||||
} else if (StrUtil.isNotEmpty(sysUser.getEmail())) {
|
||||
String content = "尊敬的" + sysUser.getNickName() + "用户,您的" + caseApplicationselect.getCaseNum() + "文件已发送至邮箱,请点击链接进行确认签收https://txroom.xayunmei.com/#/sign?" + "authId=" + roomUuid + ",如非本人操作,请忽略本短信";
|
||||
emailOutUtil.sendMessage(sysUser.getEmail(), "调解系统文件签收", content, null, null);
|
||||
sendEmail(caseApplicationselect, sysUser, "调解系统文件签收", content);
|
||||
}
|
||||
}, executor);
|
||||
break;
|
||||
}
|
||||
|
||||
// 被申请人签收
|
||||
@@ -558,6 +565,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())) {
|
||||
applicationService.pushStatusToBM(caseApplicationselect, PushCaseStatusEnum.SUCCESS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1247,11 +1255,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
}
|
||||
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||
sendMailRecord.setCaseId(caseApplication.getId());
|
||||
sendMailRecord.setCaseNum(caseApplication.getCaseNum());
|
||||
sendMailRecord.setMailAddress(email);
|
||||
sendMailRecord.setMailContent("您好,审核后的调解书在附件中请查阅");
|
||||
sendMailRecord.setMailName("签署后的调解书");
|
||||
sendMailRecord.setSendTime(new Date());
|
||||
sendMailRecord.setMailSubject("签署后的调解书");
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
sendMailRecord.setFileIds(fileId!=null?fileId.toString():null);
|
||||
// sendMailRecord.setCreateBy(SecurityUtils.getUsername());
|
||||
sendMailRecord.setCreateTime(new Date());
|
||||
|
||||
Reference in New Issue
Block a user