|
|
@@ -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());
|