18792927508 2 лет назад
Родитель
Сommit
084c22a00f
45 измененных файлов: 4205 добавлений и 4461 удалений
  1. 20
    28
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
  2. 3
    2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitrateApplicationController.java
  3. 41
    40
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
  4. 17
    17
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
  5. 15
    11
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java
  6. 4
    0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java
  7. 62
    0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  8. 69
    0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  9. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
  10. 13
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
  11. 9
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
  12. 11
    11
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
  13. 20
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  14. 309
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseApplicationDTO.java
  15. 129
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/CaseAffiliateEntity.java
  16. 33
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseAffiliateBase.java
  17. 32
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseAffiliateVO.java
  18. 2
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java
  19. 15
    15
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
  20. 15
    20
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
  21. 1
    6
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java
  22. 2
    5
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java
  23. 61
    14
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
  24. 2
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
  25. 249
    707
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
  26. 70
    77
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java
  27. 1816
    1538
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  28. 47
    385
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
  29. 201
    184
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  30. 38
    109
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java
  31. 31
    23
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseZipImportImpl.java
  32. 2
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/DeptIdentifyServiceImpl.java
  33. 11
    4
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/MsSignSealServiceImpl.java
  34. 27
    48
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java
  35. 2
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java
  36. 19
    1
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  37. 33
    3
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  38. 8
    2
      ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
  39. 1
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitrateRecordMapper.xml
  40. 4
    15
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateLogMapper.xml
  41. 121
    157
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  42. 616
    941
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  43. 0
    75
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml
  44. 11
    11
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml
  45. 6
    3
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml

+ 20
- 28
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Просмотреть файл

45
     /**
45
     /**
46
      * 根据批号查询批量签名链接
46
      * 根据批号查询批量签名链接
47
      */
47
      */
48
-    @PostMapping("/getSignUrlBatch")
49
-    public AjaxResult getSignUrlBatch(@RequestBody StringIdsReq idsReq) {
50
-        if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
51
-            return error("参数校验失败");
52
-        }
53
-        SealSignRecord sealSignRecordselect = adjudicationService.getSignUrlBatch(idsReq);
54
-        return success(sealSignRecordselect);
55
-    }
48
+//    @PostMapping("/getSignUrlBatch")
49
+//    public AjaxResult getSignUrlBatch(@RequestBody StringIdsReq idsReq) {
50
+//        if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
51
+//            return error("参数校验失败");
52
+//        }
53
+//        SealSignRecord sealSignRecordselect = adjudicationService.getSignUrlBatch(idsReq);
54
+//        return success(sealSignRecordselect);
55
+//    }
56
 
56
 
57
     /**
57
     /**
58
      * 根据签署流程id查询批量用印链接
58
      * 根据签署流程id查询批量用印链接
127
         return adjudicationService.batchDocument(caseApplication.getIds());
127
         return adjudicationService.batchDocument(caseApplication.getIds());
128
     }
128
     }
129
 
129
 
130
-    /**
131
-     * 重新生成裁决书
132
-     * @param caseApplication
133
-     * @return
134
-     */
135
-    @PostMapping("/regenerationDocument")
136
-    public AjaxResult regenerationDocument(@Validated @RequestBody CaseApplication caseApplication){
137
-        return adjudicationService.regenerationDocument(caseApplication);
138
-    }
130
+
139
 
131
 
140
     /**
132
     /**
141
      * 裁决书送达(电子邮件)
133
      * 裁决书送达(电子邮件)
152
      * @param caseApplication
144
      * @param caseApplication
153
      * @return
145
      * @return
154
      */
146
      */
155
-    @GetMapping("/logistics")
156
-//    @PreAuthorize("@ss.hasPermi('delivery:detail')")
157
-    public AjaxResult  getLogisticsInfo(CaseApplication caseApplication){
158
-        List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
159
-        return AjaxResult.success(logisticsInfo);
160
-    }
147
+//    @GetMapping("/logistics")
148
+////    @PreAuthorize("@ss.hasPermi('delivery:detail')")
149
+//    public AjaxResult  getLogisticsInfo(CaseApplication caseApplication){
150
+//        List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
151
+//        return AjaxResult.success(logisticsInfo);
152
+//    }
161
 
153
 
162
 
154
 
163
 
155
 
220
      * @param id 案件id
212
      * @param id 案件id
221
      * @return
213
      * @return
222
      */
214
      */
223
-    @GetMapping("/archives")
224
-    public AjaxResult getArchivesDetail(Long id){
225
-
226
-        return adjudicationService.getArchivesDetail(id);
227
-    }
215
+//    @GetMapping("/archives")
216
+//    public AjaxResult getArchivesDetail(Long id){
217
+//
218
+//        return adjudicationService.getArchivesDetail(id);
219
+//    }
228
     /**
220
     /**
229
      * 根据案件id获取邮箱
221
      * 根据案件id获取邮箱
230
      * @param id 案件id
222
      * @param id 案件id

+ 3
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitrateApplicationController.java Просмотреть файл

6
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.utils.CheckSignatuerUtils;
7
 import com.ruoyi.common.utils.CheckSignatuerUtils;
8
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
8
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
9
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
9
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseApplicationVO;
10
 import com.ruoyi.wisdomarbitrate.domain.vo.CaseApplicationVO;
10
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
11
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
11
 import org.springframework.beans.BeanUtils;
12
 import org.springframework.beans.BeanUtils;
32
         String paramsbody = JSONUtil.toJsonStr(caseApplicationVO);
33
         String paramsbody = JSONUtil.toJsonStr(caseApplicationVO);
33
         boolean checkResult= CheckSignatuerUtils.checkSignuter(paramsbody);
34
         boolean checkResult= CheckSignatuerUtils.checkSignuter(paramsbody);
34
         if(checkResult){
35
         if(checkResult){
35
-            CaseApplication caseApplication = new CaseApplication();
36
+            CaseApplicationDTO caseApplication = new CaseApplicationDTO();
36
             BeanUtils.copyProperties(caseApplicationVO,caseApplication);
37
             BeanUtils.copyProperties(caseApplicationVO,caseApplication);
37
             caseApplication.setCreateBy(getUsername());
38
             caseApplication.setCreateBy(getUsername());
38
-            return toAjax(caseApplicationService.insertcaseApplication1(caseApplication));
39
+            return caseApplicationService.insertOrUpdate(caseApplication);
39
         }else {
40
         }else {
40
             return AjaxResult.error("签名验证失败");
41
             return AjaxResult.error("签名验证失败");
41
         }
42
         }

+ 41
- 40
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Просмотреть файл

12
 import com.ruoyi.common.utils.StringUtils;
12
 import com.ruoyi.common.utils.StringUtils;
13
 import com.ruoyi.common.utils.WxAppletNotifyUtils;
13
 import com.ruoyi.common.utils.WxAppletNotifyUtils;
14
 import com.ruoyi.wisdomarbitrate.domain.*;
14
 import com.ruoyi.wisdomarbitrate.domain.*;
15
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
15
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
17
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
17
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
18
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
37
     private ICaseApplicationService caseApplicationService;
38
     private ICaseApplicationService caseApplicationService;
38
     @Autowired
39
     @Autowired
39
     private IAdjudicationService adjudicationService;
40
     private IAdjudicationService adjudicationService;
41
+    /**
42
+     * 根据登录人返回用户信息
43
+     */
44
+    @GetMapping("/getUserInfo")
45
+    public AjaxResult getUserInfo()
46
+    {
40
 
47
 
41
 
48
 
49
+        return success(caseApplicationService.getUserInfo());
50
+    }
51
+
42
     /**
52
     /**
43
      * 查询立案数据
53
      * 查询立案数据
44
      */
54
      */
53
         return getDataTable(list);
63
         return getDataTable(list);
54
     }
64
     }
55
 
65
 
56
-    /**
57
-     * 查询批量管理案件列表
58
-     */
59
-    @GetMapping("/listBatch")
60
-    public TableDataInfo listBatch(CaseApplication caseApplication) {
61
-        startPage();
62
-        List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
63
-        return getDataTable(list);
64
-    }
66
+//    /**
67
+//     * 查询批量管理案件列表
68
+//     */
69
+//    @GetMapping("/listBatch")
70
+//    public TableDataInfo listBatch(CaseApplication caseApplication) {
71
+//        startPage();
72
+//        List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
73
+//        return getDataTable(list);
74
+//    }
65
 
75
 
66
     /**
76
     /**
67
      * 根据角色查询待办数量
77
      * 根据角色查询待办数量
81
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
91
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
82
     @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
92
     @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
83
     @PostMapping("/addCaseApplication")
93
     @PostMapping("/addCaseApplication")
84
-    public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
94
+    public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplicationDTO caseApplication)
85
     {
95
     {
86
 
96
 
87
         caseApplication.setCreateBy(getUsername());
97
         caseApplication.setCreateBy(getUsername());
88
-        return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
98
+        return caseApplicationService.insertOrUpdate(caseApplication);
89
     }
99
     }
90
 
100
 
91
     /**
101
     /**
92
      * 修改立案数据
102
      * 修改立案数据
93
      */
103
      */
94
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
104
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
95
-    @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
96
-    @PostMapping("/editCaseApplication")
97
-    public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
98
-
99
-        caseApplication.setUpdateBy(getUsername());
100
-        return caseApplicationService.editCaseApplication(caseApplication);
101
-    }
105
+//    @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
106
+//    @PostMapping("/editCaseApplication")
107
+//    public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplicationDTO caseApplication) {
108
+//
109
+//        caseApplication.setUpdateBy(getUsername());
110
+//        return caseApplicationService.editCaseApplication(caseApplication);
111
+//    }
102
 
112
 
103
     /**
113
     /**
104
      * 修改立案数据自定义字段
114
      * 修改立案数据自定义字段
132
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
142
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
133
             return error("参数校验失败");
143
             return error("参数校验失败");
134
         }
144
         }
135
-        return toAjax(caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber()));
145
+        return caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber());
136
     }
146
     }
137
 
147
 
138
 
148
 
411
         return success(caseApplicationService.submitCaseApplicationCheck(batchCaseApplication.getIds(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
421
         return success(caseApplicationService.submitCaseApplicationCheck(batchCaseApplication.getIds(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
412
     }
422
     }
413
 
423
 
414
-    /**
415
-     * 确认缴费查询立案信息
416
-     */
417
-//    @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
418
-    @PostMapping("/selectCaseApplicationConfirm")
419
-    public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
420
-        CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
421
-        return success(caseApplicationselect);
422
-    }
423
 
424
 
424
     /**
425
     /**
425
      * 批量提交立案审查
426
      * 批量提交立案审查
430
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
431
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
431
             return error("参数校验失败");
432
             return error("参数校验失败");
432
         }
433
         }
433
-        return success(caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
434
-    }
435
-
436
-    /**
437
-     * 下载案件压缩包
438
-     */
439
-    @PostMapping("/downloadCaseZipFile")
440
-    public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
441
-
442
-        CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
443
-        return success(caseAttach);
444
-    }
434
+        return caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject());
435
+    }
436
+
437
+//    /**
438
+//     * 下载案件压缩包
439
+//     */
440
+//    @PostMapping("/downloadCaseZipFile")
441
+//    public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
442
+//
443
+//        CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
444
+//        return success(caseAttach);
445
+//    }
445
 
446
 
446
 
447
 
447
 
448
 

+ 17
- 17
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java Просмотреть файл

33
         this.caseEvidenceService = caseEvidenceService;
33
         this.caseEvidenceService = caseEvidenceService;
34
     }
34
     }
35
 
35
 
36
-    /**
37
-     * 根据案件id查询案件详情
38
-     *
39
-     * @param id
40
-     * @return
41
-     */
42
-    @GetMapping("/{id}")
43
-    public AjaxResult getCaseDetailsById(@PathVariable Long id) {
44
-        String username = this.getUsername();
45
-        return caseEvidenceService.getCaseDetailsById(id, username);
46
-    }
36
+//    /**
37
+//     * 根据案件id查询案件详情
38
+//     *
39
+//     * @param id
40
+//     * @return
41
+//     */
42
+//    @GetMapping("/{id}")
43
+//    public AjaxResult getCaseDetailsById(@PathVariable Long id) {
44
+//        String username = this.getUsername();
45
+//        return caseEvidenceService.getCaseDetailsById(id, username);
46
+//    }
47
 
47
 
48
     /**
48
     /**
49
      * 案件证据上传
49
      * 案件证据上传
121
      * @param caseStatus
121
      * @param caseStatus
122
      * @return
122
      * @return
123
      */
123
      */
124
-    @GetMapping("/all")
125
-    public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
126
-
127
-       return success(caseEvidenceService.getCaseListAll(caseStatus));
128
-
129
-    }
124
+//    @GetMapping("/all")
125
+//    public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
126
+//
127
+//       return success(caseEvidenceService.getCaseListAll(caseStatus));
128
+//
129
+//    }
130
 
130
 
131
     /**
131
     /**
132
      * 证据确认
132
      * 证据确认

+ 15
- 11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java Просмотреть файл

133
     @Anonymous
133
     @Anonymous
134
     @GetMapping("secretaryRoleByUserId")
134
     @GetMapping("secretaryRoleByUserId")
135
     public AjaxResult secretaryRoleByUserId(   @RequestParam(value = "userId",required = true) Long userId,@RequestParam(value = "caseId",required = true) Long caseId) {
135
     public AjaxResult secretaryRoleByUserId(   @RequestParam(value = "userId",required = true) Long userId,@RequestParam(value = "caseId",required = true) Long caseId) {
136
-
137
         return  videoService.secretaryRoleByUserId(userId,caseId);
136
         return  videoService.secretaryRoleByUserId(userId,caseId);
138
     }
137
     }
139
     /**
138
     /**
186
 
185
 
187
             // 上传文件路径
186
             // 上传文件路径
188
             String filePath = RuoYiConfig.getUploadPath();
187
             String filePath = RuoYiConfig.getUploadPath();
188
+            String name=file.getOriginalFilename();
189
             // 上传并返回新文件名称
189
             // 上传并返回新文件名称
190
             String fileName = FileUploadUtils.upload(filePath, file);
190
             String fileName = FileUploadUtils.upload(filePath, file);
191
             String suffix = getFileExtension(fileName);
191
             String suffix = getFileExtension(fileName);
205
                     CaseAttach caseAttach=null;
205
                     CaseAttach caseAttach=null;
206
                     for (Object obj : jsonArray) {
206
                     for (Object obj : jsonArray) {
207
                         JSONObject jsonObject = (JSONObject) obj;
207
                         JSONObject jsonObject = (JSONObject) obj;
208
+                        String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
209
+                        path=path.replace("/home/ruoyi/uploadPath/","profile/");
208
                         caseAttach = CaseAttach.builder()
210
                         caseAttach = CaseAttach.builder()
209
                                 .caseAppliId(caseId)
211
                                 .caseAppliId(caseId)
210
-                                .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
212
+//                                .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
213
+                                .annexName(name)
211
                                 .annexType(annexType)
214
                                 .annexType(annexType)
212
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
215
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
216
+                                .annexPath(path)
213
                                 .build();
217
                                 .build();
214
-                        if(jsonObject.get("filePath")!=null){
215
-                            String officePath = jsonObject.getString("filePath");
216
-                            String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
217
-                            caseAttach.setAnnexPath(replace);
218
-
219
-                        }
218
+//                        if(jsonObject.get("filePath")!=null){
219
+//                            String officePath = jsonObject.getString("filePath");
220
+//                            String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
221
+//                            caseAttach.setAnnexPath(replace);
222
+//
223
+//                        }
220
                         caseAttachMapper.save(caseAttach);
224
                         caseAttachMapper.save(caseAttach);
221
                     }
225
                     }
222
                     if(caseAttach==null){
226
                     if(caseAttach==null){
226
                     ajax.put("annexId", caseAttach.getAnnexId());
230
                     ajax.put("annexId", caseAttach.getAnnexId());
227
                     ajax.put("annexType", annexType);
231
                     ajax.put("annexType", annexType);
228
                     //     ajax.put("url", url);
232
                     //     ajax.put("url", url);
229
-                    ajax.put("fileName", fileName);
233
+                    ajax.put("fileName", name);
230
                     ajax.put("newFileName", FileUtils.getName(fileName));
234
                     ajax.put("newFileName", FileUtils.getName(fileName));
231
                     ajax.put("originalFilename", file.getOriginalFilename());
235
                     ajax.put("originalFilename", file.getOriginalFilename());
232
                     return ajax;
236
                     return ajax;
245
                         caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
249
                         caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
246
                     }
250
                     }
247
                 }
251
                 }
248
-                Long annexId = saveCaseAttach(annexType, fileName, file.getOriginalFilename(), caseId);
252
+                Long annexId = saveCaseAttach(annexType, name, file.getOriginalFilename(), caseId);
249
 
253
 
250
                 AjaxResult ajax = AjaxResult.success();
254
                 AjaxResult ajax = AjaxResult.success();
251
                 ajax.put("annexId", annexId);
255
                 ajax.put("annexId", annexId);
252
                 ajax.put("annexType", annexType);
256
                 ajax.put("annexType", annexType);
253
                 ajax.put("url", url);
257
                 ajax.put("url", url);
254
-                ajax.put("fileName", fileName);
258
+                ajax.put("fileName", name);
255
                 ajax.put("newFileName", FileUtils.getName(fileName));
259
                 ajax.put("newFileName", FileUtils.getName(fileName));
256
                 ajax.put("originalFilename", file.getOriginalFilename());
260
                 ajax.put("originalFilename", file.getOriginalFilename());
257
                 return ajax;
261
                 return ajax;

+ 4
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java Просмотреть файл

6
 public class CaseApplicationConstants {
6
 public class CaseApplicationConstants {
7
     /** 申请人/代理人,立案申请 */
7
     /** 申请人/代理人,立案申请 */
8
     public static final int CASE_APPLICATION = 0;
8
     public static final int CASE_APPLICATION = 0;
9
+    /**
10
+     * 案件新增
11
+     */
12
+    public static final int CASE_INSERT = -2;
9
     /** 申请人/代理人,案件修改 */
13
     /** 申请人/代理人,案件修改 */
10
     public static final int CASE_EDIT = -1;
14
     public static final int CASE_EDIT = -1;
11
     /** 顾问,待立案审查 */
15
     /** 顾问,待立案审查 */

+ 62
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java Просмотреть файл

54
 
54
 
55
     /** 父部门名称 */
55
     /** 父部门名称 */
56
     private String parentName;
56
     private String parentName;
57
+    /**
58
+     * 代码(统一社会信用代码或者身份证号)
59
+     */
60
+    private String code;
61
+
62
+    /**
63
+     * 法定代表人
64
+     */
65
+    private String compLegalPerson;
66
+    /**
67
+     * 住所
68
+     */
69
+    private String home;
70
+    /**
71
+     * 联系地址
72
+     */
73
+    private String address;
74
+    /**
75
+     *
76
+     * 国籍,0-国内,1-国外
77
+     */
78
+    private Integer nationality;
79
+
80
+    public String getCode() {
81
+        return code;
82
+    }
83
+
84
+    public void setCode(String code) {
85
+        this.code = code;
86
+    }
87
+
88
+    public String getCompLegalPerson() {
89
+        return compLegalPerson;
90
+    }
91
+
92
+    public void setCompLegalPerson(String compLegalPerson) {
93
+        this.compLegalPerson = compLegalPerson;
94
+    }
95
+
96
+    public String getHome() {
97
+        return home;
98
+    }
99
+
100
+    public void setHome(String home) {
101
+        this.home = home;
102
+    }
103
+
104
+    public String getAddress() {
105
+        return address;
106
+    }
107
+
108
+    public void setAddress(String address) {
109
+        this.address = address;
110
+    }
111
+
112
+    public Integer getNationality() {
113
+        return nationality;
114
+    }
115
+
116
+    public void setNationality(Integer nationality) {
117
+        this.nationality = nationality;
118
+    }
57
 
119
 
58
     public Integer getDeptType() {
120
     public Integer getDeptType() {
59
         return deptType;
121
         return deptType;

+ 69
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Просмотреть файл

49
     public void setNickNameAndNum(String nickNameAndNum) {
49
     public void setNickNameAndNum(String nickNameAndNum) {
50
         this.nickNameAndNum = nickNameAndNum;
50
         this.nickNameAndNum = nickNameAndNum;
51
     }
51
     }
52
+    /** 身份类别,0-身份证,1-护照,默认0 */
53
+    private Integer idType;
54
+    /** 国籍,0-国内,1-国外,默认0 */
55
+
56
+    private Integer nationality;
57
+    /**
58
+     * 生日
59
+     */
60
+    private Date birth;
61
+    /**
62
+     * 住所
63
+     */
64
+    private String home;
65
+    /**
66
+     * 联系地址
67
+     */
68
+    private String address;
52
 
69
 
53
     /** 用户身份证号 */
70
     /** 用户身份证号 */
54
     @Excel(name = "身份证号")
71
     @Excel(name = "身份证号")
105
 
122
 
106
     /** 角色ID */
123
     /** 角色ID */
107
     private Long roleId;
124
     private Long roleId;
125
+    /**
126
+     * 职位
127
+     */
128
+    private String position;
129
+
130
+    public String getPosition() {
131
+        return position;
132
+    }
133
+
134
+    public void setPosition(String position) {
135
+        this.position = position;
136
+    }
108
 
137
 
109
     public SysUser()
138
     public SysUser()
110
     {
139
     {
111
 
140
 
112
     }
141
     }
113
 
142
 
143
+    public Integer getIdType() {
144
+        return idType;
145
+    }
146
+
147
+    public void setIdType(Integer idType) {
148
+        this.idType = idType;
149
+    }
150
+
151
+    public Integer getNationality() {
152
+        return nationality;
153
+    }
154
+
155
+    public void setNationality(Integer nationality) {
156
+        this.nationality = nationality;
157
+    }
158
+
159
+    public Date getBirth() {
160
+        return birth;
161
+    }
162
+
163
+    public void setBirth(Date birth) {
164
+        this.birth = birth;
165
+    }
166
+
167
+    public String getHome() {
168
+        return home;
169
+    }
170
+
171
+    public void setHome(String home) {
172
+        this.home = home;
173
+    }
174
+
175
+    public String getAddress() {
176
+        return address;
177
+    }
178
+
179
+    public void setAddress(String address) {
180
+        this.address = address;
181
+    }
182
+
114
     public SysUser(Long userId)
183
     public SysUser(Long userId)
115
     {
184
     {
116
         this.userId = userId;
185
         this.userId = userId;

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java Просмотреть файл

124
      * @return
124
      * @return
125
      */
125
      */
126
     int batchSave(@Param("list")List<SysDept> sysDepts);
126
     int batchSave(@Param("list")List<SysDept> sysDepts);
127
+
128
+    /**
129
+     * 根据部门名称查询部门信息
130
+     * @param deptName
131
+     * @return
132
+     */
133
+    public SysDept selectDeptByName(@Param("deptName") String deptName);
127
 }
134
 }

+ 13
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java Просмотреть файл

171
      * @return
171
      * @return
172
      */
172
      */
173
     int batchSave(@Param("list")List<SysUser> addUsers);
173
     int batchSave(@Param("list")List<SysUser> addUsers);
174
+    /**
175
+     * 根据邮箱查询用户信息
176
+     * @param email
177
+     * @return
178
+     */
179
+    SysUser selectUserByEmail(String email);
180
+
181
+    /**
182
+     * 根据角色查询用户
183
+     * @param 法律顾问
184
+     * @return
185
+     */
186
+    SysUser selectUserByRole(String 法律顾问);
174
 }
187
 }

+ 9
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java Просмотреть файл

59
      * @return 结果
59
      * @return 结果
60
      */
60
      */
61
     public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
61
     public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
62
+
63
+    /**
64
+     * 根据用户id查询关联的角色id
65
+     * @param userId
66
+     * @return
67
+     */
68
+    List<Long> selectRoleIdsByUserId(Long userId);
69
+
70
+    void insertUserRole(@Param("userId") Long userId,@Param("roleId")  Long roleId);
62
 }
71
 }

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

13
 import com.ruoyi.system.mapper.*;
13
 import com.ruoyi.system.mapper.*;
14
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
14
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
15
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
15
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
16
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
16
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
17
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
17
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
18
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
19
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
18
 import org.slf4j.Logger;
20
 import org.slf4j.Logger;
19
 import org.slf4j.LoggerFactory;
21
 import org.slf4j.LoggerFactory;
20
 import org.springframework.beans.factory.annotation.Autowired;
22
 import org.springframework.beans.factory.annotation.Autowired;
73
 
75
 
74
     @Autowired
76
     @Autowired
75
     protected Validator validator;
77
     protected Validator validator;
78
+    @Autowired
79
+    protected ICaseApplicationService caseApplicationService;
76
 
80
 
77
     /**
81
     /**
78
      * 根据条件分页查询用户列表
82
      * 根据条件分页查询用户列表
94
     @Override
98
     @Override
95
     public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
99
     public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
96
         // 根据案件id查询案件
100
         // 根据案件id查询案件
97
-        CaseAffiliate caseAffiliate = new CaseAffiliate();
98
-        caseAffiliate.setCaseAppliId(arbitrator.getCaseId());
99
-        List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
100
-        List<String> phoneList=new ArrayList<>();
101
+        List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(arbitrator.getCaseId());
102
+        List<Long> userIds=new ArrayList<>();
101
         if(CollectionUtil.isNotEmpty(caseAffiliates)){
103
         if(CollectionUtil.isNotEmpty(caseAffiliates)){
102
-            for (CaseAffiliate affiliate : caseAffiliates) {
103
-                if(StrUtil.isNotEmpty(affiliate.getContactTelphone())) {
104
-                    phoneList.add(affiliate.getContactTelphone());
105
-                }
106
-                if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
107
-                    phoneList.add(affiliate.getContactTelphoneAgent());
104
+            for (CaseAffiliateEntity affiliate : caseAffiliates) {
105
+                if(null!=affiliate.getUserId()) {
106
+                    userIds.add(affiliate.getUserId());
108
                 }
107
                 }
108
+
109
             }
109
             }
110
         }
110
         }
111
         List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
111
         List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
112
         List<SysUser> arbitrators = new ArrayList<>();
112
         List<SysUser> arbitrators = new ArrayList<>();
113
         if(CollectionUtil.isNotEmpty(sysUsers)){
113
         if(CollectionUtil.isNotEmpty(sysUsers)){
114
             for(SysUser sysUser: sysUsers){
114
             for(SysUser sysUser: sysUsers){
115
-                if(!phoneList.contains(sysUser.getPhonenumber())) {
115
+                if(!userIds.contains(sysUser.getUserId())) {
116
                     Long userId = sysUser.getUserId();
116
                     Long userId = sysUser.getUserId();
117
                     int todoCount = caseApplicationMapper.selectCasenum(userId.toString());
117
                     int todoCount = caseApplicationMapper.selectCasenum(userId.toString());
118
                     String nickName = sysUser.getNickName();
118
                     String nickName = sysUser.getNickName();

+ 20
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Просмотреть файл

3
 import com.fasterxml.jackson.annotation.JsonFormat;
3
 import com.fasterxml.jackson.annotation.JsonFormat;
4
 import com.ruoyi.common.annotation.Excel;
4
 import com.ruoyi.common.annotation.Excel;
5
 import com.ruoyi.common.core.domain.BaseEntity;
5
 import com.ruoyi.common.core.domain.BaseEntity;
6
+import com.ruoyi.wisdomarbitrate.domain.vo.CaseAffiliateVO;
6
 import lombok.Data;
7
 import lombok.Data;
7
 
8
 
8
 import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
9
 import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
17
      * 查询案件时区分是否待办案件,0待办案件,1已办案件
18
      * 查询案件时区分是否待办案件,0待办案件,1已办案件
18
      */
19
      */
19
     private String selectCaseStatus;
20
     private String selectCaseStatus;
21
+    /**
22
+     * 房间号
23
+     */
24
+    private String roomId;
25
+    /**
26
+     * 仲裁员,0-否,1-是
27
+     */
28
+    private Integer arbitratorFlag;
29
+    /**
30
+     * 第三方代理人,0-否,1-是
31
+     */
32
+    private Integer agentFlag;
33
+
20
 
34
 
21
     /** ID */
35
     /** ID */
22
     private Long id;
36
     private Long id;
26
     /** 案件编号 */
40
     /** 案件编号 */
27
 //    @Excel(name = "案件编号")
41
 //    @Excel(name = "案件编号")
28
     private String caseNum;
42
     private String caseNum;
43
+    /**
44
+     * 是否同意,0-否
45
+     */
46
+    private Integer opinion;
29
     /** 案件标的 */
47
     /** 案件标的 */
30
     @Excel(name = "案件标的")
48
     @Excel(name = "案件标的")
31
     private BigDecimal caseSubjectAmount;
49
     private BigDecimal caseSubjectAmount;
188
     /**
206
     /**
189
      * 用户id
207
      * 用户id
190
      */
208
      */
191
-    private String userId;
209
+    private Long userId;
192
     /**
210
     /**
193
      * 登录用户用户名
211
      * 登录用户用户名
194
      */
212
      */
223
     /** 是否指派仲裁员 */
241
     /** 是否指派仲裁员 */
224
     private int pendingAppointArbotrar;
242
     private int pendingAppointArbotrar;
225
     /** 案件关联人信息 */
243
     /** 案件关联人信息 */
226
-    private List<CaseAffiliate> caseAffiliates;
244
+    private CaseAffiliateVO affiliate;
227
 
245
 
228
     /** 案件仲裁员 */
246
     /** 案件仲裁员 */
229
     private List<Arbitrator> arbitrators;
247
     private List<Arbitrator> arbitrators;

+ 309
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseApplicationDTO.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain.dto;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
5
+import com.ruoyi.wisdomarbitrate.domain.vo.CaseAffiliateVO;
6
+import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
7
+import lombok.AllArgsConstructor;
8
+import lombok.Data;
9
+import lombok.NoArgsConstructor;
10
+
11
+import java.io.Serializable;
12
+import java.math.BigDecimal;
13
+import java.util.Date;
14
+import java.util.List;
15
+
16
+/**
17
+ * @Classname CaseApplicationDTO
18
+ * @Description 案件申请表
19
+ * @Version 1.0.0
20
+ * @Date 2024/5/22 9:19
21
+ * @Created wangqiong
22
+ */
23
+@Data
24
+@AllArgsConstructor
25
+@NoArgsConstructor
26
+public class CaseApplicationDTO implements Serializable {
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * id
31
+     */
32
+    private Long id;
33
+
34
+    /**
35
+     * 案件编号
36
+     */
37
+    private String caseNum;
38
+
39
+    /**
40
+     * 案件标的
41
+     */
42
+    private BigDecimal caseSubjectAmount;
43
+
44
+    /**
45
+     * 立案日期
46
+     */
47
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
48
+    private Date registerDate;
49
+
50
+    /**
51
+     * 仲裁方式,视频仲裁(1)、书面仲裁(2)
52
+     */
53
+    private Long arbitratMethod;
54
+
55
+    /**
56
+     * 案件状态,立案申请(0)、待立案审查(1)、 待缴费(2)、待缴费确认(3)、 待案件质证(4)、
57
+     */
58
+    private Integer caseStatus;
59
+
60
+    /**
61
+     * 开庭日期
62
+     */
63
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
64
+    private Date hearDate;
65
+
66
+    /**
67
+     * 申请人仲裁请求及事实和理由
68
+     */
69
+    private String arbitratClaims;
70
+
71
+    /**
72
+     * 借款开始日期
73
+     */
74
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
75
+    private Date loanStartDate;
76
+
77
+    /**
78
+     * 借款结束日期
79
+     */
80
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
81
+    private Date loanEndDate;
82
+
83
+    /**
84
+     * 申请人主张欠本金
85
+     */
86
+    private BigDecimal claimPrinciOwed;
87
+
88
+    /**
89
+     * 申请人主张欠利息
90
+     */
91
+    private BigDecimal claimInterestOwed;
92
+
93
+    /**
94
+     * 申请人主张违约金
95
+     */
96
+    private BigDecimal claimLiquidDamag;
97
+
98
+    /**
99
+     * 仲裁应缴费用
100
+     */
101
+    private BigDecimal feePayable;
102
+
103
+
104
+    /**
105
+     * 合同编号
106
+     */
107
+    private String contractNumber;
108
+
109
+    /**
110
+     * 创建时间
111
+     */
112
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
113
+    private Date createTime;
114
+
115
+    /**
116
+     * 更新者
117
+     */
118
+    private String updateBy;
119
+
120
+    /**
121
+     * 更新时间
122
+     */
123
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
124
+    private Date updateTime;
125
+
126
+    /**
127
+     * 创建者
128
+     */
129
+    private String createBy;
130
+
131
+    /**
132
+     * 仲裁员id
133
+     */
134
+    private String arbitratorId;
135
+
136
+    /**
137
+     * 案件名称
138
+     */
139
+    private String caseName;
140
+
141
+    /**
142
+     * 仲裁结果
143
+     */
144
+    private String caseResult;
145
+
146
+    /**
147
+     * 是否同意组庭,0否,1是
148
+     */
149
+    private Integer isAgreePendTral;
150
+
151
+    /**
152
+     * 是否有异议需要举证,1是,0否
153
+     */
154
+    private Integer objectionAddEviden;
155
+
156
+
157
+    /**
158
+     * 案件实缴费用
159
+     */
160
+    private BigDecimal paidExpenses;
161
+
162
+    /**
163
+     * 裁决书URL
164
+     */
165
+    private String filearbitraUrl;
166
+
167
+    /**
168
+     * 支付方式(0线上支付,1线下支付)
169
+     */
170
+    private String payType;
171
+
172
+    /**
173
+     * 申请人请求仲裁庭裁决
174
+     */
175
+    private String requestRule;
176
+
177
+    /**
178
+     * 是否仲裁反请求,1是,0否
179
+     */
180
+    private Integer adjudicaCounter;
181
+
182
+    /**
183
+     * 仲裁反请求原因
184
+     */
185
+    private String adjudicaCounterReason;
186
+
187
+    /**
188
+     * 是否财产保全申请,1是,0否
189
+     */
190
+    private Integer properPreser;
191
+
192
+    /**
193
+     * 是否管辖异议申请,1是,0否
194
+     */
195
+    private Integer objectiJuris;
196
+
197
+    /**
198
+     * 被申请人是否缺席,1是,0否
199
+     */
200
+    private Integer isAbsence;
201
+
202
+    /**
203
+     * 被申请人质证意见
204
+     */
205
+    private String responCrossOpin;
206
+
207
+    /**
208
+     * 申请人质证意见
209
+     */
210
+    private String applicaCrossOpin;
211
+
212
+    /**
213
+     * 被申请人的答辩意见
214
+     */
215
+    private String responDefenOpini;
216
+
217
+    /**
218
+     * 申请人是否缺席,1是,0否
219
+     */
220
+    private Integer appliIsAbsen;
221
+
222
+    /**
223
+     * 是否锁定,0-否,1-是
224
+     */
225
+    private Integer lockStatus;
226
+
227
+    /**
228
+     * 视频会议房间号id
229
+     */
230
+    private String roomId;
231
+
232
+    /**
233
+     * 是否导入,0手动录入,1导入,默认0
234
+     */
235
+    private Integer importFlag=0;
236
+
237
+    /**
238
+     * 版本号
239
+     */
240
+    private Integer version;
241
+
242
+    /**
243
+     * 事实和理由
244
+     */
245
+    private String facts;
246
+
247
+    /**
248
+     * 批次
249
+     */
250
+    private Integer batchNumber;
251
+
252
+    /**
253
+     * 模板id
254
+     */
255
+    private Long templateId;
256
+
257
+    /**
258
+     * 调解内容
259
+     */
260
+    private String mediationAgreement;
261
+
262
+    /**
263
+     * 申请人是否书面审理 ,0否,1是
264
+     */
265
+    private Integer appliIswritHear;
266
+
267
+    /**
268
+     * 被申请人是否书面审理
269
+     */
270
+    private Integer responIsWritHear;
271
+
272
+    /**
273
+     * 案件附件相关表
274
+     */
275
+    private List<CaseAttach> caseAttachList;
276
+    /**
277
+     * 附件类型
278
+     */
279
+    private List<Integer> annexTypeList;
280
+    /**
281
+     * 附件类型
282
+     */
283
+    private Integer annexType;
284
+    /**
285
+     * 自定义字段
286
+     */
287
+    private List<ColumnValue> columnValueList;
288
+    /**
289
+     * 案件相关人员
290
+     */
291
+    private CaseAffiliateVO affiliate;
292
+    /**
293
+     * 待办状态,0-待办,1-已办
294
+     */
295
+    private Integer pendingStatus;
296
+    /**
297
+     * 仲裁方式名称,1-线上调解,2-线下调解
298
+     */
299
+    private String arbitratMethodName;
300
+    /**
301
+     * 申请机构名称
302
+     */
303
+    private String applicationName;
304
+    /**
305
+     * 被申请人姓名
306
+     */
307
+    private String respondentName;
308
+
309
+}

+ 129
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/CaseAffiliateEntity.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain.entity;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import lombok.Data;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+import lombok.ToString;
8
+
9
+import java.util.Date;
10
+
11
+@Getter
12
+@Setter
13
+@ToString
14
+@Data
15
+public class CaseAffiliateEntity {
16
+    /**
17
+     * id
18
+     */
19
+    private Long id;
20
+    /**
21
+     * 案件主表id,案件申请表主键
22
+     */
23
+    private Long caseAppliId;
24
+    /**
25
+     * 案件日志表id
26
+     */
27
+    private Long caseAppliLogId;
28
+    /**
29
+     * 用户id,用户表user_id关联
30
+     */
31
+    private Long userId;
32
+    /**
33
+     * 申请机构id,和部门表id关联
34
+     */
35
+    private Long applicantDeptId;
36
+
37
+    /**
38
+     * 代码(统一社会信用代码或者身份证号)
39
+     */
40
+    private String code;
41
+    /**
42
+     * 用户名
43
+     */
44
+    private String userName;
45
+
46
+    /**
47
+     * 法定代表人
48
+     */
49
+    private String compLegalPerson;
50
+    /**
51
+     * 角色类别,1-申请操作人/申请人,2-申请人代理人,3-被申请人操作人/被申请人,4-被申请人代理人
52
+     */
53
+    private Integer roleType=1;
54
+    /**
55
+     * 组别
56
+     */
57
+    private Integer groupOrder;
58
+    /**
59
+     * 是否操作人,0-否,1-是
60
+     */
61
+    private Integer operatorFlag=1;
62
+    /**
63
+     * 是否机构申请,0-自然人,1-申请机构,默认0
64
+     */
65
+    private Integer organizeFlag=0;
66
+    /**
67
+     * 电话
68
+     */
69
+    private String phone;
70
+    /**
71
+     * 邮箱
72
+     */
73
+    private String email;
74
+    /**
75
+     * 姓名
76
+     */
77
+    private String name;
78
+    /**
79
+     * 住所
80
+     */
81
+    private String home;
82
+    /**
83
+     * 联系地址
84
+     */
85
+    private String address;
86
+    /**
87
+     * 身份证号
88
+     */
89
+    private String idCard;
90
+
91
+    /**
92
+     * '身份类别,0-身份证,1-护照,默认0'
93
+     */
94
+    private Integer idType;
95
+    /**
96
+     * 国籍,0-境内,1-境外,默认0
97
+     */
98
+    private Integer nationality;
99
+    /**
100
+     * 生日
101
+     */
102
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
103
+    private Date birth;
104
+    /**
105
+     * 性别,0-男,1-女
106
+     */
107
+    private String sex;
108
+    /**
109
+     * 被申请人姓名
110
+     */
111
+    private String resName;
112
+    /**
113
+     * 角色名称
114
+     */
115
+    private String roleName;
116
+    /**
117
+     * 申请机构名称
118
+     */
119
+    private String applicantOrgName;
120
+    /**
121
+     * 角色id
122
+     */
123
+    private Long roleId;
124
+    /**
125
+     * 职位
126
+     */
127
+    private String position;
128
+
129
+}

+ 33
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseAffiliateBase.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain.vo;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
5
+import lombok.Data;
6
+
7
+/**
8
+ * @Classname MsCaseAffiliateList
9
+ * @Description 案件人员表
10
+ * @Version 1.0.0
11
+ * @Date 2024/3/27 16:08
12
+ * @Created wangqiong
13
+ */
14
+@Data
15
+public class CaseAffiliateBase {
16
+    /**
17
+     * 申请人/操作人
18
+     */
19
+    private CaseAffiliateEntity applicant;
20
+    /**
21
+     * 申请人代理人
22
+     */
23
+    private CaseAffiliateEntity applicantAgent;
24
+    /**
25
+     * 被申请人/操作人
26
+     */
27
+    private CaseAffiliateEntity res;
28
+    /**
29
+     * 被申请人代理人
30
+     */
31
+    private CaseAffiliateEntity resAgent;
32
+
33
+}

+ 32
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseAffiliateVO.java Просмотреть файл

1
+package com.ruoyi.wisdomarbitrate.domain.vo;
2
+
3
+import lombok.Data;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+import lombok.ToString;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * @Classname MsCaseAffiliateVO
12
+ * @Description 案件人员表
13
+ * @Version 1.0.0
14
+ * @Date 2024/3/22 11:46
15
+ * @Created wangqiong
16
+ */
17
+@Getter
18
+@Setter
19
+@ToString
20
+@Data
21
+public class CaseAffiliateVO {
22
+    /**
23
+     * 申请人/操作人
24
+     */
25
+    private List<CaseAffiliateBase> applicant;
26
+
27
+    /**
28
+     * 被申请人/操作人
29
+     */
30
+    private List<CaseAffiliateBase> res;
31
+
32
+}

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java Просмотреть файл

2
 
2
 
3
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
3
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
5
 import org.apache.ibatis.annotations.Param;
6
 import org.apache.ibatis.annotations.Param;
6
 import org.springframework.stereotype.Repository;
7
 import org.springframework.stereotype.Repository;
7
 
8
 
10
 public interface CaseAffiliateLogMapper {
11
 public interface CaseAffiliateLogMapper {
11
 
12
 
12
 
13
 
13
-    int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
14
+    int batchCaseAffiliate(List<CaseAffiliateEntity> caseAffiliates);
14
 
15
 
15
 
16
 
16
     void deletecaseAffiliate(CaseApplication caseApplication);
17
     void deletecaseAffiliate(CaseApplication caseApplication);

+ 15
- 15
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Просмотреть файл

3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
7
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
6
 import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
8
 import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
7
 import org.apache.ibatis.annotations.Param;
9
 import org.apache.ibatis.annotations.Param;
8
 
10
 
18
     void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
20
     void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
19
 
21
 
20
 
22
 
21
-    List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
22
-    List<CaseAffiliate>  selectCaseAffiliateByCaseIds(@Param("ids") List<Long> ids);
23
-    CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
24
-
25
-    int updataCaseAffiliate(CaseAffiliate caseAffiliate);
23
+    List<CaseAffiliateEntity>  selectCaseAffiliate(CaseAffiliateEntity entity);
24
+    List<CaseAffiliateEntity>  selectCaseAffiliateByCaseIds(@Param("caseIds") List<Long> ids);
26
 
25
 
27
     /**
26
     /**
28
-     * 根据案件查询邮箱
29
-     * @param id
30
-     * @return
27
+     * 根据案件id删除
28
+     * @param caseId
31
      */
29
      */
32
-    List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
30
+    void deleteByCaseId(@Param("caseAppliId") Long caseId);
33
 
31
 
34
     /**
32
     /**
35
-     * 批量修改
36
-     * @param affiliateLogList
33
+     * 新增人员
34
+     * @param affiliate
37
      */
35
      */
38
-    void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
36
+
37
+    void insert(CaseAffiliateEntity affiliate);
39
 
38
 
40
     /**
39
     /**
41
-     * 根据案件id删除
42
-     * @param caseId
40
+     * 根据案件id查询邮箱
41
+     * @param id
42
+     * @return
43
      */
43
      */
44
-    void deleteByCaseId(@Param("caseAppliId") Long caseId);
44
+    List<CaseAffiliateEntity> emailByCaseId(Long id);
45
 }
45
 }

+ 15
- 20
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Просмотреть файл

4
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
4
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
7
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
8
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
8
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
9
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
9
 import org.apache.ibatis.annotations.Param;
10
 import org.apache.ibatis.annotations.Param;
11
 import java.util.List;
12
 import java.util.List;
12
 
13
 
13
 public interface CaseApplicationMapper {
14
 public interface CaseApplicationMapper {
14
-    List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
15
 
15
 
16
     int selectCaseApplicationCount(CaseApplication caseApplication);
16
     int selectCaseApplicationCount(CaseApplication caseApplication);
17
 
17
 
18
-    /**
19
-     * 查询超级管理员案件
20
-     * @param caseApplication
21
-     * @return
22
-     */
23
-    List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
24
-
25
     int insertCaseApplication(CaseApplication caseApplication);
18
     int insertCaseApplication(CaseApplication caseApplication);
26
 
19
 
27
 
20
 
40
      */
33
      */
41
     List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
34
     List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
42
 
35
 
43
-    CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
36
+
44
 
37
 
45
     /**
38
     /**
46
      * 查询最大编号
39
      * 查询最大编号
64
     void updatePayType(CaseConfirmPayDTO payDTO);
57
     void updatePayType(CaseConfirmPayDTO payDTO);
65
 
58
 
66
 
59
 
67
-    ToDoCount selectAdminCaseToDoCount();
68
 
60
 
69
 
61
 
70
     ToDoCount selectTodoCountByRole(@Param("caseApplication") CaseApplication caseApplication,
62
     ToDoCount selectTodoCountByRole(@Param("caseApplication") CaseApplication caseApplication,
71
                                     @Param("caseStatusList") List<Integer> caseStatusList,
63
                                     @Param("caseStatusList") List<Integer> caseStatusList,
72
-                                    @Param("roleNames") List<String> roleNames);
64
+                                    @Param("roleIds") List<Long> roleIds);
73
 
65
 
74
     /**
66
     /**
75
      * 修改案件锁定状态
67
      * 修改案件锁定状态
100
      */
92
      */
101
     Long selectCaseIdByRoomId(@Param("roomId")String roomId);
93
     Long selectCaseIdByRoomId(@Param("roomId")String roomId);
102
 
94
 
103
-    /**
104
-     * 查询已办案件
105
-     * @param caseApplication
106
-     * @return
107
-     */
108
-    List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
109
     /**
95
     /**
110
      * 查询最大房间号
96
      * 查询最大房间号
111
      * @return
97
      * @return
124
      * 查询最大批号
110
      * 查询最大批号
125
      * @return
111
      * @return
126
      */
112
      */
127
-    Integer selectBatchNumberLike();
113
+    Integer selectMaxBatchNumber();
128
 
114
 
129
     /**
115
     /**
130
      * 批量新增案件
116
      * 批量新增案件
139
 
125
 
140
     List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
126
     List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
141
 
127
 
142
-    List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
128
+
143
 
129
 
144
     /**
130
     /**
145
      * 案件列表查询
131
      * 案件列表查询
148
      */
134
      */
149
     List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
135
     List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
150
                                @Param("caseStatusList") List<Integer> caseStatusList,
136
                                @Param("caseStatusList") List<Integer> caseStatusList,
151
-                               @Param("roleNames") List<String> roleNames);
137
+                               @Param("roleIds") List<Long> roleIds);
152
 
138
 
153
     /**
139
     /**
154
      * 查询当前案件节点
140
      * 查询当前案件节点
156
      * @return
142
      * @return
157
      */
143
      */
158
     Integer selectCaseApplicationCaseStatus(@Param("id") Long id);
144
     Integer selectCaseApplicationCaseStatus(@Param("id") Long id);
145
+
146
+    /**
147
+     * 新增
148
+     * @param caseApplication
149
+     * @return
150
+     */
151
+    int insert(CaseApplicationDTO caseApplication);
152
+    int update(CaseApplicationDTO caseApplication);
153
+
159
 }
154
 }

+ 1
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java Просмотреть файл

9
 
9
 
10
 @Mapper
10
 @Mapper
11
 public interface CaseEvidenceMapper {
11
 public interface CaseEvidenceMapper {
12
-    List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
13
-            , @Param(value = "caseStatusList") List<Integer> caseStatusList
14
-            , @Param(value = "identityType" ) Integer identityType
15
-            , @Param(value = "phone" ) String phone
16
-            , @Param(value = "loginUserName" ) String loginUserName
17
-    );
12
+
18
 }
13
 }

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

16
 
16
 
17
     AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
17
     AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
18
 
18
 
19
-    List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
19
+//    List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
20
 
20
 
21
-    AjaxResult signature(CaseApplication caseApplication);
22
 
21
 
23
     AjaxResult caseFile( List<Long> ids);
22
     AjaxResult caseFile( List<Long> ids);
24
 
23
 
25
     AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
24
     AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
26
 
25
 
27
-    AjaxResult stamp(CaseApplication caseApplication);
28
 
26
 
29
-    AjaxResult getArchivesDetail(Long id);
30
 
27
 
31
-    AjaxResult regenerationDocument(CaseApplication caseApplication);
28
+
32
 
29
 
33
     /**
30
     /**
34
      * 根据案件id查询邮箱
31
      * 根据案件id查询邮箱

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

2
 
2
 
3
 import com.alibaba.fastjson.JSONArray;
3
 import com.alibaba.fastjson.JSONArray;
4
 import com.ruoyi.common.core.domain.AjaxResult;
4
 import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.common.exception.EsignDemoException;
6
 import com.ruoyi.wisdomarbitrate.domain.*;
7
 import com.ruoyi.wisdomarbitrate.domain.*;
7
-import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
8
-import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
9
-import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
10
-import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
8
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
9
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
10
+import com.ruoyi.wisdomarbitrate.domain.vo.*;
11
 import org.springframework.web.bind.annotation.RequestParam;
11
 import org.springframework.web.bind.annotation.RequestParam;
12
 import org.springframework.web.multipart.MultipartFile;
12
 import org.springframework.web.multipart.MultipartFile;
13
 
13
 
16
 import java.util.Map;
16
 import java.util.Map;
17
 
17
 
18
 public interface ICaseApplicationService {
18
 public interface ICaseApplicationService {
19
-    List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
20
-    List<CaseApplication> selectCaseApplicationListByRole(CaseApplication caseApplication);
21
 
19
 
22
 
20
 
23
-    int insertcaseApplication(CaseApplication caseApplication);
21
+//    int insertcaseApplication(CaseApplication caseApplication);
24
 
22
 
25
-    int insertcaseApplication1(CaseApplication caseApplication);
23
+//    int insertcaseApplication1(CaseApplication caseApplication);
26
 
24
 
27
     int selectCaseApplicationCount(CaseApplication caseApplication);
25
     int selectCaseApplicationCount(CaseApplication caseApplication);
28
 
26
 
29
-    AjaxResult editCaseApplication(CaseApplication caseApplication);
27
+//    AjaxResult editCaseApplication(CaseApplication caseApplication);
30
 
28
 
31
     int submitCaseApplication( List<Long> ids);
29
     int submitCaseApplication( List<Long> ids);
32
 
30
 
50
 
48
 
51
     int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
49
     int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
52
 
50
 
53
-    CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
54
-
55
     String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
51
     String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
56
 
52
 
57
     SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
53
     SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
139
 
135
 
140
     CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
136
     CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
141
 
137
 
142
-    List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
138
+//    List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
143
     public List<CaseApplication> page(CaseApplication caseApplication) ;
139
     public List<CaseApplication> page(CaseApplication caseApplication) ;
144
 
140
 
145
 
141
 
146
-    int submitCaseApplicationBatch(String batchNumber);
142
+    AjaxResult submitCaseApplicationBatch(String batchNumber);
147
 
143
 
148
-    int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
144
+    AjaxResult submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
149
 
145
 
150
     int pendTralCheckBatch(CaseApplication caseApplication);
146
     int pendTralCheckBatch(CaseApplication caseApplication);
151
 
147
 
168
      */
164
      */
169
 
165
 
170
     AjaxResult saveOnlyOfficeFile(CaseAttach caseAttach);
166
     AjaxResult saveOnlyOfficeFile(CaseAttach caseAttach);
167
+
168
+    /**
169
+     * 新增或编辑
170
+     * @param caseApplication
171
+     * @return
172
+     */
173
+
174
+    AjaxResult insertOrUpdate(CaseApplicationDTO caseApplication);
175
+
176
+    /**
177
+     * 设置案件相关信息
178
+     * @param caseApplication
179
+     * @param affiliate
180
+     * @param groupOrder 组别
181
+     * @param operatorCount 操作人数量
182
+     * @param updateFlag 是否修改案件
183
+     */
184
+    public int setCaseAfflicate(List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplication, CaseAffiliateEntity affiliate, int groupOrder, int operatorCount, boolean updateFlag);
185
+
186
+    /**
187
+     * 新增案件
188
+     * @param caseApplication
189
+     */
190
+    void insert(CaseApplicationDTO caseApplication);
191
+
192
+    /**
193
+     * 修改案件
194
+     * @param caseApplication
195
+     */
196
+
197
+    void update(CaseApplicationDTO caseApplication);
198
+    /**
199
+     * 新增案件相关人员信息
200
+     * @param affiliate 相关人员信息
201
+     * @param roleIdList 角色id
202
+     * @param updateFlag 是否修改案件
203
+
204
+     */
205
+    public void insertAfficateUser(CaseAffiliateEntity affiliate,  List<Long> roleIdList,boolean updateFlag);
206
+
207
+    void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplication);
208
+
209
+    /**
210
+     * 根据案件id查询相关人员
211
+     * @param id
212
+     * @return
213
+     */
214
+
215
+    List<CaseAffiliateEntity> selectAfflicatesByCaseId(Long id);
216
+
217
+    SysUser getUserInfo();
171
 }
218
 }

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

13
 
13
 
14
 public interface ICaseEvidenceService {
14
 public interface ICaseEvidenceService {
15
 
15
 
16
-    AjaxResult getCaseDetailsById(Long id,String userName);
16
+//    AjaxResult getCaseDetailsById(Long id,String userName);
17
 
17
 
18
     AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
18
     AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
19
 
19
 
20
-    List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
20
+//    List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
21
 
21
 
22
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
22
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
23
 
23
 

+ 249
- 707
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


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

247
         CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
247
         CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
248
 
248
 
249
         // 查询案件关联人员
249
         // 查询案件关联人员
250
-        afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
250
+     //   afterCase.setAffiliate(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
251
         // 查询自定义字段表
251
         // 查询自定义字段表
252
         afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
252
         afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
253
         // 查询附件
253
         // 查询附件
259
         List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
259
         List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
260
         if (CollectionUtil.isNotEmpty(afterAttachList)) {
260
         if (CollectionUtil.isNotEmpty(afterAttachList)) {
261
             for (CaseAttach attach : afterAttachList) {
261
             for (CaseAttach attach : afterAttachList) {
262
-                String annexName = attach.getAnnexName();
263
-                String prefix = "/profile";
264
-                int startIndex = annexName.indexOf(prefix);
265
-                startIndex += prefix.length();
266
-                String annexPath = "/uploadPath" + annexName.substring(startIndex);
267
-                attach.setAnnexPath(annexPath);
268
-                int startIndexnew = annexName.lastIndexOf("/");
269
-                if (startIndexnew != -1) {
270
-                    String annexNamenew = annexName.substring(startIndexnew + 1);
271
-                    attach.setAnnexName(annexNamenew);
272
-                }
262
+                String path = attach.getAnnexPath()==null?"":attach.getAnnexPath();
263
+                attach.setAnnexPath(path);
264
+                attach.setAnnexName(attach.getAnnexName());
265
+
273
             }
266
             }
274
             afterCase.setCaseAttachList(afterAttachList);
267
             afterCase.setCaseAttachList(afterAttachList);
275
         }
268
         }
299
 
292
 
300
         }
293
         }
301
         // 对比案件人员字段
294
         // 对比案件人员字段
302
-        compareAffilate(beforeCase, afterCase);
295
+//        compareAffilate(beforeCase, afterCase);
303
         // 对比申请人证据资料
296
         // 对比申请人证据资料
304
         compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
297
         compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
305
         // 对比自定义字段
298
         // 对比自定义字段
385
      * @param beforeCase
378
      * @param beforeCase
386
      * @param afterCase
379
      * @param afterCase
387
      */
380
      */
388
-    private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
389
-        // 对比人员字段
390
-        List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
391
-        List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
392
-        Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
393
-        if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
394
-            // 转为map
395
-            beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
396
-        }
397
-        StringBuilder affiliateChangeColumn;
398
-        // 如果上一个版本和现版本有一个为空,那么所有字段都修改
399
-        if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
400
-            affiliateChangeColumn = new StringBuilder();
401
-            for (String column : affiliateColumns) {
402
-
403
-                affiliateChangeColumn.append(column).append(",");
404
-            }
405
-
406
-        } else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
407
-            affiliateChangeColumn = new StringBuilder();
408
-            for (String column : affiliateColumns) {
409
-
410
-                affiliateChangeColumn.append(column).append(",");
411
-            }
412
-        } else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
413
-            for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
414
-                // 找到相同身份类型的数据,进行对比
415
-                affiliateChangeColumn = new StringBuilder();
416
-                int identityType = afterCaseCaseAffiliate.getIdentityType();
417
-                if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
418
-                    CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
419
-                    for (String column : affiliateColumns) {
420
-                        String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
421
-                        String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
422
-                        if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
423
-                            affiliateChangeColumn.append(column).append(",");
424
-                            continue;
425
-                        }
426
-                        if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
427
-                            affiliateChangeColumn.append(column).append(",");
428
-                            continue;
429
-                        }
430
-                        if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
431
-                            affiliateChangeColumn.append(column).append(",");
432
-                            continue;
433
-
434
-                        }
435
-
436
-                    }
437
-
438
-
439
-                } else {
440
-                    for (String column : affiliateColumns) {
441
-
442
-                        affiliateChangeColumn.append(column).append(",");
443
-                    }
444
-                }
445
-                afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
446
-
447
-            }
448
-
449
-
450
-        }
451
-    }
381
+//    private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
382
+//        // 对比人员字段
383
+//        List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
384
+//        List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
385
+//        Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
386
+//        if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
387
+//            // 转为map
388
+//            beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
389
+//        }
390
+//        StringBuilder affiliateChangeColumn;
391
+//        // 如果上一个版本和现版本有一个为空,那么所有字段都修改
392
+//        if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
393
+//            affiliateChangeColumn = new StringBuilder();
394
+//            for (String column : affiliateColumns) {
395
+//
396
+//                affiliateChangeColumn.append(column).append(",");
397
+//            }
398
+//
399
+//        } else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
400
+//            affiliateChangeColumn = new StringBuilder();
401
+//            for (String column : affiliateColumns) {
402
+//
403
+//                affiliateChangeColumn.append(column).append(",");
404
+//            }
405
+//        } else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
406
+//            for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
407
+//                // 找到相同身份类型的数据,进行对比
408
+//                affiliateChangeColumn = new StringBuilder();
409
+//                int identityType = afterCaseCaseAffiliate.getIdentityType();
410
+//                if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
411
+//                    CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
412
+//                    for (String column : affiliateColumns) {
413
+//                        String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
414
+//                        String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
415
+//                        if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
416
+//                            affiliateChangeColumn.append(column).append(",");
417
+//                            continue;
418
+//                        }
419
+//                        if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
420
+//                            affiliateChangeColumn.append(column).append(",");
421
+//                            continue;
422
+//                        }
423
+//                        if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
424
+//                            affiliateChangeColumn.append(column).append(",");
425
+//                            continue;
426
+//
427
+//                        }
428
+//
429
+//                    }
430
+//
431
+//
432
+//                } else {
433
+//                    for (String column : affiliateColumns) {
434
+//
435
+//                        affiliateChangeColumn.append(column).append(",");
436
+//                    }
437
+//                }
438
+//                afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
439
+//
440
+//            }
441
+//
442
+//
443
+//        }
444
+//    }
452
 
445
 
453
     /**
446
     /**
454
      * 同意撤销
447
      * 同意撤销

+ 1816
- 1538
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


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

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
 import cn.hutool.core.collection.CollectionUtil;
3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
4
 import com.deepoove.poi.data.PictureRenderData;
5
 import com.deepoove.poi.data.PictureRenderData;
5
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.core.domain.AjaxResult;
8
 import com.ruoyi.common.exception.ServiceException;
9
 import com.ruoyi.common.exception.ServiceException;
9
 import com.ruoyi.common.utils.WordUtil;
10
 import com.ruoyi.common.utils.WordUtil;
10
 import com.ruoyi.wisdomarbitrate.domain.*;
11
 import com.ruoyi.wisdomarbitrate.domain.*;
12
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
11
 import com.ruoyi.wisdomarbitrate.mapper.*;
13
 import com.ruoyi.wisdomarbitrate.mapper.*;
12
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
14
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
13
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
56
     private RedisCache redisCache;
58
     private RedisCache redisCache;
57
     @Autowired
59
     @Autowired
58
     private ICaseApplicationService caseApplicationService;
60
     private ICaseApplicationService caseApplicationService;
61
+    @Autowired
62
+    private ICaseArbitrateService caseArbitrateService;
59
 
63
 
60
     @Override
64
     @Override
61
     @Transactional
65
     @Transactional
65
         if (caseApplication1 == null) {
69
         if (caseApplication1 == null) {
66
             return AjaxResult.success();
70
             return AjaxResult.success();
67
         }
71
         }
68
-        Integer currentStatus = caseApplication1.getCaseStatus();
72
+        //  Integer currentStatus = caseApplication1.getCaseStatus();
69
         Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
73
         Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
74
+        if (arbitratMethodOriral == null) {
75
+            return AjaxResult.error("请选择仲裁方式");
76
+        }
70
 
77
 
71
         String caseNum = caseApplication1.getCaseNum();
78
         String caseNum = caseApplication1.getCaseNum();
72
         if (opinion == 0) {   //拒绝
79
         if (opinion == 0) {   //拒绝
77
                 //修改案件状态为待修改开庭时间
84
                 //修改案件状态为待修改开庭时间
78
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
85
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
79
                 // 新增日志
86
                 // 新增日志
80
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
87
+
81
 
88
 
82
             } else {
89
             } else {
83
                 caseApplication1.setArbitratMethod(2);
90
                 caseApplication1.setArbitratMethod(2);
84
                 //修改案件状态为待书面审理
91
                 //修改案件状态为待书面审理
85
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
92
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
86
-                // 新增日志
87
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
93
+
88
 
94
 
89
             }
95
             }
90
-        } else if (opinion == 1 ) {
96
+        } else if (opinion == 1) {
91
             if (arbitratMethodOriral == 2) {
97
             if (arbitratMethodOriral == 2) {
92
                 //修改案件状态为待书面审理
98
                 //修改案件状态为待书面审理
93
                 caseApplication1.setArbitratMethod(2);
99
                 caseApplication1.setArbitratMethod(2);
94
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
100
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
95
-                // 新增日志
96
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
101
+
97
 
102
 
98
             } else {
103
             } else {
99
                 //修改案件状态为待修改开庭时间
104
                 //修改案件状态为待修改开庭时间
100
                 caseApplication1.setArbitratMethod(1);
105
                 caseApplication1.setArbitratMethod(1);
101
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
106
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
102
-                // 新增日志
103
-                CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
107
+
104
 
108
 
105
             }
109
             }
106
-        }else if (opinion == 2) {
110
+        } else if (opinion == 2) {
107
             if (arbitratMethodNow == 2) {
111
             if (arbitratMethodNow == 2) {
108
                 //修改案件状态为待书面审理
112
                 //修改案件状态为待书面审理
109
                 caseApplication1.setArbitratMethod(2);
113
                 caseApplication1.setArbitratMethod(2);
110
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
114
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
111
-                // 新增日志
112
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
115
+
113
 
116
 
114
             } else {
117
             } else {
115
                 //修改案件状态为待修改开庭时间
118
                 //修改案件状态为待修改开庭时间
116
                 caseApplication1.setArbitratMethod(1);
119
                 caseApplication1.setArbitratMethod(1);
117
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
120
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
118
-                // 新增日志
119
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
121
+
120
 
122
 
121
             }
123
             }
122
         }
124
         }
126
             String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
128
             String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
127
             //发送短信通知
129
             //发送短信通知
128
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
130
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
129
-
130
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
131
-            caseAffiliate.setCaseAppliId(caseApplication1.getId());
132
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
131
+            //获取案件关联人信息
132
+            List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseApplication1.getId());
133
             if (caseAffiliates != null && caseAffiliates.size() > 0) {
133
             if (caseAffiliates != null && caseAffiliates.size() > 0) {
134
-                for (CaseAffiliate affiliate : caseAffiliates) {
134
+                ArrayList<CaseAffiliateEntity> operatorList = new ArrayList<>();
135
+                // 申请操作人
136
+                Optional<CaseAffiliateEntity> applicantAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
137
+                // 被申请操作人
138
+                Optional<CaseAffiliateEntity> resAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
139
+                if (!applicantAffiliateOpt.isPresent() || !resAffiliateOpt.isPresent()) {
140
+                    throw new ServiceException("未找到案件操作人员");
141
+                }
142
+                operatorList.add(applicantAffiliateOpt.get());
143
+                operatorList.add(resAffiliateOpt.get());
144
+                for (CaseAffiliateEntity affiliate : operatorList) {
135
                     request.setTemplateId("1931000");
145
                     request.setTemplateId("1931000");
136
-                    request.setPhone(affiliate.getContactTelphone());
146
+                    request.setPhone(affiliate.getPhone());
137
                     // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
147
                     // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
138
                     // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
148
                     // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
139
                     String name = affiliate.getName();
149
                     String name = affiliate.getName();
148
                     String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
158
                     String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
149
                     smsSendRecord.setSendContent(content);
159
                     smsSendRecord.setSendContent(content);
150
                     smsSendRecord.setCreateBy(getUsername());
160
                     smsSendRecord.setCreateBy(getUsername());
151
-                    if (aBoolean){
161
+                    if (aBoolean) {
152
                         smsSendRecord.setSendStatus(1);
162
                         smsSendRecord.setSendStatus(1);
153
-                    }else {
163
+                    } else {
154
                         smsSendRecord.setSendStatus(0);
164
                         smsSendRecord.setSendStatus(0);
155
                     }
165
                     }
156
                     smsRecordMapper.saveSmsSendRecord(smsSendRecord);
166
                     smsRecordMapper.saveSmsSendRecord(smsSendRecord);
157
                 }
167
                 }
158
             }
168
             }
159
-
160
-            return AjaxResult.success("审核成功");
161
         }
169
         }
170
+        // 新增日志
171
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION_METHOD, "");
162
         return AjaxResult.success();
172
         return AjaxResult.success();
163
     }
173
     }
164
 
174
 
170
         caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
180
         caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
171
         List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
181
         List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
172
         if (caseApplications1 != null && caseApplications1.size() > 0) {
182
         if (caseApplications1 != null && caseApplications1.size() > 0) {
173
-            for(CaseApplication caseApplicationse:caseApplications1){
174
-                Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplicationse.getId());
175
-                String caseNum = caseApplicationse.getCaseNum();
176
-                Integer arbitratMethod = caseApplication.getArbitratMethod();
177
-                if (arbitratMethod == 1) {
178
-                    caseApplicationse.setArbitratMethod(1);
179
-                    caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
180
-                    // 新增日志
181
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
182
-
183
-                }else if (arbitratMethod == 2) {
184
-                    //修改案件状态为待书面审理
185
-                    caseApplicationse.setArbitratMethod(2);
186
-                    caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
187
-                    // 新增日志
188
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
189
-
190
-                }
191
-                int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
192
-
193
-                if (i > 0) {
194
-                    String arbitratMethodStr = caseApplicationse.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
195
-                    //发送短信通知
196
-                    SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
197
-
198
-                    CaseAffiliate caseAffiliate = new CaseAffiliate();
199
-                    caseAffiliate.setCaseAppliId(caseApplicationse.getId());
200
-                    List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
201
-                    if (caseAffiliates != null && caseAffiliates.size() > 0) {
202
-                        for (CaseAffiliate affiliate : caseAffiliates) {
203
-                            request.setTemplateId("1931000");
204
-                            request.setPhone(affiliate.getContactTelphone());
205
-                            // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
206
-                            // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
207
-                            String name = affiliate.getName();
208
-                            request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
209
-                            Boolean aBoolean = SmsUtils.sendSms(request);
210
-                            //保存短信发送记录
211
-                            SmsSendRecord smsSendRecord = new SmsSendRecord();
212
-                            smsSendRecord.setCaseId(caseApplicationse.getId());
213
-                            smsSendRecord.setCaseNum(caseApplicationse.getCaseNum());
214
-                            smsSendRecord.setPhone(request.getPhone());
215
-                            smsSendRecord.setSendTime(new Date());
216
-                            String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
217
-                            smsSendRecord.setSendContent(content);
218
-                            smsSendRecord.setCreateBy(getUsername());
219
-                            if (aBoolean){
220
-                                smsSendRecord.setSendStatus(1);
221
-                            }else {
222
-                                smsSendRecord.setSendStatus(0);
223
-                            }
224
-                            smsRecordMapper.saveSmsSendRecord(smsSendRecord);
225
-                        }
226
-                    }
227
-
228
-
229
-                }
230
 
183
 
231
 
184
 
185
+            for (CaseApplication caseApplicationse : caseApplications1) {
186
+                caseArbitrateService.examineArbitrateMethod(caseApplicationse, caseApplication.getOpinion(), caseApplication.getArbitratMethod());
232
             }
187
             }
233
 
188
 
234
-        }else{
189
+        } else {
235
             throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
190
             throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
236
         }
191
         }
237
 
192
 
254
                 CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
209
                 CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
255
                 //案件日志表里添加数据
210
                 //案件日志表里添加数据
256
                 // 新增日志
211
                 // 新增日志
257
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
212
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
258
 
213
 
259
                 // 生成裁决书
214
                 // 生成裁决书
260
                 CaseApplication application = new CaseApplication();
215
                 CaseApplication application = new CaseApplication();
266
 
221
 
267
             }
222
             }
268
 
223
 
269
-        }else{
224
+        } else {
270
             throw new ServiceException("这个批号没有批量书面审理的案件");
225
             throw new ServiceException("这个批号没有批量书面审理的案件");
271
         }
226
         }
272
         return AjaxResult.success();
227
         return AjaxResult.success();
276
     @Override
231
     @Override
277
     @Transactional
232
     @Transactional
278
     public AjaxResult writtenHear(CaseIds caseIds) {
233
     public AjaxResult writtenHear(CaseIds caseIds) {
279
-        if (caseIds!=null){
234
+        if (caseIds != null) {
280
             List<Long> ids = caseIds.getIds();
235
             List<Long> ids = caseIds.getIds();
281
             for (Long caseId : ids) {
236
             for (Long caseId : ids) {
282
                 //查询案件详情
237
                 //查询案件详情
289
                 ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
244
                 ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
290
                 if (arbitrateRecord1 != null) {
245
                 if (arbitrateRecord1 != null) {
291
                     int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
246
                     int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
292
-                    if (i > 0) {
293
 
247
 
294
-                        // 新增日志
295
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
296
-
297
-                    }
298
                 } else {
248
                 } else {
299
                     //提交仲裁结果
249
                     //提交仲裁结果
300
                     int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
250
                     int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
301
-                    if (i > 0) {
302
-
303
-                        // 新增日志
304
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
305
-                    }
306
                 }
251
                 }
307
                 // 生成裁决书
252
                 // 生成裁决书
308
                 CaseApplication application = new CaseApplication();
253
                 CaseApplication application = new CaseApplication();
309
                 application.setId(caseId);
254
                 application.setId(caseId);
310
                 adjudicationService.createDocument(application);
255
                 adjudicationService.createDocument(application);
311
-                    //修改案件状态
312
-                    caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
313
-                    int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
314
-
256
+                //修改案件状态
257
+                caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
258
+                int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
259
+// 新增日志
260
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
315
             }
261
             }
262
+
263
+
316
             return AjaxResult.success("审理成功");
264
             return AjaxResult.success("审理成功");
317
         }
265
         }
318
         return AjaxResult.error("请检查参数");
266
         return AjaxResult.error("请检查参数");
319
     }
267
     }
320
 
268
 
321
-    //生成裁决书
322
-    private Boolean generateAward(Long id) {
323
-        try {
324
-            Map<String, Object> datas = new HashMap<>();
325
-            if (id == null) {
326
-                return null;
327
-            }
328
-            //获取案件详细信息
329
-            CaseApplication caseApplication = new CaseApplication();
330
-            caseApplication.setId(id);
331
-            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
332
-            //生成编码
333
-            String equipmentNo = getNewEquipmentNo();
334
-            datas.put("num", equipmentNo);
335
-            //获取仲裁记录表里的相关信息
336
-            ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
337
-            arbitrateRecord.setCaseAppliId(id);
338
-            ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
339
-            //获取案件关联人信息
340
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
341
-            caseAffiliate.setCaseAppliId(id);
342
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
343
-            List<String> nameAgentList = new ArrayList<>();
344
-            if (caseAffiliates != null && caseAffiliates.size() > 0) {
345
-                for (CaseAffiliate affiliate : caseAffiliates) {
346
-                    //获取身份类型
347
-                    int identityType = affiliate.getIdentityType();
348
-                    if (identityType == 1) {    //申请人
349
-                        datas.put("appName", affiliate.getName());
350
-                        datas.put("appAddress", affiliate.getResidenAffili());
351
-                        datas.put("appContactAddress", affiliate.getContactAddress());
352
-                        datas.put("appLegalPerson", affiliate.getCompLegalPerson());
353
-                        datas.put("appLegalPersonTitle", affiliate.getCompLegalperPost());
354
-                        datas.put("appAgentName", affiliate.getNameAgent());
355
-                        datas.put("appAgentTitle", affiliate.getAppliAgentTitle());
356
-                        nameAgentList.add(affiliate.getNameAgent());
357
-                    } else if (identityType == 2) {  //被申请人
358
-                        datas.put("resName", affiliate.getName());
359
-                        datas.put("resAddress", affiliate.getResidenAffili());
360
-                        String responSex = affiliate.getResponSex();
361
-                        if (responSex.equals("0")) {
362
-                            datas.put("resSex", "男");
363
-                        } else if (responSex.equals("1")){
364
-                            datas.put("resSex", "女");
365
-                        }else {
366
-                            datas.put("resSex", "未知");
367
-                        }
368
-                        Date responBirth = affiliate.getResponBirth();
369
-                        if (responBirth != null) {
370
-                            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
371
-                            String responBirthStr = sdf.format(responBirth);
372
-                            datas.put("resDateOfBirth", responBirthStr);
373
-
374
-                        }
375
-
376
-                        datas.put("resContactAddress", affiliate.getContactAddress());
377
-                        nameAgentList.add(affiliate.getNameAgent());
378
-                    }
379
-                }
380
-            }
381
-            Date createTime = caseApplication1.getCreateTime();
382
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
383
-            // 将日期格式化为字符串
384
-            String createTimeStr = sdf.format(createTime);
385
-            datas.put("submissionDate", createTimeStr);
386
-            Date registerDate = caseApplication1.getRegisterDate();
387
-            String registerDateStr = sdf.format(registerDate);
388
-            datas.put("acceptDate", registerDateStr);
389
-            //反请求
390
-            Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
391
-            String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
392
-                    "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
393
-                    "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
394
-            if (adjudicaCounter == null) {
395
-                datas.put("counterclaim", null);
396
-            } else if (adjudicaCounter == 1) {
397
-                datas.put("counterclaim", counterclaim);
398
-            } else {
399
-                datas.put("counterclaim", null);
400
-            }
401
-            //财产保全
402
-            Integer properPreser = caseApplication1.getProperPreser();
403
-            String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
404
-                    "第二十八条之规定,将该申请提交至法院。";
405
-            if (properPreser == null) {
406
-                datas.put("preservation", null);
407
-            } else if (properPreser == 1) {
408
-                datas.put("preservation", preservation);
409
-            } else {
410
-                datas.put("preservation", null);
411
-            }
412
-            //管辖权异议
413
-            Integer objectiJuris = caseApplication1.getObjectiJuris();
414
-            String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
415
-                    ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
416
-            if (objectiJuris == null) {
417
-                datas.put("jurisdictionalObjection", null);
418
-            } else if (objectiJuris == 1) {
419
-                datas.put("jurisdictionalObjection", jurisdictionalObjection);
420
-            } else {
421
-                datas.put("jurisdictionalObjection", null);
422
-            }
423
-            String arbitratorName = caseApplication1.getArbitratorName();
424
-            datas.put("arbitratorName", arbitratorName);
425
-            Integer arbitratMethod = caseApplication1.getArbitratMethod();
426
-            Date hearDate = caseApplication1.getHearDate();
427
-            if (hearDate != null) {
428
-                String hearDateStr = sdf.format(hearDate);
429
-                //线上开庭时
430
-                if (arbitratMethod == 1) {
431
-                    String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
432
-                    String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
433
-                    datas.put("onLine1", onLine1);
434
-                    datas.put("hearDate", hearDateStr);
435
-                    datas.put("onLine2", onLine2);
436
-                } else {
437
-                    //书面仲裁时
438
-                    String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
439
-                    String written2 = "在仲裁委所在地开庭审理了本案。";
440
-                    datas.put("written1", written1);
441
-                    datas.put("hearDate1", hearDateStr);
442
-                    datas.put("written2", written2);
443
-                }
444
-            }
445
-            Integer isAbsence = caseApplication1.getIsAbsence();
446
-            if (isAbsence == null) {
447
-                datas.put("absent1", null);
448
-                datas.put("absent2", null);
449
-                datas.put("absent3", null);
450
-                datas.put("absent4", null);
451
-                datas.put("absent5", null);
452
-                datas.put("attend1", null);
453
-                datas.put("attend2", null);
454
-                datas.put("attend3", null);
455
-                datas.put("attend4", null);
456
-                datas.put("attend5", null);
457
-                datas.put("attend6", null);
458
-                datas.put("attend7", null);
459
-                datas.put("appAgentName1", null);
460
-                datas.put("appAgentName2", null);
461
-                datas.put("resAgentName", null);
462
-            } else if (isAbsence == 1) {
463
-                //缺席审理
464
-                String absent1 = "申请人的特别授权委托代理人";
465
-                String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
466
-                        "《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。";
467
-                String absent3 = "庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明," +
468
-                        "发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。";
469
-                String absent4 = "(二/三)当事人提供的证据材料\n" +
470
-                        "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
471
-                String absent5 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
472
-                        "第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
473
-                datas.put("absent1", absent1);
474
-                datas.put("absent2", absent2);
475
-                datas.put("absent3", absent3);
476
-                datas.put("absent4", absent4);
477
-                datas.put("absent5", absent5);
478
-                datas.put("appAgentName1", nameAgentList.get(0));
479
-            } else {
480
-                //出席审理
481
-                String attend1 = "申请人的特别授权委托代理人";
482
-                String attend2 = "和被申请人本人/的特别授权委托代理人";
483
-                String attend3 = "出席了庭审。";
484
-                String attend4 = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;" +
485
-                        "双方当事人均出示了证据材料并对对方的证据材料进行了质证;申请人出示了证据材料," +
486
-                        "被申请人对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论," +
487
-                        "并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。";
488
-                String attend5 = "(二)被申请人的答辩意见";
489
-                String attend6 = "(二/三)当事人提供的证据材料及对方的质证意见\n" +
490
-                        "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
491
-                String attend7 = "被申请人对上述材料的质证意见为:";
492
-                datas.put("attend1", attend1);
493
-                datas.put("attend2", attend2);
494
-                datas.put("attend3", attend3);
495
-                datas.put("attend4", attend4);
496
-                datas.put("attend5", attend5);
497
-                datas.put("attend6", attend6);
498
-                datas.put("attend7", attend7);
499
-                datas.put("responCrossOpin", caseApplication1.getResponCrossOpin());
500
-                datas.put("appAgentName2", nameAgentList.get(0));
501
-                datas.put("resAgentName", nameAgentList.get(1));
502
-                if (arbitratMethod == 1) {
503
-                    //被申出席+开庭
504
-                    String attend8 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
505
-                            "第五十一条的规定,裁决如下:";
506
-                    datas.put("attend8", attend8);
507
-                } else {
508
-                    //被申出席+书面
509
-                    String attend9 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
510
-                            "第五十一条、第五十八条的规定,裁决如下:";
511
-                    datas.put("attend9", attend9);
512
-                }
513
-            }
514
-            datas.put("claims", caseApplication1.getArbitratClaims());
515
-            datas.put("request", caseApplication1.getRequestRule());
516
-            CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
517
-            List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
518
-            if (caseAttachList1 != null && caseAttachList1.size() > 0) {
519
-                for (CaseAttach caseAttach : caseAttachList1) {
520
-                    if (caseAttach.getAnnexType() == 6) {   //被申请人证据材料
521
-                        String annexName = caseAttach.getAnnexName();
522
-                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
523
-                        if (isImageFile) {
524
-                            String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
525
-                            System.out.println("路径是===========" + annexPath);
526
-                            PictureRenderData pictureRenderData = WordUtil
527
-                                    .rebuildImageContent(100, 100, null, annexPath);
528
-                            datas.put("resEvidenceMaterial", pictureRenderData);
529
-                        }
530
-                    } else if (caseAttach.getAnnexType() == 2) {   //申请人证据材料
531
-                        String annexName = caseAttach.getAnnexName();
532
-                        boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
533
-                        if (isImageFile) {
534
-                            String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
535
-                            System.out.println("路径是===========" + annexPath);
536
-                            PictureRenderData pictureRenderData = WordUtil
537
-                                    .rebuildImageContent(100, 100, null, annexPath);
538
-                            //申请人证据材料
539
-                            datas.put("appEvidenceMaterial", pictureRenderData);
540
-                        }
541
-                    }
542
-                }
543
-            }
544
-            datas.put("applicaCrossOpin", "被申请人证据不足,无法说明事实");
545
-            datas.put("factDetermi", "被申请人欠款属实");
546
-            datas.put("arbitrateThink", " 被申请人应按约定还款");
547
-            datas.put("rulingFollows", "被申请人依法偿还申请人欠款");
548
-            LocalDate now = LocalDate.now();
549
-            String year = Integer.toString(now.getYear());
550
-            datas.put("year", year);
551
-            String month = String.format("%02d", now.getMonthValue());
552
-            String day = String.format("%02d", now.getDayOfMonth());
553
-            String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
554
-            //String modalFilePath = "D:/develop/新裁决书模板.docx";
555
-            String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
556
-            //String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
557
-            String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
558
-            String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
559
-            String resultFilePath = saveFolderPath + "/" + fileName;
560
-            // 创建日期目录
561
-            File saveFolder = new File(saveFolderPath);
562
-            if (!saveFolder.exists()) {
563
-                saveFolder.mkdirs();
564
-            }
565
-            Path sourcePath = new File(modalFilePath).toPath();
566
-            Path destinationPath = new File(resultFilePath).toPath();
567
-            Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
568
-            String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
569
-            File file = new File(docFilePath);
570
-            if (file.exists()) {
571
-                InputStream in = new FileInputStream(file);
572
-                XWPFDocument xwpfDocument = new XWPFDocument(in);
573
-                WordUtil.changeText(xwpfDocument);
574
-            }
575
-            String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
576
-            CaseAttach caseAttach = CaseAttach.builder()
577
-                    .caseAppliId(id)
578
-                    .annexName(saveName)
579
-                    .annexPath(savePath)
580
-                    .annexType(3)
581
-                    .build();
582
-            //保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
583
-            CaseAttach caseAttach1 = new CaseAttach();
584
-            caseAttach1.setAnnexType(3);
585
-            caseAttach1.setCaseAppliId(id);
586
-            List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
587
-            if (caseAttachList != null && caseAttachList.size() > 0) {
588
-                //之前已经生成过了,更新
589
-                caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
590
-            } else {
591
-                //之前没生成过,新增
592
-                int i = caseAttachMapper.save(caseAttach);
593
-                if (i > 0) {
594
-                    if (arbitrateRecord1 != null) {
595
-                        Long annexId = caseAttach.getAnnexId();
596
-                        //将附件id保存到仲裁记录表里面
597
-                        arbitrateRecord1.setAnnexId(annexId);
598
-                        arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
599
-                    }
600
-                }
601
-            }
602
-            return Boolean.TRUE;
603
-        } catch (IOException e) {
604
-            return Boolean.FALSE;
605
-        }
606
-    }
607
 
269
 
608
     public String getNewEquipmentNo() {
270
     public String getNewEquipmentNo() {
609
         Object awardNum = redisCache.getCacheObject("awardNum");
271
         Object awardNum = redisCache.getCacheObject("awardNum");

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

59
     @Autowired
59
     @Autowired
60
     private ICaseApplicationService caseApplicationService;
60
     private ICaseApplicationService caseApplicationService;
61
 
61
 
62
-    @Override
63
-    @Transactional
64
-    public AjaxResult getCaseDetailsById(Long id, String userName) {
65
-        CaseApplication caseApplication = new CaseApplication();
66
-        caseApplication.setId(id);
67
-        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
68
-        if (caseApplication1 != null) {
69
-            CaseDetailVO caseDetailVO = new CaseDetailVO();
70
-            BeanUtils.copyProperties(caseApplication1, caseDetailVO);
71
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
72
-            caseAffiliate.setCaseAppliId(id);
73
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
74
-            for (CaseAffiliate affiliate : caseAffiliates) {
75
-                if (affiliate.getName() != null) {
76
-                    String name = affiliate.getName();
77
-                    //判断当前登录人和案件关联人姓名是否一致
78
-                    if (name.equals(userName)) {  //一致,将案件关联人的身份类型赋给当前登录人
79
-                        caseDetailVO.setIdentityType(affiliate.getIdentityType());
80
-                    }
81
-                }
82
-                if (affiliate.getIdentityType() == 1) {  //申请人
83
-                    caseDetailVO.setApplicantName(affiliate.getName());
84
-                } else {
85
-                    caseDetailVO.setRespondentName(affiliate.getName());
86
-                }
87
-                //根据案件id查询案件证据材料
88
-                List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
89
-                if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
90
-//                    for (CaseAttach caseAttach : evidenceMaterialList) {
91
-//                        //根据附件类型决定返回的路径
92
-//                        Integer annexType = caseAttach.getAnnexType();
93
-//                        if (annexType != 1){
94
-//                            String path = caseAttach.getAnnexName();
62
+//    @Override
63
+//    @Transactional
64
+//    public AjaxResult getCaseDetailsById(Long id, String userName) {
65
+//        CaseApplication caseApplication = new CaseApplication();
66
+//        caseApplication.setId(id);
67
+//        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
68
+//        if (caseApplication1 != null) {
69
+//            CaseDetailVO caseDetailVO = new CaseDetailVO();
70
+//            BeanUtils.copyProperties(caseApplication1, caseDetailVO);
71
+//            CaseAffiliate caseAffiliate = new CaseAffiliate();
72
+//            caseAffiliate.setCaseAppliId(id);
73
+//            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
74
+//            for (CaseAffiliate affiliate : caseAffiliates) {
75
+//                if (affiliate.getName() != null) {
76
+//                    String name = affiliate.getName();
77
+//                    //判断当前登录人和案件关联人姓名是否一致
78
+//                    if (name.equals(userName)) {  //一致,将案件关联人的身份类型赋给当前登录人
79
+//                        caseDetailVO.setIdentityType(affiliate.getIdentityType());
80
+//                    }
81
+//                }
82
+//                if (affiliate.getIdentityType() == 1) {  //申请人
83
+//                    caseDetailVO.setApplicantName(affiliate.getName());
84
+//                } else {
85
+//                    caseDetailVO.setRespondentName(affiliate.getName());
86
+//                }
87
+//                //根据案件id查询案件证据材料
88
+//                List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
89
+//                if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
90
+////                    for (CaseAttach caseAttach : evidenceMaterialList) {
91
+////                        //根据附件类型决定返回的路径
92
+////                        Integer annexType = caseAttach.getAnnexType();
93
+////                        if (annexType != 1){
94
+////                            String path = caseAttach.getAnnexName();
95
+////                            String prefix = "/profile";
96
+////                            int startIndex = path.indexOf(prefix);
97
+////                            startIndex += prefix.length();
98
+////                            String extractedPath = "/uploadPath" + path.substring(startIndex);
99
+////                            caseAttach.setAnnexPath(extractedPath);
100
+////                        }else {
101
+////                            String annexPath = caseAttach.getAnnexPath();
102
+////                            String result = annexPath.replace("/home/ruoyi", "");
103
+////                            caseAttach.setAnnexPath(result);
104
+////                        }
105
+////                    }
106
+//
107
+//                        for (CaseAttach caseAttach : evidenceMaterialList) {
108
+//                            String annexName = caseAttach.getAnnexName();
95
 //                            String prefix = "/profile";
109
 //                            String prefix = "/profile";
96
-//                            int startIndex = path.indexOf(prefix);
97
-//                            startIndex += prefix.length();
98
-//                            String extractedPath = "/uploadPath" + path.substring(startIndex);
99
-//                            caseAttach.setAnnexPath(extractedPath);
100
-//                        }else {
101
-//                            String annexPath = caseAttach.getAnnexPath();
102
-//                            String result = annexPath.replace("/home/ruoyi", "");
103
-//                            caseAttach.setAnnexPath(result);
110
+//                            int startIndex = annexName.indexOf(prefix);
111
+//                            if(startIndex!=-1) {
112
+//                                startIndex += prefix.length();
113
+//
114
+//                                String annexPath = "/uploadPath" + annexName.substring(startIndex);
115
+//                                caseAttach.setAnnexPath(annexPath);
116
+//                            }
117
+//                            int startIndexnew = annexName.lastIndexOf("/");
118
+//                            if (startIndexnew != -1) {
119
+//                                String annexNamenew = annexName.substring(startIndexnew + 1);
120
+//                                caseAttach.setAnnexName(annexNamenew);
121
+//                            }
122
+//
123
+//
104
 //                        }
124
 //                        }
105
-//                    }
106
-
107
-                        for (CaseAttach caseAttach : evidenceMaterialList) {
108
-                            String annexName = caseAttach.getAnnexName();
109
-                            String prefix = "/profile";
110
-                            int startIndex = annexName.indexOf(prefix);
111
-                            if(startIndex!=-1) {
112
-                                startIndex += prefix.length();
113
-
114
-                                String annexPath = "/uploadPath" + annexName.substring(startIndex);
115
-                                caseAttach.setAnnexPath(annexPath);
116
-                            }
117
-                            int startIndexnew = annexName.lastIndexOf("/");
118
-                            if (startIndexnew != -1) {
119
-                                String annexNamenew = annexName.substring(startIndexnew + 1);
120
-                                caseAttach.setAnnexName(annexNamenew);
121
-                            }
122
-
123
-
124
-                        }
125
-
126
-                }
127
-                caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
128
-            }
129
-            return AjaxResult.success(caseDetailVO);
130
-        }
131
-        return null;
132
-    }
125
+//
126
+//                }
127
+//                caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
128
+//            }
129
+//            return AjaxResult.success(caseDetailVO);
130
+//        }
131
+//        return null;
132
+//    }
133
 
133
 
134
     @Override
134
     @Override
135
     @Transactional
135
     @Transactional
138
         if (file.isEmpty()) {
138
         if (file.isEmpty()) {
139
             return AjaxResult.error("请选择要上传的文件");
139
             return AjaxResult.error("请选择要上传的文件");
140
         }
140
         }
141
+        AjaxResult success = AjaxResult.success();
141
         try {
142
         try {
142
             String filePath = RuoYiConfig.getUploadPath();
143
             String filePath = RuoYiConfig.getUploadPath();
143
             // 上传
144
             // 上传
144
             String fileName = FileUploadUtils.upload(filePath, file);
145
             String fileName = FileUploadUtils.upload(filePath, file);
146
+            String name = file.getOriginalFilename();
145
             String suffix = getFileExtension(fileName);
147
             String suffix = getFileExtension(fileName);
146
             if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
148
             if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
147
                 // 上传到onlyoffice
149
                 // 上传到onlyoffice
149
                 if(jsonArray!=null && jsonArray.size() > 0) {
151
                 if(jsonArray!=null && jsonArray.size() > 0) {
150
                     for (Object obj : jsonArray) {
152
                     for (Object obj : jsonArray) {
151
                         JSONObject jsonObject = (JSONObject) obj;
153
                         JSONObject jsonObject = (JSONObject) obj;
152
-                       CaseAttach caseAttach = CaseAttach.builder()
154
+                        String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
155
+                        path=path.replace("/home/ruoyi/uploadPath/","/profile/");
156
+                         name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
157
+                        CaseAttach caseAttach = CaseAttach.builder()
153
                                 .caseAppliId(id)
158
                                 .caseAppliId(id)
154
                                .annexType(annexType)
159
                                .annexType(annexType)
155
-                                .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
160
+                                .annexName(name)
156
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
161
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
162
+                                .annexPath(path)
157
                                 .build();
163
                                 .build();
158
-                        if(jsonObject.get("filePath")!=null){
159
-                            String officePath = jsonObject.getString("filePath");
160
-                            String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
161
-                            caseAttach.setAnnexPath(replace);
162
-
164
+//                        if(jsonObject.get("filePath")!=null){
165
+//                            String officePath = jsonObject.getString("filePath");
166
+//                            String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
167
+//                            caseAttach.setAnnexPath(replace);
168
+//
169
+//                        }
170
+                        if(annexType!=null && annexType.equals(8)){
171
+                            // 缴费单,先删除
172
+                            caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,annexType);
163
                         }
173
                         }
164
                         caseAttachMapper.save(caseAttach);
174
                         caseAttachMapper.save(caseAttach);
175
+                        success.put("annexId", caseAttach.getAnnexId());
176
+                        success.put("annexType", caseAttach.getAnnexType());
165
                     }
177
                     }
166
                 }
178
                 }
167
             }else {
179
             }else {
180
+                filePath=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
181
+                if(annexType!=null && annexType.equals(8)){
182
+                    // 缴费单,先删除
183
+                    caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,annexType);
184
+                }
168
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
185
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
169
-                        .annexName(fileName)
186
+                        .annexName(name)
170
                         .annexPath(filePath)
187
                         .annexPath(filePath)
171
                         .annexType(annexType)
188
                         .annexType(annexType)
172
                         .userId(userId)
189
                         .userId(userId)
173
                         .userName(userName)
190
                         .userName(userName)
174
                         .build();
191
                         .build();
175
                 int count = caseAttachMapper.save(caseAttach);
192
                 int count = caseAttachMapper.save(caseAttach);
193
+                success.put("annexId", caseAttach.getAnnexId());
194
+                success.put("annexType", caseAttach.getAnnexType());
176
             }
195
             }
177
             if ( annexType != null && annexType != 8) {
196
             if ( annexType != null && annexType != 8) {
178
                 if (id != null) {
197
                 if (id != null) {
183
                     caseApplicationMapper.submitCaseApplication(caseApplication);
202
                     caseApplicationMapper.submitCaseApplication(caseApplication);
184
                 }
203
                 }
185
             }
204
             }
186
-                return AjaxResult.success();
205
+                return success;
187
         } catch (IOException e) {
206
         } catch (IOException e) {
188
             e.printStackTrace();
207
             e.printStackTrace();
189
         }
208
         }
195
     @Autowired
214
     @Autowired
196
     IdentityAuthenticationMapper identityAuthenticationMapper;
215
     IdentityAuthenticationMapper identityAuthenticationMapper;
197
 
216
 
198
-    @Override
199
-    public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
200
-        // 是否为超级管理员
201
-        int adMinFlag=0;
202
-        String identityNum = "";
203
-            IdentityAuthentication authentication = new IdentityAuthentication();
204
-            LoginUser loginUser = SecurityUtils.getLoginUser();
205
-            // 查询该用户的角色
206
-            // 查询登录人手机号
207
-            SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
208
-            String username = sysUser.getUserName();
209
-            List<SysRole> roles = sysUser.getRoles();
210
-            if(CollectionUtil.isNotEmpty(roles)){
211
-                for (SysRole role : roles) {
212
-                    if(role.getRoleName().equals("超级管理员")
213
-                    ){
214
-                        // 超级管理员可查看所有待案件质证的案件
215
-                        adMinFlag=1;
216
-                        break;
217
-                    }
218
-                }
219
-            }
220
-//          if(adMinFlag!=1) {
221
-//              authentication.setUserName(username);
222
-//              IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
223
-//              if (authentication1 != null) {
224
-//                  identityNum = authentication1.getIdentityNo();
225
-//              }
226
-//          }
227
-        String phone=sysUser.getPhonenumber();
228
-        List<Integer> caseStatusList = Arrays.asList(caseStatus);
229
-//        return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
230
-        return getCaseEvidenceVOListByPhone(phone, caseStatusList, 2);
231
-    }
217
+//    @Override
218
+//    public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
219
+//        // 是否为超级管理员
220
+//        int adMinFlag=0;
221
+//        String identityNum = "";
222
+//            IdentityAuthentication authentication = new IdentityAuthentication();
223
+//            LoginUser loginUser = SecurityUtils.getLoginUser();
224
+//            // 查询该用户的角色
225
+//            // 查询登录人手机号
226
+//            SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
227
+//            String username = sysUser.getUserName();
228
+//            List<SysRole> roles = sysUser.getRoles();
229
+//            if(CollectionUtil.isNotEmpty(roles)){
230
+//                for (SysRole role : roles) {
231
+//                    if(role.getRoleName().equals("超级管理员")
232
+//                    ){
233
+//                        // 超级管理员可查看所有待案件质证的案件
234
+//                        adMinFlag=1;
235
+//                        break;
236
+//                    }
237
+//                }
238
+//            }
239
+////          if(adMinFlag!=1) {
240
+////              authentication.setUserName(username);
241
+////              IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
242
+////              if (authentication1 != null) {
243
+////                  identityNum = authentication1.getIdentityNo();
244
+////              }
245
+////          }
246
+//        String phone=sysUser.getPhonenumber();
247
+//        List<Integer> caseStatusList = Arrays.asList(caseStatus);
248
+////        return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
249
+//        return getCaseEvidenceVOListByPhone(phone, caseStatusList, 2);
250
+//    }
232
 
251
 
233
     @Override
252
     @Override
234
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
253
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
235
-        Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
254
+      //  Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
236
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
255
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
237
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
256
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
238
         if (i > 0) {
257
         if (i > 0) {
239
             // 新增日志
258
             // 新增日志
240
-            CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
259
+//            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants., "");
241
 
260
 
242
             return AjaxResult.success("证据确认成功");
261
             return AjaxResult.success("证据确认成功");
243
         }
262
         }
275
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
294
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
276
             if (i > 0) {
295
             if (i > 0) {
277
                 // 新增日志
296
                 // 新增日志
278
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), caseStatus, "");
297
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
279
 
298
 
280
                 return AjaxResult.success("提交成功");
299
                 return AjaxResult.success("提交成功");
281
             }
300
             }
291
             for (MultipartFile file : files) {
310
             for (MultipartFile file : files) {
292
                 // 上传
311
                 // 上传
293
                 String fileName = FileUploadUtils.upload(filePath, file);
312
                 String fileName = FileUploadUtils.upload(filePath, file);
313
+                String name=file.getOriginalFilename();
294
                 String suffix = getFileExtension(fileName);
314
                 String suffix = getFileExtension(fileName);
295
                 if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
315
                 if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
296
                     // 上传onlyoffice
316
                     // 上传onlyoffice
298
                     if(jsonArray!=null && jsonArray.size() > 0) {
318
                     if(jsonArray!=null && jsonArray.size() > 0) {
299
                         for (Object obj : jsonArray) {
319
                         for (Object obj : jsonArray) {
300
                             JSONObject jsonObject = (JSONObject) obj;
320
                             JSONObject jsonObject = (JSONObject) obj;
321
+                            String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
322
+                            // name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
323
+                            path=path.replace("/home/ruoyi/uploadPath/","/profile/");
324
+
301
                             CaseAttach   caseAttach = CaseAttach.builder()
325
                             CaseAttach   caseAttach = CaseAttach.builder()
302
                                     .caseAppliId(id)
326
                                     .caseAppliId(id)
303
                                     .annexType(annexType)
327
                                     .annexType(annexType)
304
-                                    .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
305
-
328
+                                    .annexName(name)
329
+                                    .annexPath(path)
306
                                     .onlyOfficeFileId(jsonObject.getString("fileId"))
330
                                     .onlyOfficeFileId(jsonObject.getString("fileId"))
307
                                     .build();
331
                                     .build();
308
-                            if(jsonObject.get("filePath")!=null){
309
-                                String officePath = jsonObject.getString("filePath");
310
-                                String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
311
-                                caseAttach.setAnnexPath(replace);
312
-
313
-                            }
314
                             caseAttachMapper.save(caseAttach);
332
                             caseAttachMapper.save(caseAttach);
315
                         }
333
                         }
316
                     }
334
                     }
317
                 }else {
335
                 }else {
336
+                    filePath=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
318
                     CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
337
                     CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
319
-                            .annexName(fileName)
338
+                            .annexName(name)
320
                             .annexPath(filePath)
339
                             .annexPath(filePath)
321
                             .annexType(annexType)
340
                             .annexType(annexType)
322
                             .userId(userId)
341
                             .userId(userId)
334
         }
353
         }
335
         // 给秘书发送短信
354
         // 给秘书发送短信
336
         // 根据caseid查询该案件的法律顾问,根据案件id查申请表,查到申请机构id,然后拿申请机构id查询在哪个人下并且角色要是法律顾问
355
         // 根据caseid查询该案件的法律顾问,根据案件id查申请表,查到申请机构id,然后拿申请机构id查询在哪个人下并且角色要是法律顾问
337
-        CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
338
-        if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
339
-           List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
340
-        if(CollectionUtil.isNotEmpty(userList)){
356
+//        CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
357
+//        if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
358
+//           List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
359
+        SysUser user= sysUserMapper.selectUserByRole("法律顾问");
360
+        if(user!=null){
341
             // 新增短信记录
361
             // 新增短信记录
342
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
362
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
343
             //  1992106	普通短信	修改证据资料通知	尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
363
             //  1992106	普通短信	修改证据资料通知	尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
345
             CaseApplication caseApplication = new CaseApplication();
365
             CaseApplication caseApplication = new CaseApplication();
346
             caseApplication.setId(id);
366
             caseApplication.setId(id);
347
             caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
367
             caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
348
-            for (SysUser user : userList) {
368
+
349
                 request.setPhone(user.getPhonenumber());
369
                 request.setPhone(user.getPhonenumber());
350
                 request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
370
                 request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
351
                 Boolean aBoolean = SmsUtils.sendSms(request);
371
                 Boolean aBoolean = SmsUtils.sendSms(request);
352
                 //保存短信发送记录
372
                 //保存短信发送记录
353
                 SmsSendRecord smsSendRecord = new SmsSendRecord();
373
                 SmsSendRecord smsSendRecord = new SmsSendRecord();
354
-                smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
374
+                smsSendRecord.setCaseId(id);
355
 
375
 
356
                 smsSendRecord.setCaseNum(caseApplication.getCaseNum());
376
                 smsSendRecord.setCaseNum(caseApplication.getCaseNum());
357
                 smsSendRecord.setPhone(request.getPhone());
377
                 smsSendRecord.setPhone(request.getPhone());
365
                     smsSendRecord.setSendStatus(0);
385
                     smsSendRecord.setSendStatus(0);
366
                 }
386
                 }
367
                 smsRecordMapper.saveSmsSendRecord(smsSendRecord);
387
                 smsRecordMapper.saveSmsSendRecord(smsSendRecord);
368
-            }
388
+
369
 
389
 
370
         }
390
         }
371
-        }
391
+
372
 
392
 
373
 
393
 
374
         return AjaxResult.success("上传成功");
394
         return AjaxResult.success("上传成功");
383
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
403
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
384
         if (CollectionUtil.isNotEmpty(caseAttachList)) {
404
         if (CollectionUtil.isNotEmpty(caseAttachList)) {
385
             for (CaseAttach caseAttach : caseAttachList) {
405
             for (CaseAttach caseAttach : caseAttachList) {
386
-                String annexName = caseAttach.getAnnexName();
387
-                String prefix = "/profile";
388
-                int startIndex = annexName.indexOf(prefix);
389
-                startIndex += prefix.length();
390
-                String annexPath = "/uploadPath" + annexName.substring(startIndex);
391
-                caseAttach.setAnnexPath(annexPath);
392
-                int startIndexnew = annexName.lastIndexOf("/");
393
-                if (startIndexnew != -1) {
394
-                    String annexNamenew = annexName.substring(startIndexnew + 1);
395
-                    caseAttach.setAnnexName(annexNamenew);
406
+                String annexPath = caseAttach.getAnnexPath();
407
+                if(StrUtil.isEmpty(annexPath)){
408
+                    continue;
396
                 }
409
                 }
410
+                caseAttach.setAnnexPath(annexPath);
411
+                caseAttach.setAnnexName(caseAttach.getAnnexName());
412
+
397
             }
413
             }
398
             return AjaxResult.success(caseAttachList);
414
             return AjaxResult.success(caseAttachList);
399
         }
415
         }
463
             String filePath = RuoYiConfig.getUploadPath();
479
             String filePath = RuoYiConfig.getUploadPath();
464
             // 上传
480
             // 上传
465
             String fileName = FileUploadUtils.upload(filePath, file);
481
             String fileName = FileUploadUtils.upload(filePath, file);
482
+            fileName=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
466
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
483
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
467
-                    .annexName(fileName)
468
-                    .annexPath(filePath)
484
+                    .annexName(file.getOriginalFilename())
485
+                    .annexPath(fileName)
469
                     .annexType(annexType)
486
                     .annexType(annexType)
470
                     .userId(userId)
487
                     .userId(userId)
471
                     .userName(username)
488
                     .userName(username)
517
         return getChildList(list, t).size() > 0;
534
         return getChildList(list, t).size() > 0;
518
     }
535
     }
519
 
536
 
520
-    private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
521
-        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType,null,SecurityUtils.getUsername());
522
-        if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
523
-            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
524
-                //根据案件id查询姓名
525
-                CaseAffiliate caseAffiliate = new CaseAffiliate();
526
-                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
527
-                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
528
-                for (CaseAffiliate affiliate : caseAffiliates) {
529
-                    if (affiliate.getIdentityType() == 1) {  //申请人
530
-                        caseEvidenceVO.setApplicantName(affiliate.getName());
531
-                    } else {
532
-                        caseEvidenceVO.setRespondentName(affiliate.getName());
533
-                    }
534
-                }
535
-            }
536
-            return caseListByRespondent;
537
-        }
538
-        return null;
539
-    }
540
-    private List<CaseEvidenceVO> getCaseEvidenceVOListByPhone(String phone, List<Integer> caseStatusList, Integer identityType) {
541
-        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(null, caseStatusList, identityType,phone,SecurityUtils.getUsername());
542
-        if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
543
-            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
544
-                //根据案件id查询姓名
545
-                CaseAffiliate caseAffiliate = new CaseAffiliate();
546
-                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
547
-                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
548
-                for (CaseAffiliate affiliate : caseAffiliates) {
549
-                    if (affiliate.getIdentityType() == 1) {  //申请人
550
-                        caseEvidenceVO.setApplicantName(affiliate.getName());
551
-                    } else {
552
-                        caseEvidenceVO.setRespondentName(affiliate.getName());
553
-                    }
554
-                }
555
-            }
556
-            return caseListByRespondent;
557
-        }
558
-        return null;
559
-    }
537
+//    private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
538
+//        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType,null,SecurityUtils.getUsername());
539
+//        if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
540
+//            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
541
+//                //根据案件id查询姓名
542
+//                CaseAffiliate caseAffiliate = new CaseAffiliate();
543
+//                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
544
+//                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
545
+//                for (CaseAffiliate affiliate : caseAffiliates) {
546
+//                    if (affiliate.getIdentityType() == 1) {  //申请人
547
+//                        caseEvidenceVO.setApplicantName(affiliate.getName());
548
+//                    } else {
549
+//                        caseEvidenceVO.setRespondentName(affiliate.getName());
550
+//                    }
551
+//                }
552
+//            }
553
+//            return caseListByRespondent;
554
+//        }
555
+//        return null;
556
+//    }
557
+//    private List<CaseEvidenceVO> getCaseEvidenceVOListByPhone(String phone, List<Integer> caseStatusList, Integer identityType) {
558
+//        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(null, caseStatusList, identityType,phone,SecurityUtils.getUsername());
559
+//        if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
560
+//            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
561
+//                //根据案件id查询姓名
562
+//                CaseAffiliate caseAffiliate = new CaseAffiliate();
563
+//                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
564
+//                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
565
+//                for (CaseAffiliate affiliate : caseAffiliates) {
566
+//                    if (affiliate.getIdentityType() == 1) {  //申请人
567
+//                        caseEvidenceVO.setApplicantName(affiliate.getName());
568
+//                    } else {
569
+//                        caseEvidenceVO.setRespondentName(affiliate.getName());
570
+//                    }
571
+//                }
572
+//            }
573
+//            return caseListByRespondent;
574
+//        }
575
+//        return null;
576
+//    }
560
 }
577
 }

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

13
 import com.ruoyi.common.utils.StringUtils;
13
 import com.ruoyi.common.utils.StringUtils;
14
 import com.ruoyi.wisdomarbitrate.domain.*;
14
 import com.ruoyi.wisdomarbitrate.domain.*;
15
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
15
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
16
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
16
 import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
17
 import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
17
 import com.ruoyi.wisdomarbitrate.mapper.*;
18
 import com.ruoyi.wisdomarbitrate.mapper.*;
18
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
19
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
31
 import java.util.ArrayList;
32
 import java.util.ArrayList;
32
 import java.util.Date;
33
 import java.util.Date;
33
 import java.util.List;
34
 import java.util.List;
35
+import java.util.Optional;
34
 import java.util.stream.Collectors;
36
 import java.util.stream.Collectors;
35
 
37
 
36
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
38
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
47
     private SmsRecordMapper smsRecordMapper;
49
     private SmsRecordMapper smsRecordMapper;
48
     @Autowired
50
     @Autowired
49
     private ArbitrateRecordMapper arbitrateRecordMapper;
51
     private ArbitrateRecordMapper arbitrateRecordMapper;
52
+    private ICasePaymentService casePaymentService;
50
 
53
 
51
     @Autowired
54
     @Autowired
52
     public CasePaymentServiceImpl(ElegentPay elegentPay
55
     public CasePaymentServiceImpl(ElegentPay elegentPay
118
         for (Long id : batchCaseApplication.getIds()) {
121
         for (Long id : batchCaseApplication.getIds()) {
119
             CaseApplication caseApplication = new CaseApplication();
122
             CaseApplication caseApplication = new CaseApplication();
120
             caseApplication.setId(id);
123
             caseApplication.setId(id);
124
+            //查询案件详细信息
125
+            CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
126
+            if (caseApplication1 == null) {
127
+                continue;
128
+            }
129
+
121
             // 查询当前案件节点
130
             // 查询当前案件节点
122
-           Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(id);
131
+         //  Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(id);
123
             if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
132
             if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
124
                 // 同意,更新案件状态为案件质证
133
                 // 同意,更新案件状态为案件质证
125
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
134
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
146
             caseApplicationMapper.submitCaseApplication(caseApplication);
155
             caseApplicationMapper.submitCaseApplication(caseApplication);
147
             //发送短信通知
156
             //发送短信通知
148
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
157
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
149
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
150
-            caseAffiliate.setCaseAppliId(caseApplication.getId());
151
-            List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
158
+            List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseApplication.getId());
152
             if (caseAffiliates != null && caseAffiliates.size() > 0) {
159
             if (caseAffiliates != null && caseAffiliates.size() > 0) {
153
-                for (CaseAffiliate affiliate : caseAffiliates) {
154
-                    //获取身份类型
155
-                    int identityType = affiliate.getIdentityType();
156
-                    //查询案件详细信息
157
-                    CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
158
-                    if (caseApplication1 == null) {
159
-                       continue;
160
-                    }
160
+                // 申请操作人
161
+                Optional<CaseAffiliateEntity> applicantAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
162
+                // 被申请操作人
163
+                Optional<CaseAffiliateEntity> resAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
164
+                if (!applicantAffiliateOpt.isPresent() || !resAffiliateOpt.isPresent()) {
165
+                    throw new ServiceException("未找到案件操作人员");
166
+                }
167
+
161
                     String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
168
                     String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
162
                     String caseNum = caseApplication1.getCaseNum();
169
                     String caseNum = caseApplication1.getCaseNum();
163
-                    if (identityType == 1) {    //申请人
164
-                        String name = affiliate.getName();
165
-                        request.setPhone(affiliate.getContactTelphone());
170
+                CaseAffiliateEntity app = applicantAffiliateOpt.get();
171
+                CaseAffiliateEntity res = resAffiliateOpt.get();
172
+                //申请人
173
+                        String name = app.getName();
174
+                        request.setPhone(app.getPhone());
166
                         Boolean aBoolean = SmsUtils.sendSms(request);
175
                         Boolean aBoolean = SmsUtils.sendSms(request);
167
                         //保存短信发送记录
176
                         //保存短信发送记录
168
                         SmsSendRecord smsSendRecord = new SmsSendRecord();
177
                         SmsSendRecord smsSendRecord = new SmsSendRecord();
189
                             smsSendRecord.setSendStatus(0);
198
                             smsSendRecord.setSendStatus(0);
190
                         }
199
                         }
191
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
200
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
192
-                    } else {       //被申请人
201
+                         //被申请人
193
                         if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
202
                         if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
194
 
203
 
195
-                            request.setPhone(affiliate.getContactTelphone());
204
+                            request.setPhone(res.getPhone());
196
                             request.setTemplateId("1952840");
205
                             request.setTemplateId("1952840");
197
                             // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
206
                             // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
198
-                            String name = affiliate.getName();
207
+                             name = res.getName();
199
                             request.setTemplateParamSet(new String[]{name, caseName, caseNum});
208
                             request.setTemplateParamSet(new String[]{name, caseName, caseNum});
200
-                            Boolean aBoolean = SmsUtils.sendSms(request);
209
+                             aBoolean = SmsUtils.sendSms(request);
201
                             //保存短信发送记录
210
                             //保存短信发送记录
202
-                            SmsSendRecord smsSendRecord = new SmsSendRecord();
211
+                             smsSendRecord = new SmsSendRecord();
203
                             smsSendRecord.setCaseId(caseApplication.getId());
212
                             smsSendRecord.setCaseId(caseApplication.getId());
204
                             smsSendRecord.setCaseNum(caseNum);
213
                             smsSendRecord.setCaseNum(caseNum);
205
                             smsSendRecord.setPhone(request.getPhone());
214
                             smsSendRecord.setPhone(request.getPhone());
214
                             }
223
                             }
215
                             smsRecordMapper.saveSmsSendRecord(smsSendRecord);
224
                             smsRecordMapper.saveSmsSendRecord(smsSendRecord);
216
                         }
225
                         }
217
-                    }
218
-                }
226
+
227
+
219
                 //更改记录表里的支付状态和支付时间
228
                 //更改记录表里的支付状态和支付时间
220
                 CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
229
                 CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
221
                 casePaymentRecord.setPaymentStatus(1);
230
                 casePaymentRecord.setPaymentStatus(1);
224
                 casePaymentRecordMapper.update(casePaymentRecord);
233
                 casePaymentRecordMapper.update(casePaymentRecord);
225
                 // 新增日志
234
                 // 新增日志
226
                 if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
235
                 if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
227
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
236
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
228
                 }else {
237
                 }else {
229
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
238
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(),  CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
230
                 }
239
                 }
231
             }
240
             }
232
         }
241
         }
271
                 paymentRecord.setPaymentStatus(1);
280
                 paymentRecord.setPaymentStatus(1);
272
                 casePaymentRecordMapper.saveRecord(paymentRecord);
281
                 casePaymentRecordMapper.saveRecord(paymentRecord);
273
                 // 新增日志
282
                 // 新增日志
274
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus ,"");
283
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),  CaseApplicationConstants.PENDING_PAYMENT ,"");
275
             }
284
             }
276
         }
285
         }
277
 
286
 
403
 
412
 
404
         if (caseApplications != null && caseApplications.size() > 0) {
413
         if (caseApplications != null && caseApplications.size() > 0) {
405
             List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
414
             List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
406
-            for (Long caseId : caseIds) {
407
-                Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseId);
408
-                CaseApplication caseApplication = new CaseApplication();
409
-                caseApplication.setId(caseId);
410
-                caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
411
-                caseApplicationMapper.submitCaseApplication(caseApplication);
412
-                //发送短信通知
413
-                SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
414
-                CaseAffiliate caseAffiliate = new CaseAffiliate();
415
-                caseAffiliate.setCaseAppliId(caseApplication.getId());
416
-                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);            //获取案件关联人信息
417
-                if (caseAffiliates != null && caseAffiliates.size() > 0) {
418
-                    for (CaseAffiliate affiliate : caseAffiliates) {
419
-                        //获取身份类型
420
-                        int identityType = affiliate.getIdentityType();
421
-                        //查询案件详细信息
422
-                        CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
423
-                        if (caseApplication1 == null) {
424
-                            continue;
425
-                        }
426
-                        String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
427
-                        String caseNum = caseApplication1.getCaseNum();
428
-                        if (identityType == 1) {    //申请人
429
-                            request.setPhone(affiliate.getContactTelphone());
430
-                            request.setTemplateId("1928003"); //传入申请人模板id
431
-                            // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
432
-                            // 模板id:1928003 普通短信 案件受理通知
433
-                            String name = affiliate.getName();
434
-                            request.setTemplateParamSet(new String[]{name, caseName, caseNum});
435
-                            Boolean aBoolean = SmsUtils.sendSms(request);
436
-                            //保存短信发送记录
437
-                            SmsSendRecord smsSendRecord = new SmsSendRecord();
438
-                            smsSendRecord.setCaseId(caseApplication.getId());
439
-                            smsSendRecord.setCaseNum(caseNum);
440
-                            smsSendRecord.setPhone(request.getPhone());
441
-                            smsSendRecord.setSendTime(new Date());
442
-                            String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
443
-                            smsSendRecord.setSendContent(content);
444
-                            smsSendRecord.setCreateBy(getUsername());
445
-                            if (aBoolean) {
446
-                                smsSendRecord.setSendStatus(1);
447
-                            } else {
448
-                                smsSendRecord.setSendStatus(0);
449
-                            }
450
-                            smsRecordMapper.saveSmsSendRecord(smsSendRecord);
451
-                        } else {       //被申请人
452
-
453
-                            request.setPhone(affiliate.getContactTelphone());
454
-                            request.setTemplateId("1952840");
455
-                            // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
456
-                            String name = affiliate.getName();
457
-                            request.setTemplateParamSet(new String[]{name, caseName, caseNum});
458
-                            Boolean aBoolean = SmsUtils.sendSms(request);
459
-                            //保存短信发送记录
460
-                            SmsSendRecord smsSendRecord = new SmsSendRecord();
461
-                            smsSendRecord.setCaseId(caseApplication.getId());
462
-                            smsSendRecord.setCaseNum(caseNum);
463
-                            smsSendRecord.setPhone(request.getPhone());
464
-                            smsSendRecord.setSendTime(new Date());
465
-                            String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
466
-                            smsSendRecord.setSendContent(content);
467
-                            smsSendRecord.setCreateBy(getUsername());
468
-                            if (aBoolean) {
469
-                                smsSendRecord.setSendStatus(1);
470
-                            } else {
471
-                                smsSendRecord.setSendStatus(0);
472
-                            }
473
-                            smsRecordMapper.saveSmsSendRecord(smsSendRecord);
474
-                        }
475
-                    }
476
-                    //更改记录表里的支付状态和支付时间
477
-                    CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
478
-                    casePaymentRecord.setPaymentStatus(1);
479
-                    casePaymentRecord.setCaseId(caseId);
480
-                    casePaymentRecord.setPaymentTime(new Date());
481
-                    casePaymentRecord.setUpdateTime(new Date());
482
-                    casePaymentRecordMapper.update(casePaymentRecord);
483
-                    // 新增日志
484
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
485
-
486
-
487
-                }
488
-
489
-            }
415
+            BatchCaseApplication batchCaseApplication = new BatchCaseApplication();
416
+            batchCaseApplication.setIds(caseIds);
417
+            casePaymentService.confirmPayment(batchCaseApplication);
418
+           
490
         }else{
419
         }else{
491
             throw new ServiceException("这个批号没有批量缴费确认的案件");
420
             throw new ServiceException("这个批号没有批量缴费确认的案件");
492
         }
421
         }

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

50
 import java.util.stream.Collectors;
50
 import java.util.stream.Collectors;
51
 
51
 
52
 import static com.google.common.io.Files.getFileExtension;
52
 import static com.google.common.io.Files.getFileExtension;
53
+import static com.ruoyi.common.constant.FileTransformation.getFileName;
53
 import static com.ruoyi.common.core.domain.AjaxResult.error;
54
 import static com.ruoyi.common.core.domain.AjaxResult.error;
54
 import static com.ruoyi.common.core.domain.AjaxResult.success;
55
 import static com.ruoyi.common.core.domain.AjaxResult.success;
55
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
56
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
209
     public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap,  Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
210
     public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap,  Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
210
         // fileMap<caseId, List<File>>
211
         // fileMap<caseId, List<File>>
211
         Map<String, String> fatchMap = new HashMap<>();
212
         Map<String, String> fatchMap = new HashMap<>();
212
-        Integer batchNumber = caseApplicationMapper.selectBatchNumberLike();
213
+        Integer batchNumber = caseApplicationMapper.selectMaxBatchNumber();
213
         AtomicInteger maxBatchNumber = new AtomicInteger();
214
         AtomicInteger maxBatchNumber = new AtomicInteger();
214
         if (batchNumber == null) {
215
         if (batchNumber == null) {
215
             maxBatchNumber.set(1);
216
             maxBatchNumber.set(1);
268
 
269
 
269
                 // 需要新增的用户
270
                 // 需要新增的用户
270
                 List<SysUser> addUsers = new ArrayList<>();
271
                 List<SysUser> addUsers = new ArrayList<>();
271
-                caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
272
+              //  caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
272
                 caseApplication.setCaseLogId(IdWorkerUtil.getId());
273
                 caseApplication.setCaseLogId(IdWorkerUtil.getId());
273
                 caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
274
                 caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
274
                 caseApplication.setCaseAppliId(caseApplication.getId());
275
                 caseApplication.setCaseAppliId(caseApplication.getId());
290
                     if (StrUtil.isEmpty(fileUrl)) {
291
                     if (StrUtil.isEmpty(fileUrl)) {
291
                         continue;
292
                         continue;
292
                     }
293
                     }
294
+                    // 根据路径获取文件名
295
+                    String name = getFileName(fileUrl);
293
                     String suffix = getFileExtension(fileUrl);
296
                     String suffix = getFileExtension(fileUrl);
294
                     if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
297
                     if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
295
                         // 上传onlyoffice
298
                         // 上传onlyoffice
297
                         if(jsonArray!=null && jsonArray.size() > 0) {
300
                         if(jsonArray!=null && jsonArray.size() > 0) {
298
                             for (Object obj : jsonArray) {
301
                             for (Object obj : jsonArray) {
299
                                 JSONObject jsonObject = (JSONObject) obj;
302
                                 JSONObject jsonObject = (JSONObject) obj;
300
-                             CaseAttach   caseAttach = CaseAttach.builder()
303
+                                String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
304
+                                path=path.replace("/home/ruoyi/uploadPath/","/profile/");
305
+                             //   String name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
306
+                                CaseAttach   caseAttach = CaseAttach.builder()
301
                                         .caseAppliId(caseApplication.getId())
307
                                         .caseAppliId(caseApplication.getId())
302
-                                        .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
303
-
308
+                                        .annexName(name)
309
+                                        .annexPath(path)
304
                                         .onlyOfficeFileId(jsonObject.getString("fileId"))
310
                                         .onlyOfficeFileId(jsonObject.getString("fileId"))
305
                                         .build();
311
                                         .build();
306
-                                if(jsonObject.get("filePath")!=null){
307
-                                    String officePath = jsonObject.getString("filePath");
308
-                                    String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
309
-                                    caseAttach.setAnnexPath(replace);
310
-
311
-                                }
312
+//                                if(jsonObject.get("filePath")!=null){
313
+//                                    String officePath = jsonObject.getString("filePath");
314
+//                                    String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
315
+//                                    caseAttach.setAnnexPath(replace);
316
+//
317
+//                                }
312
                                 if(fileUrl.contains("申请书")){
318
                                 if(fileUrl.contains("申请书")){
313
                                     CaseAttach applyFile = new CaseAttach();
319
                                     CaseAttach applyFile = new CaseAttach();
314
                                     BeanUtil.copyProperties(caseAttach, applyFile);
320
                                     BeanUtil.copyProperties(caseAttach, applyFile);
326
 
332
 
327
                         CaseAttach caseAttach = new CaseAttach();
333
                         CaseAttach caseAttach = new CaseAttach();
328
                         caseAttach.setCaseAppliId(caseApplication.getId());
334
                         caseAttach.setCaseAppliId(caseApplication.getId());
335
+                        filePath=filePath.replace("home/ruoyi/uploadPath/","profile/");
329
                         caseAttach.setAnnexPath(filePath);
336
                         caseAttach.setAnnexPath(filePath);
330
-                        if (StrUtil.isNotEmpty(fileUrl)) {
331
-                            String fileName = fileUrl.replace(filePath, "/profile/upload");
332
-                            caseAttach.setAnnexName(fileName);
333
-                        }
337
+
338
+                        caseAttach.setAnnexName(name);
339
+
334
                         // 申请人提供的证据材料
340
                         // 申请人提供的证据材料
335
                         caseAttach.setAnnexType(2);
341
                         caseAttach.setAnnexType(2);
336
                         caseAttachs.add(caseAttach);
342
                         caseAttachs.add(caseAttach);
359
 
365
 
360
                         caseApplicationMapper.insertCaseApplication(caseApplication);
366
                         caseApplicationMapper.insertCaseApplication(caseApplication);
361
                         // 新增日志
367
                         // 新增日志
362
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
368
+                     //   CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_INSERT, "",loginUser);
363
                         caseApplicationLogMapper.insert(caseApplication);
369
                         caseApplicationLogMapper.insert(caseApplication);
364
                         // 多线程执行
370
                         // 多线程执行
365
                         if (CollectionUtil.isNotEmpty(addUsers)) {
371
                         if (CollectionUtil.isNotEmpty(addUsers)) {
374
                             sysDeptMapper.batchSave(sysDepts);
380
                             sysDeptMapper.batchSave(sysDepts);
375
 
381
 
376
                         }
382
                         }
377
-
378
-                        if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
379
-
380
-                            caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
381
-                            caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
382
-                        }
383
+// todo
384
+//                        if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
385
+//
386
+//                            caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
387
+//                            //todo
388
+////                            caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
389
+//                        }
383
                         if (CollectionUtil.isNotEmpty(caseAttachs)) {
390
                         if (CollectionUtil.isNotEmpty(caseAttachs)) {
384
                             caseAttachMapper.batchSave(caseAttachs);
391
                             caseAttachMapper.batchSave(caseAttachs);
385
                             caseAttachLogMapper.batchSave(caseAttachs);
392
                             caseAttachLogMapper.batchSave(caseAttachs);
772
         if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
779
         if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
773
             caseAffiliates.add(debtorAffiliate);
780
             caseAffiliates.add(debtorAffiliate);
774
         }
781
         }
775
-        caseApplication.setCaseAffiliates(caseAffiliates);
782
+        // todo
783
+//        caseApplication.setCaseAffiliates(caseAffiliates);
776
 
784
 
777
     }
785
     }
778
 
786
 

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

248
                             if (downLoadFile) {
248
                             if (downLoadFile) {
249
                                 CaseAttach caseAttach = new CaseAttach();
249
                                 CaseAttach caseAttach = new CaseAttach();
250
                                 caseAttach.setAnnexType(10);  //10代表印章图片
250
                                 caseAttach.setAnnexType(10);  //10代表印章图片
251
-                                caseAttach.setAnnexPath(savePath);
252
-                                caseAttach.setAnnexName(saveName);
251
+                                caseAttach.setAnnexPath(saveName);
252
+                                caseAttach.setAnnexName(fileName);
253
                                 int i1 = caseAttachMapper.save(caseAttach);
253
                                 int i1 = caseAttachMapper.save(caseAttach);
254
                                 if (i1 > 0) {
254
                                 if (i1 > 0) {
255
                                     //将附件id保存到公章管理表里
255
                                     //将附件id保存到公章管理表里

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

8
 import com.ruoyi.common.constant.FileTransformation;
8
 import com.ruoyi.common.constant.FileTransformation;
9
 import com.ruoyi.common.core.domain.AjaxResult;
9
 import com.ruoyi.common.core.domain.AjaxResult;
10
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
10
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
11
+import com.ruoyi.common.core.domain.entity.SysUser;
11
 import com.ruoyi.common.exception.EsignDemoException;
12
 import com.ruoyi.common.exception.EsignDemoException;
12
 import com.ruoyi.common.utils.EmailOutUtil;
13
 import com.ruoyi.common.utils.EmailOutUtil;
13
 import com.ruoyi.common.utils.SecurityUtils;
14
 import com.ruoyi.common.utils.SecurityUtils;
48
     private SealManageMapper sealManageMapper;
49
     private SealManageMapper sealManageMapper;
49
     @Autowired
50
     @Autowired
50
     private CaseLogRecordMapper caseLogRecordMapper;
51
     private CaseLogRecordMapper caseLogRecordMapper;
52
+    @Autowired
53
+    private SysUserMapper sysUserMapper;
51
 
54
 
52
     /**
55
     /**
53
      * 签署流程回调,即签名用印回调
56
      * 签署流程回调,即签名用印回调
85
             Long caseAppliId = sealSignRecordsel.getCaseAppliId();
88
             Long caseAppliId = sealSignRecordsel.getCaseAppliId();
86
             CaseApplication req = new CaseApplication();
89
             CaseApplication req = new CaseApplication();
87
             req.setId(caseAppliId);
90
             req.setId(caseAppliId);
88
-
91
+            // 根据电话查询用户名
92
+            SysUser sysUser = sysUserMapper.selectUserByPhone(accountMobile);
89
             if ("SIGN_MISSON_COMPLETE".equals(action) && signResult == 2) {
93
             if ("SIGN_MISSON_COMPLETE".equals(action) && signResult == 2) {
90
                 if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccount)) {
94
                 if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccount)) {
91
-                    //申请人签名
95
+                    //调解员签名
92
                     sealSignRecordsel.setSignStatusArbitor(1);
96
                     sealSignRecordsel.setSignStatusArbitor(1);
93
                     sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
97
                     sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
94
                     CaseLogRecord operLog = new CaseLogRecord();
98
                     CaseLogRecord operLog = new CaseLogRecord();
96
                     operLog.setCaseAppliId(caseAppliId);
100
                     operLog.setCaseAppliId(caseAppliId);
97
                     operLog.setCaseNode(13);
101
                     operLog.setCaseNode(13);
98
                     operLog.setCreateTime(dateOperate);
102
                     operLog.setCreateTime(dateOperate);
103
+                    if(sysUser!=null){
104
+                        operLog.setCreateBy(sysUser.getUserName());
105
+                    }
99
                     caseLogRecordMapper.insertCaseLogRecord(operLog);
106
                     caseLogRecordMapper.insertCaseLogRecord(operLog);
100
 
107
 
101
                     CaseApplication application = new CaseApplication();
108
                     CaseApplication application = new CaseApplication();
158
                             caseAttach.setAnnexType(3);
165
                             caseAttach.setAnnexType(3);
159
                             caseAttach.setAnnexPath(savePath);
166
                             caseAttach.setAnnexPath(savePath);
160
                             caseAttach.setAnnexName(saveName);
167
                             caseAttach.setAnnexName(saveName);
161
-                            caseAttach.setUserName(SecurityUtils.getUsername());
162
-                            caseAttach.setUserId(SecurityUtils.getUserId());
168
+                            //caseAttach.setUserName(SecurityUtils.getUsername());
169
+                            //caseAttach.setUserId(SecurityUtils.getUserId());
163
                             // 删除已存在的
170
                             // 删除已存在的
164
                             caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, 3);
171
                             caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, 3);
165
                             caseAttachMapper.save(caseAttach);
172
                             caseAttachMapper.save(caseAttach);

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

27
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
27
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
28
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
28
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
29
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
29
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
30
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
30
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
31
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
31
 import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
32
 import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
32
 import com.ruoyi.wisdomarbitrate.mapper.*;
33
 import com.ruoyi.wisdomarbitrate.mapper.*;
34
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
33
 import com.ruoyi.wisdomarbitrate.service.VideoService;
35
 import com.ruoyi.wisdomarbitrate.service.VideoService;
34
 import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
36
 import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
35
 import com.tencentcloudapi.common.Credential;
37
 import com.tencentcloudapi.common.Credential;
96
     private SysRoleMapper roleMapper;
98
     private SysRoleMapper roleMapper;
97
     @Autowired
99
     @Autowired
98
     private SysUserMapper userMapper;
100
     private SysUserMapper userMapper;
101
+    @Autowired
102
+    private ICaseApplicationService caseApplicationService;
99
     /**
103
     /**
100
      *  功能:第三方回调sign校验
104
      *  功能:第三方回调sign校验
101
      *     参数:
105
      *     参数:
179
             return success();
183
             return success();
180
         }
184
         }
181
         for (CaseAttach caseAttach : caseAttachList) {
185
         for (CaseAttach caseAttach : caseAttachList) {
182
-            String annexName = caseAttach.getAnnexName();
183
-            String prefix = "/profile";
184
-            int startIndex = annexName.indexOf(prefix);
185
-            startIndex += prefix.length();
186
-            String annexPath = "/uploadPath" + annexName.substring(startIndex);
187
-            caseAttach.setAnnexPath(annexPath);
188
-            int startIndexnew = annexName.lastIndexOf("/");
189
-            if (startIndexnew != -1) {
190
-                String annexNamenew = annexName.substring(startIndexnew + 1);
191
-                caseAttach.setAnnexName(annexNamenew);
192
-            }
186
+
187
+            caseAttach.setAnnexPath(caseAttach.getAnnexPath());
188
+
189
+            caseAttach.setAnnexName(caseAttach.getAnnexName());
190
+
193
         }
191
         }
194
         return  success(caseAttachList);
192
         return  success(caseAttachList);
195
     }
193
     }
374
 
372
 
375
         // 绑定案件
373
         // 绑定案件
376
         if(convertFlag){
374
         if(convertFlag){
375
+//            String path=fileName.replace("")
377
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
376
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
378
-                    .annexName(fileName)
379
-                    .annexPath(RuoYiConfig.getHtml2PDFPath())
377
+                    .annexName(currentFileName)
378
+                    .annexPath(fileName)
380
                     .annexType(7)
379
                     .annexType(7)
381
                     .build();
380
                     .build();
382
             caseAttachMapper.save(caseAttach);
381
             caseAttachMapper.save(caseAttach);
400
         if (caseAttachList != null && caseAttachList.size() > 0) {
399
         if (caseAttachList != null && caseAttachList.size() > 0) {
401
             for (CaseAttach caseAttach : caseAttachList) {
400
             for (CaseAttach caseAttach : caseAttachList) {
402
                 String annexName = caseAttach.getAnnexName();
401
                 String annexName = caseAttach.getAnnexName();
403
-                String prefix = "/profile";
404
-                int startIndex = annexName.indexOf(prefix);
405
-                startIndex += prefix.length();
406
-                String annexPath = "/uploadPath" + annexName.substring(startIndex);
407
-                caseAttach.setAnnexPath(annexPath);
408
-                int startIndexnew = annexName.lastIndexOf("/");
409
-                if (startIndexnew != -1) {
410
-                    String annexNamenew = annexName.substring(startIndexnew + 1);
411
-                    caseAttach.setAnnexName(annexNamenew);
412
-                }
402
+
403
+                caseAttach.setAnnexPath(caseAttach.getAnnexPath());
404
+                caseAttach.setAnnexName(annexName);
405
+
413
 
406
 
414
 
407
 
415
             }
408
             }
497
                 String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
490
                 String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
498
                 // 存入数据库
491
                 // 存入数据库
499
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
492
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
500
-                        .annexName(annexName)
501
-                        .annexPath(RuoYiConfig.getVideoUploadPath())
493
+                        .annexName(fileName)
494
+                        .annexPath(annexName)
502
                         .annexType(9)
495
                         .annexType(9)
503
                         .build();
496
                         .build();
504
                 caseAttachMapper.save(caseAttach);
497
                 caseAttachMapper.save(caseAttach);
517
     @Override
510
     @Override
518
     public AjaxResult selectRoleMenuByCaseId(Long caseId) {
511
     public AjaxResult selectRoleMenuByCaseId(Long caseId) {
519
         AjaxResult result = success();
512
         AjaxResult result = success();
520
-        CaseAffiliate caseAffiliate = new CaseAffiliate();
521
-        caseAffiliate.setCaseAppliId(caseId);
522
-        // 根据案件id查询相关人员
523
-        List<CaseAffiliate> msCaseAffiliates = affiliateMapper.selectCaseAffiliate(caseAffiliate);
513
+        List<CaseAffiliateEntity> msCaseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseId);
524
         if (CollectionUtil.isEmpty(msCaseAffiliates)) {
514
         if (CollectionUtil.isEmpty(msCaseAffiliates)) {
525
             return error("未找到案件相关人员");
515
             return error("未找到案件相关人员");
526
         }
516
         }
532
         if (sysUser == null) {
522
         if (sysUser == null) {
533
             return error("未找到当前登录用户");
523
             return error("未找到当前登录用户");
534
         }
524
         }
535
-        for (CaseAffiliate affiliate : msCaseAffiliates) {
536
-            if (StrUtil.isEmpty(sysUser.getPhonenumber())) {
537
-                continue;
538
-            }
539
-            // 申请人,根据电话判断用户在该案件是否为申请人
540
-            if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent()) && sysUser.getPhonenumber().equals(affiliate.getContactTelphoneAgent())) {
541
-                if (affiliate.getIdentityType() == 1) {
542
-                    result.put("appFlag", "1");
543
-                } else if (affiliate.getIdentityType() == 2) {
544
-                    // 申请人代理人
545
-                    result.put("resFlag", "1");
525
+        for (CaseAffiliateEntity affiliate : msCaseAffiliates) {
526
+            if(affiliate.getOperatorFlag()!=null && affiliate.getOperatorFlag()==1 && affiliate.getUserId()!=null&&affiliate.getUserId().equals(userId)&&affiliate.getRoleType()!=null){
527
+                if(affiliate.getRoleType().equals(1)||affiliate.getRoleType().equals(2)){
528
+                    // 申请人操作人
529
+                    result.put("appFlag","1");
546
                 }
530
                 }
547
-            } else if (StrUtil.isNotEmpty(affiliate.getContactTelphone()) && sysUser.getPhonenumber().equals(affiliate.getContactTelphone())) {
548
-                if (affiliate.getIdentityType() == 1) {
549
-                    // 在该案件中为申请人或者申请代理人
550
-                    result.put("appFlag", "1");
551
-                } else if (affiliate.getIdentityType() == 2) {
552
-                    // 在该案件中为被申请人或者被申请代理人
553
-                    result.put("resFlag", "1");
531
+                if(affiliate.getRoleType().equals(3)||affiliate.getRoleType().equals(4)){
532
+                    // 被申请人操作人
533
+                    result.put("resFlag","1");
554
                 }
534
                 }
555
-
556
             }
535
             }
557
         }
536
         }
558
         return result;
537
         return result;

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Просмотреть файл

236
                                             if (downLoadFile) {
236
                                             if (downLoadFile) {
237
                                                 CaseAttach caseAttach = new CaseAttach();
237
                                                 CaseAttach caseAttach = new CaseAttach();
238
                                                 caseAttach.setAnnexType(10);  //10代表印章图片
238
                                                 caseAttach.setAnnexType(10);  //10代表印章图片
239
-                                                caseAttach.setAnnexPath(savePath);
240
-                                                caseAttach.setAnnexName(saveName);
239
+                                                caseAttach.setAnnexPath(saveName);
240
+                                                caseAttach.setAnnexName(fileName);
241
                                                 int i1 = caseAttachMapper.save(caseAttach);
241
                                                 int i1 = caseAttachMapper.save(caseAttach);
242
                                                 if (i1 > 0) {
242
                                                 if (i1 > 0) {
243
                                                     //将印章信息保存到公章管理表里
243
                                                     //将印章信息保存到公章管理表里

+ 19
- 1
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml Просмотреть файл

105
  			<if test="email != null and email != ''">email,</if>
105
  			<if test="email != null and email != ''">email,</if>
106
  			<if test="status != null">status,</if>
106
  			<if test="status != null">status,</if>
107
  			<if test="createBy != null and createBy != ''">create_by,</if>
107
  			<if test="createBy != null and createBy != ''">create_by,</if>
108
+		<if test="code != null and code != ''">code,</if>
109
+		<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person,</if>
110
+		<if test="home != null and home != ''">home,</if>
111
+		<if test="address != null and address != ''">address,</if>
112
+		<if test="nationality != null ">nationality,</if>
108
  			create_time
113
  			create_time
109
  		)values(
114
  		)values(
110
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
115
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
118
  			<if test="email != null and email != ''">#{email},</if>
123
  			<if test="email != null and email != ''">#{email},</if>
119
  			<if test="status != null">#{status},</if>
124
  			<if test="status != null">#{status},</if>
120
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
125
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
126
+		<if test="code != null and code != ''">#{code},</if>
127
+		<if test="compLegalPerson != null and compLegalPerson != ''">#{compLegalPerson},</if>
128
+		<if test="home != null and home != ''">#{home},</if>
129
+		<if test="address != null and address != ''">#{address},</if>
130
+		<if test="nationality != null ">#{nationality},</if>
121
  			sysdate()
131
  			sysdate()
122
  		);
132
  		);
123
 	</insert>
133
 	</insert>
168
  			<if test="email != null">email = #{email},</if>
178
  			<if test="email != null">email = #{email},</if>
169
  			<if test="status != null and status != ''">status = #{status},</if>
179
  			<if test="status != null and status != ''">status = #{status},</if>
170
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
180
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
181
+			<if test="code != null and code != ''">code = #{code},</if>
182
+			<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person = #{compLegalPerson},</if>
183
+			<if test="home != null and home != ''">home = #{home},</if>
184
+			<if test="address != null and address != ''">address = #{address},</if>
185
+			<if test="nationality != null ">nationality = #{nationality},</if>
171
  			update_time = sysdate()
186
  			update_time = sysdate()
172
  		</set>
187
  		</set>
173
  		where dept_id = #{deptId}
188
  		where dept_id = #{deptId}
196
 	<delete id="deleteDeptById" parameterType="Long">
211
 	<delete id="deleteDeptById" parameterType="Long">
197
 		update sys_dept set del_flag = '2' where dept_id = #{deptId}
212
 		update sys_dept set del_flag = '2' where dept_id = #{deptId}
198
 	</delete>
213
 	</delete>
199
-
214
+	<select id="selectDeptByName" resultMap="SysDeptResult">
215
+		<include refid="selectDeptVo"/>
216
+		where dept_name=#{deptName}  and del_flag = '0' limit 1
217
+	</select>
200
 </mapper> 
218
 </mapper> 

+ 33
- 3
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Просмотреть файл

49
     </resultMap>
49
     </resultMap>
50
 	
50
 	
51
 	<sql id="selectUserVo">
51
 	<sql id="selectUserVo">
52
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, 
52
+        select u.*,
53
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
53
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
54
-        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
54
+        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
55
         from sys_user u
55
         from sys_user u
56
 		    left join sys_dept d on u.dept_id = d.dept_id
56
 		    left join sys_dept d on u.dept_id = d.dept_id
57
 		    left join sys_user_role ur on u.user_id = ur.user_id
57
 		    left join sys_user_role ur on u.user_id = ur.user_id
217
 
217
 
218
     <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
218
     <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
219
  		insert into sys_user(
219
  		insert into sys_user(
220
+ 			<if test="position != null and position != ''">position,</if>
220
  			<if test="userId != null and userId != 0">user_id,</if>
221
  			<if test="userId != null and userId != 0">user_id,</if>
221
  			<if test="deptId != null and deptId != 0">dept_id,</if>
222
  			<if test="deptId != null and deptId != 0">dept_id,</if>
222
  			<if test="userName != null and userName != ''">user_name,</if>
223
  			<if test="userName != null and userName != ''">user_name,</if>
223
  			<if test="nickName != null and nickName != ''">nick_name,</if>
224
  			<if test="nickName != null and nickName != ''">nick_name,</if>
224
  			<if test="idCard != null and idCard != ''">id_card,</if>
225
  			<if test="idCard != null and idCard != ''">id_card,</if>
226
+		<if test="idType != null ">id_type,</if>
227
+		<if test="nationality != null ">nationality,</if>
228
+		<if test="birth != null  ">birth,</if>
229
+		<if test="home != null and home != '' ">home,</if>
230
+		<if test="address != null and address != '' ">address,</if>
225
  			<if test="email != null and email != ''">email,</if>
231
  			<if test="email != null and email != ''">email,</if>
226
  			<if test="avatar != null and avatar != ''">avatar,</if>
232
  			<if test="avatar != null and avatar != ''">avatar,</if>
227
  			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
233
  			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
232
  			<if test="remark != null and remark != ''">remark,</if>
238
  			<if test="remark != null and remark != ''">remark,</if>
233
  			create_time
239
  			create_time
234
  		)values(
240
  		)values(
241
+		<if test="position != null and position != ''">#{position},</if>
235
  			<if test="userId != null and userId != ''">#{userId},</if>
242
  			<if test="userId != null and userId != ''">#{userId},</if>
236
  			<if test="deptId != null and deptId != ''">#{deptId},</if>
243
  			<if test="deptId != null and deptId != ''">#{deptId},</if>
237
  			<if test="userName != null and userName != ''">#{userName},</if>
244
  			<if test="userName != null and userName != ''">#{userName},</if>
238
  			<if test="nickName != null and nickName != ''">#{nickName},</if>
245
  			<if test="nickName != null and nickName != ''">#{nickName},</if>
239
  			<if test="idCard != null and idCard != ''">#{idCard},</if>
246
  			<if test="idCard != null and idCard != ''">#{idCard},</if>
247
+		<if test="idType != null ">#{idType},</if>
248
+		<if test="nationality != null ">#{nationality},</if>
249
+		<if test="birth != null  ">#{birth},</if>
250
+		<if test="home != null and home != '' ">#{home},</if>
251
+		<if test="address != null and address != '' ">#{address},</if>
240
  			<if test="email != null and email != ''">#{email},</if>
252
  			<if test="email != null and email != ''">#{email},</if>
241
  			<if test="avatar != null and avatar != ''">#{avatar},</if>
253
  			<if test="avatar != null and avatar != ''">#{avatar},</if>
242
  			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
254
  			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
250
 	</insert>
262
 	</insert>
251
     <insert id="batchSave">
263
     <insert id="batchSave">
252
 		insert into sys_user(
264
 		insert into sys_user(
265
+		position,
253
 		user_id,
266
 		user_id,
254
 		dept_id,
267
 		dept_id,
255
 		user_name,
268
 		user_name,
267
 		)values
280
 		)values
268
 		<foreach item="item" index="index" collection="list" separator=",">
281
 		<foreach item="item" index="index" collection="list" separator=",">
269
 		(
282
 		(
283
+		#{item.position},
270
 		#{item.userId},
284
 		#{item.userId},
271
 		#{item.deptId},
285
 		#{item.deptId},
272
 		#{item.userName},
286
 		#{item.userName},
292
  			<if test="userName != null and userName != ''">user_name = #{userName},</if>
306
  			<if test="userName != null and userName != ''">user_name = #{userName},</if>
293
  			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
307
  			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
294
  			<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
308
  			<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
309
+ 			<if test="position != null and position != ''">position = #{position},</if>
310
+			<if test="idType != null">id_type = #{idType},</if>
311
+			<if test="nationality != null">nationality = #{nationality},</if>
312
+			<if test="birth != null  ">birth = #{birth},</if>
313
+			<if test="home != null and home != '' ">home = #{home},</if>
314
+			<if test="address != null and address != '' ">address = #{address},</if>
295
  			<if test="email != null ">email = #{email},</if>
315
  			<if test="email != null ">email = #{email},</if>
296
  			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
316
  			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
297
  			<if test="sex != null and sex != ''">sex = #{sex},</if>
317
  			<if test="sex != null and sex != ''">sex = #{sex},</if>
335
 		INNER JOIN sys_dept d ON u.dept_id = d.dept_id
355
 		INNER JOIN sys_dept d ON u.dept_id = d.dept_id
336
 		WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
356
 		WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
337
 	</select>
357
 	</select>
338
-	
358
+	<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
359
+		select u.*
360
+		from sys_user u
361
+		where u.email = #{email} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
362
+	</select>
363
+	<select id="selectUserByRole" resultMap="SysUserResult">
364
+		SELECT u.* FROM sys_user u
365
+							INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
366
+							INNER JOIN sys_dept d ON u.dept_id = d.dept_id
367
+		WHERE ur.role_id = #{roleId}
368
+	</select>
339
 </mapper> 
369
 </mapper> 

+ 8
- 2
ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml Просмотреть файл

16
 	<select id="countUserRoleByRoleId" resultType="Integer">
16
 	<select id="countUserRoleByRoleId" resultType="Integer">
17
 	    select count(1) from sys_user_role where role_id=#{roleId}  
17
 	    select count(1) from sys_user_role where role_id=#{roleId}  
18
 	</select>
18
 	</select>
19
-	
20
-	<delete id="deleteUserRole" parameterType="Long">
19
+    <select id="selectRoleIdsByUserId" resultType="java.lang.Long">
20
+		select role_id from sys_user_role where user_id=#{userId}
21
+    </select>
22
+
23
+    <delete id="deleteUserRole" parameterType="Long">
21
  		delete from sys_user_role where user_id in
24
  		delete from sys_user_role where user_id in
22
  		<foreach collection="array" item="userId" open="(" separator="," close=")">
25
  		<foreach collection="array" item="userId" open="(" separator="," close=")">
23
  			#{userId}
26
  			#{userId}
41
  	        #{userId}
44
  	        #{userId}
42
             </foreach> 
45
             </foreach> 
43
 	</delete>
46
 	</delete>
47
+	<insert id="insertUserRole">
48
+		insert into sys_user_role(user_id, role_id) values(#{userId}, #{roleId})
49
+	</insert>
44
 </mapper> 
50
 </mapper> 

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitrateRecordMapper.xml Просмотреть файл

102
                 AND a.case_appli_id  = #{caseAppliId}
102
                 AND a.case_appli_id  = #{caseAppliId}
103
             </if>
103
             </if>
104
         </where>
104
         </where>
105
+        limit 1
105
     </select>
106
     </select>
106
 
107
 
107
 
108
 

+ 4
- 15
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateLogMapper.xml Просмотреть файл

63
 
63
 
64
 
64
 
65
     <insert id="batchCaseAffiliate">
65
     <insert id="batchCaseAffiliate">
66
-        insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
67
-        contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
68
-        comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
69
-        residen_affili,appli_agent_title,
70
-        contact_address_agent,email , send_email,track_num,applicant_agent_user_id,agent_email) values
66
+
67
+        insert into case_affiliate_log(case_appli_log_id, user_id,applicant_dept_id,role_type,group_order,operator_flag,organize_flag) values
71
         <foreach item="item" index="index" collection="list" separator=",">
68
         <foreach item="item" index="index" collection="list" separator=",">
72
-            (#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
73
-            #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
74
-            #{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex},  #{item.responBirth},
75
-            #{item.residenAffili},#{item.appliAgentTitle},
76
-            #{item.contactAddressAgent},
77
-            #{item.email},
78
-            #{item.sendEmail},
79
-            #{item.trackNum},
80
-            #{item.applicantAgentUserId},
81
-            #{item.agentEmail}
69
+            (#{item.caseAppliLogId},#{item.userId},#{item.applicantDeptId},#{item.roleType},#{item.groupOrder},#{item.operatorFlag},#{item.organizeFlag}
70
+
82
             )
71
             )
83
         </foreach>;
72
         </foreach>;
84
     </insert>
73
     </insert>

+ 121
- 157
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Просмотреть файл

3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
6
-
7
-    <resultMap type="CaseAffiliate" id="CaseAffiliateResult">
8
-        <id     property="id"       column="id"      />
9
-        <result property="caseAppliId"       column="case_appli_id"      />
10
-        <result property="identityType"     column="identity_type"    />
11
-        <result property="name"     column="name"    />
12
-        <result property="identityNum"        column="identity_num"        />
13
-        <result property="workTelphone"  column="work_telphone"  />
14
-        <result property="contactTelphone"          column="contact_telphone"          />
15
-        <result property="contactAddress"       column="contact_address"       />
16
-        <result property="workAddress"     column="work_address"     />
17
-        <result property="nameAgent"       column="name_agent"       />
18
-        <result property="identityNumAgent"      column="identity_num_agent"     />
19
-        <result property="contactTelphoneAgent"      column="contact_telphone_agent"     />
20
-        <result property="contactAddressAgent"    column="contact_address_agent"   />
21
-        <result property="trackNum"    column="track_num"   />
22
-        <result property="applicationOrganId"    column="application_organ_id"   />
23
-        <result property="applicationOrganName"    column="application_organ_name"   />
24
-
25
-        <result property="compLegalPerson"    column="comp_legal_person"   />
26
-        <result property="compLegalperPost"    column="comp_legalper_post"   />
27
-        <result property="responSex"    column="respon_sex"   />
28
-        <result property="responBirth"    column="respon_birth"   />
29
-
30
-        <result property="residenAffili"    column="residen_affili"   />
31
-        <result property="appliAgentTitle"    column="appli_agent_title"   />
32
-        <result property="userId"    column="user_id"   />
33
-        <result property="email"     column="email"    />
34
-        <result property="sendEmail"     column="send_email"    />
35
-        <result property="applicantAgentUserId"     column="applicant_agent_user_id"    />
36
-        <result property="agentEmail"     column="agent_email"    />
6
+    <resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity" >
7
+        <result column="id" property="id" />
8
+        <result column="case_appli_id" property="caseAppliId" />
9
+        <result column="user_id" property="userId" />
10
+        <result column="applicant_dept_id" property="applicantDeptId" />
11
+        <result column="role_type" property="roleType" />
12
+        <result column="group_order" property="groupOrder" />
13
+        <result column="operator_flag" property="operatorFlag" />
14
+        <result column="organize_flag" property="organizeFlag" />
15
+        <result column="user_name" property="userName" />
16
+        <result column="comp_legal_person" property="compLegalPerson" />
17
+        <result column="phone" property="phone" />
18
+        <result column="email" property="email" />
19
+        <result column="name" property="name" />
20
+        <result column="home" property="home" />
21
+        <result column="address" property="address" />
22
+        <result column="id_card" property="idCard" />
23
+        <result column="id_type" property="idType" />
24
+        <result column="nationality" property="nationality" />
25
+        <result column="birth" property="birth" />
26
+        <result column="sex" property="sex" />
27
+        <result column="res_name" property="resName" />
28
+        <result column="role_ame" property="roleName" />
29
+        <result column="applicant_org_name" property="applicantOrgName" />
30
+        <result column="role_id" property="roleId" />
31
+        <result column="code" property="code" />
37
     </resultMap>
32
     </resultMap>
38
 
33
 
39
-    <select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
40
-        select c.*
41
-        from case_affiliate c
42
 
34
 
35
+    <select id="selectCaseAffiliate"  resultType="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity">
36
+        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
37
+        u.email,
38
+        (case when a.user_id is null then d.dept_name else u.nick_name end)  name,
39
+        (case when a.user_id is null then d.home else u.home end) home,
40
+        (case when a.user_id is null then d.address else u.address end) address,
41
+        (case when a.user_id is null then d.nationality else u.nationality end) nationality,
42
+        u.sex,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId,a.applicant_dept_id applicantDeptId,a.organize_flag organizeFlag
43
+        FROM
44
+            case_application c
45
+                JOIN case_affiliate a ON  c.id = a.case_appli_id
46
+                LEFT JOIN sys_user u ON u.user_id = a.user_id
47
+                LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
48
+                LEFT JOIN sys_role r ON r.role_id = ur.role_id
49
+                LEFT JOIN sys_dept d ON d.dept_id = a.applicant_dept_id
43
         <where>
50
         <where>
44
-            <if test="caseAppliId != null ">
45
-                AND c.case_appli_id = #{caseAppliId}
51
+            <if test="caseAppliId!=null">
52
+               c.id=#{ caseAppliId}
46
             </if>
53
             </if>
47
         </where>
54
         </where>
55
+        GROUP BY a.id,r.role_id order by a.id asc
48
 
56
 
49
 
57
 
50
 
58
 
51
 
59
 
52
     </select>
60
     </select>
53
-    <select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
54
-        select (c.id),
55
-        c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
56
-        c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
57
-        c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
58
-        c.residen_affili,appli_agent_title,
59
-        c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email
60
-        from case_affiliate c
61
-
61
+    <select id="selectCaseAffiliateByCaseIds" resultType="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity">
62
+
63
+
64
+        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
65
+        u.email,
66
+        (case when a.user_id is null then d.dept_name else u.nick_name end)  name,
67
+        (case when a.user_id is null then d.home else u.home end) home,
68
+        (case when a.user_id is null then d.address else u.address end) address,
69
+        (case when a.user_id is null then d.nationality else u.nationality end) nationality,
70
+        u.sex,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId,a.applicant_dept_id applicantDeptId,a.organize_flag organizeFlag
71
+        FROM
72
+        case_application c
73
+        JOIN case_affiliate a ON  c.id = a.case_appli_id
74
+        LEFT JOIN sys_user u ON u.user_id = a.user_id
75
+        LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
76
+        LEFT JOIN sys_role r ON r.role_id = ur.role_id
77
+        LEFT JOIN sys_dept d ON d.dept_id = a.applicant_dept_id
62
         <where>
78
         <where>
63
-        <if test="ids != null ">
64
-                 case_appli_id in
65
-                <foreach collection="ids" item="item" open="(" separator="," close=")">
66
-                    #{item}
79
+            <if test="caseIds != null and caseIds.size() > 0">
80
+                and a.case_appli_id in
81
+                <foreach item="caseId" index="index" collection="caseIds" open="(" separator="," close=")">
82
+                    #{caseId}
67
                 </foreach>
83
                 </foreach>
68
             </if>
84
             </if>
69
         </where>
85
         </where>
70
     </select>
86
     </select>
71
-    <select id="selectCaseAffiliateByIdentityType"  resultMap="CaseAffiliateResult">
72
-        select c.*
73
-        from case_affiliate c
74
-        <where>
75
-            <if test="caseAppliId != null ">
76
-                AND c.case_appli_id = #{caseAppliId}
77
-            </if>
78
-            <if test="identityType != null ">
79
-                AND c.identity_type = #{identityType}
80
-            </if>
81
-        </where>
82
-    </select>
83
-    <select id="emailByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate">
84
-        select c.identity_type identityType,c.email
85
-        from case_affiliate c
86
-        where c.case_appli_id=#{caseAppliId}
87
+    <select id="emailByCaseId" resultMap="BaseResultMap">
88
+        select a.*,u.email
89
+        from case_affiliate a
90
+        left join sys_user u on u.user_id=a.user_id
87
     </select>
91
     </select>
88
 
92
 
89
-
90
-
91
     <insert id="batchCaseAffiliate">
93
     <insert id="batchCaseAffiliate">
92
-        insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
93
-        contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
94
-        comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
95
-        residen_affili,appli_agent_title,
96
-        contact_address_agent,email, send_email,track_num,applicant_agent_user_id,agent_email) values
94
+        insert into case_affiliate(case_appli_id, user_id,applicant_dept_id,role_type,group_order,operator_flag,organize_flag) values
97
         <foreach item="item" index="index" collection="list" separator=",">
95
         <foreach item="item" index="index" collection="list" separator=",">
98
-            (#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
99
-            #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
100
-            #{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex},  #{item.responBirth},
101
-            #{item.residenAffili},#{item.appliAgentTitle},
102
-            #{item.contactAddressAgent},
103
-            #{item.email},
104
-             #{item.sendEmail},
105
-             #{item.trackNum},
106
-             #{item.applicantAgentUserId},
107
-             #{item.agentEmail}
96
+            (#{item.caseAppliId},#{item.userId},#{item.applicantDeptId},#{item.roleType},#{item.groupOrder},#{item.operatorFlag},#{item.organizeFlag}
97
+
108
              )
98
              )
109
         </foreach>
99
         </foreach>
110
     </insert>
100
     </insert>
101
+    <insert id="insert">
102
+        INSERT INTO case_affiliate
103
+        <trim prefix="(" suffix=")" suffixOverrides=",">
104
+            <if test="null != caseAppliId ">
105
+                case_appli_id,
106
+            </if>
107
+            <if test="null != userId ">
108
+                user_id,
109
+            </if>
110
+            <if test="null != applicantDeptId ">
111
+                applicant_dept_id,
112
+            </if>
113
+            <if test="null != roleType ">
114
+                role_type,
115
+            </if>
116
+            <if test="null != groupOrder ">
117
+                group_order,
118
+            </if>
119
+            <if test="null != operatorFlag ">
120
+                operator_flag,
121
+            </if>
122
+            <if test="null != organizeFlag ">
123
+                organize_flag
124
+            </if>
125
+        </trim>
126
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
127
+            <if test="null != caseAppliId ">
128
+                #{caseAppliId},
129
+            </if>
130
+            <if test="null != userId ">
131
+                #{userId},
132
+            </if>
133
+            <if test="null != applicantDeptId ">
134
+                #{applicantDeptId},
135
+            </if>
136
+            <if test="null != roleType ">
137
+                #{roleType},
138
+            </if>
139
+            <if test="null != groupOrder ">
140
+                #{groupOrder},
141
+            </if>
142
+            <if test="null != operatorFlag ">
143
+                #{operatorFlag},
144
+            </if>
145
+            <if test="null != organizeFlag ">
146
+                #{organizeFlag}
147
+            </if>
148
+        </trim>
149
+    </insert>
111
 
150
 
112
 
151
 
113
-
114
-    <update id="updataCaseAffiliate" parameterType="CaseAffiliate">
115
-        update case_affiliate
116
-        set
117
-        case_appli_id=#{caseAppliId},
118
-        identity_type= #{identityType},
119
-        application_organ_id= #{applicationOrganId},
120
-        application_organ_name= #{applicationOrganName},
121
-        name = #{name},
122
-        identity_num = #{identityNum},
123
-        contact_telphone = #{contactTelphone},
124
-        contact_address = #{contactAddress},
125
-        work_address = #{workAddress},
126
-        work_telphone = #{workTelphone},
127
-        name_agent = #{nameAgent},
128
-        identity_num_agent = #{identityNumAgent},
129
-        contact_telphone_agent = #{contactTelphoneAgent},
130
-        contact_address_agent = #{contactAddressAgent},
131
-        send_email = #{sendEmail},
132
-        residen_affili = #{residenAffili},
133
-        email= #{email},
134
-        track_num = #{trackNum},
135
-            comp_legal_person=#{compLegalPerson},
136
-            comp_legalper_post=#{compLegalperPost},
137
-            applicant_agent_user_id=#{applicantAgentUserId},
138
-            respon_sex=#{responSex},
139
-            respon_birth=#{responBirth},
140
-            residen_affili=#{residenAffili},
141
-            appli_agent_title=#{appliAgentTitle}
142
-
143
-        <if test="agentEmail !=null and agentEmail!=''">
144
-            ,agent_email=#{agentEmail}
145
-        </if>
146
-        where id = #{id}
147
-
148
-    </update>
149
-    <update id="updateCaseAffiliateByCaseId">
150
-
151
-        <foreach collection="list" item="item" >
152
-        update case_affiliate
153
-            <set>
154
-
155
-            application_organ_id= #{item.applicationOrganId},
156
-            application_organ_name= #{item.applicationOrganName},
157
-            name = #{item.name},
158
-            identity_num = #{item.identityNum},
159
-            contact_telphone = #{item.contactTelphone},
160
-            contact_address = #{item.contactAddress},
161
-            work_address = #{item.workAddress},
162
-            work_telphone = #{item.workTelphone},
163
-
164
-            name_agent = #{item.nameAgent},
165
-            identity_num_agent = #{item.identityNumAgent},
166
-            contact_telphone_agent = #{item.contactTelphoneAgent},
167
-            contact_address_agent = #{item.contactAddressAgent},
168
-            send_email = #{item.sendEmail},
169
-            residen_affili = #{item.residenAffili},
170
-            email= #{item.email},
171
-            track_num = #{item.trackNum},
172
-                comp_legal_person=#{item.compLegalPerson},
173
-                comp_legalper_post=#{item.compLegalperPost},
174
-                applicant_agent_user_id=#{item.applicantAgentUserId},
175
-                respon_sex=#{item.responSex},
176
-                respon_birth=#{item.responBirth},
177
-                residen_affili=#{item.residenAffili},
178
-                appli_agent_title=#{item.appliAgentTitle}
179
-
180
-                <if test="agentEmail !=null and agentEmail!=''">
181
-                    ,agent_email=#{agentEmail}
182
-                </if>
183
-            </set>
184
-        where case_appli_id = #{caseAppliId} and   identity_type= #{item.identityType};
185
-        </foreach>
186
-    </update>
187
-
188
     <delete id="deletecaseAffiliate" parameterType="CaseApplication">
152
     <delete id="deletecaseAffiliate" parameterType="CaseApplication">
189
         delete from case_affiliate where case_appli_id = #{id}
153
         delete from case_affiliate where case_appli_id = #{id}
190
     </delete>
154
     </delete>

+ 616
- 941
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 0
- 75
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml Просмотреть файл

11
         <result property="roomId"     column="room_id"    />
11
         <result property="roomId"     column="room_id"    />
12
         <result property="caseStatusName"     column="caseStatusName"    />
12
         <result property="caseStatusName"     column="caseStatusName"    />
13
     </resultMap>
13
     </resultMap>
14
-    <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
15
-        select t.* from(
16
-        select c.id id,c.create_time, c.case_num,c.case_status,
17
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
18
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
19
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
20
-        when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
21
-        when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
22
-        when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
23
-        when 18 then '待仲裁员审核裁决书'
24
-        when 31 then '待修改开庭时间'
25
-        ELSE ''
26
-        END caseStatusName,
27
-        rc.room_id,rc.schedule_start_time
28
-        from case_application as c  join case_affiliate as d on c.id = d.case_appli_id
29
-        left join reserved_conference rc on rc.case_id=c.id
30
-        where c.id = d.case_appli_id
31
-        <if test="identityNum != null and identityNum != ''">
32
-            and d.identity_num = #{identityNum}
33
-        </if>
34
-        <if test="identityType != null ">
35
-            and d.identity_type = #{identityType}
36
-        </if>
37
-        <if test="phone != null and phone != ''">
38
-            and (d.contact_telphone = #{phone} or d.contact_telphone_agent=#{phone})
39
-        </if>
40
-        <if test="caseStatusList != null and caseStatusList.size() > 0">
41
-            and c.case_status in
42
-            <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
43
-                #{caseStatus}
44
-            </foreach>
45
-        </if>
46
-        union
47
-        <!-- 已办案件 -->
48
-        select c.id id, c.create_time,c.case_num,c.case_status,
49
-        CASE c.case_status  when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
50
-        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
51
-        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
52
-        when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
53
-        when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
54
-        when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
55
-        when 18 then '待仲裁员审核裁决书'
56
-        when 31 then '待修改开庭时间'
57
-        ELSE ''
58
-        END caseStatusName,
59
-        rc.room_id,rc.schedule_start_time
60
-        from case_log_record r
61
-        join case_application c on r.case_appli_id=c.id
62
-        JOIN case_affiliate ca ON ca.case_appli_id = c.id
63
-        left join reserved_conference rc on rc.case_id=c.id
64
-        WHERE
65
-        r.create_by=#{loginUserName}  AND ca.identity_type=2
66
-        and c.id not in(
67
-        select c.id
68
-        from case_application c
69
-        JOIN case_affiliate ca ON ca.case_appli_id = c.id
70
 
14
 
71
-        where c.id = ca.case_appli_id
72
-        <if test="identityNum != null and identityNum != ''">
73
-            and ca.identity_num = #{identityNum}
74
-        </if>
75
-        <if test="identityType != null ">
76
-            and ca.identity_type = #{identityType}
77
-        </if>
78
-        <if test="phone != null and phone != ''">
79
-            and (ca.contact_telphone = #{phone} or ca.contact_telphone_agent=#{phone})
80
-        </if>
81
-        <if test="caseStatusList != null and caseStatusList.size() > 0">
82
-            and c.case_status in
83
-            <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
84
-                #{caseStatus}
85
-            </foreach>
86
-        </if>
87
-        )
88
-        ) t order by t.create_time desc
89
-    </select>
90
 </mapper>
15
 </mapper>

+ 11
- 11
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml Просмотреть файл

31
     <select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
31
     <select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
32
             select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId,
32
             select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId,
33
             cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
33
             cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
34
-        CASE cl.case_node when 0 then '立案申请' when 1 then '立案审查' when 2 then '缴费'
34
+        CASE cl.case_node when 0 then '立案申请' when -1 then '修改案件'  when -2 then '新增案件' when 1 then '立案审查' when 2 then '缴费'
35
         when 3 then '缴费确认' when 4 then '案件质证' when 5 then '组庭审核'
35
         when 3 then '缴费确认' when 4 then '案件质证' when 5 then '组庭审核'
36
         when 6 then '组庭确定' when 7 then '审核仲裁方式' when 8 then '开庭审理'
36
         when 6 then '组庭确定' when 7 then '审核仲裁方式' when 8 then '开庭审理'
37
         when 9 then '书面审理'
37
         when 9 then '书面审理'
38
         when 11 then '核验裁决书'
38
         when 11 then '核验裁决书'
39
-        when 18 then '审核裁决书'
40
-        when 12 then '审核裁决书' when 13 then '裁决书签名' when 14 then '裁决书用印'
41
-        when 15 then '决书送达' when 16 then '案件归档' when 17 then '已归档'
39
+        when 18 then '仲裁员审核裁决书'
40
+        when 12 then '部门长审核裁决书' when 13 then '裁决书签名' when 14 then '裁决书用印'
41
+        when 15 then '决书送达' when 16 then '案件归档' when 17 then '已归档'
42
         when 26 then '证据确认成功'
42
         when 26 then '证据确认成功'
43
         when 31 then '修改开庭时间'
43
         when 31 then '修改开庭时间'
44
 
44
 
45
         ELSE ''
45
         ELSE ''
46
         END content,
46
         END content,
47
-        CASE cl.case_node when 0 then '申请人' when 1 then '申请人' when 2 then '法律顾问'
48
-        when 3 then '申请人' when 4 then '财务' when 5 then '被申请人'
49
-        when 6 then '部门长' when 7 then '仲裁员' when 8 then '仲裁员'
50
-        when 9 then '仲裁员'   when 10 then '仲裁员'   when 11 then '法律顾问'
51
-        when 12 then '仲裁员' when 13 then '仲裁员' when 14 then '部门长'
52
-        when 15 then '法律顾问' when 16 then '法律顾问'
53
-        ELSE '无角色'
47
+        CASE cl.case_node when 0 then '申请人' when 1 then '法律顾问' when 2 then '申请人'
48
+        when 3 then '财务' when 4 then '被申请人' when 5 then '法律顾问'
49
+        when 6 then '部门长' when 7 then '仲裁员' when 8 then '法律顾问,仲裁员,申请人,被申请人'
50
+        when 9 then '法律顾问,仲裁员,申请人,被申请人'   when 10 then '仲裁员'   when 11 then '法律顾问'
51
+        when 12 then '部门长' when 13 then '仲裁员' when 14 then '法律顾问'
52
+        when 15 then '法律顾问' when 16 then '法律顾问' when 18 then '仲裁员' when 31 then '法律顾问'
53
+        ELSE ''
54
         END roleName
54
         END roleName
55
             from case_log_record cl
55
             from case_log_record cl
56
 
56
 

+ 6
- 3
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml Просмотреть файл

72
         ELSE '无案件状态'
72
         ELSE '无案件状态'
73
         END caseStatusName,
73
         END caseStatusName,
74
         c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
74
         c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
75
-        ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
75
+        ca.applicant_dept_id applicationOrganId ,d.dept_name as applicantName,
76
         c.arbitrat_method arbitratMethod ,
76
         c.arbitrat_method arbitratMethod ,
77
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
77
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
78
         ELSE '无审理方式'
78
         ELSE '无审理方式'
79
         END arbitratMethodName,
79
         END arbitratMethodName,
80
         c.arbitrator_id arbitratorId,
80
         c.arbitrator_id arbitratorId,
81
-        c.arbitrator_name arbitratorName
81
+        u.nick_name arbitratorName
82
         from seal_sign_record s
82
         from seal_sign_record s
83
         join case_application c on s.case_appli_id=c.id
83
         join case_application c on s.case_appli_id=c.id
84
-        JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
84
+        JOIN case_affiliate ca ON ca.case_appli_id = c.id
85
+        LEFT JOIN sys_user u ON u.user_id = c.arbitrator_id
86
+
87
+        LEFT JOIN sys_dept d ON d.dept_id = ca.applicant_dept_id
85
         <!-- where s.sign_flow_status in (0,1,2)-->
88
         <!-- where s.sign_flow_status in (0,1,2)-->
86
         <where>
89
         <where>
87
         <if test="penSonAccount != null and penSonAccount!='' ">
90
         <if test="penSonAccount != null and penSonAccount!='' ">