Bladeren bron

仲裁系统修改

18792927508 2 jaren geleden
bovenliggende
commit
084c22a00f
45 gewijzigde bestanden met toevoegingen van 4205 en 4461 verwijderingen
  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 Bestand weergeven

@@ -45,14 +45,14 @@ public class AdjudicationController extends BaseController {
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 58
      * 根据签署流程id查询批量用印链接
@@ -127,15 +127,7 @@ public class AdjudicationController extends BaseController {
127 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,12 +144,12 @@ public class AdjudicationController extends BaseController {
152 144
      * @param caseApplication
153 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,11 +212,11 @@ public class AdjudicationController extends BaseController {
220 212
      * @param id 案件id
221 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 221
      * 根据案件id获取邮箱
230 222
      * @param id 案件id

+ 3
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitrateApplicationController.java Bestand weergeven

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

+ 41
- 40
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Bestand weergeven

@@ -12,6 +12,7 @@ import com.ruoyi.common.exception.EsignDemoException;
12 12
 import com.ruoyi.common.utils.StringUtils;
13 13
 import com.ruoyi.common.utils.WxAppletNotifyUtils;
14 14
 import com.ruoyi.wisdomarbitrate.domain.*;
15
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
15 16
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
16 17
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
17 18
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
@@ -37,8 +38,17 @@ public class CaseApplicationController extends BaseController {
37 38
     private ICaseApplicationService caseApplicationService;
38 39
     @Autowired
39 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,15 +63,15 @@ public class CaseApplicationController extends BaseController {
53 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,24 +91,24 @@ public class CaseApplicationController extends BaseController {
81 91
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
82 92
     @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
83 93
     @PostMapping("/addCaseApplication")
84
-    public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
94
+    public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplicationDTO caseApplication)
85 95
     {
86 96
 
87 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 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,7 +142,7 @@ public class CaseApplicationController extends BaseController {
132 142
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
133 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,15 +421,6 @@ public class CaseApplicationController extends BaseController {
411 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,18 +431,18 @@ public class CaseApplicationController extends BaseController {
430 431
         if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
431 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 Bestand weergeven

@@ -33,17 +33,17 @@ public class CaseEvidenceController extends BaseController {
33 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,12 +121,12 @@ public class CaseEvidenceController extends BaseController {
121 121
      * @param caseStatus
122 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 Bestand weergeven

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

+ 4
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CaseApplicationConstants.java Bestand weergeven

@@ -6,6 +6,10 @@ package com.ruoyi.common.constant;
6 6
 public class CaseApplicationConstants {
7 7
     /** 申请人/代理人,立案申请 */
8 8
     public static final int CASE_APPLICATION = 0;
9
+    /**
10
+     * 案件新增
11
+     */
12
+    public static final int CASE_INSERT = -2;
9 13
     /** 申请人/代理人,案件修改 */
10 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 Bestand weergeven

@@ -54,6 +54,68 @@ public class SysDept extends BaseEntity
54 54
 
55 55
     /** 父部门名称 */
56 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 120
     public Integer getDeptType() {
59 121
         return deptType;

+ 69
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Bestand weergeven

@@ -49,6 +49,23 @@ public class SysUser extends BaseEntity
49 49
     public void setNickNameAndNum(String nickNameAndNum) {
50 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 71
     @Excel(name = "身份证号")
@@ -105,12 +122,64 @@ public class SysUser extends BaseEntity
105 122
 
106 123
     /** 角色ID */
107 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 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 183
     public SysUser(Long userId)
115 184
     {
116 185
         this.userId = userId;

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java Bestand weergeven

@@ -124,4 +124,11 @@ public interface SysDeptMapper
124 124
      * @return
125 125
      */
126 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 Bestand weergeven

@@ -171,4 +171,17 @@ public interface SysUserMapper
171 171
      * @return
172 172
      */
173 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 Bestand weergeven

@@ -59,4 +59,13 @@ public interface SysUserRoleMapper
59 59
      * @return 结果
60 60
      */
61 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 Bestand weergeven

@@ -13,8 +13,10 @@ import com.ruoyi.common.core.domain.entity.SysDept;
13 13
 import com.ruoyi.system.mapper.*;
14 14
 import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
15 15
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
16
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
16 17
 import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
17 18
 import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
19
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
18 20
 import org.slf4j.Logger;
19 21
 import org.slf4j.LoggerFactory;
20 22
 import org.springframework.beans.factory.annotation.Autowired;
@@ -73,6 +75,8 @@ public class SysUserServiceImpl implements ISysUserService {
73 75
 
74 76
     @Autowired
75 77
     protected Validator validator;
78
+    @Autowired
79
+    protected ICaseApplicationService caseApplicationService;
76 80
 
77 81
     /**
78 82
      * 根据条件分页查询用户列表
@@ -94,25 +98,21 @@ public class SysUserServiceImpl implements ISysUserService {
94 98
     @Override
95 99
     public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
96 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 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 111
         List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
112 112
         List<SysUser> arbitrators = new ArrayList<>();
113 113
         if(CollectionUtil.isNotEmpty(sysUsers)){
114 114
             for(SysUser sysUser: sysUsers){
115
-                if(!phoneList.contains(sysUser.getPhonenumber())) {
115
+                if(!userIds.contains(sysUser.getUserId())) {
116 116
                     Long userId = sysUser.getUserId();
117 117
                     int todoCount = caseApplicationMapper.selectCasenum(userId.toString());
118 118
                     String nickName = sysUser.getNickName();

+ 20
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Bestand weergeven

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

+ 309
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseApplicationDTO.java Bestand weergeven

@@ -0,0 +1,309 @@
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 Bestand weergeven

@@ -0,0 +1,129 @@
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 Bestand weergeven

@@ -0,0 +1,33 @@
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 Bestand weergeven

@@ -0,0 +1,32 @@
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 Bestand weergeven

@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
2 2
 
3 3
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 import org.springframework.stereotype.Repository;
7 8
 
@@ -10,7 +11,7 @@ import java.util.List;
10 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 17
     void deletecaseAffiliate(CaseApplication caseApplication);

+ 15
- 15
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java Bestand weergeven

@@ -3,6 +3,8 @@ package com.ruoyi.wisdomarbitrate.mapper;
3 3
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
4 4
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
6
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
7
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
6 8
 import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
7 9
 import org.apache.ibatis.annotations.Param;
8 10
 
@@ -18,28 +20,26 @@ public interface CaseAffiliateMapper {
18 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 Bestand weergeven

@@ -4,6 +4,7 @@ import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
4 4
 import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
5 5
 import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
6 6
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
+import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
7 8
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
8 9
 import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
9 10
 import org.apache.ibatis.annotations.Param;
@@ -11,17 +12,9 @@ import org.apache.ibatis.annotations.Param;
11 12
 import java.util.List;
12 13
 
13 14
 public interface CaseApplicationMapper {
14
-    List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
15 15
 
16 16
     int selectCaseApplicationCount(CaseApplication caseApplication);
17 17
 
18
-    /**
19
-     * 查询超级管理员案件
20
-     * @param caseApplication
21
-     * @return
22
-     */
23
-    List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
24
-
25 18
     int insertCaseApplication(CaseApplication caseApplication);
26 19
 
27 20
 
@@ -40,7 +33,7 @@ public interface CaseApplicationMapper {
40 33
      */
41 34
     List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
42 35
 
43
-    CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
36
+
44 37
 
45 38
     /**
46 39
      * 查询最大编号
@@ -64,12 +57,11 @@ public interface CaseApplicationMapper {
64 57
     void updatePayType(CaseConfirmPayDTO payDTO);
65 58
 
66 59
 
67
-    ToDoCount selectAdminCaseToDoCount();
68 60
 
69 61
 
70 62
     ToDoCount selectTodoCountByRole(@Param("caseApplication") CaseApplication caseApplication,
71 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,12 +92,6 @@ public interface CaseApplicationMapper {
100 92
      */
101 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 97
      * @return
@@ -124,7 +110,7 @@ public interface CaseApplicationMapper {
124 110
      * 查询最大批号
125 111
      * @return
126 112
      */
127
-    Integer selectBatchNumberLike();
113
+    Integer selectMaxBatchNumber();
128 114
 
129 115
     /**
130 116
      * 批量新增案件
@@ -139,7 +125,7 @@ public interface CaseApplicationMapper {
139 125
 
140 126
     List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
141 127
 
142
-    List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
128
+
143 129
 
144 130
     /**
145 131
      * 案件列表查询
@@ -148,7 +134,7 @@ public interface CaseApplicationMapper {
148 134
      */
149 135
     List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
150 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,4 +142,13 @@ public interface CaseApplicationMapper {
156 142
      * @return
157 143
      */
158 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 Bestand weergeven

@@ -9,10 +9,5 @@ import java.util.List;
9 9
 
10 10
 @Mapper
11 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 Bestand weergeven

@@ -16,19 +16,16 @@ public interface IAdjudicationService {
16 16
 
17 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 22
     AjaxResult caseFile( List<Long> ids);
24 23
 
25 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 31
      * 根据案件id查询邮箱

+ 61
- 14
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Bestand weergeven

@@ -2,12 +2,12 @@ package com.ruoyi.wisdomarbitrate.service;
2 2
 
3 3
 import com.alibaba.fastjson.JSONArray;
4 4
 import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
5 6
 import com.ruoyi.common.exception.EsignDemoException;
6 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 11
 import org.springframework.web.bind.annotation.RequestParam;
12 12
 import org.springframework.web.multipart.MultipartFile;
13 13
 
@@ -16,17 +16,15 @@ import java.util.List;
16 16
 import java.util.Map;
17 17
 
18 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 25
     int selectCaseApplicationCount(CaseApplication caseApplication);
28 26
 
29
-    AjaxResult editCaseApplication(CaseApplication caseApplication);
27
+//    AjaxResult editCaseApplication(CaseApplication caseApplication);
30 28
 
31 29
     int submitCaseApplication( List<Long> ids);
32 30
 
@@ -50,8 +48,6 @@ public interface ICaseApplicationService {
50 48
 
51 49
     int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
52 50
 
53
-    CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
54
-
55 51
     String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
56 52
 
57 53
     SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
@@ -139,13 +135,13 @@ public interface ICaseApplicationService {
139 135
 
140 136
     CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
141 137
 
142
-    List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
138
+//    List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
143 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 146
     int pendTralCheckBatch(CaseApplication caseApplication);
151 147
 
@@ -168,4 +164,55 @@ public interface ICaseApplicationService {
168 164
      */
169 165
 
170 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 Bestand weergeven

@@ -13,11 +13,11 @@ import java.util.List;
13 13
 
14 14
 public interface ICaseEvidenceService {
15 15
 
16
-    AjaxResult getCaseDetailsById(Long id,String userName);
16
+//    AjaxResult getCaseDetailsById(Long id,String userName);
17 17
 
18 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 22
     AjaxResult evidenceConfirmation(CaseApplication caseApplication);
23 23
 

+ 249
- 707
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 70
- 77
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Bestand weergeven

@@ -247,7 +247,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
247 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 252
         afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
253 253
         // 查询附件
@@ -259,17 +259,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
259 259
         List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
260 260
         if (CollectionUtil.isNotEmpty(afterAttachList)) {
261 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 267
             afterCase.setCaseAttachList(afterAttachList);
275 268
         }
@@ -299,7 +292,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
299 292
 
300 293
         }
301 294
         // 对比案件人员字段
302
-        compareAffilate(beforeCase, afterCase);
295
+//        compareAffilate(beforeCase, afterCase);
303 296
         // 对比申请人证据资料
304 297
         compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
305 298
         // 对比自定义字段
@@ -385,70 +378,70 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
385 378
      * @param beforeCase
386 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
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 47
- 385
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.impl;
2 2
 
3 3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
4 5
 import com.deepoove.poi.data.PictureRenderData;
5 6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6 7
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -8,6 +9,7 @@ import com.ruoyi.common.core.redis.RedisCache;
8 9
 import com.ruoyi.common.exception.ServiceException;
9 10
 import com.ruoyi.common.utils.WordUtil;
10 11
 import com.ruoyi.wisdomarbitrate.domain.*;
12
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
11 13
 import com.ruoyi.wisdomarbitrate.mapper.*;
12 14
 import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
13 15
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -56,6 +58,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
56 58
     private RedisCache redisCache;
57 59
     @Autowired
58 60
     private ICaseApplicationService caseApplicationService;
61
+    @Autowired
62
+    private ICaseArbitrateService caseArbitrateService;
59 63
 
60 64
     @Override
61 65
     @Transactional
@@ -65,8 +69,11 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
65 69
         if (caseApplication1 == null) {
66 70
             return AjaxResult.success();
67 71
         }
68
-        Integer currentStatus = caseApplication1.getCaseStatus();
72
+        //  Integer currentStatus = caseApplication1.getCaseStatus();
69 73
         Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
74
+        if (arbitratMethodOriral == null) {
75
+            return AjaxResult.error("请选择仲裁方式");
76
+        }
70 77
 
71 78
         String caseNum = caseApplication1.getCaseNum();
72 79
         if (opinion == 0) {   //拒绝
@@ -77,46 +84,41 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
77 84
                 //修改案件状态为待修改开庭时间
78 85
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
79 86
                 // 新增日志
80
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
87
+
81 88
 
82 89
             } else {
83 90
                 caseApplication1.setArbitratMethod(2);
84 91
                 //修改案件状态为待书面审理
85 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 97
             if (arbitratMethodOriral == 2) {
92 98
                 //修改案件状态为待书面审理
93 99
                 caseApplication1.setArbitratMethod(2);
94 100
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
95
-                // 新增日志
96
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
101
+
97 102
 
98 103
             } else {
99 104
                 //修改案件状态为待修改开庭时间
100 105
                 caseApplication1.setArbitratMethod(1);
101 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 111
             if (arbitratMethodNow == 2) {
108 112
                 //修改案件状态为待书面审理
109 113
                 caseApplication1.setArbitratMethod(2);
110 114
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
111
-                // 新增日志
112
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
115
+
113 116
 
114 117
             } else {
115 118
                 //修改案件状态为待修改开庭时间
116 119
                 caseApplication1.setArbitratMethod(1);
117 120
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
118
-                // 新增日志
119
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
121
+
120 122
 
121 123
             }
122 124
         }
@@ -126,14 +128,22 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
126 128
             String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
127 129
             //发送短信通知
128 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 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 145
                     request.setTemplateId("1931000");
136
-                    request.setPhone(affiliate.getContactTelphone());
146
+                    request.setPhone(affiliate.getPhone());
137 147
                     // 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
138 148
                     // 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
139 149
                     String name = affiliate.getName();
@@ -148,17 +158,17 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
148 158
                     String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
149 159
                     smsSendRecord.setSendContent(content);
150 160
                     smsSendRecord.setCreateBy(getUsername());
151
-                    if (aBoolean){
161
+                    if (aBoolean) {
152 162
                         smsSendRecord.setSendStatus(1);
153
-                    }else {
163
+                    } else {
154 164
                         smsSendRecord.setSendStatus(0);
155 165
                     }
156 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 172
         return AjaxResult.success();
163 173
     }
164 174
 
@@ -170,68 +180,13 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
170 180
         caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
171 181
         List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
172 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 190
             throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
236 191
         }
237 192
 
@@ -254,7 +209,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
254 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 215
                 CaseApplication application = new CaseApplication();
@@ -266,7 +221,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
266 221
 
267 222
             }
268 223
 
269
-        }else{
224
+        } else {
270 225
             throw new ServiceException("这个批号没有批量书面审理的案件");
271 226
         }
272 227
         return AjaxResult.success();
@@ -276,7 +231,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
276 231
     @Override
277 232
     @Transactional
278 233
     public AjaxResult writtenHear(CaseIds caseIds) {
279
-        if (caseIds!=null){
234
+        if (caseIds != null) {
280 235
             List<Long> ids = caseIds.getIds();
281 236
             for (Long caseId : ids) {
282 237
                 //查询案件详情
@@ -289,321 +244,28 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
289 244
                 ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
290 245
                 if (arbitrateRecord1 != null) {
291 246
                     int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
292
-                    if (i > 0) {
293 247
 
294
-                        // 新增日志
295
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
296
-
297
-                    }
298 248
                 } else {
299 249
                     //提交仲裁结果
300 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 253
                 CaseApplication application = new CaseApplication();
309 254
                 application.setId(caseId);
310 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 264
             return AjaxResult.success("审理成功");
317 265
         }
318 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 270
     public String getNewEquipmentNo() {
609 271
         Object awardNum = redisCache.getCacheObject("awardNum");

+ 201
- 184
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Bestand weergeven

@@ -59,77 +59,77 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
59 59
     @Autowired
60 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 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 134
     @Override
135 135
     @Transactional
@@ -138,10 +138,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
138 138
         if (file.isEmpty()) {
139 139
             return AjaxResult.error("请选择要上传的文件");
140 140
         }
141
+        AjaxResult success = AjaxResult.success();
141 142
         try {
142 143
             String filePath = RuoYiConfig.getUploadPath();
143 144
             // 上传
144 145
             String fileName = FileUploadUtils.upload(filePath, file);
146
+            String name = file.getOriginalFilename();
145 147
             String suffix = getFileExtension(fileName);
146 148
             if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
147 149
                 // 上传到onlyoffice
@@ -149,30 +151,47 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
149 151
                 if(jsonArray!=null && jsonArray.size() > 0) {
150 152
                     for (Object obj : jsonArray) {
151 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 158
                                 .caseAppliId(id)
154 159
                                .annexType(annexType)
155
-                                .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
160
+                                .annexName(name)
156 161
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
162
+                                .annexPath(path)
157 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 174
                         caseAttachMapper.save(caseAttach);
175
+                        success.put("annexId", caseAttach.getAnnexId());
176
+                        success.put("annexType", caseAttach.getAnnexType());
165 177
                     }
166 178
                 }
167 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 185
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
169
-                        .annexName(fileName)
186
+                        .annexName(name)
170 187
                         .annexPath(filePath)
171 188
                         .annexType(annexType)
172 189
                         .userId(userId)
173 190
                         .userName(userName)
174 191
                         .build();
175 192
                 int count = caseAttachMapper.save(caseAttach);
193
+                success.put("annexId", caseAttach.getAnnexId());
194
+                success.put("annexType", caseAttach.getAnnexType());
176 195
             }
177 196
             if ( annexType != null && annexType != 8) {
178 197
                 if (id != null) {
@@ -183,7 +202,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
183 202
                     caseApplicationMapper.submitCaseApplication(caseApplication);
184 203
                 }
185 204
             }
186
-                return AjaxResult.success();
205
+                return success;
187 206
         } catch (IOException e) {
188 207
             e.printStackTrace();
189 208
         }
@@ -195,49 +214,49 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
195 214
     @Autowired
196 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 252
     @Override
234 253
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
235
-        Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
254
+      //  Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
236 255
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
237 256
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
238 257
         if (i > 0) {
239 258
             // 新增日志
240
-            CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
259
+//            CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants., "");
241 260
 
242 261
             return AjaxResult.success("证据确认成功");
243 262
         }
@@ -275,7 +294,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
275 294
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
276 295
             if (i > 0) {
277 296
                 // 新增日志
278
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), caseStatus, "");
297
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
279 298
 
280 299
                 return AjaxResult.success("提交成功");
281 300
             }
@@ -291,6 +310,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
291 310
             for (MultipartFile file : files) {
292 311
                 // 上传
293 312
                 String fileName = FileUploadUtils.upload(filePath, file);
313
+                String name=file.getOriginalFilename();
294 314
                 String suffix = getFileExtension(fileName);
295 315
                 if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
296 316
                     // 上传onlyoffice
@@ -298,25 +318,24 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
298 318
                     if(jsonArray!=null && jsonArray.size() > 0) {
299 319
                         for (Object obj : jsonArray) {
300 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 325
                             CaseAttach   caseAttach = CaseAttach.builder()
302 326
                                     .caseAppliId(id)
303 327
                                     .annexType(annexType)
304
-                                    .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
305
-
328
+                                    .annexName(name)
329
+                                    .annexPath(path)
306 330
                                     .onlyOfficeFileId(jsonObject.getString("fileId"))
307 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 332
                             caseAttachMapper.save(caseAttach);
315 333
                         }
316 334
                     }
317 335
                 }else {
336
+                    filePath=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
318 337
                     CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
319
-                            .annexName(fileName)
338
+                            .annexName(name)
320 339
                             .annexPath(filePath)
321 340
                             .annexType(annexType)
322 341
                             .userId(userId)
@@ -334,10 +353,11 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
334 353
         }
335 354
         // 给秘书发送短信
336 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 362
             SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
343 363
             //  1992106	普通短信	修改证据资料通知	尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
@@ -345,13 +365,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
345 365
             CaseApplication caseApplication = new CaseApplication();
346 366
             caseApplication.setId(id);
347 367
             caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
348
-            for (SysUser user : userList) {
368
+
349 369
                 request.setPhone(user.getPhonenumber());
350 370
                 request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
351 371
                 Boolean aBoolean = SmsUtils.sendSms(request);
352 372
                 //保存短信发送记录
353 373
                 SmsSendRecord smsSendRecord = new SmsSendRecord();
354
-                smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
374
+                smsSendRecord.setCaseId(id);
355 375
 
356 376
                 smsSendRecord.setCaseNum(caseApplication.getCaseNum());
357 377
                 smsSendRecord.setPhone(request.getPhone());
@@ -365,10 +385,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
365 385
                     smsSendRecord.setSendStatus(0);
366 386
                 }
367 387
                 smsRecordMapper.saveSmsSendRecord(smsSendRecord);
368
-            }
388
+
369 389
 
370 390
         }
371
-        }
391
+
372 392
 
373 393
 
374 394
         return AjaxResult.success("上传成功");
@@ -383,17 +403,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
383 403
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
384 404
         if (CollectionUtil.isNotEmpty(caseAttachList)) {
385 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 414
             return AjaxResult.success(caseAttachList);
399 415
         }
@@ -463,9 +479,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
463 479
             String filePath = RuoYiConfig.getUploadPath();
464 480
             // 上传
465 481
             String fileName = FileUploadUtils.upload(filePath, file);
482
+            fileName=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
466 483
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
467
-                    .annexName(fileName)
468
-                    .annexPath(filePath)
484
+                    .annexName(file.getOriginalFilename())
485
+                    .annexPath(fileName)
469 486
                     .annexType(annexType)
470 487
                     .userId(userId)
471 488
                     .userName(username)
@@ -517,44 +534,44 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
517 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 Bestand weergeven

@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.SecurityUtils;
13 13
 import com.ruoyi.common.utils.StringUtils;
14 14
 import com.ruoyi.wisdomarbitrate.domain.*;
15 15
 import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
16
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
16 17
 import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
17 18
 import com.ruoyi.wisdomarbitrate.mapper.*;
18 19
 import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -31,6 +32,7 @@ import java.math.BigDecimal;
31 32
 import java.util.ArrayList;
32 33
 import java.util.Date;
33 34
 import java.util.List;
35
+import java.util.Optional;
34 36
 import java.util.stream.Collectors;
35 37
 
36 38
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -47,6 +49,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
47 49
     private SmsRecordMapper smsRecordMapper;
48 50
     @Autowired
49 51
     private ArbitrateRecordMapper arbitrateRecordMapper;
52
+    private ICasePaymentService casePaymentService;
50 53
 
51 54
     @Autowired
52 55
     public CasePaymentServiceImpl(ElegentPay elegentPay
@@ -118,8 +121,14 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
118 121
         for (Long id : batchCaseApplication.getIds()) {
119 122
             CaseApplication caseApplication = new CaseApplication();
120 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 132
             if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
124 133
                 // 同意,更新案件状态为案件质证
125 134
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
@@ -146,23 +155,23 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
146 155
             caseApplicationMapper.submitCaseApplication(caseApplication);
147 156
             //发送短信通知
148 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 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 168
                     String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
162 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 175
                         Boolean aBoolean = SmsUtils.sendSms(request);
167 176
                         //保存短信发送记录
168 177
                         SmsSendRecord smsSendRecord = new SmsSendRecord();
@@ -189,17 +198,17 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
189 198
                             smsSendRecord.setSendStatus(0);
190 199
                         }
191 200
                         smsRecordMapper.saveSmsSendRecord(smsSendRecord);
192
-                    } else {       //被申请人
201
+                         //被申请人
193 202
                         if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
194 203
 
195
-                            request.setPhone(affiliate.getContactTelphone());
204
+                            request.setPhone(res.getPhone());
196 205
                             request.setTemplateId("1952840");
197 206
                             // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
198
-                            String name = affiliate.getName();
207
+                             name = res.getName();
199 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 212
                             smsSendRecord.setCaseId(caseApplication.getId());
204 213
                             smsSendRecord.setCaseNum(caseNum);
205 214
                             smsSendRecord.setPhone(request.getPhone());
@@ -214,8 +223,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
214 223
                             }
215 224
                             smsRecordMapper.saveSmsSendRecord(smsSendRecord);
216 225
                         }
217
-                    }
218
-                }
226
+
227
+
219 228
                 //更改记录表里的支付状态和支付时间
220 229
                 CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
221 230
                 casePaymentRecord.setPaymentStatus(1);
@@ -224,9 +233,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
224 233
                 casePaymentRecordMapper.update(casePaymentRecord);
225 234
                 // 新增日志
226 235
                 if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
227
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
236
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
228 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,7 +280,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
271 280
                 paymentRecord.setPaymentStatus(1);
272 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,90 +412,10 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
403 412
 
404 413
         if (caseApplications != null && caseApplications.size() > 0) {
405 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 419
         }else{
491 420
             throw new ServiceException("这个批号没有批量缴费确认的案件");
492 421
         }

+ 31
- 23
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseZipImportImpl.java Bestand weergeven

@@ -50,6 +50,7 @@ import java.util.regex.Pattern;
50 50
 import java.util.stream.Collectors;
51 51
 
52 52
 import static com.google.common.io.Files.getFileExtension;
53
+import static com.ruoyi.common.constant.FileTransformation.getFileName;
53 54
 import static com.ruoyi.common.core.domain.AjaxResult.error;
54 55
 import static com.ruoyi.common.core.domain.AjaxResult.success;
55 56
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -209,7 +210,7 @@ public class CaseZipImportImpl {
209 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 211
         // fileMap<caseId, List<File>>
211 212
         Map<String, String> fatchMap = new HashMap<>();
212
-        Integer batchNumber = caseApplicationMapper.selectBatchNumberLike();
213
+        Integer batchNumber = caseApplicationMapper.selectMaxBatchNumber();
213 214
         AtomicInteger maxBatchNumber = new AtomicInteger();
214 215
         if (batchNumber == null) {
215 216
             maxBatchNumber.set(1);
@@ -268,7 +269,7 @@ public class CaseZipImportImpl {
268 269
 
269 270
                 // 需要新增的用户
270 271
                 List<SysUser> addUsers = new ArrayList<>();
271
-                caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
272
+              //  caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
272 273
                 caseApplication.setCaseLogId(IdWorkerUtil.getId());
273 274
                 caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
274 275
                 caseApplication.setCaseAppliId(caseApplication.getId());
@@ -290,6 +291,8 @@ public class CaseZipImportImpl {
290 291
                     if (StrUtil.isEmpty(fileUrl)) {
291 292
                         continue;
292 293
                     }
294
+                    // 根据路径获取文件名
295
+                    String name = getFileName(fileUrl);
293 296
                     String suffix = getFileExtension(fileUrl);
294 297
                     if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
295 298
                         // 上传onlyoffice
@@ -297,18 +300,21 @@ public class CaseZipImportImpl {
297 300
                         if(jsonArray!=null && jsonArray.size() > 0) {
298 301
                             for (Object obj : jsonArray) {
299 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 307
                                         .caseAppliId(caseApplication.getId())
302
-                                        .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
303
-
308
+                                        .annexName(name)
309
+                                        .annexPath(path)
304 310
                                         .onlyOfficeFileId(jsonObject.getString("fileId"))
305 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 318
                                 if(fileUrl.contains("申请书")){
313 319
                                     CaseAttach applyFile = new CaseAttach();
314 320
                                     BeanUtil.copyProperties(caseAttach, applyFile);
@@ -326,11 +332,11 @@ public class CaseZipImportImpl {
326 332
 
327 333
                         CaseAttach caseAttach = new CaseAttach();
328 334
                         caseAttach.setCaseAppliId(caseApplication.getId());
335
+                        filePath=filePath.replace("home/ruoyi/uploadPath/","profile/");
329 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 341
                         caseAttach.setAnnexType(2);
336 342
                         caseAttachs.add(caseAttach);
@@ -359,7 +365,7 @@ public class CaseZipImportImpl {
359 365
 
360 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 369
                         caseApplicationLogMapper.insert(caseApplication);
364 370
                         // 多线程执行
365 371
                         if (CollectionUtil.isNotEmpty(addUsers)) {
@@ -374,12 +380,13 @@ public class CaseZipImportImpl {
374 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 390
                         if (CollectionUtil.isNotEmpty(caseAttachs)) {
384 391
                             caseAttachMapper.batchSave(caseAttachs);
385 392
                             caseAttachLogMapper.batchSave(caseAttachs);
@@ -772,7 +779,8 @@ public class CaseZipImportImpl {
772 779
         if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
773 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 Bestand weergeven

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

+ 11
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/MsSignSealServiceImpl.java Bestand weergeven

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

+ 27
- 48
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java Bestand weergeven

@@ -27,9 +27,11 @@ import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
27 27
 import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
28 28
 import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
29 29
 import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
30
+import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
30 31
 import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
31 32
 import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
32 33
 import com.ruoyi.wisdomarbitrate.mapper.*;
34
+import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
33 35
 import com.ruoyi.wisdomarbitrate.service.VideoService;
34 36
 import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
35 37
 import com.tencentcloudapi.common.Credential;
@@ -96,6 +98,8 @@ public class VideoServiceImpl implements VideoService {
96 98
     private SysRoleMapper roleMapper;
97 99
     @Autowired
98 100
     private SysUserMapper userMapper;
101
+    @Autowired
102
+    private ICaseApplicationService caseApplicationService;
99 103
     /**
100 104
      *  功能:第三方回调sign校验
101 105
      *     参数:
@@ -179,17 +183,11 @@ public class VideoServiceImpl implements VideoService {
179 183
             return success();
180 184
         }
181 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 192
         return  success(caseAttachList);
195 193
     }
@@ -374,9 +372,10 @@ public class VideoServiceImpl implements VideoService {
374 372
 
375 373
         // 绑定案件
376 374
         if(convertFlag){
375
+//            String path=fileName.replace("")
377 376
             CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
378
-                    .annexName(fileName)
379
-                    .annexPath(RuoYiConfig.getHtml2PDFPath())
377
+                    .annexName(currentFileName)
378
+                    .annexPath(fileName)
380 379
                     .annexType(7)
381 380
                     .build();
382 381
             caseAttachMapper.save(caseAttach);
@@ -400,16 +399,10 @@ public class VideoServiceImpl implements VideoService {
400 399
         if (caseAttachList != null && caseAttachList.size() > 0) {
401 400
             for (CaseAttach caseAttach : caseAttachList) {
402 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,8 +490,8 @@ public class VideoServiceImpl implements VideoService {
497 490
                 String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
498 491
                 // 存入数据库
499 492
                 CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
500
-                        .annexName(annexName)
501
-                        .annexPath(RuoYiConfig.getVideoUploadPath())
493
+                        .annexName(fileName)
494
+                        .annexPath(annexName)
502 495
                         .annexType(9)
503 496
                         .build();
504 497
                 caseAttachMapper.save(caseAttach);
@@ -517,10 +510,7 @@ public class VideoServiceImpl implements VideoService {
517 510
     @Override
518 511
     public AjaxResult selectRoleMenuByCaseId(Long caseId) {
519 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 514
         if (CollectionUtil.isEmpty(msCaseAffiliates)) {
525 515
             return error("未找到案件相关人员");
526 516
         }
@@ -532,27 +522,16 @@ public class VideoServiceImpl implements VideoService {
532 522
         if (sysUser == null) {
533 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 537
         return result;

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Bestand weergeven

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

+ 19
- 1
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml Bestand weergeven

@@ -105,6 +105,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
105 105
  			<if test="email != null and email != ''">email,</if>
106 106
  			<if test="status != null">status,</if>
107 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 113
  			create_time
109 114
  		)values(
110 115
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -118,6 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
118 123
  			<if test="email != null and email != ''">#{email},</if>
119 124
  			<if test="status != null">#{status},</if>
120 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 131
  			sysdate()
122 132
  		);
123 133
 	</insert>
@@ -168,6 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
168 178
  			<if test="email != null">email = #{email},</if>
169 179
  			<if test="status != null and status != ''">status = #{status},</if>
170 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 186
  			update_time = sysdate()
172 187
  		</set>
173 188
  		where dept_id = #{deptId}
@@ -196,5 +211,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
196 211
 	<delete id="deleteDeptById" parameterType="Long">
197 212
 		update sys_dept set del_flag = '2' where dept_id = #{deptId}
198 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 218
 </mapper> 

+ 33
- 3
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Bestand weergeven

@@ -49,9 +49,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
49 49
     </resultMap>
50 50
 	
51 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 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 55
         from sys_user u
56 56
 		    left join sys_dept d on u.dept_id = d.dept_id
57 57
 		    left join sys_user_role ur on u.user_id = ur.user_id
@@ -217,11 +217,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
217 217
 
218 218
     <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
219 219
  		insert into sys_user(
220
+ 			<if test="position != null and position != ''">position,</if>
220 221
  			<if test="userId != null and userId != 0">user_id,</if>
221 222
  			<if test="deptId != null and deptId != 0">dept_id,</if>
222 223
  			<if test="userName != null and userName != ''">user_name,</if>
223 224
  			<if test="nickName != null and nickName != ''">nick_name,</if>
224 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 231
  			<if test="email != null and email != ''">email,</if>
226 232
  			<if test="avatar != null and avatar != ''">avatar,</if>
227 233
  			<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
@@ -232,11 +238,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
232 238
  			<if test="remark != null and remark != ''">remark,</if>
233 239
  			create_time
234 240
  		)values(
241
+		<if test="position != null and position != ''">#{position},</if>
235 242
  			<if test="userId != null and userId != ''">#{userId},</if>
236 243
  			<if test="deptId != null and deptId != ''">#{deptId},</if>
237 244
  			<if test="userName != null and userName != ''">#{userName},</if>
238 245
  			<if test="nickName != null and nickName != ''">#{nickName},</if>
239 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 252
  			<if test="email != null and email != ''">#{email},</if>
241 253
  			<if test="avatar != null and avatar != ''">#{avatar},</if>
242 254
  			<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
@@ -250,6 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
250 262
 	</insert>
251 263
     <insert id="batchSave">
252 264
 		insert into sys_user(
265
+		position,
253 266
 		user_id,
254 267
 		dept_id,
255 268
 		user_name,
@@ -267,6 +280,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
267 280
 		)values
268 281
 		<foreach item="item" index="index" collection="list" separator=",">
269 282
 		(
283
+		#{item.position},
270 284
 		#{item.userId},
271 285
 		#{item.deptId},
272 286
 		#{item.userName},
@@ -292,6 +306,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
292 306
  			<if test="userName != null and userName != ''">user_name = #{userName},</if>
293 307
  			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
294 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 315
  			<if test="email != null ">email = #{email},</if>
296 316
  			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
297 317
  			<if test="sex != null and sex != ''">sex = #{sex},</if>
@@ -335,5 +355,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
335 355
 		INNER JOIN sys_dept d ON u.dept_id = d.dept_id
336 356
 		WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
337 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 369
 </mapper> 

+ 8
- 2
ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml Bestand weergeven

@@ -16,8 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
16 16
 	<select id="countUserRoleByRoleId" resultType="Integer">
17 17
 	    select count(1) from sys_user_role where role_id=#{roleId}  
18 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 24
  		delete from sys_user_role where user_id in
22 25
  		<foreach collection="array" item="userId" open="(" separator="," close=")">
23 26
  			#{userId}
@@ -41,4 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
41 44
  	        #{userId}
42 45
             </foreach> 
43 46
 	</delete>
47
+	<insert id="insertUserRole">
48
+		insert into sys_user_role(user_id, role_id) values(#{userId}, #{roleId})
49
+	</insert>
44 50
 </mapper> 

+ 1
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ArbitrateRecordMapper.xml Bestand weergeven

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

+ 4
- 15
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateLogMapper.xml Bestand weergeven

@@ -63,22 +63,11 @@
63 63
 
64 64
 
65 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 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 72
         </foreach>;
84 73
     </insert>

+ 121
- 157
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml Bestand weergeven

@@ -3,188 +3,152 @@
3 3
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 4
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 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 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 50
         <where>
44
-            <if test="caseAppliId != null ">
45
-                AND c.case_appli_id = #{caseAppliId}
51
+            <if test="caseAppliId!=null">
52
+               c.id=#{ caseAppliId}
46 53
             </if>
47 54
         </where>
55
+        GROUP BY a.id,r.role_id order by a.id asc
48 56
 
49 57
 
50 58
 
51 59
 
52 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 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 83
                 </foreach>
68 84
             </if>
69 85
         </where>
70 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 91
     </select>
88 92
 
89
-
90
-
91 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 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 99
         </foreach>
110 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 152
     <delete id="deletecaseAffiliate" parameterType="CaseApplication">
189 153
         delete from case_affiliate where case_appli_id = #{id}
190 154
     </delete>

+ 616
- 941
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 75
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml Bestand weergeven

@@ -11,80 +11,5 @@
11 11
         <result property="roomId"     column="room_id"    />
12 12
         <result property="caseStatusName"     column="caseStatusName"    />
13 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 15
 </mapper>

+ 11
- 11
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml Bestand weergeven

@@ -31,26 +31,26 @@
31 31
     <select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
32 32
             select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes  ,cl.id ,cl.case_appli_id caseAppliId,
33 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 35
         when 3 then '缴费确认' when 4 then '案件质证' when 5 then '组庭审核'
36 36
         when 6 then '组庭确定' when 7 then '审核仲裁方式' when 8 then '开庭审理'
37 37
         when 9 then '书面审理'
38 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 42
         when 26 then '证据确认成功'
43 43
         when 31 then '修改开庭时间'
44 44
 
45 45
         ELSE ''
46 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 54
         END roleName
55 55
             from case_log_record cl
56 56
 

+ 6
- 3
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml Bestand weergeven

@@ -72,16 +72,19 @@
72 72
         ELSE '无案件状态'
73 73
         END caseStatusName,
74 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 76
         c.arbitrat_method arbitratMethod ,
77 77
         CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
78 78
         ELSE '无审理方式'
79 79
         END arbitratMethodName,
80 80
         c.arbitrator_id arbitratorId,
81
-        c.arbitrator_name arbitratorName
81
+        u.nick_name arbitratorName
82 82
         from seal_sign_record s
83 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 88
         <!-- where s.sign_flow_status in (0,1,2)-->
86 89
         <where>
87 90
         <if test="penSonAccount != null and penSonAccount!='' ">