Преглед изворни кода

Merge branch 'qtz1' of SH-Arbitrate/Mediation-Backend into dev

qtz пре 2 година
родитељ
комит
39c7bb43bd

+ 15
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Прегледај датотеку

521
     }
521
     }
522
 
522
 
523
     @Override
523
     @Override
524
-    @Transactional
525
-    public AjaxResult msCaseFile(List<Long> ids) {
524
+    @Transactional(rollbackFor = Exception.class)
525
+    public AjaxResult msCaseFile(List<Long> ids){
526
         try {
526
         try {
527
             for (Long id : ids) {
527
             for (Long id : ids) {
528
                 MsCaseApplication caseApplication1 = msCaseApplicationMapper.selectByPrimaryKey(id);
528
                 MsCaseApplication caseApplication1 = msCaseApplicationMapper.selectByPrimaryKey(id);
614
                 String appEmail = "";
614
                 String appEmail = "";
615
                 String resEmail = "";
615
                 String resEmail = "";
616
                 MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
616
                 MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
617
-                appEmail = caseAffiliate.getAgentEmail();
618
-                resEmail = caseAffiliate.getRespondentEmail();
619
 
617
 
618
+                Integer organizeFlag = caseAffiliate.getOrganizeFlag();
619
+                if(organizeFlag!=null){
620
+                    if(organizeFlag.intValue()==1){
621
+                        appEmail = caseAffiliate.getAgentEmail();
622
+                    }else {
623
+                        appEmail = caseAffiliate.getApplicationEmail();
624
+                    }
625
+                }
626
+                resEmail = caseAffiliate.getRespondentEmail();
620
                 boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
627
                 boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
621
 
628
 
622
 //                SendMailRecord sendMailRecord = new SendMailRecord();
629
 //                SendMailRecord sendMailRecord = new SendMailRecord();
657
                     throw new ServiceException("申请人调解书发送失败");
664
                     throw new ServiceException("申请人调解书发送失败");
658
                 }
665
                 }
659
                 if(!resEmailFlag){
666
                 if(!resEmailFlag){
660
-                    throw new ServiceException("被申请人调解书送失败");
667
+                    throw new ServiceException("被申请人调解书送失败");
661
                 }
668
                 }
662
-
663
                 CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
669
                 CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
664
 
670
 
665
             }
671
             }
672
+
666
         } catch (Exception e) {
673
         } catch (Exception e) {
667
-            return AjaxResult.error(e.getMessage());
674
+            throw new ServiceException("调解书发送失败");
668
         }
675
         }
669
 
676
 
670
         return AjaxResult.success("归档成功");
677
         return AjaxResult.success("归档成功");
925
 
932
 
926
         if (file != null && file.exists()) {
933
         if (file != null && file.exists()) {
927
             try {
934
             try {
928
-                Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的调解书", fileList, null);
935
+                Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的调解书在附件中请查阅", "签署后的调解书", fileList, null);
929
 
936
 
930
                 if (aBoolean) {
937
                 if (aBoolean) {
931
                     return Boolean.TRUE;
938
                     return Boolean.TRUE;