hejinbo 2 лет назад
Родитель
Сommit
b18075b0c4

+ 3
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Просмотреть файл

@@ -296,9 +296,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
296 296
             String month = String.format("%02d", now.getMonthValue());
297 297
             String day = String.format("%02d", now.getDayOfMonth());
298 298
             String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
299
-            //String modalFilePath = "D:/develop/新裁决书模板.docx";
299
+           // String modalFilePath = "D:/develop/新裁决书模板.docx";
300 300
             String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
301
-            //String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
301
+           // String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
302 302
             String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
303 303
             String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
304 304
             String resultFilePath = saveFolderPath + "/" + fileName;
@@ -729,7 +729,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
729 729
             //财产保全
730 730
             Integer properPreser = caseApplication1.getProperPreser();
731 731
             String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
732
-                    "第二十八条之规定,将该申请提交至XXX市XXX区法院。";
732
+                    "第二十八条之规定,将该申请提交至法院。";
733 733
             if (properPreser == null) {
734 734
                 datas.put("preservation", null);
735 735
             } else if (properPreser == 1) {

+ 39
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import cn.hutool.core.collection.CollectionUtil;
4
+import com.deepoove.poi.data.PictureRenderData;
4 5
 import com.ruoyi.common.constant.CaseApplicationConstants;
5 6
 import com.ruoyi.common.core.domain.AjaxResult;
6 7
 import com.ruoyi.common.core.redis.RedisCache;
@@ -8,6 +9,7 @@ import com.ruoyi.common.utils.WordUtil;
8 9
 import com.ruoyi.wisdomarbitrate.domain.*;
9 10
 import com.ruoyi.wisdomarbitrate.mapper.*;
10 11
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
12
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
11 13
 import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
12 14
 import com.ruoyi.common.utils.SmsUtils;
13 15
 import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
@@ -28,6 +30,7 @@ import java.time.LocalDate;
28 30
 import java.time.ZoneId;
29 31
 import java.util.*;
30 32
 import java.util.function.Function;
33
+import java.util.regex.Pattern;
31 34
 import java.util.stream.Collectors;
32 35
 
33 36
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -50,6 +53,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
50 53
     private IAdjudicationService adjudicationService;
51 54
     @Autowired
52 55
     private RedisCache redisCache;
56
+    @Autowired
57
+    private ICaseApplicationService caseApplicationService;
53 58
 
54 59
     @Override
55 60
     @Transactional
@@ -346,7 +351,12 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
346 351
                     } else if (identityType == 2) {  //被申请人
347 352
                         datas.put("resName", affiliate.getName());
348 353
                         datas.put("resAddress", affiliate.getResidenAffili());
349
-                        datas.put("resSex", affiliate.getResponSex());
354
+                        String responSex = affiliate.getResponSex();
355
+                        if (responSex.equals("0")) {
356
+                            datas.put("resSex", "男");
357
+                        } else {
358
+                            datas.put("resSex", "女");
359
+                        }
350 360
                         Date responBirth = affiliate.getResponBirth();
351 361
                         if (responBirth != null) {
352 362
                             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -495,10 +505,34 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
495 505
             }
496 506
             datas.put("claims", caseApplication1.getArbitratClaims());
497 507
             datas.put("request", caseApplication1.getRequestRule());
498
-            //申请人证据材料
499
-            datas.put("appEvidenceMaterial", null);
500
-            //被申请人证据材料
501
-            datas.put("resEvidenceMaterial", null);
508
+            CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
509
+            List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
510
+            if (caseAttachList1 != null && caseAttachList1.size() > 0) {
511
+                for (CaseAttach caseAttach : caseAttachList1) {
512
+                    if (caseAttach.getAnnexType() == 6) {   //被申请人证据材料
513
+                        String annexName = caseAttach.getAnnexName();
514
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
515
+                        if (isImageFile) {
516
+                            String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
517
+                            System.out.println("路径是===========" + annexPath);
518
+                            PictureRenderData pictureRenderData = WordUtil
519
+                                    .rebuildImageContent(100, 100, null, annexPath);
520
+                            datas.put("resEvidenceMaterial", pictureRenderData);
521
+                        }
522
+                    } else if (caseAttach.getAnnexType() == 2) {   //申请人证据材料
523
+                        String annexName = caseAttach.getAnnexName();
524
+                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
525
+                        if (isImageFile) {
526
+                            String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
527
+                            System.out.println("路径是===========" + annexPath);
528
+                            PictureRenderData pictureRenderData = WordUtil
529
+                                    .rebuildImageContent(100, 100, null, annexPath);
530
+                            //申请人证据材料
531
+                            datas.put("appEvidenceMaterial", pictureRenderData);
532
+                        }
533
+                    }
534
+                }
535
+            }
502 536
             datas.put("applicaCrossOpin", caseApplication1.getApplicaCrossOpin());
503 537
             if (arbitrateRecord1 != null) {
504 538
                 datas.put("factDetermi", arbitrateRecord1.getFactDetermi());