From 784f7c0675c8e6a8aa37461649c16b208b88e11b Mon Sep 17 00:00:00 2001 From: qitz <18810291185@163.com> Date: Mon, 19 Feb 2024 10:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=81=E8=BE=BE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mscase/impl/MsSignSealServiceImpl.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) 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 fe2011f..86c25cd 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 @@ -521,8 +521,8 @@ public class MsSignSealServiceImpl implements MsSignSealService { } @Override - @Transactional - public AjaxResult msCaseFile(List ids) { + @Transactional(rollbackFor = Exception.class) + public AjaxResult msCaseFile(List ids){ try { for (Long id : ids) { MsCaseApplication caseApplication1 = msCaseApplicationMapper.selectByPrimaryKey(id); @@ -614,9 +614,16 @@ public class MsSignSealServiceImpl implements MsSignSealService { String appEmail = ""; String resEmail = ""; 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); // SendMailRecord sendMailRecord = new SendMailRecord(); @@ -657,14 +664,14 @@ public class MsSignSealServiceImpl implements MsSignSealService { throw new ServiceException("申请人调解书发送失败"); } if(!resEmailFlag){ - throw new ServiceException("被申请人调解书送失败"); + throw new ServiceException("被申请人调解书发送失败"); } - CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档"); } + } catch (Exception e) { - return AjaxResult.error(e.getMessage()); + throw new ServiceException("调解书发送失败"); } return AjaxResult.success("归档成功"); @@ -925,7 +932,7 @@ public class MsSignSealServiceImpl implements MsSignSealService { if (file != null && file.exists()) { try { - Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的调解书", fileList, null); + Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的调解书在附件中请查阅", "签署后的调解书", fileList, null); if (aBoolean) { return Boolean.TRUE; -- 2.54.0