Sfoglia il codice sorgente

优化送达失败的提示语

wangqiong 2 anni fa
parent
commit
064b88a86a

+ 19
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Vedi File

@@ -163,7 +163,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
163 163
                 return AjaxResult.error("未找到该模板");
164 164
             }
165 165
 
166
-            // todo 部署放开
166
+            // 部署放开
167 167
             if (templatePath != null) {
168 168
                 templatePath = "/home/ruoyi/" + templatePath;
169 169
             }
@@ -764,9 +764,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
764 764
             return AjaxResult.error("未查询到相关案件");
765 765
         }
766 766
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
767
+        Boolean isExistPdf = false;
767 768
         if (caseAttachList != null && caseAttachList.size() > 0) {
768 769
             for (CaseAttach caseAttach : caseAttachList) {
769 770
                 if (caseAttach.getAnnexType() == 3) {
771
+                    isExistPdf = true;
770 772
                     String annexName = caseAttach.getAnnexName();
771 773
                     String prefix = "/profile/upload/";
772 774
                     int startIndex = prefix.length();
@@ -774,8 +776,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
774 776
                     File file = new File(path);
775 777
                     //判断文件是否存在
776 778
                     if (!file.exists()) {
777
-//                        return AjaxResult.error("未生成裁决书");
778
-                        //若不存在则从e签宝下载PDF文件
779
+                        isExistPdf = false;
780
+                        //若不存在裁决书则从e签宝下载PDF文件
779 781
                         try {
780 782
                             SealSignRecord sealSignRecord = new SealSignRecord();
781 783
                             sealSignRecord.setCaseAppliId(caseApplication.getId());
@@ -789,18 +791,26 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
789 791
                                 List<CaseAttach> caseAttachList1 = caseAttachMapper.queryCaseAttachList(caseApplication1);
790 792
                                 for (CaseAttach caseAttach1 : caseAttachList1) {
791 793
                                     if (caseAttach1.getAnnexType() == 3) {
792
-                                        annexName = caseAttach.getAnnexName();
794
+                                        isExistPdf = true;
795
+                                        annexName = caseAttach1.getAnnexName();
793 796
                                         prefix = "/profile/upload/";
794 797
                                         startIndex = prefix.length();
795
-                                        path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
798
+                                        path = caseAttach1.getAnnexPath() + annexName.substring(startIndex);
796 799
                                         File file1 = new File(path);
797 800
                                         if (!file1.exists()) {
798
-                                            return AjaxResult.error("未生成裁决书");
801
+                                            isExistPdf = false;
799 802
                                         }
803
+                                        annexName = null;
804
+                                        prefix = null;
805
+                                        path = null;
800 806
                                         caseAttachList = caseAttachList1;
801 807
                                         break;
802 808
                                     }
803 809
                                 }
810
+                                //若附件中没有裁决书PDF文件则终止
811
+                                if (!isExistPdf) {
812
+                                    return AjaxResult.error("未找到签名后的裁决书");
813
+                                }
804 814
                             }
805 815
                         } catch (Exception e) {
806 816
                             e.printStackTrace();
@@ -811,6 +821,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
811 821
                 }
812 822
             }
813 823
         }
824
+        if (!isExistPdf) {
825
+            return AjaxResult.error("未找到签名后的裁决书");
826
+        }
814 827
         //修改案件状态
815 828
         caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
816 829
         caseApplicationMapper.submitCaseApplication(caseApplication1);