Преглед изворни кода

视频,用印回调,裁决书处理

18792927508 пре 2 година
родитељ
комит
44129c7cd0
28 измењених фајлова са 970 додато и 643 уклоњено
  1. 1
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
  2. 9
    25
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
  3. 2
    12
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
  4. 56
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MsSignSealController.java
  5. 2
    0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
  6. 2
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  7. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealSignRecord.java
  8. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
  9. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java
  10. 2
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java
  11. 7
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java
  12. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
  13. 15
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/MsSignSealService.java
  14. 21
    8
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
  15. 277
    517
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  16. 15
    32
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java
  17. 38
    25
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  18. 7
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseLogRecordServiceImpl.java
  19. 10
    4
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java
  20. 268
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/MsSignSealServiceImpl.java
  21. 46
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/DigesdateUtils.java
  22. 2
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java
  23. 96
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignVerifyUtils.java
  24. 9
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
  25. 5
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml
  26. 37
    1
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml
  27. 9
    7
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml
  28. 10
    3
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml

+ 1
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java Прегледај датотеку

37
     /**
37
     /**
38
      * 获取部门列表
38
      * 获取部门列表
39
      */
39
      */
40
-    @PreAuthorize("@ss.hasPermi('system:dept:list')")
40
+//    @PreAuthorize("@ss.hasPermi('system:dept:list')")
41
     @GetMapping("/list")
41
     @GetMapping("/list")
42
     public AjaxResult list(SysDept dept)
42
     public AjaxResult list(SysDept dept)
43
     {
43
     {

+ 9
- 25
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java Прегледај датотеку

159
         return AjaxResult.success(logisticsInfo);
159
         return AjaxResult.success(logisticsInfo);
160
     }
160
     }
161
 
161
 
162
-    /**
163
-     * 签名(暂时只改案件状态)
164
-     * @param caseApplication
165
-     * @return
166
-     */
167
-    @PostMapping("/signature")
168
-//    @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
169
-    public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
170
-        return adjudicationService.signature(caseApplication);
171
-    }
162
+
172
 
163
 
173
 
164
 
174
     /**
165
     /**
222
         return adjudicationService.serviceBatch(caseApplication.getBatchNumber());
213
         return adjudicationService.serviceBatch(caseApplication.getBatchNumber());
223
     }
214
     }
224
 
215
 
225
-    /**
226
-     * 用印(暂时只改案件状态)
227
-     * @param caseApplication
228
-     * @return
229
-     */
230
-    @PostMapping("/stamp")
231
-//    @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
232
-    public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
233
-        return adjudicationService.stamp(caseApplication);
234
-    }
216
+
235
 
217
 
236
     /**
218
     /**
237
      * 档案详情查询
219
      * 档案详情查询
255
     }
237
     }
256
     /**
238
     /**
257
      * 开庭审理提交,只改变案件状态为CaseApplicationConstants.VERPRIF_ARBITRATION
239
      * 开庭审理提交,只改变案件状态为CaseApplicationConstants.VERPRIF_ARBITRATION
258
-     * @param id 案件id
240
+     * @param caseApplication 案件
259
      * @return
241
      * @return
260
      */
242
      */
261
-    @GetMapping("/changeCaseStatus")
262
-    public AjaxResult changeCaseStatus(@RequestParam("id") Long id){
263
-
264
-        return adjudicationService.changeCaseStatus(id, CaseApplicationConstants.VERPRIF_ARBITRATION);
243
+    @PostMapping("/changeCaseStatus")
244
+    public AjaxResult changeCaseStatus(@RequestBody CaseApplication caseApplication){
245
+    if(caseApplication.getId()==null){
246
+        return error("参数校验失败");
247
+    }
248
+        return adjudicationService.changeCaseStatus(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION);
265
     }
249
     }
266
 
250
 
267
 }
251
 }

+ 2
- 12
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Прегледај датотеку

271
     @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
271
     @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
272
     @PostMapping("/pendTralCheck")
272
     @PostMapping("/pendTralCheck")
273
     public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
273
     public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
274
-        if(StrUtil.isEmpty(caseApplication.getArbitratorId())|| StrUtil.isEmpty(caseApplication.getArbitratorName())){
274
+        if(CollectionUtil.isEmpty(caseApplication.getArbitrators())){
275
             return error("请选择仲裁员");
275
             return error("请选择仲裁员");
276
         }
276
         }
277
         return caseApplicationService.pendTralCheck(caseApplication);
277
         return caseApplicationService.pendTralCheck(caseApplication);
454
         return success(schemeUrl);
454
         return success(schemeUrl);
455
     }
455
     }
456
 
456
 
457
-    /**
458
-     * 生成庭审笔录
459
-     * @param arbitrateRecord
460
-     * @return
461
-     */
462
-    @PostMapping("/creatTrialRecord")
463
-//    @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
464
-    public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
465
-        return caseApplicationService.creatTrialRecord(arbitrateRecord);
466
-    }
467
 
457
 
468
     /**
458
     /**
469
-     * 记录庭审笔录
459
+     * 确认会议结果
470
      * @param arbitrateRecord
460
      * @param arbitrateRecord
471
      * @return
461
      * @return
472
      */
462
      */

+ 56
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/MsSignSealController.java Прегледај датотеку

1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.ruoyi.common.annotation.Anonymous;
4
+import com.ruoyi.common.core.controller.BaseController;
5
+import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.wisdomarbitrate.service.MsSignSealService;
7
+import com.ruoyi.wisdomarbitrate.utils.SignVerifyUtils;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.web.bind.annotation.PostMapping;
10
+import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RestController;
12
+
13
+/**
14
+ * @Classname MsSignSealController
15
+ * @Description TODO
16
+ * @Version 1.0.0
17
+ * @Date 2024/5/10 15:07
18
+ * @Created wangqiong
19
+ */
20
+@RestController
21
+@RequestMapping("/mssignSeal")
22
+public class MsSignSealController extends BaseController {
23
+    @Autowired
24
+    private MsSignSealService msSignSealService;
25
+    /**
26
+     * 签名用印回调
27
+     */
28
+    @Anonymous
29
+    @PostMapping("/signSeaalCaseApplicaCallback")
30
+    public AjaxResult signSeaalCaseApplicaCallback() throws Exception {
31
+        boolean checkResult= SignVerifyUtils.checkSignuter();
32
+        if(checkResult){
33
+            String reqbodystr =SignVerifyUtils.getRequestBody();
34
+            return msSignSealService.signSeaalCaseApplicaCallback(reqbodystr);
35
+        }else {
36
+            return AjaxResult.error("error");
37
+        }
38
+
39
+    }
40
+
41
+    /**
42
+     * 印章审核回调
43
+     */
44
+    @Anonymous
45
+    @PostMapping("/sealCheckCallback")
46
+    public AjaxResult sealCheckCallback() throws Exception {
47
+        boolean checkResult= SignVerifyUtils.checkSignuter();
48
+        if(checkResult){
49
+            String reqbodystr =SignVerifyUtils.getRequestBody();
50
+            return msSignSealService.sealCheckCallback(reqbodystr);
51
+        }else {
52
+            return AjaxResult.error("error");
53
+        }
54
+
55
+    }
56
+}

+ 2
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java Прегледај датотеку

154
      */
154
      */
155
     public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
155
     public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
156
             "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
156
             "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
157
+    // 中文逗号分隔符
158
+    public static final String CN_SPLIT_COMMA = ",";
157
 }
159
 }

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java Прегледај датотеку

39
     /** 立案日期 */
39
     /** 立案日期 */
40
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
40
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
41
     private Date registerDate;
41
     private Date registerDate;
42
-    /** 仲裁方式 */
42
+    /** 仲裁方式 ,1-开庭,2-书面*/
43
     private Integer arbitratMethod;
43
     private Integer arbitratMethod;
44
     /**
44
     /**
45
      * 是否导入,0手动录入,1导入,默认0
45
      * 是否导入,0手动录入,1导入,默认0
211
      */
211
      */
212
     private Integer financeStatus;
212
     private Integer financeStatus;
213
     /**
213
     /**
214
-     * 是否是被申请人,仲裁员,部门长,财务,代理人,0-否,1-是
214
+     * 是否查询全部节点
215
      */
215
      */
216
     private Integer isOtherRole;
216
     private Integer isOtherRole;
217
     /**
217
     /**

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/SealSignRecord.java Прегледај датотеку

58
     private double positionXorg;
58
     private double positionXorg;
59
     /** 印章位置y坐标 */
59
     /** 印章位置y坐标 */
60
     private double positionYorg;
60
     private double positionYorg;
61
+    /**
62
+     * 仲裁员签名状态,1-签名
63
+     */
64
+    private Integer signStatusArbitor;
65
+    /**
66
+     * 用印状态,1用印
67
+     */
68
+    private Integer sealStatus;
61
 
69
 
62
 
70
 
63
 
71
 

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Прегледај датотеку

149
     List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
149
     List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
150
                                @Param("caseStatusList") List<Integer> caseStatusList,
150
                                @Param("caseStatusList") List<Integer> caseStatusList,
151
                                @Param("roleNames") List<String> roleNames);
151
                                @Param("roleNames") List<String> roleNames);
152
+
153
+    /**
154
+     * 查询当前案件节点
155
+     * @param id
156
+     * @return
157
+     */
158
+    Integer selectCaseApplicationCaseStatus(@Param("id") Long id);
152
 }
159
 }

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAttachMapper.java Прегледај датотеку

35
     void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
35
     void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
36
 
36
 
37
     void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
37
     void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
38
+
39
+    /**
40
+     * 删除存在的附件不包括该附件
41
+     * @param caseId 附件
42
+     * @param type 附件类型
43
+     * @param annexId 附件id
44
+     */
45
+    void deleteCaseAttach(@Param("caseId")Long caseId, @Param("type")int type,@Param("annexId") Long annexId);
38
 }
46
 }

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java Прегледај датотеку

12
     List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
12
     List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
13
             , @Param(value = "caseStatusList") List<Integer> caseStatusList
13
             , @Param(value = "caseStatusList") List<Integer> caseStatusList
14
             , @Param(value = "identityType" ) Integer identityType
14
             , @Param(value = "identityType" ) Integer identityType
15
+            , @Param(value = "phone" ) String phone
16
+            , @Param(value = "loginUserName" ) String loginUserName
15
     );
17
     );
16
 }
18
 }

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java Прегледај датотеку

31
     void insertSealSignRecord(SealSignRecord sealSignRecord);
31
     void insertSealSignRecord(SealSignRecord sealSignRecord);
32
 
32
 
33
     List<CaseApplication> selectsignFlow(@Param("batchNumber") Integer batchNumber,@Param("caseStatus")  Integer caseStatus);
33
     List<CaseApplication> selectsignFlow(@Param("batchNumber") Integer batchNumber,@Param("caseStatus")  Integer caseStatus);
34
+
35
+    /**
36
+     * 根据签署流程id查询签署记录
37
+     * @param signFlowId
38
+     * @return
39
+     */
40
+    SealSignRecord selectSealByFlowId(@Param("signFlowId") String signFlowId);
34
 }
41
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Прегледај датотеку

57
 
57
 
58
     SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
58
     SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
59
 
59
 
60
-    AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
60
+
61
 
61
 
62
     CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
62
     CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
63
 
63
 

+ 15
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/MsSignSealService.java Прегледај датотеку

1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.google.gson.Gson;
4
+import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.common.exception.EsignDemoException;
6
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
+
8
+import java.io.IOException;
9
+import java.util.List;
10
+
11
+public interface MsSignSealService {
12
+    AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException;
13
+
14
+    AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException;
15
+}

+ 21
- 8
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Прегледај датотеку

60
 import java.util.stream.Collectors;
60
 import java.util.stream.Collectors;
61
 
61
 
62
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
62
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
63
+import static com.ruoyi.wisdomarbitrate.utils.CaseLogUtils.insertCaseLog;
63
 
64
 
64
 @Service
65
 @Service
65
 @Slf4j
66
 @Slf4j
730
     @Override
731
     @Override
731
     @Transactional
732
     @Transactional
732
     public AjaxResult signature(CaseApplication caseApplication) {
733
     public AjaxResult signature(CaseApplication caseApplication) {
734
+        // 查询当前案件节点
735
+        Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
733
         //更改案件状态(暂时)
736
         //更改案件状态(暂时)
734
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
737
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
735
         caseApplicationMapper.submitCaseApplication(caseApplication);
738
         caseApplicationMapper.submitCaseApplication(caseApplication);
736
         // 新增日志
739
         // 新增日志
737
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
740
+        CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
738
 
741
 
739
         return AjaxResult.success("签名成功,案件状态已改为待裁决书用印");
742
         return AjaxResult.success("签名成功,案件状态已改为待裁决书用印");
740
     }
743
     }
746
             for (Long id : ids) {
749
             for (Long id : ids) {
747
                 CaseApplication caseApplication = new CaseApplication();
750
                 CaseApplication caseApplication = new CaseApplication();
748
                 caseApplication.setId(id);
751
                 caseApplication.setId(id);
752
+                // 查询当前案件节点
753
+                Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
749
                 //更改案件状态(暂时)
754
                 //更改案件状态(暂时)
750
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
755
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
751
                 caseApplicationMapper.submitCaseApplication(caseApplication);
756
                 caseApplicationMapper.submitCaseApplication(caseApplication);
752
                 // 新增日志
757
                 // 新增日志
753
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
758
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
754
             }
759
             }
755
         } catch (Exception e) {
760
         } catch (Exception e) {
756
             return AjaxResult.error(e.getMessage());
761
             return AjaxResult.error(e.getMessage());
771
         if (caseApplication1 == null) {
776
         if (caseApplication1 == null) {
772
             return AjaxResult.error("未查询到相关案件");
777
             return AjaxResult.error("未查询到相关案件");
773
         }
778
         }
779
+        Integer currentNode=caseApplication1.getCaseStatus();
774
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
780
         List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
775
         Boolean isExistPdf = false;
781
         Boolean isExistPdf = false;
776
         if (caseAttachList != null && caseAttachList.size() > 0) {
782
         if (caseAttachList != null && caseAttachList.size() > 0) {
953
 
959
 
954
 
960
 
955
         // 新增日志
961
         // 新增日志
956
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
962
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), currentNode, "");
957
 
963
 
958
         return AjaxResult.success("裁决书送达成功");
964
         return AjaxResult.success("裁决书送达成功");
959
     }
965
     }
1010
 
1016
 
1011
     @Override
1017
     @Override
1012
     public AjaxResult stamp(CaseApplication caseApplication) {
1018
     public AjaxResult stamp(CaseApplication caseApplication) {
1019
+        Integer caseStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
1013
         //更改案件状态(暂时)
1020
         //更改案件状态(暂时)
1014
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
1021
         caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
1015
         caseApplicationMapper.submitCaseApplication(caseApplication);
1022
         caseApplicationMapper.submitCaseApplication(caseApplication);
1016
         // 新增日志
1023
         // 新增日志
1017
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
1024
+        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseStatus, "");
1018
 
1025
 
1019
         return AjaxResult.success("用印成功,案件状态已改为待裁决书送达");
1026
         return AjaxResult.success("用印成功,案件状态已改为待裁决书送达");
1020
     }
1027
     }
1552
             List<Long> ids = caseApplications1.stream().map(CaseApplication::getId).collect(Collectors.toList());
1559
             List<Long> ids = caseApplications1.stream().map(CaseApplication::getId).collect(Collectors.toList());
1553
             try {
1560
             try {
1554
                 for (Long id : ids) {
1561
                 for (Long id : ids) {
1562
+                    Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(id);
1555
                     CaseApplication caseApplication = new CaseApplication();
1563
                     CaseApplication caseApplication = new CaseApplication();
1556
                     caseApplication.setId(id);
1564
                     caseApplication.setId(id);
1557
                     //更改案件状态(暂时)
1565
                     //更改案件状态(暂时)
1558
                     caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
1566
                     caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
1559
                     caseApplicationMapper.submitCaseApplication(caseApplication);
1567
                     caseApplicationMapper.submitCaseApplication(caseApplication);
1560
                     // 新增日志
1568
                     // 新增日志
1561
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
1569
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
1562
                 }
1570
                 }
1563
             } catch (Exception e) {
1571
             } catch (Exception e) {
1564
                 return AjaxResult.error(e.getMessage());
1572
                 return AjaxResult.error(e.getMessage());
1587
                 if (caseApplication1 == null) {
1595
                 if (caseApplication1 == null) {
1588
                     return AjaxResult.error("未查询到相关案件");
1596
                     return AjaxResult.error("未查询到相关案件");
1589
                 }
1597
                 }
1598
+                Integer currentCaseNode=caseApplication1.getCaseStatus();
1590
                 List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
1599
                 List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
1591
 
1600
 
1592
                 if (caseAttachList != null && caseAttachList.size() > 0) {
1601
                 if (caseAttachList != null && caseAttachList.size() > 0) {
1767
 
1776
 
1768
                     }
1777
                     }
1769
                     // 新增日志
1778
                     // 新增日志
1770
-                    CaseLogUtils.insertCaseLog(caseApplication1.getId(), CaseApplicationConstants.CASE_FILING, "");
1779
+                    CaseLogUtils.insertCaseLog(caseApplication1.getId(), currentCaseNode, "");
1771
 
1780
 
1772
                 }
1781
                 }
1773
 
1782
 
1902
         // 保存裁决书附件
1911
         // 保存裁决书附件
1903
         saveArbitorFile(req.getId(), saveName, savePath, caseApplicationById, arbitrateRecordSelect,null);
1912
         saveArbitorFile(req.getId(), saveName, savePath, caseApplicationById, arbitrateRecordSelect,null);
1904
 
1913
 
1905
-        return AjaxResult.success("裁决书已生成");
1914
+        return AjaxResult.success();
1906
     }
1915
     }
1907
 
1916
 
1908
     @Transactional
1917
     @Transactional
1911
         if (id == null || caseStatus == null) {
1920
         if (id == null || caseStatus == null) {
1912
             return AjaxResult.error("参数校验失败");
1921
             return AjaxResult.error("参数校验失败");
1913
         }
1922
         }
1923
+        Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(id);
1914
         CaseApplication caseApplication = new CaseApplication();
1924
         CaseApplication caseApplication = new CaseApplication();
1915
         caseApplication.setId(id);
1925
         caseApplication.setId(id);
1916
         caseApplication.setCaseStatus(caseStatus);
1926
         caseApplication.setCaseStatus(caseStatus);
1927
+
1917
         caseApplicationMapper.submitCaseApplication(caseApplication);
1928
         caseApplicationMapper.submitCaseApplication(caseApplication);
1929
+        // 新增日志
1930
+        insertCaseLog(id,currentStatus , "");
1918
         return AjaxResult.success();
1931
         return AjaxResult.success();
1919
     }
1932
     }
1920
 
1933
 
1971
             xwpfDocument = new XWPFDocument(fileInputStream);
1984
             xwpfDocument = new XWPFDocument(fileInputStream);
1972
             log.error("xwpfDocument====" + xwpfDocument);
1985
             log.error("xwpfDocument====" + xwpfDocument);
1973
         } catch (IOException e) {
1986
         } catch (IOException e) {
1974
-            e.printStackTrace();
1987
+           throw new ServiceException("系统找不到指定的文件。");
1975
         }
1988
         }
1976
         if (xwpfDocument == null) {
1989
         if (xwpfDocument == null) {
1977
             return new ArrayList<>();
1990
             return new ArrayList<>();

+ 277
- 517
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 15
- 32
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseArbitrateServiceImpl.java Прегледај датотеку

65
         if (caseApplication1 == null) {
65
         if (caseApplication1 == null) {
66
             return AjaxResult.success();
66
             return AjaxResult.success();
67
         }
67
         }
68
+        Integer currentStatus = caseApplication1.getCaseStatus();
68
         Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
69
         Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
69
 
70
 
70
         String caseNum = caseApplication1.getCaseNum();
71
         String caseNum = caseApplication1.getCaseNum();
76
                 //修改案件状态为待修改开庭时间
77
                 //修改案件状态为待修改开庭时间
77
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
78
 //                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
78
                 // 新增日志
79
                 // 新增日志
79
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
80
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
80
 
81
 
81
             } else {
82
             } else {
82
                 caseApplication1.setArbitratMethod(2);
83
                 caseApplication1.setArbitratMethod(2);
83
                 //修改案件状态为待书面审理
84
                 //修改案件状态为待书面审理
84
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
85
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
85
                 // 新增日志
86
                 // 新增日志
86
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
87
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
87
 
88
 
88
             }
89
             }
89
         } else if (opinion == 1 ) {
90
         } else if (opinion == 1 ) {
92
                 caseApplication1.setArbitratMethod(2);
93
                 caseApplication1.setArbitratMethod(2);
93
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
94
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
94
                 // 新增日志
95
                 // 新增日志
95
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
96
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
96
 
97
 
97
             } else {
98
             } else {
98
                 //修改案件状态为待修改开庭时间
99
                 //修改案件状态为待修改开庭时间
99
                 caseApplication1.setArbitratMethod(1);
100
                 caseApplication1.setArbitratMethod(1);
100
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
101
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
101
-                //修改案件状态为待修改开庭时间
102
-//                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
103
                 // 新增日志
102
                 // 新增日志
104
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
103
+                CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
105
 
104
 
106
             }
105
             }
107
         }else if (opinion == 2) {
106
         }else if (opinion == 2) {
110
                 caseApplication1.setArbitratMethod(2);
109
                 caseApplication1.setArbitratMethod(2);
111
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
110
                 caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
112
                 // 新增日志
111
                 // 新增日志
113
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
112
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
114
 
113
 
115
             } else {
114
             } else {
116
                 //修改案件状态为待修改开庭时间
115
                 //修改案件状态为待修改开庭时间
117
                 caseApplication1.setArbitratMethod(1);
116
                 caseApplication1.setArbitratMethod(1);
118
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
117
                 caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
119
-                //修改案件状态为待修改开庭时间
120
-//                caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
121
                 // 新增日志
118
                 // 新增日志
122
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
119
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
123
 
120
 
124
             }
121
             }
125
         }
122
         }
174
         List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
171
         List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
175
         if (caseApplications1 != null && caseApplications1.size() > 0) {
172
         if (caseApplications1 != null && caseApplications1.size() > 0) {
176
             for(CaseApplication caseApplicationse:caseApplications1){
173
             for(CaseApplication caseApplicationse:caseApplications1){
174
+                Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplicationse.getId());
177
                 String caseNum = caseApplicationse.getCaseNum();
175
                 String caseNum = caseApplicationse.getCaseNum();
178
                 Integer arbitratMethod = caseApplication.getArbitratMethod();
176
                 Integer arbitratMethod = caseApplication.getArbitratMethod();
179
                 if (arbitratMethod == 1) {
177
                 if (arbitratMethod == 1) {
180
                     caseApplicationse.setArbitratMethod(1);
178
                     caseApplicationse.setArbitratMethod(1);
181
                     caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
179
                     caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
182
                     // 新增日志
180
                     // 新增日志
183
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
181
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
184
 
182
 
185
                 }else if (arbitratMethod == 2) {
183
                 }else if (arbitratMethod == 2) {
186
                     //修改案件状态为待书面审理
184
                     //修改案件状态为待书面审理
187
                     caseApplicationse.setArbitratMethod(2);
185
                     caseApplicationse.setArbitratMethod(2);
188
                     caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
186
                     caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
189
                     // 新增日志
187
                     // 新增日志
190
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
188
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
191
 
189
 
192
                 }
190
                 }
193
                 int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
191
                 int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
255
                 caseApplication.setId(caseId);
253
                 caseApplication.setId(caseId);
256
                 CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
254
                 CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
257
                 //案件日志表里添加数据
255
                 //案件日志表里添加数据
258
-                CaseLogRecord caseLogRecord = new CaseLogRecord();
259
-                caseLogRecord.setCaseAppliId(caseApplication1.getId());
260
-                caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
261
-                caseLogRecord.setCreateBy(getUsername());
262
-                caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
263
                 // 新增日志
256
                 // 新增日志
264
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
257
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
265
 
258
 
266
                 // 生成裁决书
259
                 // 生成裁决书
267
                 CaseApplication application = new CaseApplication();
260
                 CaseApplication application = new CaseApplication();
297
                 if (arbitrateRecord1 != null) {
290
                 if (arbitrateRecord1 != null) {
298
                     int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
291
                     int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
299
                     if (i > 0) {
292
                     if (i > 0) {
300
-                        //案件日志表里添加数据
301
-                        CaseLogRecord caseLogRecord = new CaseLogRecord();
302
-                        caseLogRecord.setCaseAppliId(caseApplication1.getId());
303
-                        caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
304
-                        caseLogRecord.setCreateBy(getUsername());
305
-                        caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
293
+
306
                         // 新增日志
294
                         // 新增日志
307
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
295
+                        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
308
 
296
 
309
                     }
297
                     }
310
                 } else {
298
                 } else {
311
                     //提交仲裁结果
299
                     //提交仲裁结果
312
                     int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
300
                     int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
313
                     if (i > 0) {
301
                     if (i > 0) {
314
-                        //案件日志表里添加数据
315
-                        CaseLogRecord caseLogRecord = new CaseLogRecord();
316
-                        caseLogRecord.setCaseAppliId(caseApplication1.getId());
317
-                        caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
318
-                        caseLogRecord.setCreateBy(getUsername());
319
-                        caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
302
+
320
                         // 新增日志
303
                         // 新增日志
321
-                        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
304
+                        CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
322
                     }
305
                     }
323
                 }
306
                 }
324
                 // 生成裁决书
307
                 // 生成裁决书

+ 38
- 25
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Прегледај датотеку

182
             IdentityAuthentication authentication = new IdentityAuthentication();
182
             IdentityAuthentication authentication = new IdentityAuthentication();
183
             LoginUser loginUser = SecurityUtils.getLoginUser();
183
             LoginUser loginUser = SecurityUtils.getLoginUser();
184
             // 查询该用户的角色
184
             // 查询该用户的角色
185
-            // 查询登录人身份证
185
+            // 查询登录人手机
186
             SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
186
             SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
187
             String username = sysUser.getUserName();
187
             String username = sysUser.getUserName();
188
             List<SysRole> roles = sysUser.getRoles();
188
             List<SysRole> roles = sysUser.getRoles();
196
                     }
196
                     }
197
                 }
197
                 }
198
             }
198
             }
199
-          if(adMinFlag!=1) {
200
-              authentication.setUserName(username);
201
-              IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
202
-              if (authentication1 != null) {
203
-                  identityNum = authentication1.getIdentityNo();
204
-              }
205
-          }
206
-
199
+//          if(adMinFlag!=1) {
200
+//              authentication.setUserName(username);
201
+//              IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
202
+//              if (authentication1 != null) {
203
+//                  identityNum = authentication1.getIdentityNo();
204
+//              }
205
+//          }
206
+        String phone=sysUser.getPhonenumber();
207
         List<Integer> caseStatusList = Arrays.asList(caseStatus);
207
         List<Integer> caseStatusList = Arrays.asList(caseStatus);
208
-        return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
208
+//        return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
209
+        return getCaseEvidenceVOListByPhone(phone, caseStatusList, 2);
209
     }
210
     }
210
 
211
 
211
     @Override
212
     @Override
212
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
213
     public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
214
+        Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
213
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
215
         caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
214
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
216
         int i = caseApplicationMapper.submitCaseApplication(caseApplication);
215
         if (i > 0) {
217
         if (i > 0) {
216
             // 新增日志
218
             // 新增日志
217
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_TRIAL, "");
219
+            CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
218
 
220
 
219
             return AjaxResult.success("证据确认成功");
221
             return AjaxResult.success("证据确认成功");
220
         }
222
         }
252
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
254
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
253
             if (i > 0) {
255
             if (i > 0) {
254
                 // 新增日志
256
                 // 新增日志
255
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT, "");
257
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), caseStatus, "");
256
 
258
 
257
                 return AjaxResult.success("提交成功");
259
                 return AjaxResult.success("提交成功");
258
             }
260
             }
430
                     .userId(userId)
432
                     .userId(userId)
431
                     .userName(username)
433
                     .userName(username)
432
                     .build();
434
                     .build();
433
-
434
-            CaseApplication caseApplicationsel = new CaseApplication();
435
-            caseApplicationsel.setId(id);
436
-            caseApplicationsel.setAnnexType(7);
437
-            List<CaseAttach> caseAttachs = caseAttachMapper.queryCaseAttachList(caseApplicationsel);
438
-            if(caseAttachs!=null&&caseAttachs.size()>0){
439
-                caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,7);
440
-                int count = caseAttachMapper.save(caseAttach);
441
-            }else {
442
-                int count = caseAttachMapper.save(caseAttach);
443
-            }
444
-
435
+            caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,annexType);
436
+            int count = caseAttachMapper.save(caseAttach);
445
             return AjaxResult.success("上传成功");
437
             return AjaxResult.success("上传成功");
446
         } catch (IOException e) {
438
         } catch (IOException e) {
447
             e.printStackTrace();
439
             e.printStackTrace();
488
     }
480
     }
489
 
481
 
490
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
482
     private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
491
-        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType);
483
+        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType,null,SecurityUtils.getUsername());
492
        // todo 返回房间号和开庭时间
484
        // todo 返回房间号和开庭时间
493
         if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
485
         if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
494
             for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
486
             for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
508
         }
500
         }
509
         return null;
501
         return null;
510
     }
502
     }
503
+    private List<CaseEvidenceVO> getCaseEvidenceVOListByPhone(String phone, List<Integer> caseStatusList, Integer identityType) {
504
+        List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(null, caseStatusList, identityType,phone,SecurityUtils.getUsername());
505
+        // todo 返回房间号和开庭时间
506
+        if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
507
+            for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
508
+                //根据案件id查询姓名
509
+                CaseAffiliate caseAffiliate = new CaseAffiliate();
510
+                caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
511
+                List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
512
+                for (CaseAffiliate affiliate : caseAffiliates) {
513
+                    if (affiliate.getIdentityType() == 1) {  //申请人
514
+                        caseEvidenceVO.setApplicantName(affiliate.getName());
515
+                    } else {
516
+                        caseEvidenceVO.setRespondentName(affiliate.getName());
517
+                    }
518
+                }
519
+            }
520
+            return caseListByRespondent;
521
+        }
522
+        return null;
523
+    }
511
 }
524
 }

+ 7
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseLogRecordServiceImpl.java Прегледај датотеку

4
 import cn.hutool.core.date.DatePattern;
4
 import cn.hutool.core.date.DatePattern;
5
 import cn.hutool.core.date.DateUtil;
5
 import cn.hutool.core.date.DateUtil;
6
 import cn.hutool.core.util.StrUtil;
6
 import cn.hutool.core.util.StrUtil;
7
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
7
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
8
 import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
9
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
8
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
10
 import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
9
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
11
 import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
10
 import org.springframework.beans.factory.annotation.Autowired;
12
 import org.springframework.beans.factory.annotation.Autowired;
11
 import org.springframework.stereotype.Service;
13
 import org.springframework.stereotype.Service;
12
 
14
 
15
+import java.util.ArrayList;
13
 import java.util.List;
16
 import java.util.List;
14
 import java.util.Optional;
17
 import java.util.Optional;
15
 
18
 
17
 public class CaseLogRecordServiceImpl  implements ICaseLogRecordService {
20
 public class CaseLogRecordServiceImpl  implements ICaseLogRecordService {
18
     @Autowired
21
     @Autowired
19
     private CaseLogRecordMapper caseLogRecordMapper;
22
     private CaseLogRecordMapper caseLogRecordMapper;
20
-
23
+    @Autowired
24
+    private CaseApplicationMapper applicationMapper;
21
 
25
 
22
     @Override
26
     @Override
23
     public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
27
     public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
28
+        CaseApplication caseApplicationReq = new CaseApplication();
29
+        caseApplicationReq.setId(caseLogRecord.getCaseAppliId());
24
         List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
30
         List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
25
         if(CollectionUtil.isNotEmpty(records)){
31
         if(CollectionUtil.isNotEmpty(records)){
26
             records.forEach(record->{
32
             records.forEach(record->{

+ 10
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CasePaymentServiceImpl.java Прегледај датотеку

118
         for (Long id : batchCaseApplication.getIds()) {
118
         for (Long id : batchCaseApplication.getIds()) {
119
             CaseApplication caseApplication = new CaseApplication();
119
             CaseApplication caseApplication = new CaseApplication();
120
             caseApplication.setId(id);
120
             caseApplication.setId(id);
121
+            // 查询当前案件节点
122
+           Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(id);
121
             if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
123
             if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
122
                 // 同意,更新案件状态为案件质证
124
                 // 同意,更新案件状态为案件质证
123
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
125
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
222
                 casePaymentRecordMapper.update(casePaymentRecord);
224
                 casePaymentRecordMapper.update(casePaymentRecord);
223
                 // 新增日志
225
                 // 新增日志
224
                 if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
226
                 if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
225
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
227
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
226
                 }else {
228
                 }else {
227
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
229
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
228
                 }
230
                 }
229
             }
231
             }
230
         }
232
         }
247
             if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
249
             if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
248
                 for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
250
                 for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
249
                     caseAttach.setCaseAppliId(caseId);
251
                     caseAttach.setCaseAppliId(caseId);
252
+                    // 先删除该案件缴费凭证,类型为8,在新增
253
+                    caseAttachMapper.deleteCaseAttach(caseId,8,caseAttach.getAnnexId());
250
                     caseAttachMapper.updateCaseAttach(caseAttach);
254
                     caseAttachMapper.updateCaseAttach(caseAttach);
251
                 }
255
                 }
252
             }
256
             }
255
             CaseApplication caseApplication = new CaseApplication();
259
             CaseApplication caseApplication = new CaseApplication();
256
             caseApplication.setId(caseId);
260
             caseApplication.setId(caseId);
257
             CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
261
             CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
262
+            Integer currentStatus=caseApplication1.getCaseStatus();
258
             caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
263
             caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
259
             //修改案件状态
264
             //修改案件状态
260
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
265
             int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
266
                 paymentRecord.setPaymentStatus(1);
271
                 paymentRecord.setPaymentStatus(1);
267
                 casePaymentRecordMapper.saveRecord(paymentRecord);
272
                 casePaymentRecordMapper.saveRecord(paymentRecord);
268
                 // 新增日志
273
                 // 新增日志
269
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
274
+                CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus ,"");
270
             }
275
             }
271
         }
276
         }
272
 
277
 
399
         if (caseApplications != null && caseApplications.size() > 0) {
404
         if (caseApplications != null && caseApplications.size() > 0) {
400
             List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
405
             List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
401
             for (Long caseId : caseIds) {
406
             for (Long caseId : caseIds) {
407
+                Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseId);
402
                 CaseApplication caseApplication = new CaseApplication();
408
                 CaseApplication caseApplication = new CaseApplication();
403
                 caseApplication.setId(caseId);
409
                 caseApplication.setId(caseId);
404
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
410
                 caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
475
                     casePaymentRecord.setUpdateTime(new Date());
481
                     casePaymentRecord.setUpdateTime(new Date());
476
                     casePaymentRecordMapper.update(casePaymentRecord);
482
                     casePaymentRecordMapper.update(casePaymentRecord);
477
                     // 新增日志
483
                     // 新增日志
478
-                    CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
484
+                    CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
479
 
485
 
480
 
486
 
481
                 }
487
                 }

+ 268
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/MsSignSealServiceImpl.java Прегледај датотеку

1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.google.gson.Gson;
6
+import com.google.gson.JsonArray;
7
+import com.google.gson.JsonObject;
8
+import com.ruoyi.common.constant.FileTransformation;
9
+import com.ruoyi.common.core.domain.AjaxResult;
10
+import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
11
+import com.ruoyi.common.exception.EsignDemoException;
12
+import com.ruoyi.common.utils.EmailOutUtil;
13
+import com.ruoyi.common.utils.StringUtils;
14
+import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
15
+import com.ruoyi.system.mapper.SysUserMapper;
16
+import com.ruoyi.wisdomarbitrate.domain.*;
17
+import com.ruoyi.wisdomarbitrate.mapper.*;
18
+import com.ruoyi.wisdomarbitrate.service.MsSignSealService;
19
+import com.ruoyi.wisdomarbitrate.utils.SignAward;
20
+import lombok.extern.slf4j.Slf4j;
21
+import org.springframework.beans.BeanUtils;
22
+import org.springframework.beans.factory.annotation.Autowired;
23
+import org.springframework.beans.factory.annotation.Value;
24
+import org.springframework.stereotype.Service;
25
+import org.springframework.transaction.annotation.Transactional;
26
+import java.io.File;
27
+import java.io.IOException;
28
+import java.time.LocalDate;
29
+import java.util.*;
30
+import static com.ruoyi.common.core.domain.AjaxResult.error;
31
+
32
+
33
+@Slf4j
34
+@Service
35
+public class MsSignSealServiceImpl implements MsSignSealService {
36
+
37
+
38
+    @Autowired
39
+    private CaseApplicationMapper caseApplicationMapper;
40
+    @Autowired
41
+    private SealSignRecordMapper sealSignRecordMapper;
42
+    @Autowired
43
+    private CaseAttachMapper caseAttachMapper;
44
+    @Autowired
45
+    private DeptIdentifyMapper deptIdentifyMapper;
46
+    @Autowired
47
+    private SealManageMapper sealManageMapper;
48
+    @Autowired
49
+    private CaseLogRecordMapper caseLogRecordMapper;
50
+
51
+    /**
52
+     * 签署流程回调,即签名用印回调
53
+     *
54
+     * @param reqbodystr
55
+     * @return
56
+     * @throws EsignDemoException
57
+     * @throws IOException
58
+     */
59
+    @Override
60
+    @Transactional(rollbackFor = Exception.class)
61
+    public AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException {
62
+        JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
63
+        Gson gson = new Gson();
64
+        if (jsonObjectCallback != null) {
65
+            log.info("签名回调======" + jsonObjectCallback);
66
+            int signResult = jsonObjectCallback.getIntValue("signResult");
67
+            String action = jsonObjectCallback.getString("action");
68
+            String signFlowId = jsonObjectCallback.getString("signFlowId");
69
+            Long operateTime = jsonObjectCallback.getLongValue("operateTime");
70
+            JSONObject operator = jsonObjectCallback.getJSONObject("operator");
71
+            JSONObject psnAccount = operator.getJSONObject("psnAccount");
72
+            String accountMobile = psnAccount.getString("accountMobile");
73
+
74
+            SealSignRecord sealSignRecordsel = sealSignRecordMapper.selectSealByFlowId(signFlowId);
75
+            if (sealSignRecordsel == null) {
76
+                return error("未找到签署流程");
77
+            }
78
+
79
+            String pensonAccount = sealSignRecordsel.getPensonAccount();
80
+            String orgnNamePsnAcc = sealSignRecordsel.getOrgnizeNamePsnAccount();
81
+            String pensonName = sealSignRecordsel.getPensonName();
82
+            String orgnNamePsnName = sealSignRecordsel.getOrgnizeNamepsnName();
83
+            Date dateOperate = new Date(operateTime);
84
+            Long caseAppliId = sealSignRecordsel.getCaseAppliId();
85
+            CaseApplication req = new CaseApplication();
86
+            req.setId(caseAppliId);
87
+
88
+            if ("SIGN_MISSON_COMPLETE".equals(action) && signResult == 2) {
89
+                if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccount)) {
90
+                    //申请人签名
91
+                    sealSignRecordsel.setSignStatusArbitor(1);
92
+                    sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
93
+                    CaseLogRecord operLog = new CaseLogRecord();
94
+                    operLog.setCreateNickName(pensonName);
95
+                    operLog.setCaseAppliId(caseAppliId);
96
+                    operLog.setCaseNode(13);
97
+                    operLog.setCreateTime(dateOperate);
98
+                    caseLogRecordMapper.insertCaseLogRecord(operLog);
99
+
100
+                    CaseApplication application = new CaseApplication();
101
+                    application.setId(caseAppliId);
102
+                    // 修改状态为待用印
103
+                    application.setCaseStatus(14);
104
+                    caseApplicationMapper.updataCaseApplication(application);
105
+
106
+
107
+                } else if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(orgnNamePsnAcc)) {
108
+                    //用印
109
+                    sealSignRecordsel.setSealStatus(1);
110
+
111
+                    sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
112
+                    CaseLogRecord operLog = new CaseLogRecord();
113
+                    operLog.setCreateNickName(orgnNamePsnName);
114
+                    operLog.setCaseNode(14);
115
+                    operLog.setCaseAppliId(caseAppliId);
116
+                    operLog.setCreateTime(dateOperate);
117
+                    caseLogRecordMapper.insertCaseLogRecord(operLog);
118
+                    CaseApplication application = new CaseApplication();
119
+                    application.setId(caseAppliId);
120
+                    // 案件状态为待送达
121
+                    application.setCaseStatus(15);
122
+                    caseApplicationMapper.updataCaseApplication(application);
123
+                    //下载审核完成的裁决书,
124
+                    EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
125
+                    JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
126
+                    JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
127
+                    JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
128
+                    if (filesArray != null && filesArray.size() > 0) {
129
+                        JsonObject fileObject = (JsonObject) filesArray.get(0);
130
+                        String fileDownloadUrl = fileObject.get("downloadUrl").toString();
131
+                        ///修改"签署用印记录表"的状态为完成
132
+                        sealSignRecordsel.setSignFlowStatus(3);
133
+                        sealSignRecordsel.setFileDownloadUrl(fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1));
134
+                        sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
135
+
136
+                        String filearbitraUrl = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
137
+                        application.setFilearbitraUrl(filearbitraUrl);
138
+                        caseApplicationMapper.submitCaseApplication(application);
139
+
140
+                        LocalDate now = LocalDate.now();
141
+                        String year = Integer.toString(now.getYear());
142
+                        String month = String.format("%02d", now.getMonthValue());
143
+                        String day = String.format("%02d", now.getDayOfMonth());
144
+                        String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
145
+                        String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
146
+                        String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
147
+                        String savePath = "/home/ruoyi/uploadPath/upload/";
148
+
149
+                        // 创建日期目录
150
+                        File saveFolder = new File(saveFolderPath);
151
+                        if (!saveFolder.exists()) {
152
+                            saveFolder.mkdirs();
153
+                        }
154
+                        String resultFilePath = saveFolderPath + "/" + fileName;
155
+                        File resultFilePathFile = new File(resultFilePath);
156
+                        if (!resultFilePathFile.exists()) {
157
+                            resultFilePathFile.createNewFile();
158
+                        }
159
+
160
+                        String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
161
+                        boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
162
+                        if (downLoadFile) {
163
+                            CaseAttach caseAttach = new CaseAttach();
164
+                            caseAttach.setCaseAppliId(caseAppliId);
165
+                            caseAttach.setAnnexType(3);
166
+                            caseAttach.setAnnexPath(savePath);
167
+                            caseAttach.setAnnexName(saveName);
168
+                            caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
169
+                        }
170
+
171
+                    }
172
+
173
+
174
+                }
175
+
176
+            }
177
+
178
+        } else {
179
+            return AjaxResult.error("error");
180
+        }
181
+        return AjaxResult.success("success");
182
+    }
183
+
184
+
185
+
186
+
187
+    @Override
188
+    @Transactional(rollbackFor = Exception.class)
189
+    public AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException {
190
+        JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
191
+        Gson gson = new Gson();
192
+        if (jsonObjectCallback != null) {
193
+            int auditStatus = jsonObjectCallback.getIntValue("auditStatus");
194
+            String action = jsonObjectCallback.getString("action");
195
+            String orgId = jsonObjectCallback.getString("orgId");
196
+            String sealId = jsonObjectCallback.getString("sealId");
197
+
198
+            SealManage sealManage = new SealManage();
199
+            DeptIdentify deptIdentify1 = new DeptIdentify();
200
+            deptIdentify1.setOrgId(orgId);
201
+            List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify1);
202
+            if (deptIdentifies != null && deptIdentifies.size() > 0) {
203
+                Long iddeptIdent = deptIdentifies.get(0).getId();
204
+                SealManage sealManageSel = new SealManage();
205
+                sealManageSel.setIdentifyId(iddeptIdent);
206
+                sealManageSel.setSealId(sealId);
207
+                List<String> sealIdList = new ArrayList<>();
208
+                List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManageSel);
209
+                if (selectSealList != null && selectSealList.size() > 0) {
210
+                    sealManage = selectSealList.get(0);
211
+                }
212
+            }
213
+
214
+            if ("SEAL_AUDIT".equals(action) && auditStatus == 1) {
215
+                EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
216
+                JSONObject jsonObject = JSONObject.parseObject(response.getBody());
217
+                int code = jsonObject.getIntValue("code");
218
+                if (code == 0) {
219
+                    JSONObject data = jsonObject.getJSONObject("data");
220
+                    int sealStatus = data.getIntValue("sealStatus");
221
+                    if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
222
+                        //已启用证明审核通过,下载到数据库
223
+                        String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
224
+                        LocalDate now = LocalDate.now();
225
+                        String year = Integer.toString(now.getYear());
226
+                        String month = String.format("%02d", now.getMonthValue());
227
+                        String day = String.format("%02d", now.getDayOfMonth());
228
+                        String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
229
+                        String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
230
+                        String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
231
+                        String savePath = "/home/ruoyi/uploadPath/upload/";
232
+                        // 创建日期目录
233
+                        File saveFolder = new File(saveFolderPath);
234
+                        if (!saveFolder.exists()) {
235
+                            saveFolder.mkdirs();
236
+                        }
237
+                        String resultFilePath = saveFolderPath + "/" + fileName;
238
+                        File resultFilePathFile = new File(resultFilePath);
239
+                        if (!resultFilePathFile.exists()) {
240
+                            resultFilePathFile.createNewFile();
241
+                        }
242
+                        boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
243
+                        if (downLoadFile) {
244
+                            CaseAttach caseAttach = new CaseAttach();
245
+                            caseAttach.setAnnexType(10);  //10代表印章图片
246
+                            caseAttach.setAnnexPath(savePath);
247
+                            caseAttach.setAnnexName(saveName);
248
+                            int i1 = caseAttachMapper.save(caseAttach);
249
+                            if (i1 > 0) {
250
+                                //将附件id保存到公章管理表里
251
+                                Long annexId1 = caseAttach.getAnnexId();
252
+                                sealManage.setAnnexId(annexId1);
253
+                                sealManage.setSealStatus(1);
254
+                                sealManage.setIsUse(0);
255
+                                sealManageMapper.updateSealManage(sealManage);
256
+                            }
257
+                        }
258
+                    }
259
+                }
260
+            }
261
+        } else {
262
+            return AjaxResult.error("error");
263
+        }
264
+        return AjaxResult.success("success");
265
+    }
266
+
267
+
268
+}

+ 46
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/DigesdateUtils.java Прегледај датотеку

1
+package com.ruoyi.wisdomarbitrate.utils;
2
+
3
+import javax.crypto.Mac;
4
+import javax.crypto.spec.SecretKeySpec;
5
+import java.io.UnsupportedEncodingException;
6
+import java.security.InvalidKeyException;
7
+import java.security.NoSuchAlgorithmException;
8
+
9
+public class DigesdateUtils {
10
+
11
+    public static String getSignStr(String paramsStr, String accessSec ) {
12
+        Mac macDiges = null;
13
+        try {
14
+            macDiges = Mac.getInstance("HmacSHA256");
15
+            SecretKeySpec accessSecKey = new SecretKeySpec(accessSec.getBytes("UTF-8"), "HmacSHA256");
16
+            macDiges.init(accessSecKey);
17
+            macDiges.update(paramsStr.getBytes("UTF-8"));
18
+        } catch (NoSuchAlgorithmException e) {
19
+            e.printStackTrace();
20
+            return null;
21
+        } catch (UnsupportedEncodingException e) {
22
+            e.printStackTrace();
23
+            return null;
24
+        } catch (InvalidKeyException e) {
25
+            e.printStackTrace();
26
+            return null;
27
+        }
28
+        return byteTrasferhex(macDiges.doFinal());
29
+    }
30
+
31
+    public static String byteTrasferhex(byte[] byteArrayData) {
32
+        StringBuilder hashBuilder = new StringBuilder();
33
+        String stmpHex;
34
+        for (int n = 0; byteArrayData != null && n < byteArrayData.length; n++) {
35
+            stmpHex = Integer.toHexString(byteArrayData[n] & 0XFF);
36
+            if (stmpHex.length() == 1)
37
+                hashBuilder.append('0');
38
+            hashBuilder.append(stmpHex);
39
+        }
40
+        return hashBuilder.toString();
41
+    }
42
+
43
+
44
+
45
+
46
+}

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Прегледај датотеку

43
     /*
43
     /*
44
     定时查询签署流程详情
44
     定时查询签署流程详情
45
      */
45
      */
46
-    @Scheduled(cron = "0/10 * * * * ?")
46
+//    @Scheduled(cron = "0/10 * * * * ?")
47
     @Transactional
47
     @Transactional
48
     public void fixExecuteSelectFlowDetailUtils() {
48
     public void fixExecuteSelectFlowDetailUtils() {
49
         Gson gson = new Gson();
49
         Gson gson = new Gson();
277
     /**
277
     /**
278
      * 定时查询印章审核状态
278
      * 定时查询印章审核状态
279
      */
279
      */
280
-    @Scheduled(cron = "0/30 * * * * ?")
280
+//    @Scheduled(cron = "0/30 * * * * ?")
281
     @Transactional
281
     @Transactional
282
     public void searchForInstitutionalSeal() {
282
     public void searchForInstitutionalSeal() {
283
         try {
283
         try {

+ 96
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignVerifyUtils.java Прегледај датотеку

1
+package com.ruoyi.wisdomarbitrate.utils;
2
+
3
+import com.ruoyi.common.utils.EsignApplicaConfig;
4
+import com.ruoyi.common.utils.StringUtils;
5
+import org.springframework.web.context.request.RequestContextHolder;
6
+import org.springframework.web.context.request.ServletRequestAttributes;
7
+
8
+import javax.servlet.http.HttpServletRequest;
9
+import java.io.IOException;
10
+import java.io.UnsupportedEncodingException;
11
+import java.util.ArrayList;
12
+import java.util.Collections;
13
+import java.util.Enumeration;
14
+import java.util.List;
15
+
16
+public class SignVerifyUtils {
17
+    private static String eSignAppSecret = EsignApplicaConfig.EsignAppSecret;
18
+
19
+
20
+
21
+    public static boolean checkSignuter() throws Exception {
22
+        HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
23
+        String orialsignature =  httprequest.getHeader("X-Tsign-Open-SIGNATURE");
24
+        String timestampreq = httprequest.getHeader("X-Tsign-Open-TIMESTAMP");
25
+        String reqQuerystr =getHttpreqQuery();
26
+        //获取请求参数
27
+        String reqbodystr =getRequestBody();
28
+        String signOriaData = timestampreq + reqQuerystr + reqbodystr;
29
+        String newDisgSignuter= DigesdateUtils.getSignStr(signOriaData, eSignAppSecret);
30
+
31
+
32
+        if (StringUtils.equals(orialsignature, newDisgSignuter)) {
33
+            return true;
34
+        }else {
35
+            return false;
36
+        }
37
+    }
38
+
39
+
40
+
41
+    public static  String getHttpreqQuery() {
42
+        HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
43
+        List<String> reqNames= new ArrayList();
44
+        Enumeration<String> httpreqEle =httprequest.getParameterNames();
45
+        while (httpreqEle.hasMoreElements()){
46
+            reqNames.add(httpreqEle.nextElement());
47
+        }
48
+        Collections.sort(reqNames);
49
+        String httpreqQuery = "";
50
+        for (String reqName : reqNames) {
51
+            String reqvalue = httprequest.getParameter(reqName);
52
+            httpreqQuery += reqvalue == null ? "" : reqvalue;
53
+        }
54
+        return  httpreqQuery;
55
+    }
56
+
57
+    public static String getRequestBody() {
58
+        HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
59
+        String requestBody = "";
60
+        int reqContentLen = httprequest.getContentLength();
61
+        if (reqContentLen < 0) {
62
+            return null;
63
+        }
64
+        byte bufByteArray[] = new byte[reqContentLen];
65
+        try {
66
+            for (int i = 0; i < reqContentLen;) {
67
+                int lengthReadInputStream = httprequest.getInputStream().read(bufByteArray, i, reqContentLen - i);
68
+                if (lengthReadInputStream == -1) {
69
+                    break;
70
+                }
71
+                i += lengthReadInputStream;
72
+            }
73
+        } catch (IOException e) {
74
+            e.printStackTrace();
75
+        }
76
+        try {
77
+            requestBody = new String(bufByteArray, "UTF-8");
78
+        } catch (UnsupportedEncodingException e) {
79
+            e.printStackTrace();
80
+        }
81
+        return requestBody;
82
+    }
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+}

+ 9
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Прегледај датотеку

1291
             <!--    仲裁员查询-->
1291
             <!--    仲裁员查询-->
1292
             and c.arbitrator_id=#{caseApplication.arbitratorId}
1292
             and c.arbitrator_id=#{caseApplication.arbitratorId}
1293
         </if>
1293
         </if>
1294
+        <if test="caseApplication.isOtherRole !=null and caseApplication.isOtherRole==1">
1295
+
1296
+             and ca.identity_type=1
1297
+        </if>
1298
+
1294
     </where>
1299
     </where>
1295
 </sql>
1300
 </sql>
1296
     <select id="list" resultMap="CaseApplicationResult">
1301
     <select id="list" resultMap="CaseApplicationResult">
1416
 
1421
 
1417
         order by  t1.pendingStatus asc,t1.create_time desc
1422
         order by  t1.pendingStatus asc,t1.create_time desc
1418
     </select>
1423
     </select>
1424
+
1425
+    <select id="selectCaseApplicationCaseStatus" resultType="java.lang.Integer">
1426
+        select case_status from case_application where id=#{id}
1427
+    </select>
1419
 </mapper>
1428
 </mapper>

+ 5
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Прегледај датотеку

119
         </where>
119
         </where>
120
     </update>
120
     </update>
121
 
121
 
122
-
123
-
122
+    <delete id="deleteCaseAttach">
123
+        delete from case_attach
124
+        where case_appli_id = #{caseId}
125
+          and annex_type = #{type} and annex_id!=#{annexId}
126
+    </delete>
124
 </mapper>
127
 </mapper>

+ 37
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceMapper.xml Прегледај датотеку

11
         <result property="scheduleStartTime"     column="schedule_start_time"    />
11
         <result property="scheduleStartTime"     column="schedule_start_time"    />
12
     </resultMap>
12
     </resultMap>
13
     <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
13
     <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
14
-        select DISTINCT(c.id) id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
14
+        select t.* from(
15
+        select c.id id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
15
         from case_application as c  join case_affiliate as d on c.id = d.case_appli_id
16
         from case_application as c  join case_affiliate as d on c.id = d.case_appli_id
16
         left join reserved_conference rc on rc.case_id=c.id
17
         left join reserved_conference rc on rc.case_id=c.id
17
         where c.id = d.case_appli_id
18
         where c.id = d.case_appli_id
21
         <if test="identityType != null ">
22
         <if test="identityType != null ">
22
             and d.identity_type = #{identityType}
23
             and d.identity_type = #{identityType}
23
         </if>
24
         </if>
25
+        <if test="phone != null and phone != ''">
26
+            and (d.contact_telphone = #{phone} or d.contact_telphone_agent=#{phone})
27
+        </if>
28
+        <if test="caseStatusList != null and caseStatusList.size() > 0">
29
+            and c.case_status in
30
+            <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
31
+                #{caseStatus}
32
+            </foreach>
33
+        </if>
34
+        union
35
+        <!-- 已办案件 -->
36
+        select c.id id, c.case_num,c.case_status,rc.room_id,rc.schedule_start_time
37
+        from case_log_record r
38
+        join case_application c on r.case_appli_id=c.id
39
+        JOIN case_affiliate ca ON ca.case_appli_id = c.id
40
+        left join reserved_conference rc on rc.case_id=c.id
41
+        WHERE
42
+        r.create_by=#{loginUserName}  AND ca.identity_type=2
43
+        and c.id not in(
44
+        select c.id
45
+        from case_application c
46
+        JOIN case_affiliate ca ON ca.case_appli_id = c.id
47
+
48
+        where c.id = ca.case_appli_id
49
+        <if test="identityNum != null and identityNum != ''">
50
+            and ca.identity_num = #{identityNum}
51
+        </if>
52
+        <if test="identityType != null ">
53
+            and ca.identity_type = #{identityType}
54
+        </if>
55
+        <if test="phone != null and phone != ''">
56
+            and (ca.contact_telphone = #{phone} or ca.contact_telphone_agent=#{phone})
57
+        </if>
24
         <if test="caseStatusList != null and caseStatusList.size() > 0">
58
         <if test="caseStatusList != null and caseStatusList.size() > 0">
25
             and c.case_status in
59
             and c.case_status in
26
             <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
60
             <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
27
                 #{caseStatus}
61
                 #{caseStatus}
28
             </foreach>
62
             </foreach>
29
         </if>
63
         </if>
64
+        )
65
+        ) t
30
     </select>
66
     </select>
31
 </mapper>
67
 </mapper>

+ 9
- 7
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseLogRecordMapper.xml Прегледај датотеку

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

+ 10
- 3
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/SealSignRecordMapper.xml Прегледај датотеку

15
     </insert>
15
     </insert>
16
 
16
 
17
 
17
 
18
-    <resultMap type="SealSignRecord" id="SealSignRecordResult">
18
+    <resultMap type="com.ruoyi.wisdomarbitrate.domain.SealSignRecord" id="SealSignRecordResult">
19
         <id     property="id"       column="id"      />
19
         <id     property="id"       column="id"      />
20
         <result property="caseAppliId"       column="case_appli_id"      />
20
         <result property="caseAppliId"       column="case_appli_id"      />
21
         <result property="fileid"     column="file_id"    />
21
         <result property="fileid"     column="file_id"    />
25
         <result property="pensonAccount"        column="penson_account"        />
25
         <result property="pensonAccount"        column="penson_account"        />
26
         <result property="orgnizeName"        column="orgnize_name"        />
26
         <result property="orgnizeName"        column="orgnize_name"        />
27
         <result property="orgnizeNamePsnAccount"        column="orgn_name_psn_acc"        />
27
         <result property="orgnizeNamePsnAccount"        column="orgn_name_psn_acc"        />
28
+        <result property="signStatusArbitor"        column="sign_status_arbitor"        />
29
+        <result property="sealStatus"        column="seal_status"        />
28
 
30
 
29
     </resultMap>
31
     </resultMap>
30
 
32
 
31
     <select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
33
     <select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
32
-        SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
34
+        SELECT s.*
33
         from seal_sign_record s
35
         from seal_sign_record s
34
         <where>
36
         <where>
35
             <if test="signFlowStatus != null ">
37
             <if test="signFlowStatus != null ">
42
     </select>
44
     </select>
43
 
45
 
44
     <select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
46
     <select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
45
-        SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
47
+        SELECT s.*
46
         from seal_sign_record s join case_application c on s.case_appli_id=c.id
48
         from seal_sign_record s join case_application c on s.case_appli_id=c.id
47
         where s.sign_flow_status  in (1,2)
49
         where s.sign_flow_status  in (1,2)
48
     </select>
50
     </select>
102
         <set>
104
         <set>
103
             <if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
105
             <if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
104
             <if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
106
             <if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
107
+            <if test="signStatusArbitor != null ">sign_status_arbitor = #{signStatusArbitor}</if>
108
+            <if test="sealStatus != null ">seal_status = #{sealStatus}</if>
105
         </set>
109
         </set>
106
         where id = #{id}
110
         where id = #{id}
107
     </update>
111
     </update>
108
 
112
 
113
+    <select id="selectSealByFlowId" resultMap="SealSignRecordResult">
114
+        select * from seal_sign_record where sign_flow_id = #{signFlowId}
109
 
115
 
116
+    </select>
110
 </mapper>
117
 </mapper>