修改送达功能

This commit is contained in:
qitz
2024-02-19 10:19:12 +08:00
parent 54dea94f6a
commit 784f7c0675
@@ -521,8 +521,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
} }
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public AjaxResult msCaseFile(List<Long> ids) { public AjaxResult msCaseFile(List<Long> ids){
try { try {
for (Long id : ids) { for (Long id : ids) {
MsCaseApplication caseApplication1 = msCaseApplicationMapper.selectByPrimaryKey(id); MsCaseApplication caseApplication1 = msCaseApplicationMapper.selectByPrimaryKey(id);
@@ -614,9 +614,16 @@ public class MsSignSealServiceImpl implements MsSignSealService {
String appEmail = ""; String appEmail = "";
String resEmail = ""; String resEmail = "";
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id); MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
appEmail = caseAffiliate.getAgentEmail();
resEmail = caseAffiliate.getRespondentEmail();
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
if(organizeFlag!=null){
if(organizeFlag.intValue()==1){
appEmail = caseAffiliate.getAgentEmail();
}else {
appEmail = caseAffiliate.getApplicationEmail();
}
}
resEmail = caseAffiliate.getRespondentEmail();
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList); boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
// SendMailRecord sendMailRecord = new SendMailRecord(); // SendMailRecord sendMailRecord = new SendMailRecord();
@@ -657,14 +664,14 @@ public class MsSignSealServiceImpl implements MsSignSealService {
throw new ServiceException("申请人调解书发送失败"); throw new ServiceException("申请人调解书发送失败");
} }
if(!resEmailFlag){ if(!resEmailFlag){
throw new ServiceException("被申请人调解书送失败"); throw new ServiceException("被申请人调解书发送失败");
} }
CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档"); CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
} }
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(e.getMessage()); throw new ServiceException("调解书发送失败");
} }
return AjaxResult.success("归档成功"); return AjaxResult.success("归档成功");
@@ -925,7 +932,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
if (file != null && file.exists()) { if (file != null && file.exists()) {
try { try {
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的调解书", fileList, null); Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的调解书在附件中请查阅", "签署后的调解书", fileList, null);
if (aBoolean) { if (aBoolean) {
return Boolean.TRUE; return Boolean.TRUE;