18792927508 2 年 前
コミット
11aab5bc31
共有26 個のファイルを変更した2471 個の追加167 個の削除を含む
  1. 6
    3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
  2. 93
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationLogController.java
  3. 37
    0
      ruoyi-common/src/main/java/com/ruoyi/common/enums/UpdateSubmitStatus.java
  4. 33
    0
      ruoyi-common/src/main/java/com/ruoyi/common/enums/YesOrNoEnum.java
  5. 112
    0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/thread/ThreadPoolUtil.java
  6. 8
    0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
  7. 24
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java
  8. 58
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java
  9. 255
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseApplicationLogDTO.java
  10. 19
    19
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/ToDoCount.java
  11. 34
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/UpdateSubmitVO.java
  12. 25
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java
  13. 6
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
  14. 46
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java
  15. 22
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
  16. 57
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/CaseApplicationLogService.java
  17. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
  18. 155
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java
  19. 154
    106
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
  20. 45
    11
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java
  21. 1
    1
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java
  22. 7
    0
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  23. 125
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateLogMapper.xml
  24. 28
    1
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml
  25. 158
    0
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml
  26. 962
    25
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml

+ 6
- 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java ファイルの表示

53
         }
53
         }
54
         startPage();
54
         startPage();
55
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
55
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
56
-//        List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
57
         return getDataTable(list);
56
         return getDataTable(list);
58
     }
57
     }
59
 
58
 
91
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
90
     public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
92
 
91
 
93
         caseApplication.setUpdateBy(getUsername());
92
         caseApplication.setUpdateBy(getUsername());
94
-        return success(caseApplicationService.editCaseApplication(caseApplication));
93
+        return caseApplicationService.editCaseApplication(caseApplication);
95
     }
94
     }
96
 
95
 
97
     /**
96
     /**
123
     }
122
     }
124
 
123
 
125
     /**
124
     /**
126
-     * 查询立案信息
125
+     * 查询立案信息 todo 必须传version
127
      */
126
      */
128
 //     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
127
 //     @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
129
     @PostMapping("/selectCaseApplication")
128
     @PostMapping("/selectCaseApplication")
130
     public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
129
     public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
130
+        if(caseApplication.getVersion()==null){
131
+            return error("参数校验失败");
132
+        }
131
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
133
         CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
132
         return success(caseApplicationselect);
134
         return success(caseApplicationselect);
133
     }
135
     }
428
 
430
 
429
         return  success(caseApplicationService.reserveConferenceList(caseId));
431
         return  success(caseApplicationService.reserveConferenceList(caseId));
430
     }
432
     }
433
+
431
 }
434
 }

+ 93
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationLogController.java ファイルの表示

1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
6
+import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.web.bind.annotation.*;
9
+import org.springframework.web.bind.annotation.PostMapping;
10
+
11
+import static com.ruoyi.common.core.domain.AjaxResult.success;
12
+
13
+/**
14
+ * @author wangqiong
15
+ * @description 案件日志
16
+ * @date 2023-11-17 13:58
17
+ */
18
+@RestController
19
+@RequestMapping (value = "/caseApplicationLog")
20
+public class CaseApplicationLogController {
21
+
22
+    @Autowired
23
+    private CaseApplicationLogService caseApplicationLogService;
24
+
25
+    /**
26
+     * 新增
27
+     * @author wangqiong
28
+     * @date 2023/11/17
29
+     **/
30
+    @PostMapping("/insert")
31
+    public AjaxResult insert(@RequestBody CaseApplication caseApplicationLog){
32
+        return success(caseApplicationLogService.insert(caseApplicationLog));
33
+    }
34
+
35
+    /**
36
+     * 刪除
37
+     * @author wangqiong
38
+     * @date 2023/11/17
39
+     **/
40
+    @PostMapping("/delete")
41
+    public AjaxResult delete(Long id){
42
+        return success(caseApplicationLogService.delete(id));
43
+    }
44
+    /**
45
+     * 修改的案件提交到秘书
46
+     * @author wangqiong
47
+     * @date 2023/11/17
48
+     **/
49
+    @PostMapping("/submit")
50
+    public AjaxResult submit(@RequestBody UpdateSubmitVO vo){
51
+        if(vo.getCaseId()==null || vo.getVersion()==null){
52
+            return AjaxResult.error("参数校验错误");
53
+        }
54
+        return caseApplicationLogService.submit(vo);
55
+    }
56
+
57
+    /**
58
+     * 修改撤销申请
59
+     * @author wangqiong
60
+     * @date 2023/11/17
61
+     **/
62
+    @PostMapping("/revoke")
63
+    public AjaxResult revoke(@RequestBody UpdateSubmitVO vo){
64
+        if(vo.getCaseId()==null || vo.getVersion()==null){
65
+            return AjaxResult.error("参数校验错误");
66
+        }
67
+        // todo 需确定
68
+        return caseApplicationLogService.revoke(vo);
69
+    }
70
+
71
+    /**
72
+     * 查询 根据主键 id 查询
73
+     * @author wangqiong
74
+     * @date 2023/11/17
75
+     **/
76
+    @GetMapping("/selectByCaseIdAndVersion")
77
+    public AjaxResult selectByCaseIdAndVersion(@RequestParam(value = "caseId") Long caseId,@RequestParam(value = "version")Integer version ){
78
+        return success(caseApplicationLogService.selectByCaseIdAndVersion(caseId,version));
79
+    }
80
+    /**
81
+     * 秘书审核修改的案件
82
+     * @author wangqiong
83
+     * @date 2023/11/17
84
+     **/
85
+    @PostMapping("/updateAudit")
86
+    public AjaxResult updateAudit(@RequestBody UpdateSubmitVO vo){
87
+        if(vo.getCaseId()==null || vo.getVersion()==null || vo.getIsAgree()==null || vo.getUpdateSubmitStatus()==null){
88
+            return AjaxResult.error("参数校验错误");
89
+        }
90
+        return caseApplicationLogService.updateAudit(vo);
91
+    }
92
+  
93
+}

+ 37
- 0
ruoyi-common/src/main/java/com/ruoyi/common/enums/UpdateSubmitStatus.java ファイルの表示

1
+package com.ruoyi.common.enums;
2
+
3
+/**
4
+ * @author wangqiong
5
+ * @description 修改案件的提交状态
6
+ * @date 2023-11-17 14:05
7
+ */
8
+public enum UpdateSubmitStatus
9
+{
10
+    UNCOMMITTED(0, "未提交"),
11
+    COMMITTED(1, "已提交"),
12
+    AGREE(2, "同意已修改的案件"),
13
+    REFUSE(3, "拒绝已修改的案件"),
14
+    REVOKE(4, "撤销"),
15
+    AGREE_REVOKE(5, "同意撤销修改"),
16
+    REFUSE_REVOKE(6, "拒绝撤销修改"),
17
+    ;
18
+
19
+    private final Integer code;
20
+    private final String text;
21
+
22
+    UpdateSubmitStatus(Integer code, String text)
23
+    {
24
+        this.code = code;
25
+        this.text = text;
26
+    }
27
+
28
+    public Integer getCode()
29
+    {
30
+        return code;
31
+    }
32
+
33
+    public String getText()
34
+    {
35
+        return text;
36
+    }
37
+}

+ 33
- 0
ruoyi-common/src/main/java/com/ruoyi/common/enums/YesOrNoEnum.java ファイルの表示

1
+package com.ruoyi.common.enums;
2
+
3
+/**
4
+ * @author wangqiong
5
+ * @description 是否枚举
6
+ * @date 2023-11-17 14:05
7
+ */
8
+public enum YesOrNoEnum
9
+{
10
+    NO(0, "否"),
11
+    YES(1, "是"),
12
+
13
+    ;
14
+
15
+    private final Integer code;
16
+    private final String text;
17
+
18
+    YesOrNoEnum(Integer code, String text)
19
+    {
20
+        this.code = code;
21
+        this.text = text;
22
+    }
23
+
24
+    public Integer getCode()
25
+    {
26
+        return code;
27
+    }
28
+
29
+    public String getText()
30
+    {
31
+        return text;
32
+    }
33
+}

+ 112
- 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/thread/ThreadPoolUtil.java ファイルの表示

1
+package com.ruoyi.common.utils.thread;
2
+
3
+import lombok.extern.slf4j.Slf4j;
4
+
5
+import java.util.ArrayList;
6
+import java.util.List;
7
+import java.util.concurrent.*;
8
+
9
+/**
10
+ * @description 线程池工具类
11
+ * @Author wangqiong
12
+ * @Date 2023/11/7 15:41
13
+ * @Version V1.0
14
+ **/
15
+@Slf4j
16
+public class ThreadPoolUtil {
17
+    /** cpu核心数 */
18
+    private static int corePoolSize = (Runtime.getRuntime().availableProcessors());
19
+    /**创建固定大小线程池*/
20
+    private static ExecutorService executors = new ThreadPoolExecutor(
21
+            corePoolSize,
22
+            corePoolSize,
23
+        0L,
24
+            TimeUnit.MILLISECONDS,
25
+            new LinkedBlockingQueue<>());
26
+
27
+    /**
28
+     * 异步任务
29
+     * @param task
30
+     */
31
+    public static void execute(Runnable task){
32
+        executors.execute(task);
33
+    }
34
+
35
+    /**
36
+     * 可获取返回结果的任务且可设置超时时间
37
+     * @param task
38
+     * @param timeout
39
+     * @param <T>
40
+     * @return
41
+     */
42
+    public static <T> T execute(Callable<T> task, long timeout){
43
+        Future<T> future = executors.submit(task);
44
+        T result = null;
45
+        try {
46
+            result = future.get(timeout, TimeUnit.SECONDS);
47
+        } catch (InterruptedException e) {
48
+            future.cancel(true);
49
+            log.error("ThreadPoolUtil.InterruptedException. e:{}", e);
50
+        } catch (ExecutionException e) {
51
+            future.cancel(true);
52
+            log.error("ThreadPoolUtil.ExecutionException. e:{}", e);
53
+        } catch (TimeoutException e) {
54
+            future.cancel(true);
55
+            log.error("ThreadPoolUtil.TimeoutException. e:{}", e);
56
+        }
57
+        return result;
58
+    }
59
+
60
+    /**
61
+     * 可获取返回结果的任务
62
+     * @param task
63
+     * @return
64
+     */
65
+    public static <T> Future<T> submit(Callable<T> task){
66
+        return executors.submit(task);
67
+    }
68
+
69
+    /**
70
+     * 可获取返回结果的任务
71
+     * @param tasks
72
+     * @param <T>
73
+     * @return
74
+     */
75
+    public static <T> List<T> submit(Callable<T>... tasks){
76
+        List<Future<T>> list=new ArrayList<>();
77
+        List<T> resultList=new ArrayList<>();
78
+        if(tasks==null||tasks.length==0){
79
+            return resultList;
80
+        }
81
+        for(Callable<T> task:tasks){
82
+            list.add(executors.submit(task));
83
+        }
84
+        for(Future<T> future:list){
85
+            try {
86
+                resultList.add(future.get());
87
+            } catch (InterruptedException e) {
88
+                future.cancel(true);
89
+                log.error("ThreadPoolUtil.InterruptedException. e:{}", e);
90
+            } catch (ExecutionException e) {
91
+                future.cancel(true);
92
+                log.error("ThreadPoolUtil.ExecutionException. e:{}", e);
93
+            }
94
+        }
95
+        return resultList;
96
+    }
97
+
98
+    /**
99
+     * 执行完所有返回
100
+     * @param tasks
101
+     */
102
+    public static void submit(Runnable ...tasks){
103
+        if(tasks==null||tasks.length==0){
104
+            return;
105
+        }
106
+        List<CompletableFuture> futureList=new ArrayList<>();
107
+        for (Runnable task : tasks) {
108
+            futureList.add(CompletableFuture.runAsync(task,executors));
109
+        }
110
+        CompletableFuture.allOf(futureList.toArray(new CompletableFuture[futureList.size()])).join();
111
+    }
112
+}

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java ファイルの表示

148
      * @return
148
      * @return
149
      */
149
      */
150
     SysUser selectUserByIdCard(@Param("idCard")String identityNo);
150
     SysUser selectUserByIdCard(@Param("idCard")String identityNo);
151
+
152
+    /**
153
+     * 根据部门和角色查询用户
154
+     * @param applicationOrganId
155
+     * @param roleName
156
+     * @return
157
+     */
158
+    List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
151
 }
159
 }

+ 24
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseAffiliate.java ファイルの表示

13
     private Long id;
13
     private Long id;
14
     /** 案件申请id */
14
     /** 案件申请id */
15
     private Long caseAppliId;
15
     private Long caseAppliId;
16
+    /**
17
+     * 案件申请日志id
18
+     */
19
+    private Long caseAppliLogId;
16
     /** 身份类型 */
20
     /** 身份类型 */
17
     private int identityType;
21
     private int identityType;
18
     /** 姓名 */
22
     /** 姓名 */
48
      */
52
      */
49
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
53
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
50
     private Date responBirth;
54
     private Date responBirth;
55
+    /**
56
+     * 版本号
57
+     */
58
+    private Integer version;
59
+
60
+    public Long getCaseAppliLogId() {
61
+        return caseAppliLogId;
62
+    }
63
+
64
+    public void setCaseAppliLogId(Long caseAppliLogId) {
65
+        this.caseAppliLogId = caseAppliLogId;
66
+    }
67
+
68
+    public Integer getVersion() {
69
+        return version;
70
+    }
71
+
72
+    public void setVersion(Integer version) {
73
+        this.version = version;
74
+    }
51
 
75
 
52
     public String getEmail() {
76
     public String getEmail() {
53
         return email;
77
         return email;

+ 58
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseApplication.java ファイルの表示

73
 
73
 
74
     /** 案件状态 */
74
     /** 案件状态 */
75
     private Integer caseStatus;
75
     private Integer caseStatus;
76
+    /** 案件申请表ID */
77
+    private Long caseAppliId;
78
+
79
+    public Long getCaseAppliId() {
80
+        return caseAppliId;
81
+    }
82
+
83
+    public void setCaseAppliId(Long caseAppliId) {
84
+        this.caseAppliId = caseAppliId;
85
+    }
76
 
86
 
77
     public Integer getCaseStatus() {
87
     public Integer getCaseStatus() {
78
         return caseStatus;
88
         return caseStatus;
402
      * 财务状态
412
      * 财务状态
403
      */
413
      */
404
     private Integer financeStatus;
414
     private Integer financeStatus;
415
+    /**
416
+     * 是否是被申请人,仲裁员,部门长,财务,代理人,0-否,1-是
417
+     */
418
+    private Integer isOtherRole;
419
+    /**
420
+     * 案件日志id
421
+     */
422
+    private Long caseLogId;
423
+
424
+    public Long getCaseLogId() {
425
+        return caseLogId;
426
+    }
427
+
428
+    public void setCaseLogId(Long caseLogId) {
429
+        this.caseLogId = caseLogId;
430
+    }
431
+
432
+    public Integer getIsOtherRole() {
433
+        return isOtherRole;
434
+    }
435
+
436
+    public void setIsOtherRole(Integer isOtherRole) {
437
+        this.isOtherRole = isOtherRole;
438
+    }
405
 
439
 
406
     public List<Long> getAgentDeptIds() {
440
     public List<Long> getAgentDeptIds() {
407
         return agentDeptIds;
441
         return agentDeptIds;
775
      * 申请机构id
809
      * 申请机构id
776
      */
810
      */
777
     private String applicationOrganId;
811
     private String applicationOrganId;
812
+    /**
813
+     * 版本号
814
+     */
815
+    private Integer version;
816
+    /**
817
+     * 修改案件的提交状态,0-未提交,1-已提交,2-同意,3-拒绝,4-撤销
818
+     */
819
+    private Integer updateSubmitStatus;
820
+
821
+    public Integer getVersion() {
822
+        return version;
823
+    }
824
+
825
+    public void setVersion(Integer version) {
826
+        this.version = version;
827
+    }
828
+
829
+    public Integer getUpdateSubmitStatus() {
830
+        return updateSubmitStatus;
831
+    }
832
+
833
+    public void setUpdateSubmitStatus(Integer updateSubmitStatus) {
834
+        this.updateSubmitStatus = updateSubmitStatus;
835
+    }
778
 
836
 
779
     public String getEmail() {
837
     public String getEmail() {
780
         return email;
838
         return email;

+ 255
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/CaseApplicationLogDTO.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.domain.dto;
2
+
3
+import lombok.Data;
4
+
5
+import java.util.Date;
6
+
7
+/**
8
+ * @author wangqiong
9
+ * @description 案件日志
10
+ * @date 2023-11-17 14:01
11
+ */
12
+@Data
13
+public class CaseApplicationLogDTO {
14
+    private static final long serialVersionUID = 1L;
15
+
16
+    /**
17
+     * id
18
+     */
19
+    private Long id;
20
+
21
+    /**
22
+     * 案件编号
23
+     */
24
+    private String caseNum;
25
+
26
+    /**
27
+     * 案件标的
28
+     */
29
+    private Double caseSubjectAmount;
30
+
31
+    /**
32
+     * 立案日期
33
+     */
34
+    private Date registerDate;
35
+
36
+    /**
37
+     * 仲裁方式,视频仲裁(1)、书面仲裁(2)
38
+     */
39
+    private Long arbitratMethod;
40
+
41
+    /**
42
+     * 案件状态,立案申请(0)、待立案审查(1)、 待缴费(2)、待缴费确认(3)、 待案件质证(4)、
43
+     */
44
+    private Integer caseStatus;
45
+
46
+    /**
47
+     * 开庭日期
48
+     */
49
+    private Date hearDate;
50
+
51
+    /**
52
+     * 申请人仲裁请求及事实和理由
53
+     */
54
+    private String arbitratClaims;
55
+
56
+    /**
57
+     * 借款开始日期
58
+     */
59
+    private Date loanStartDate;
60
+
61
+    /**
62
+     * 借款结束日期
63
+     */
64
+    private Date loanEndDate;
65
+
66
+    /**
67
+     * 申请人主张欠本金
68
+     */
69
+    private Double claimPrinciOwed;
70
+
71
+    /**
72
+     * 申请人主张欠利息
73
+     */
74
+    private Double claimInterestOwed;
75
+
76
+    /**
77
+     * 申请人主张违约金
78
+     */
79
+    private Double claimLiquidDamag;
80
+
81
+    /**
82
+     * 仲裁应缴费用
83
+     */
84
+    private Double feePayable;
85
+
86
+    /**
87
+     * 开始在线视频时间
88
+     */
89
+    private Date beginVideoDate;
90
+
91
+    /**
92
+     * 在线视频人员
93
+     */
94
+    private String onlineVideoPerson;
95
+
96
+    /**
97
+     * 合同编号
98
+     */
99
+    private String contractNumber;
100
+
101
+    /**
102
+     * 创建时间
103
+     */
104
+    private Date createTime;
105
+
106
+    /**
107
+     * 更新者
108
+     */
109
+    private String updateBy;
110
+
111
+    /**
112
+     * 更新时间
113
+     */
114
+    private Date updateTime;
115
+
116
+    /**
117
+     * 创建者
118
+     */
119
+    private String createBy;
120
+
121
+    /**
122
+     * 仲裁员id
123
+     */
124
+    private String arbitratorId;
125
+
126
+    /**
127
+     * 仲裁员名称
128
+     */
129
+    private String arbitratorName;
130
+
131
+    /**
132
+     * 已确认组庭的仲裁员id
133
+     */
134
+    private String pendedTrialArbitorid;
135
+
136
+    /**
137
+     * 是否指派仲裁员,1是,2否
138
+     */
139
+    private Integer pendingAppointArbotrar;
140
+
141
+    /**
142
+     * 案件名称
143
+     */
144
+    private String caseName;
145
+
146
+    /**
147
+     * 案件描述
148
+     */
149
+    private String caseDescribe;
150
+
151
+    /**
152
+     * 仲裁结果
153
+     */
154
+    private String caseResult;
155
+
156
+    /**
157
+     * 是否同意组庭,0否,1是
158
+     */
159
+    private Integer isAgreePendTral;
160
+
161
+    /**
162
+     * 是否有异议需要举证,1是,0否
163
+     */
164
+    private Integer objectionAddEviden;
165
+
166
+    /**
167
+     * 是否需要开庭审理,1是,0否
168
+     */
169
+    private Integer openCourtHear;
170
+
171
+    /**
172
+     * paid_expenses
173
+     */
174
+    private Double paidExpenses;
175
+
176
+    /**
177
+     * 裁决书URL
178
+     */
179
+    private String filearbitraUrl;
180
+
181
+    /**
182
+     * 支付方式(0线上支付,1线下支付)
183
+     */
184
+    private String payType;
185
+
186
+    /**
187
+     * 申请人请求仲裁庭裁决
188
+     */
189
+    private String requestRule;
190
+
191
+    /**
192
+     * 是否仲裁反请求,1是,0否
193
+     */
194
+    private Integer adjudicaCounter;
195
+
196
+    /**
197
+     * 是否财产保全申请,1是,0否
198
+     */
199
+    private Integer properPreser;
200
+
201
+    /**
202
+     * 是否管辖异议申请,1是,0否
203
+     */
204
+    private Integer objectiJuris;
205
+
206
+    /**
207
+     * 被申请人是否缺席,1是,0否
208
+     */
209
+    private Integer isAbsence;
210
+
211
+    /**
212
+     * 被申请人质证意见
213
+     */
214
+    private String responCrossOpin;
215
+
216
+    /**
217
+     * 申请人质证意见
218
+     */
219
+    private String applicaCrossOpin;
220
+
221
+    /**
222
+     * 被申请人的答辩意见
223
+     */
224
+    private String responDefenOpini;
225
+
226
+    /**
227
+     * 申请人是否缺席,1是,0否
228
+     */
229
+    private Integer appliIsAbsen;
230
+
231
+    /**
232
+     * 是否锁定,0-否,1-是
233
+     */
234
+    private Integer lockStatus;
235
+
236
+    /**
237
+     * 视频会议房间号id,多个用逗号拼接
238
+     */
239
+    private String roomId;
240
+
241
+    /**
242
+     * 是否导入,0手动录入,1导入,默认0
243
+     */
244
+    private Integer importFlag;
245
+
246
+    /**
247
+     * 版本号
248
+     */
249
+    private Long version;
250
+
251
+    /**
252
+     * 修改案件的提交状态,0-未提交,1-已提交,2-同意,3,拒绝
253
+     */
254
+    private Integer updateSubmitStatus;
255
+}

+ 19
- 19
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/ToDoCount.java ファイルの表示

10
 @Data
10
 @Data
11
 public class ToDoCount {
11
 public class ToDoCount {
12
 
12
 
13
-    private int caseApply; // 立案申请
14
-    private int caseApplyCheck; // 待立案审查
15
-    private int caseApplyPay; // 待缴费
16
-    private int caseApplyPayCheck; // 待缴费确认
17
-    private int caseApplyEvidence; //待案件质证
18
-    private int caseApplyGroupCheck; // 待组庭审核
19
-    private int caseApplyGroupConfirm; // 待组庭确定
13
+    private int caseApply=0; // 立案申请
14
+    private int caseApplyCheck=0; // 待立案审查
15
+    private int caseApplyPay=0; // 待缴费
16
+    private int caseApplyPayCheck=0; // 待缴费确认
17
+    private int caseApplyEvidence=0; //待案件质证
18
+    private int caseApplyGroupCheck=0; // 待组庭审核
19
+    private int caseApplyGroupConfirm=0; // 待组庭确定
20
 //    private int caseApplyGroupNotice;
20
 //    private int caseApplyGroupNotice;
21
-    private int caseApplyArbitrateWay; // 待审核仲裁方式
22
-    private int caseApplyGroupOnline; // 待开庭审理
23
-    private int caseApplyGroupOffline; // 待书面审理
24
-    private int caseApplyAward; // 待生成仲裁文书
25
-    private int caseApplyAwardCheck; // 待核验仲裁文书
26
-    private int caseApplyAwardConfirm; // 待审核仲裁文书
27
-    private int caseApplyAwardSign; // 待仲裁文书签名
28
-    private int caseApplyAwardSeal; // 待仲裁文书用印
29
-    private int caseApplyAwardSend; // 待仲裁文书送达
30
-    private int caseApplyStored; // 待案件归档
31
-    private int caseApplyArchived; // 已归档
32
-    private int updateOnlineHearDate; // 待修改开庭时间
21
+    private int caseApplyArbitrateWay=0; // 待审核仲裁方式
22
+    private int caseApplyGroupOnline=0; // 待开庭审理
23
+    private int caseApplyGroupOffline=0; // 待书面审理
24
+    private int caseApplyAward=0; // 待生成仲裁文书
25
+    private int caseApplyAwardCheck=0; // 待核验仲裁文书
26
+    private int caseApplyAwardConfirm=0; // 待审核仲裁文书
27
+    private int caseApplyAwardSign=0; // 待仲裁文书签名
28
+    private int caseApplyAwardSeal=0; // 待仲裁文书用印
29
+    private int caseApplyAwardSend=0; // 待仲裁文书送达
30
+    private int caseApplyStored=0; // 待案件归档
31
+    private int caseApplyArchived=0; // 已归档
32
+    private int updateOnlineHearDate=0; // 待修改开庭时间
33
 }
33
 }

+ 34
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/UpdateSubmitVO.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.domain.vo;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Builder;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+/**
9
+ * 修改案件提交至秘书
10
+ */
11
+@Data
12
+@Builder
13
+@NoArgsConstructor
14
+@AllArgsConstructor
15
+public class UpdateSubmitVO {
16
+    /**
17
+     * 案件id
18
+     */
19
+    private Long caseId;
20
+    /**
21
+     * 版本号
22
+     */
23
+    private Integer version;
24
+    /**
25
+     * 修改案件的提交状态,0-未提交,1-已提交,2-同意已修改的案件,3-拒绝已修改的案件,4-撤销,5-同意撤销,6-拒绝撤销
26
+     */
27
+    private Integer updateSubmitStatus;
28
+    /**
29
+     * 是否同意,0-否,1-是
30
+     */
31
+    private Integer isAgree;
32
+
33
+
34
+}

+ 25
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.springframework.stereotype.Repository;
7
+
8
+import java.util.List;
9
+@Repository
10
+public interface CaseAffiliateLogMapper {
11
+
12
+
13
+    int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
14
+
15
+
16
+    void deletecaseAffiliate(CaseApplication caseApplication);
17
+    void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
18
+
19
+
20
+    List<CaseAffiliate>  selectCaseAffiliate(CaseAffiliate caseAffiliate);
21
+    CaseAffiliate  selectCaseAffiliateByIdentityType(@Param("caseAppliLogId") Long caseAppliLogId, @Param("identityType")int identityType);
22
+
23
+    int updataCaseAffiliate(CaseAffiliate caseAffiliate);
24
+
25
+}

+ 6
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java ファイルの表示

29
      * @return
29
      * @return
30
      */
30
      */
31
     List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
31
     List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
32
+
33
+    /**
34
+     * 批量修改
35
+     * @param affiliateLogList
36
+     */
37
+    void updataCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
32
 }
38
 }

+ 46
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.mapper;
2
+
3
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
4
+import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.springframework.stereotype.Repository;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * @author wangqiong
12
+ * @description 案件日志
13
+ * @date 2023-11-17 14:05
14
+ */
15
+@Repository
16
+public interface CaseApplicationLogMapper {
17
+    int insert(CaseApplication caseApplicationLog);
18
+
19
+    int deleteById(Long id);
20
+
21
+
22
+
23
+    CaseApplication selectByCaseIdAndVersion(@Param("caseAppliId")long caseAppliId,@Param("version") int version);
24
+
25
+    Integer selectMaxVersionByCaseId(@Param("caseAppliId")long caseAppliId);
26
+
27
+    /**
28
+     * 修改日志表状态
29
+     * @param vo
30
+     */
31
+    void updateStatus(UpdateSubmitVO vo);
32
+
33
+    /**
34
+     * 根据案件id查询秘书角色最新版本号
35
+     * @param id
36
+     * @return
37
+     */
38
+    Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
39
+
40
+    /**
41
+     * 根据案件id删除案件记录表和案件关联人日志表
42
+     * @param ids
43
+     */
44
+    void batchDeleteLog(@Param("ids") List<Long> ids);
45
+
46
+}

+ 22
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java ファイルの表示

12
 
12
 
13
 public interface CaseApplicationMapper {
13
 public interface CaseApplicationMapper {
14
     List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
14
     List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
15
+    List<CaseApplication> selectCaseApplicationList1(CaseApplication caseApplication);
15
 
16
 
16
     int selectCaseApplicationCount(CaseApplication caseApplication);
17
     int selectCaseApplicationCount(CaseApplication caseApplication);
17
 
18
 
109
      * @return
110
      * @return
110
      */
111
      */
111
     Integer selectMaxRoomId();
112
     Integer selectMaxRoomId();
113
+
114
+    /**
115
+     * 修改案件版本号
116
+     * @param id
117
+     * @param version
118
+     */
119
+    void updateVersionById(@Param("id")Long id, @Param("version")Integer version);
120
+
121
+    /**
122
+     * 查询秘书案件
123
+     * @param caseApplication
124
+     * @return
125
+     */
126
+    List<CaseApplication> selectSecretaryCase(CaseApplication caseApplication);
127
+
128
+    /**
129
+     * 查询申请人案件
130
+     * @param caseApplication
131
+     * @return
132
+     */
133
+    List<CaseApplication> selectApplicationCase(CaseApplication caseApplication);
112
 }
134
 }

+ 57
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/CaseApplicationLogService.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
5
+import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
6
+
7
+/**
8
+ * @author wangqiong
9
+ * @description 案件日志
10
+ * @date 2023-11-17 13:58
11
+ */
12
+public interface CaseApplicationLogService {
13
+    /**
14
+     * 新增案件日志
15
+     * @param caseApplicationLog
16
+     * @return
17
+     */
18
+   int insert(CaseApplication caseApplicationLog);
19
+
20
+    /**
21
+     * 根据案件日志id删除案件日志
22
+     * @param id
23
+     * @return
24
+     */
25
+   int delete(Long id);
26
+
27
+    /**
28
+     * 根据案件id和版本号查询案件日志
29
+     * @param id
30
+     * @param version
31
+     * @return
32
+     */
33
+    CaseApplication selectByCaseIdAndVersion(Long id, int version);
34
+
35
+    /**
36
+     * 修改的案件提交到秘书
37
+     * @param vo
38
+     * @return
39
+     */
40
+    AjaxResult submit(UpdateSubmitVO vo);
41
+
42
+    /**
43
+     * 修改撤销申请
44
+     * @param vo
45
+     * @return
46
+     */
47
+    AjaxResult revoke(UpdateSubmitVO vo);
48
+
49
+    /**
50
+     * 秘书审核修改的案件
51
+     * @param vo
52
+     * @return
53
+     */
54
+    AjaxResult updateAudit(UpdateSubmitVO vo);
55
+
56
+
57
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java ファイルの表示

21
 
21
 
22
     int selectCaseApplicationCount(CaseApplication caseApplication);
22
     int selectCaseApplicationCount(CaseApplication caseApplication);
23
 
23
 
24
-    int editCaseApplication(CaseApplication caseApplication);
24
+    AjaxResult editCaseApplication(CaseApplication caseApplication);
25
 
25
 
26
     int submitCaseApplication( List<Long> ids);
26
     int submitCaseApplication( List<Long> ids);
27
 
27
 

+ 155
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java ファイルの表示

1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.common.enums.UpdateSubmitStatus;
5
+import com.ruoyi.common.enums.YesOrNoEnum;
6
+import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
7
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
8
+import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
9
+import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateLogMapper;
10
+import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
11
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationLogMapper;
12
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
13
+import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.stereotype.Service;
16
+import org.springframework.transaction.annotation.Transactional;
17
+
18
+import java.util.List;
19
+import java.util.Objects;
20
+
21
+/**
22
+ * @author wangqiong
23
+ * @description 案件日志
24
+ * @date 2023-11-17 14:05
25
+ */
26
+@Service
27
+public class CaseApplicationLogServiceImpl implements CaseApplicationLogService {
28
+    @Autowired
29
+    private CaseApplicationLogMapper caseApplicationLogMapper;
30
+    @Autowired
31
+    private CaseApplicationMapper caseApplicationMapper;
32
+    @Autowired
33
+    private CaseAffiliateLogMapper caseAffiliateLogMapper;
34
+    @Autowired
35
+    private CaseAffiliateMapper caseAffiliateMapper;
36
+    @Override
37
+    public int insert(CaseApplication caseApplicationLog) {
38
+        return caseApplicationLogMapper.insert(caseApplicationLog);
39
+    }
40
+
41
+    @Override
42
+    public int delete(Long id) {
43
+        return caseApplicationLogMapper.deleteById(id);
44
+    }
45
+
46
+
47
+
48
+    @Override
49
+    public CaseApplication selectByCaseIdAndVersion(Long id, int version) {
50
+        return caseApplicationLogMapper.selectByCaseIdAndVersion(id,version);
51
+    }
52
+    /**
53
+     * 修改的案件提交到秘书
54
+     * @param vo
55
+     * @return
56
+     */
57
+    @Override
58
+    public AjaxResult submit(UpdateSubmitVO vo) {
59
+        vo.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
60
+        // 修改日志表提交状态
61
+        caseApplicationLogMapper.updateStatus(vo);
62
+        return AjaxResult.success();
63
+    }
64
+
65
+    @Override
66
+    public AjaxResult revoke(UpdateSubmitVO vo) {
67
+        vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
68
+        // 修改日志表提交状态
69
+        caseApplicationLogMapper.updateStatus(vo);
70
+        return AjaxResult.success();
71
+    }
72
+
73
+    /**
74
+     * 秘书审核修改的案件
75
+     * @param vo
76
+     * @return
77
+     */
78
+    @Transactional
79
+    @Override
80
+    public AjaxResult updateAudit(UpdateSubmitVO vo) {
81
+        if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.COMMITTED.getCode())) {
82
+            // 审核修改提交状态
83
+            if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
84
+                // 如果版本号为1,则直接返回
85
+                if(vo.getVersion() <= 1){
86
+                    return AjaxResult.success();
87
+                }
88
+                // 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
89
+                // 查询日志记录表本版本数据
90
+                CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
91
+                if (caseApplicationLog == null) {
92
+                    return AjaxResult.error("未找到该案件");
93
+                }
94
+                // 将日志表改版本的状态改为同意
95
+                vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
96
+                caseApplicationLogMapper.updateStatus(vo);
97
+                // 根据caseLogId查询相关人员表
98
+                CaseAffiliate caseAffiliate = new CaseAffiliate();
99
+                caseAffiliate.setCaseAppliLogId(caseApplicationLog.getCaseLogId());
100
+                List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliate);
101
+                caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
102
+                // 更新案件主表
103
+                caseApplicationMapper.updataCaseApplication(caseApplicationLog);
104
+
105
+                // 更新相关人员主表
106
+                caseAffiliateMapper.updataCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
107
+            } else {
108
+                // 拒绝,将日志表改版本的状态改为拒绝
109
+                vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
110
+                caseApplicationLogMapper.updateStatus(vo);
111
+                // 修改案件表的版本号
112
+                 //  caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
113
+
114
+            }
115
+            return AjaxResult.success();
116
+        }
117
+        // todo 需确定
118
+//        else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
119
+//            // 如果版本号为1,则直接返回
120
+//            if(vo.getVersion() <= 1){
121
+//                return AjaxResult.success();
122
+//            }
123
+//            // 审核修改撤销状态
124
+//            if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
125
+//                // 同意撤销,查询日志记录表上个版本数据,将数据更新到主表,并将日志表改版本的状态改为同意撤销
126
+//                // 查询日志记录表上个版本未被拒绝数据
127
+//                CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion()-1);
128
+//                if (caseApplicationLog == null) {
129
+//                    return AjaxResult.error("未找到该案件");
130
+//                }
131
+//                // 将日志表改版本的状态改为拒绝
132
+//                vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
133
+//                caseApplicationLogMapper.updateStatus(vo);
134
+//                // 根据caseLogId查询相关人员表
135
+//                CaseAffiliate caseAffiliate = new CaseAffiliate();
136
+//                caseAffiliate.setCaseAppliLogId(caseApplicationLog.getCaseLogId());
137
+//                List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliate);
138
+//                caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
139
+//                // 更新案件主表
140
+//                caseApplicationMapper.updataCaseApplication(caseApplicationLog);
141
+//
142
+//                // 更新相关人员主表
143
+//                caseAffiliateMapper.updataCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
144
+//            } else {
145
+//                // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
146
+//                vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
147
+//                caseApplicationLogMapper.updateStatus(vo);
148
+//                // 修改案件表的版本号
149
+//             //   caseApplicationMapper.updateVersionById(vo.getCaseId(),vo.getVersion());
150
+//            }
151
+//            return AjaxResult.success();
152
+//        }
153
+       return AjaxResult.success();
154
+    }
155
+}

+ 154
- 106
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java ファイルの表示

2
 
2
 
3
 
3
 
4
 import cn.hutool.core.collection.CollectionUtil;
4
 import cn.hutool.core.collection.CollectionUtil;
5
+import cn.hutool.core.util.IdcardUtil;
5
 import cn.hutool.core.util.StrUtil;
6
 import cn.hutool.core.util.StrUtil;
6
 import com.alibaba.fastjson.JSON;
7
 import com.alibaba.fastjson.JSON;
7
 import com.alibaba.fastjson.JSONArray;
8
 import com.alibaba.fastjson.JSONArray;
14
 import com.ruoyi.common.core.domain.AjaxResult;
15
 import com.ruoyi.common.core.domain.AjaxResult;
15
 import com.ruoyi.common.core.domain.entity.*;
16
 import com.ruoyi.common.core.domain.entity.*;
16
 import com.ruoyi.common.core.domain.model.LoginUser;
17
 import com.ruoyi.common.core.domain.model.LoginUser;
18
+import com.ruoyi.common.enums.UpdateSubmitStatus;
17
 import com.ruoyi.common.exception.EsignDemoException;
19
 import com.ruoyi.common.exception.EsignDemoException;
18
 import com.ruoyi.common.exception.ServiceException;
20
 import com.ruoyi.common.exception.ServiceException;
19
 import com.ruoyi.common.utils.*;
21
 import com.ruoyi.common.utils.*;
20
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
22
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
21
 import com.ruoyi.common.core.domain.entity.SysUser;
23
 import com.ruoyi.common.core.domain.entity.SysUser;
24
+import com.ruoyi.common.utils.thread.ThreadPoolUtil;
22
 import com.ruoyi.system.domain.SysUserRole;
25
 import com.ruoyi.system.domain.SysUserRole;
23
 import com.ruoyi.system.mapper.SysDeptMapper;
26
 import com.ruoyi.system.mapper.SysDeptMapper;
24
 import com.ruoyi.system.mapper.SysRoleMapper;
27
 import com.ruoyi.system.mapper.SysRoleMapper;
59
 import java.util.regex.Pattern;
62
 import java.util.regex.Pattern;
60
 import java.util.stream.Collectors;
63
 import java.util.stream.Collectors;
61
 
64
 
65
+import static com.ruoyi.common.core.domain.AjaxResult.success;
62
 import static com.ruoyi.common.utils.PageUtils.startPage;
66
 import static com.ruoyi.common.utils.PageUtils.startPage;
63
 import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
67
 import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
64
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
68
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
69
+import static com.ruoyi.wisdomarbitrate.utils.CaseLogUtils.insertCaseLog;
65
 
70
 
66
 
71
 
67
 @Service
72
 @Service
107
 
112
 
108
     @Autowired
113
     @Autowired
109
     private SealManageMapper sealManageMapper;
114
     private SealManageMapper sealManageMapper;
115
+    @Autowired
116
+    private CaseApplicationLogMapper caseApplicationLogMapper;
117
+    @Autowired
118
+    private CaseAffiliateLogMapper caseAffiliateLogMapper;
110
 
119
 
111
     // 手机号正则
120
     // 手机号正则
112
     private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
121
     private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
113
     // 邮箱正则
122
     // 邮箱正则
114
     private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
123
     private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
115
     // 身份证号码正则表达式
124
     // 身份证号码正则表达式
116
-    private static final String ID_REGEX = "^(\\d{14}|\\d{17})(\\d|[Xx])$";
125
+    private static final String ID_REGEX = "^(\\\\d{15}$|\\\\d{18}$|\\\\d{17}([0-9]|X))$";
117
 
126
 
118
     /**
127
     /**
119
      * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
128
      * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
148
             }
157
             }
149
 
158
 
150
             for (SysRole role : roles) {
159
             for (SysRole role : roles) {
160
+                if(StrUtil.isEmpty(role.getRoleName())){
161
+                    continue;
162
+                }
151
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
163
                 // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
152
-                if (role.getRoleName().equals("超级管理员")
164
+                if ("超级管理员".equals(role.getRoleName())
153
                 ) {
165
                 ) {
154
                     return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
166
                     return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
155
                 }
167
                 }
156
-                if (role.getRoleName().equals("仲裁委")
157
-                        || role.getRoleName().equals("部门长")) {
168
+                if ("仲裁委".equals(role.getRoleName())
169
+                        || "部门长".equals(role.getRoleName())) {
158
                     List<Integer> caseStatusList = new ArrayList<>();
170
                     List<Integer> caseStatusList = new ArrayList<>();
159
                     caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
171
                     caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
160
                     caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
172
                     caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
161
                     caseApplication.setDeptHeadStatus(caseStatusList);
173
                     caseApplication.setDeptHeadStatus(caseStatusList);
174
+                    caseApplication.setIsOtherRole(1);
162
                 }
175
                 }
163
-                if (role.getRoleName().equals("仲裁员")) {
176
+                if ("仲裁员".equals(role.getRoleName())) {
164
                     caseApplication.setUserId(String.valueOf(userId));
177
                     caseApplication.setUserId(String.valueOf(userId));
178
+                    caseApplication.setIsOtherRole(1);
165
                 }
179
                 }
166
-                if (role.getRoleName().equals("财务")) {
180
+                if ("财务".equals(role.getRoleName())) {
181
+                    caseApplication.setIsOtherRole(1);
167
                     caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
182
                     caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
168
                 }
183
                 }
169
-                if (role.getRoleName().equals("法律顾问")) {
184
+                if ("法律顾问".equals(role.getRoleName())) {
170
                     // 查询角色有关的用户部门
185
                     // 查询角色有关的用户部门
171
-                    //      List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
172
                     List<Long> deptIds = new ArrayList<>();
186
                     List<Long> deptIds = new ArrayList<>();
173
                     deptIds.add(sysUser.getDeptId());
187
                     deptIds.add(sysUser.getDeptId());
174
                     caseApplication.setDeptIds(deptIds);
188
                     caseApplication.setDeptIds(deptIds);
175
                 }
189
                 }
176
-                if (role.getRoleName().equals("申请人")) {
190
+                if ("申请人".equals(role.getRoleName())) {
177
                     // 查询有关的用户部门
191
                     // 查询有关的用户部门
178
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
192
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
179
                 }
193
                 }
180
-                if (role.getRoleName().equals("被申请人")) {
194
+                if ("被申请人".equals(role.getRoleName())) {
195
+                    caseApplication.setIsOtherRole(1);
181
                     //
196
                     //
182
                     caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
197
                     caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
183
                 }
198
                 }
184
-                if (role.getRoleName().equals("代理人")) {
199
+                if ("代理人".equals(role.getRoleName())) {
200
+                    caseApplication.setIsOtherRole(1);
185
                     // 查询角色有关的用户部门
201
                     // 查询角色有关的用户部门
186
                         // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
202
                         // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
187
                     List<Long> agentDeptIds = new ArrayList<>();
203
                     List<Long> agentDeptIds = new ArrayList<>();
192
 
208
 
193
 
209
 
194
             // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
210
             // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
195
-            return caseApplicationMapper.selectCaseApplicationList(caseApplication);
211
+//            return caseApplicationMapper.selectCaseApplicationList(caseApplication);
212
+            return caseApplicationMapper.selectCaseApplicationList1(caseApplication);
196
         }
213
         }
197
 
214
 
198
     }
215
     }
215
         CaseApplication caseApplication = new CaseApplication();
232
         CaseApplication caseApplication = new CaseApplication();
216
         List<Integer> caseStatusList = new ArrayList<>();
233
         List<Integer> caseStatusList = new ArrayList<>();
217
         for (SysRole role : roles) {
234
         for (SysRole role : roles) {
235
+            if(StrUtil.isEmpty(role.getRoleName())){
236
+                continue;
237
+            }
218
             // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
238
             // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
219
             if (role.getRoleName().equals("超级管理员")
239
             if (role.getRoleName().equals("超级管理员")
220
             ) {
240
             ) {
221
                 return caseApplicationMapper.selectAdminCaseToDoCount();
241
                 return caseApplicationMapper.selectAdminCaseToDoCount();
222
             }
242
             }
223
-            if (role.getRoleName().equals("仲裁委")
224
-                    || role.getRoleName().equals("部门长")) {
225
-
243
+            if ("仲裁委".equals(role.getRoleName())
244
+                    || "部门长".equals(role.getRoleName())) {
245
+                caseApplication.setIsOtherRole(1);
226
                 caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
246
                 caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
227
                 caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
247
                 caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
228
                 caseApplication.setDeptHeadStatus(caseStatusList);
248
                 caseApplication.setDeptHeadStatus(caseStatusList);
229
             }
249
             }
230
-            if (role.getRoleName().equals("仲裁员")) {
250
+            if ("仲裁员".equals(role.getRoleName())) {
251
+                caseApplication.setIsOtherRole(1);
231
                 caseApplication.setUserId(String.valueOf(userId));
252
                 caseApplication.setUserId(String.valueOf(userId));
232
             }
253
             }
233
-            if (role.getRoleName().equals("财务")) {
254
+            if ("财务".equals(role.getRoleName())) {
255
+                caseApplication.setIsOtherRole(1);
234
                 caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
256
                 caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
235
             }
257
             }
236
-            if (role.getRoleName().equals("法律顾问")) {
258
+            if ("法律顾问".equals(role.getRoleName())) {
237
                 // 查询角色有关的用户部门
259
                 // 查询角色有关的用户部门
238
                 // List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
260
                 // List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
239
                 List<Long> deptIds = new ArrayList<>();
261
                 List<Long> deptIds = new ArrayList<>();
240
                 deptIds.add(sysUser.getDeptId());
262
                 deptIds.add(sysUser.getDeptId());
241
                 caseApplication.setDeptIds(deptIds);
263
                 caseApplication.setDeptIds(deptIds);
242
             }
264
             }
243
-            if (role.getRoleName().equals("申请人")) {
265
+            if ("申请人".equals(role.getRoleName())) {
244
                 // 查询角色有关的用户部门
266
                 // 查询角色有关的用户部门
245
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
267
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
246
             }
268
             }
247
-            if (role.getRoleName().equals("被申请人")) {
269
+            if ("被申请人".equals(role.getRoleName())) {
270
+                caseApplication.setIsOtherRole(1);
248
                 //
271
                 //
249
                 caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
272
                 caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
250
             }
273
             }
251
-            if (role.getRoleName().equals("代理人")) {
274
+            if ("代理人".equals(role.getRoleName())) {
275
+                caseApplication.setIsOtherRole(1);
252
                 // 查询角色有关的用户部门
276
                 // 查询角色有关的用户部门
253
                 // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
277
                 // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
254
                 List<Long> agentDeptIds = new ArrayList<>();
278
                 List<Long> agentDeptIds = new ArrayList<>();
259
 
283
 
260
 
284
 
261
         // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
285
         // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
262
-        return caseApplicationMapper.selectTodoCountByRole(caseApplication);
286
+        ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
287
+        if(toDoCount==null){
288
+            return new ToDoCount();
289
+        }
290
+        return toDoCount;
263
     }
291
     }
264
 
292
 
265
     @Override
293
     @Override
280
         records.addAll(recordsnofinish);
308
         records.addAll(recordsnofinish);
281
         datas.put("allCasenode", records);
309
         datas.put("allCasenode", records);
282
         datas.put("caseStatus", caseStatus);
310
         datas.put("caseStatus", caseStatus);
283
-        return AjaxResult.success(datas);
311
+        return success(datas);
284
 
312
 
285
     }
313
     }
286
 
314
 
298
         // 发送开庭日期通知短信
326
         // 发送开庭日期通知短信
299
         sendHearDateMessage(caseApplication, request, "1975139");
327
         sendHearDateMessage(caseApplication, request, "1975139");
300
         // 新增日志
328
         // 新增日志
301
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
329
+        insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
302
         return rows;
330
         return rows;
303
     }
331
     }
304
 
332
 
511
             }
539
             }
512
         }
540
         }
513
 
541
 
514
-        return AjaxResult.success();
542
+        return success();
515
 
543
 
516
     }
544
     }
517
 
545
 
846
 
874
 
847
     }
875
     }
848
 
876
 
877
+    /**
878
+     * 新增案件
879
+     * @param caseApplication
880
+     * @return
881
+     */
849
     @Override
882
     @Override
850
     @Transactional
883
     @Transactional
851
     public int insertcaseApplication(CaseApplication caseApplication) {
884
     public int insertcaseApplication(CaseApplication caseApplication) {
860
         String caseNum = generateCaseNum();
893
         String caseNum = generateCaseNum();
861
         caseApplication.setCaseNum(caseNum);
894
         caseApplication.setCaseNum(caseNum);
862
         caseApplication.setCreateBy(getUsername());
895
         caseApplication.setCreateBy(getUsername());
896
+        caseApplication.setVersion(1);
863
         // 新增立案信息
897
         // 新增立案信息
864
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
898
         int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
899
+        if(rows==0){
900
+            return rows;
901
+        }
865
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
902
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
866
         Map<String, Long> deptMap = new HashMap<>();
903
         Map<String, Long> deptMap = new HashMap<>();
867
         // 判断申请机构
904
         // 判断申请机构
876
             Long roleId = roleMapper.selectRoleIdByName("申请人");
913
             Long roleId = roleMapper.selectRoleIdByName("申请人");
877
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
914
             for (CaseAffiliate caseAffiliate : caseAffiliates) {
878
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
915
                 caseAffiliate.setCaseAppliId(caseApplication.getId());
916
+                caseAffiliate.setCaseAppliLogId(caseApplication.getId());
879
                 if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getName())) {
917
                 if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getName())) {
880
                     // 将组织机构id设为申请人名称
918
                     // 将组织机构id设为申请人名称
881
                     if (deptMap.containsKey(caseAffiliate.getName())) {
919
                     if (deptMap.containsKey(caseAffiliate.getName())) {
918
             }
956
             }
919
         }
957
         }
920
         // 新增日志
958
         // 新增日志
921
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
959
+        insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
960
+        // 异步新增案件日志
961
+        ThreadPoolUtil.execute(() -> {
962
+            caseApplication.setCaseAppliId(caseApplication.getId());
963
+            caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
964
+            int insertRow = caseApplicationLogMapper.insert(caseApplication);
965
+            if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
966
+                caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
967
+                // 插入案件日志人员相关表
968
+                caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
969
+            }
970
+        });
971
+
922
         return rows;
972
         return rows;
923
     }
973
     }
924
 
974
 
950
 
1000
 
951
     @Override
1001
     @Override
952
     @Transactional
1002
     @Transactional
953
-    public int editCaseApplication(CaseApplication caseApplication) {
1003
+    public AjaxResult editCaseApplication(CaseApplication caseApplication) {
954
         //根据仲裁费用计费规则计算应缴费用
1004
         //根据仲裁费用计费规则计算应缴费用
955
         //暂时设置计费比率为0.01
1005
         //暂时设置计费比率为0.01
956
         BigDecimal feeRate = new BigDecimal("0.01");
1006
         BigDecimal feeRate = new BigDecimal("0.01");
957
         BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
1007
         BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
958
         caseApplication.setFeePayable(feePayable);
1008
         caseApplication.setFeePayable(feePayable);
959
         caseApplication.setUpdateBy(getUsername());
1009
         caseApplication.setUpdateBy(getUsername());
960
-
961
-        int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
1010
+    //    int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
1011
+//        if(rows==0){
1012
+//            return rows;
1013
+//        }
962
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
1014
         List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
963
         if (caseAffiliates != null && caseAffiliates.size() > 0) {
1015
         if (caseAffiliates != null && caseAffiliates.size() > 0) {
964
             // 查询所有的组织机构,组装成map
1016
             // 查询所有的组织机构,组装成map
1001
 
1053
 
1002
                 }
1054
                 }
1003
 
1055
 
1004
-                caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
1056
+          //      caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
1005
             }
1057
             }
1006
 
1058
 
1007
         }
1059
         }
1013
             }
1065
             }
1014
 
1066
 
1015
         }
1067
         }
1068
+        // 根据案件id查询最新版本号
1069
+        Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
1070
+        if (maxVersion == null) {
1071
+            maxVersion = 1;
1072
+        }
1073
+        caseApplication.setVersion(maxVersion+1);
1074
+        // 将修改提交状态改为未提交
1075
+        caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
1076
+        // 修改案件表的版本号
1077
+     //   caseApplicationMapper.updateVersionById(caseApplication.getId(),caseApplication.getVersion());
1016
 
1078
 
1017
-        return rows;
1079
+        // 异步新增案件日志
1080
+        ThreadPoolUtil.execute(() -> {
1081
+            caseApplication.setCaseAppliId(caseApplication.getId());
1082
+            int insertRow = caseApplicationLogMapper.insert(caseApplication);
1083
+            if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
1084
+                caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
1085
+                // 插入案件日志人员相关表
1086
+                caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
1087
+            }
1088
+        });
1089
+
1090
+        return success();
1018
     }
1091
     }
1019
 
1092
 
1020
 
1093
 
1132
             application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
1205
             application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
1133
             rows += caseApplicationMapper.submitCaseApplication(application);
1206
             rows += caseApplicationMapper.submitCaseApplication(application);
1134
             // 新增日志
1207
             // 新增日志
1135
-            CaseLogUtils.insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
1208
+            insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
1136
         }
1209
         }
1137
         return rows;
1210
         return rows;
1138
     }
1211
     }
1140
     @Override
1213
     @Override
1141
     @Transactional
1214
     @Transactional
1142
     public int deletecaseApplicationByIds(List<Long> ids) {
1215
     public int deletecaseApplicationByIds(List<Long> ids) {
1143
-
1216
+        int rows = caseApplicationMapper.batchDeletecaseApplication(ids);
1144
         caseAffiliateMapper.batchDeletecaseAffiliate(ids);
1217
         caseAffiliateMapper.batchDeletecaseAffiliate(ids);
1145
-        return caseApplicationMapper.batchDeletecaseApplication(ids);
1218
+        caseApplicationLogMapper.batchDeleteLog(ids);
1219
+        return rows;
1146
     }
1220
     }
1147
 
1221
 
1148
     @Override
1222
     @Override
1149
     public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
1223
     public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
1150
-        CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
1151
-        CaseAffiliate caseAffiliate = new CaseAffiliate();
1152
-        caseAffiliate.setCaseAppliId(caseApplication.getId());
1224
+        CaseApplication caseApplicationselect=caseApplicationLogMapper.selectByCaseIdAndVersion(caseApplication.getId(),caseApplication.getVersion());
1225
+        caseApplicationselect.setId(caseApplication.getId());
1226
+
1153
 
1227
 
1154
         ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
1228
         ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
1155
         arbitrateRecord.setCaseAppliId(caseApplication.getId());
1229
         arbitrateRecord.setCaseAppliId(caseApplication.getId());
1178
             }
1252
             }
1179
         }
1253
         }
1180
         caseApplicationselect.setCaseAttachList(caseAttachList);
1254
         caseApplicationselect.setCaseAttachList(caseAttachList);
1181
-
1182
-        List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1255
+        CaseAffiliate caseAffiliateLog = new CaseAffiliate();
1256
+        caseAffiliateLog.setCaseAppliLogId(caseApplication.getCaseLogId());
1257
+        List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseAffiliateLog);
1183
         if (caseAffiliatListeselect != null) {
1258
         if (caseAffiliatListeselect != null) {
1184
             // 查询组织机构
1259
             // 查询组织机构
1185
             List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1260
             List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1219
         StringBuilder failureMsg = new StringBuilder();
1294
         StringBuilder failureMsg = new StringBuilder();
1220
         StringBuilder successMsg = new StringBuilder();
1295
         StringBuilder successMsg = new StringBuilder();
1221
         int successNum = 0;
1296
         int successNum = 0;
1297
+        List<CaseAffiliate> caseAffiliateLogList=new ArrayList<>();
1222
         if (caseApplicationList != null && caseApplicationList.size() > 0) {
1298
         if (caseApplicationList != null && caseApplicationList.size() > 0) {
1223
             // 1,查询所有的组织机构,组装成map
1299
             // 1,查询所有的组织机构,组装成map
1224
             List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
1300
             List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
1254
                 }
1330
                 }
1255
             }
1331
             }
1256
             if (caseApplicationListinsert.size() > 0) {
1332
             if (caseApplicationListinsert.size() > 0) {
1257
-//                List<CaseApplication> caseApplicationListinsertDiffer = caseApplicationListinsert.stream().collect(
1258
-//                        collectingAndThen(
1259
-//                                toCollection(() -> new TreeSet<>(Comparator.comparing(CaseApplication::getCaseNum))),
1260
-//                                ArrayList::new));
1261
-
1262
-
1263
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
1333
                 //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
1264
-//                if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
1265
                 List<CaseApplication> caseApplicationNewList = null;
1334
                 List<CaseApplication> caseApplicationNewList = null;
1266
                 for (int i = 0; i < caseApplicationListinsert.size(); i++) {
1335
                 for (int i = 0; i < caseApplicationListinsert.size(); i++) {
1267
                     caseApplicationNewList = new ArrayList<>();
1336
                     caseApplicationNewList = new ArrayList<>();
1290
                         // 新增立案信息
1359
                         // 新增立案信息
1291
                         caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
1360
                         caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
1292
                         caseApplicationItera.setCreateBy(getUsername());
1361
                         caseApplicationItera.setCreateBy(getUsername());
1362
+                        caseApplicationItera.setImportFlag(1);
1293
                         int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
1363
                         int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
1364
+                        if(rows==0){
1365
+                            continue;
1366
+                        }
1294
                         // 新增日志
1367
                         // 新增日志
1295
-                        CaseLogUtils.insertCaseLog(caseApplicationItera.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
1368
+                        insertCaseLog(caseApplicationItera.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
1296
 
1369
 
1297
                         List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
1370
                         List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
1298
                         if (caseAffiliates != null && caseAffiliates.size() > 0) {
1371
                         if (caseAffiliates != null && caseAffiliates.size() > 0) {
1302
                             }
1375
                             }
1303
                             caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
1376
                             caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
1304
                         }
1377
                         }
1305
-
1378
+                        // 新增案件记录
1379
+                        caseApplicationItera.setCaseAppliId(caseApplicationItera.getId());
1380
+                        caseApplicationItera.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
1381
+                        caseApplicationItera.setVersion(1);
1382
+
1383
+                        int insertRow = caseApplicationLogMapper.insert(caseApplicationItera);
1384
+                        if(insertRow>0){
1385
+                            caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId()));
1386
+                            caseAffiliateLogList.addAll(caseAffiliates);
1387
+                        }
1306
                         successNum++;
1388
                         successNum++;
1307
                         successMsg.append("<br/>").append(successNum).append("、立案编号 ").append(caseApplicationItera.getCaseNum()).append(" 导入成功");
1389
                         successMsg.append("<br/>").append(successNum).append("、立案编号 ").append(caseApplicationItera.getCaseNum()).append(" 导入成功");
1308
                     }
1390
                     }
1309
 
1391
 
1310
-//                    }
1311
 
1392
 
1312
                 }
1393
                 }
1313
 
1394
 
1314
             }
1395
             }
1396
+            // 异步新增案件日志
1397
+            ThreadPoolUtil.execute(() -> {
1398
+                if ( CollectionUtil.isNotEmpty(caseAffiliateLogList)) {
1399
+                    // 插入案件日志人员相关表
1400
+                    caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliateLogList);
1401
+                }
1402
+            });
1315
 
1403
 
1316
 
1404
 
1317
         } else {
1405
         } else {
1342
         validDebtorApplicationAgentColumn(caseApplication, failureMsg);
1430
         validDebtorApplicationAgentColumn(caseApplication, failureMsg);
1343
     }
1431
     }
1344
 
1432
 
1345
-    /**
1346
-     * 验证身份证号码是否合法
1347
-     * @param idCard
1348
-     * @return
1349
-     */
1350
-    public static boolean validateIdCard(String idCard) {
1351
-        if (idCard == null || idCard.trim().isEmpty()) {
1352
-            return false;
1353
-        }
1354
-
1355
-        if (!Pattern.matches(ID_REGEX, idCard)) {
1356
-            return false;
1357
-        }
1358
-
1359
-        // 根据身份证号码的长度,采取不同的校验位计算方式
1360
-        if (idCard.length() == 15) {
1361
-            // 旧版身份证校验位计算
1362
-            int sum = 0;
1363
-            int[] weights = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8};
1364
-            String idDigits = idCard.substring(0, 14);
1365
-            for (int i = 0; i < idDigits.length(); i++) {
1366
-                sum += Integer.parseInt(idDigits.substring(i, i + 1)) * weights[i];
1367
-            }
1368
-            int checkCode = 11 - (sum % 11);
1369
-            if (checkCode == 10) {
1370
-                checkCode = 0;
1371
-            }
1372
-            return idCard.substring(idCard.length() - 1).equals(String.valueOf(checkCode));
1373
-        } else if (idCard.length() == 18) {
1374
-            // 新版身份证校验位计算
1375
-            int sum = 0;
1376
-            int[] weights = {6, 7, 8, 4, 5, 6, 3, 2, 1, 0, 9, 7, 3, 4, 5, 6, 2, 8};
1377
-            String idDigits = idCard.substring(0, 17);
1378
-            for (int i = 0; i < idDigits.length(); i++) {
1379
-                sum += Integer.parseInt(idDigits.substring(i, i + 1)) * weights[i];
1380
-            }
1381
-            int checkCode = sum % 10;
1382
-            return idCard.substring(idCard.length() - 1).equals(String.valueOf(checkCode));
1383
-        }
1384
-
1385
-        return false;
1386
-    }
1387
     /**
1433
     /**
1388
      * 校验被申请人代理信息
1434
      * 校验被申请人代理信息
1389
      *
1435
      *
1398
         }
1444
         }
1399
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
1445
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
1400
             failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
1446
             failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
1401
-        } else if (!validateIdCard(caseApplication.getDebtorIdentityNumAgent())) {
1447
+        } else if (! IdcardUtil.isValidCard((caseApplication.getDebtorIdentityNumAgent()))) {
1402
             failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
1448
             failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
1403
         }
1449
         }
1404
         String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
1450
         String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
1428
         }
1474
         }
1429
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
1475
         if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
1430
             failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
1476
             failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
1431
-        } else if (!validateIdCard(caseApplication.getDebtorIdentityNum())) {
1477
+        } else if (! IdcardUtil.isValidCard(caseApplication.getDebtorIdentityNum())) {
1432
             failureMsg.append("【被申请人主体信息-身份证号】不合法;");
1478
             failureMsg.append("【被申请人主体信息-身份证号】不合法;");
1433
         }
1479
         }
1434
         String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
1480
         String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
1485
         }
1531
         }
1486
         if (StrUtil.isEmpty(caseApplication.getIdentityNumAgent())) {
1532
         if (StrUtil.isEmpty(caseApplication.getIdentityNumAgent())) {
1487
             failureMsg.append("【申请人主体信息-代理人身份证号】字段不能为空;");
1533
             failureMsg.append("【申请人主体信息-代理人身份证号】字段不能为空;");
1488
-        } else if (!validateIdCard(caseApplication.getIdentityNumAgent())) {
1534
+        } else if (!IdcardUtil.isValidCard(caseApplication.getIdentityNumAgent())) {
1489
             failureMsg.append("【申请人主体信息-代理人身份证号】不合法;");
1535
             failureMsg.append("【申请人主体信息-代理人身份证号】不合法;");
1490
         }
1536
         }
1491
         validAgentInfo(caseApplication, failureMsg, deptMap);
1537
         validAgentInfo(caseApplication, failureMsg, deptMap);
1701
             }
1747
             }
1702
         }
1748
         }
1703
         // 新增日志
1749
         // 新增日志
1704
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
1750
+        insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
1705
         return rows;
1751
         return rows;
1706
     }
1752
     }
1707
 
1753
 
1713
         ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
1759
         ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
1714
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
1760
         arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
1715
         // 新增日志
1761
         // 新增日志
1716
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION, "");
1762
+        insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION, "");
1717
         return rows;
1763
         return rows;
1718
 
1764
 
1719
     }
1765
     }
1906
             }
1952
             }
1907
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
1953
             caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
1908
             // 新增日志
1954
             // 新增日志
1909
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.SIGN_ARBITRATION, "");
1955
+            insertCaseLog(caseApplication.getId(), CaseApplicationConstants.SIGN_ARBITRATION, "");
1910
 
1956
 
1911
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1957
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1912
         } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
1958
         } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
1913
             caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
1959
             caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
1914
             // 新增日志
1960
             // 新增日志
1915
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
1961
+            insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
1916
 
1962
 
1917
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1963
             rows = caseApplicationMapper.submitCaseApplication(caseApplication);
1918
         }
1964
         }
1919
 
1965
 
1920
-        return AjaxResult.success();
1966
+        return success();
1921
     }
1967
     }
1922
 
1968
 
1923
     @Override
1969
     @Override
1937
                 rows += caseApplicationMapper.submitCaseApplication(caseApplication);
1983
                 rows += caseApplicationMapper.submitCaseApplication(caseApplication);
1938
             }
1984
             }
1939
             // 新增日志
1985
             // 新增日志
1940
-            CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, "");
1986
+            insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, "");
1941
         }
1987
         }
1942
 
1988
 
1943
 
1989
 
2144
                 caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
2190
                 caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
2145
 
2191
 
2146
                 // 新增日志
2192
                 // 新增日志
2147
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
2193
+                insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
2148
 
2194
 
2149
 
2195
 
2150
             }
2196
             }
2163
                 caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
2209
                 caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
2164
 
2210
 
2165
                 // 新增日志
2211
                 // 新增日志
2166
-                CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
2212
+                insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
2167
 
2213
 
2168
             }
2214
             }
2169
         }
2215
         }
2281
 
2327
 
2282
             //获取案件详细信息
2328
             //获取案件详细信息
2283
             CaseApplication caseApplicationSelct = selectCaseApplication(caseApplication);
2329
             CaseApplication caseApplicationSelct = selectCaseApplication(caseApplication);
2284
-            return AjaxResult.success(caseApplicationSelct);
2330
+            return success(caseApplicationSelct);
2285
         } catch (IOException e) {
2331
         } catch (IOException e) {
2286
             e.printStackTrace();
2332
             e.printStackTrace();
2287
             return AjaxResult.error("生成庭审笔录异常");
2333
             return AjaxResult.error("生成庭审笔录异常");
2344
         // 发送开庭日期通知短信
2390
         // 发送开庭日期通知短信
2345
         sendHearDateMessage(caseApplication, request, "1947342");
2391
         sendHearDateMessage(caseApplication, request, "1947342");
2346
         // 新增日志
2392
         // 新增日志
2347
-        CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
2393
+        insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
2348
 
2394
 
2349
         return rows;
2395
         return rows;
2350
 
2396
 
2682
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2728
                     ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2683
                             reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2729
                             reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2684
                     reservedConferenceMapper.insert(conference);
2730
                     reservedConferenceMapper.insert(conference);
2685
-                    return AjaxResult.success("预约会议成功");
2731
+                    return success("预约会议成功");
2686
 
2732
 
2687
                 case 42002:
2733
                 case 42002:
2688
                     return AjaxResult.error("预定会议无效");
2734
                     return AjaxResult.error("预定会议无效");
2770
     @Override
2816
     @Override
2771
     public AjaxResult deleteRoom(String roomId) {
2817
     public AjaxResult deleteRoom(String roomId) {
2772
 
2818
 
2773
-        return AjaxResult.success( reservedConferenceMapper.deleteByRoomId(roomId));
2819
+        return success( reservedConferenceMapper.deleteByRoomId(roomId));
2774
     }
2820
     }
2821
+
2822
+
2775
 }
2823
 }
2776
 
2824
 
2777
 
2825
 

+ 45
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java ファイルの表示

1
 package com.ruoyi.wisdomarbitrate.service.impl;
1
 package com.ruoyi.wisdomarbitrate.service.impl;
2
 
2
 
3
 import cn.hutool.core.collection.CollectionUtil;
3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
4
 import com.ruoyi.common.config.RuoYiConfig;
5
 import com.ruoyi.common.config.RuoYiConfig;
5
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.constant.CaseApplicationConstants;
6
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.core.domain.AjaxResult;
8
 import com.ruoyi.common.core.domain.entity.SysUser;
9
 import com.ruoyi.common.core.domain.entity.SysUser;
9
 import com.ruoyi.common.core.domain.model.LoginUser;
10
 import com.ruoyi.common.core.domain.model.LoginUser;
10
 import com.ruoyi.common.utils.SecurityUtils;
11
 import com.ruoyi.common.utils.SecurityUtils;
12
+import com.ruoyi.common.utils.SmsUtils;
11
 import com.ruoyi.common.utils.StringUtils;
13
 import com.ruoyi.common.utils.StringUtils;
12
 import com.ruoyi.common.utils.spring.SpringUtils;
14
 import com.ruoyi.common.utils.spring.SpringUtils;
13
 import com.ruoyi.system.mapper.SysUserMapper;
15
 import com.ruoyi.system.mapper.SysUserMapper;
27
 import org.springframework.web.multipart.MultipartFile;
29
 import org.springframework.web.multipart.MultipartFile;
28
 
30
 
29
 import java.io.IOException;
31
 import java.io.IOException;
30
-import java.util.ArrayList;
31
-import java.util.Arrays;
32
-import java.util.Iterator;
33
-import java.util.List;
32
+import java.util.*;
34
 import java.util.stream.Collectors;
33
 import java.util.stream.Collectors;
35
 
34
 
35
+import static com.ruoyi.common.utils.SecurityUtils.getUsername;
36
+
36
 @Service
37
 @Service
37
 public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
38
 public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
38
     @Autowired
39
     @Autowired
47
     private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
48
     private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
48
     @Autowired
49
     @Autowired
49
     private SysUserMapper sysUserMapper;
50
     private SysUserMapper sysUserMapper;
51
+    @Autowired
52
+    private SmsRecordMapper smsRecordMapper;
50
 
53
 
51
     @Override
54
     @Override
52
     @Transactional
55
     @Transactional
246
                         .build();
249
                         .build();
247
                 int count = caseAttachMapper.save(caseAttach);
250
                 int count = caseAttachMapper.save(caseAttach);
248
                 if (count > 0 && annexType != null && annexType != 8) {
251
                 if (count > 0 && annexType != null && annexType != 8) {
249
-//                    if (id != null) {
250
-//                        //修改案件状态
251
-//                        CaseApplication caseApplication = new CaseApplication();
252
-//                        caseApplication.setId(id);
253
-//                        caseApplication.setCaseStatus(4);
254
-//                        caseApplicationMapper.submitCaseApplication(caseApplication);
255
-//                    }
256
                     CaseAttach caseAttachselect = new CaseAttach();
252
                     CaseAttach caseAttachselect = new CaseAttach();
257
                     caseAttachselect.setAnnexId(caseAttach.getAnnexId());
253
                     caseAttachselect.setAnnexId(caseAttach.getAnnexId());
258
                     caseAttachselect.setAnnexName(caseAttach.getAnnexName());
254
                     caseAttachselect.setAnnexName(caseAttach.getAnnexName());
266
             e.printStackTrace();
262
             e.printStackTrace();
267
             return AjaxResult.error("上传失败");
263
             return AjaxResult.error("上传失败");
268
         }
264
         }
265
+        // 给秘书发送短信
266
+        // 根据caseid查询该案件的法律顾问,根据案件id查申请表,查到申请机构id,然后拿申请机构id查询在哪个人下并且角色要是法律顾问
267
+        CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
268
+        if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
269
+           List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
270
+        if(CollectionUtil.isNotEmpty(userList)){
271
+            // 新增短信记录
272
+            SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
273
+            //  1992106	普通短信	修改证据资料通知	尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
274
+            request.setTemplateId("1992106");
275
+            CaseApplication caseApplication = new CaseApplication();
276
+            caseApplication.setId(id);
277
+            caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
278
+            for (SysUser user : userList) {
279
+                request.setPhone(user.getPhonenumber());
280
+                request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
281
+                Boolean aBoolean = SmsUtils.sendSms(request);
282
+                //保存短信发送记录
283
+                SmsSendRecord smsSendRecord = new SmsSendRecord();
284
+                smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
285
+
286
+                smsSendRecord.setCaseNum(caseApplication.getCaseNum());
287
+                smsSendRecord.setPhone(request.getPhone());
288
+                smsSendRecord.setSendTime(new Date());
289
+                String content = "尊敬的" + user.getNickName() + ",您的"+caseApplication.getCaseNum()+"仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。";
290
+                smsSendRecord.setSendContent(content);
291
+                smsSendRecord.setCreateBy(getUsername());
292
+                if (aBoolean) {
293
+                    smsSendRecord.setSendStatus(1);
294
+                } else {
295
+                    smsSendRecord.setSendStatus(0);
296
+                }
297
+                smsRecordMapper.saveSmsSendRecord(smsSendRecord);
298
+            }
299
+
300
+        }
301
+        }
302
+
269
 
303
 
270
         return AjaxResult.success("上传成功", successList);
304
         return AjaxResult.success("上传成功", successList);
271
 
305
 

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java ファイルの表示

209
             recordParams.setOutputFormat(0L); // 0:(默认)输出文件为hls格式。1:输出文件格式为hls+mp4。2:输出文件格式为hls+aac
209
             recordParams.setOutputFormat(0L); // 0:(默认)输出文件为hls格式。1:输出文件格式为hls+mp4。2:输出文件格式为hls+aac
210
             MixLayoutParams mixLayoutParams = new MixLayoutParams();
210
             MixLayoutParams mixLayoutParams = new MixLayoutParams();
211
             // 	布局模式: 1:悬浮布局;2:屏幕分享布局;3:九宫格布局(默认);4:自定义布局;
211
             // 	布局模式: 1:悬浮布局;2:屏幕分享布局;3:九宫格布局(默认);4:自定义布局;
212
-            mixLayoutParams.setMixLayoutMode(1L);
212
+            mixLayoutParams.setMixLayoutMode(3L);
213
             req.setMixLayoutParams(mixLayoutParams);
213
             req.setMixLayoutParams(mixLayoutParams);
214
 
214
 
215
             StorageParams storageParams1 = new StorageParams();
215
             StorageParams storageParams1 = new StorageParams();

+ 7
- 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml ファイルの表示

194
 			left join sys_role r on r.role_id = ur.role_id
194
 			left join sys_role r on r.role_id = ur.role_id
195
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
195
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
196
 	</select>
196
 	</select>
197
+    <select id="selectByDeptIdAndRole" resultMap="SysUserResult">
198
+		select u.* from
199
+		               sys_user u
200
+		                join sys_user_role ur on u.user_id = ur.user_id
201
+		                join sys_role r on ur.role_id = r.role_id
202
+		where u.dept_id = #{deptId} and r.role_name = #{roleName} and u.del_flag = '0' and r.del_flag='0'
203
+	</select>
197
 
204
 
198
 
205
 
199
     <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
206
     <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">

+ 125
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateLogMapper.xml ファイルの表示

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateLogMapper">
6
+
7
+    <resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate" id="CaseAffiliateResult">
8
+        <id     property="id"       column="id"      />
9
+        <result property="caseAppliLogId"       column="case_appli_log_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
+    </resultMap>
35
+
36
+    <select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
37
+        select c.id ,c.case_appli_log_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
38
+        c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
39
+        c.comp_legal_person,c.comp_legalper_post,c.respon_sex,c.respon_birth,
40
+        c.residen_affili,c.appli_agent_title,c.email,
41
+        c.track_num,c.application_organ_id,c.application_organ_name,s.user_id
42
+        from case_affiliate_log c
43
+        left join sys_user s on c.identity_num=s.id_card
44
+        <where>
45
+            <if test="caseAppliLogId != null ">
46
+                AND c.case_appli_log_id = #{caseAppliLogId}
47
+            </if>
48
+
49
+        </where>
50
+    </select>
51
+    <select id="selectCaseAffiliateByIdentityType"  resultMap="CaseAffiliateResult">
52
+        select c.id ,c.case_appli_log_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
53
+        c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
54
+        c.track_num,c.application_organ_id,c.application_organ_name
55
+        from case_affiliate_log c
56
+        <where>
57
+            <if test="caseAppliLogId != null ">
58
+                AND c.case_appli_log_id = #{caseAppliLogId}
59
+            </if>
60
+            <if test="identityType != null ">
61
+                AND c.identity_type = #{identityType}
62
+            </if>
63
+        </where>
64
+    </select>
65
+
66
+
67
+
68
+    <insert id="batchCaseAffiliate">
69
+        insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
70
+        contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
71
+        comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
72
+        residen_affili,appli_agent_title,
73
+        contact_address_agent,email ) values
74
+        <foreach item="item" index="index" collection="list" separator=",">
75
+            (#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
76
+            #{item.contactAddress},#{item.workAddress},#{item.workTelphone},  #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
77
+            #{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex},  #{item.responBirth},
78
+            #{item.residenAffili},#{item.appliAgentTitle},
79
+            #{item.contactAddressAgent},
80
+            #{item.email})
81
+        </foreach>
82
+    </insert>
83
+
84
+
85
+
86
+    <update id="updataCaseAffiliate" parameterType="CaseAffiliate">
87
+        update case_affiliate_log
88
+        set
89
+        case_appli_log_id=#{caseAppliLogId},
90
+        identity_type= #{identityType},
91
+        application_organ_id= #{applicationOrganId},
92
+        application_organ_name= #{applicationOrganName},
93
+        name = #{name},
94
+        identity_num = #{identityNum},
95
+        contact_telphone = #{contactTelphone},
96
+        contact_address = #{contactAddress},
97
+        work_address = #{workAddress},
98
+        work_telphone = #{workTelphone},
99
+
100
+        name_agent = #{nameAgent},
101
+        identity_num_agent = #{identityNumAgent},
102
+        contact_telphone_agent = #{contactTelphoneAgent},
103
+        contact_address_agent = #{contactAddressAgent},
104
+        send_email = #{sendEmail},
105
+        residen_affili = #{residenAffili},
106
+        email= #{email},
107
+        track_num = #{trackNum}
108
+
109
+        where id = #{id}
110
+
111
+    </update>
112
+
113
+    <delete id="deletecaseAffiliate" parameterType="CaseApplication">
114
+        delete from case_affiliate_log where case_appli_log_id = #{caseAppliLogId}
115
+    </delete>
116
+    <delete id="batchDeletecaseAffiliate">
117
+
118
+        delete from case_affiliate_log where case_appli_log_id in
119
+        <foreach collection="ids" item="item" open="(" separator="," close=")">
120
+            #{item}
121
+        </foreach>
122
+    </delete>
123
+
124
+
125
+</mapper>

+ 28
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAffiliateMapper.xml ファイルの表示

56
             <if test="caseAppliId != null ">
56
             <if test="caseAppliId != null ">
57
                 AND c.case_appli_id = #{caseAppliId}
57
                 AND c.case_appli_id = #{caseAppliId}
58
             </if>
58
             </if>
59
-            <if test="caseAppliId != null ">
59
+            <if test="identityType != null ">
60
                 AND c.identity_type = #{identityType}
60
                 AND c.identity_type = #{identityType}
61
             </if>
61
             </if>
62
         </where>
62
         </where>
112
         where id = #{id}
112
         where id = #{id}
113
 
113
 
114
     </update>
114
     </update>
115
+    <update id="updateCaseAffiliateByCaseId">
116
+
117
+        <foreach collection="list" item="item" >
118
+        update case_affiliate
119
+            <set>
120
+
121
+            application_organ_id= #{item.applicationOrganId},
122
+            application_organ_name= #{item.applicationOrganName},
123
+            name = #{name},
124
+            identity_num = #{item.identityNum},
125
+            contact_telphone = #{item.contactTelphone},
126
+            contact_address = #{item.contactAddress},
127
+            work_address = #{item.workAddress},
128
+            work_telphone = #{item.workTelphone},
129
+
130
+            name_agent = #{item.nameAgent},
131
+            identity_num_agent = #{item.identityNumAgent},
132
+            contact_telphone_agent = #{item.contactTelphoneAgent},
133
+            contact_address_agent = #{item.contactAddressAgent},
134
+            send_email = #{item.sendEmail},
135
+            residen_affili = #{item.residenAffili},
136
+            email= #{item.email},
137
+            track_num = #{item.trackNum}
138
+            </set>
139
+        where case_appli_id = #{caseAppliId} and   identity_type= #{item.identityType};
140
+        </foreach>
141
+    </update>
115
 
142
 
116
     <delete id="deletecaseAffiliate" parameterType="CaseApplication">
143
     <delete id="deletecaseAffiliate" parameterType="CaseApplication">
117
         delete from case_affiliate where case_appli_id = #{id}
144
         delete from case_affiliate where case_appli_id = #{id}

+ 158
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml ファイルの表示

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationLogMapper">
6
+    <resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
7
+        <id     property="id"       column="id"      />
8
+        <result     property="caseAppliId"       column="caseAppliId"      />
9
+        <result property="caseNum"       column="case_num"      />
10
+        <result property="caseName"       column="case_name"      />
11
+        <result property="caseSubjectAmount"     column="case_subject_amount"    />
12
+        <result property="registerDate"     column="register_date"    />
13
+        <result property="arbitratMethod"        column="arbitrat_method"        />
14
+        <result property="caseStatus"  column="case_status"  />
15
+        <result property="hearDate"          column="hear_date"          />
16
+        <result property="arbitratClaims"       column="arbitrat_claims"       />
17
+        <result property="loanStartDate"     column="loan_start_date"     />
18
+        <result property="loanEndDate"       column="loan_end_date"       />
19
+        <result property="claimPrinciOwed"      column="claim_princi_owed"     />
20
+        <result property="claimInterestOwed"      column="claim_interest_owed"     />
21
+        <result property="claimLiquidDamag"    column="claim_liquid_damag"   />
22
+
23
+        <result property="feePayable"          column="fee_payable"          />
24
+        <result property="beginVideoDate"     column="begin_video_date"     />
25
+        <result property="onlineVideoPerson"       column="online_video_person"       />
26
+        <result property="contractNumber"      column="contract_number"     />
27
+        <result property="caseStatusName"      column="caseStatusName"     />
28
+        <result property="createBy"     column="create_by"    />
29
+        <result property="createTime"   column="create_time"  />
30
+        <result property="updateBy"     column="update_by"    />
31
+        <result property="updateTime"   column="update_time"  />
32
+        <result property="arbitratMethodName"   column="arbitratMethodName"  />
33
+
34
+        <result property="isAbsence"   column="is_absence"  />
35
+        <result property="responCrossOpin"   column="respon_cross_opin"  />
36
+        <result property="applicaCrossOpin"   column="applica_cross_opin"  />
37
+        <result property="responDefenOpini"   column="respon_defen_opini"  />
38
+
39
+        <result property="arbitratorId"   column="arbitrator_id"  />
40
+        <result property="arbitratorName"   column="arbitrator_name"  />
41
+        <result property="paymentStatus"   column="payment_status"  />
42
+        <result property="paymentStatusName"   column="paymentStatusName"  />
43
+        <result property="filearbitraUrl"   column="filearbitra_url"  />
44
+
45
+        <result property="requestRule"   column="request_rule"  />
46
+        <result property="properPreser"   column="proper_preser"  />
47
+        <result property="adjudicaCounter"   column="adjudica_counter"  />
48
+        <result property="lockStatus"   column="lock_status"  />
49
+        <result property="version"   column="version"  />
50
+        <result property="updateSubmitStatus"   column="update_submit_status"  />
51
+    </resultMap>
52
+    <insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
53
+        insert into case_application_log(
54
+        <if test="caseAppliId != null  ">case_appli_id ,</if>
55
+        <if test="caseName != null  and caseName != ''">case_name ,</if>
56
+        <if test="caseNum != null and caseNum != ''">case_num,</if>
57
+        <if test="caseSubjectAmount != null">case_subject_amount,</if>
58
+
59
+        <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
60
+        <if test="requestRule != null and requestRule != ''">request_rule,</if>
61
+        <if test="loanStartDate != null ">loan_start_date,</if>
62
+        <if test="loanEndDate != null ">loan_end_date,</if>
63
+        <if test="claimPrinciOwed != null ">claim_princi_owed,</if>
64
+
65
+        <if test="claimInterestOwed != null ">claim_interest_owed,</if>
66
+        <if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
67
+        <if test="feePayable != null ">fee_payable,</if>
68
+        <if test="contractNumber != null  and contractNumber != ''">contract_number,</if>
69
+        <if test="createBy != null  and createBy != ''">create_by,</if>
70
+        <if test="version != null ">version,</if>
71
+        <if test="updateSubmitStatus != null ">update_submit_status,</if>
72
+        create_time
73
+        )values(
74
+        <if test="caseAppliId != null">#{caseAppliId},</if>
75
+        <if test="caseName != null and caseName != ''">#{caseName},</if>
76
+        <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
77
+        <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
78
+
79
+        <if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
80
+        <if test="requestRule != null and requestRule != ''">#{requestRule},</if>
81
+        <if test="loanStartDate != null ">#{loanStartDate},</if>
82
+        <if test="loanEndDate != null ">#{loanEndDate},</if>
83
+        <if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
84
+
85
+        <if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
86
+        <if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
87
+        <if test="feePayable != null ">#{feePayable},</if>
88
+        <if test="contractNumber != null  and contractNumber != ''">#{contractNumber},</if>
89
+        <if test="createBy != null  and createBy != ''">#{createBy},</if>
90
+        <if test="version != null ">#{version},</if>
91
+        <if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
92
+        sysdate()
93
+        )
94
+    </insert>
95
+    <update id="updateStatus">
96
+        update case_application_log
97
+
98
+        <set>
99
+            <if test="updateSubmitStatus!= null ">update_submit_status=#{updateSubmitStatus},</if>
100
+
101
+        </set>
102
+        <where>
103
+            <if test="caseId!= null ">AND case_appli_id=#{caseId}</if>
104
+            <if test="version!= null ">AND version=#{version}</if>
105
+
106
+        </where>
107
+    </update>
108
+
109
+    <delete id="deleteById" >
110
+        DELETE FROM case_application_log
111
+        WHERE id = #{id}
112
+    </delete>
113
+    <delete id="batchDeleteLog">
114
+        delete a from case_affiliate_log  a
115
+        join case_application_log l on l.id=a.case_appli_log_id
116
+        where l.id in (
117
+        <foreach collection="ids" item="id" separator=",">
118
+            #{id}
119
+        </foreach>
120
+        );
121
+
122
+        delete from case_application_log l where l.id in (
123
+        <foreach collection="ids" item="id" separator=",">
124
+            #{id}
125
+        </foreach>
126
+        );
127
+    </delete>
128
+
129
+
130
+    <select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
131
+        SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
132
+               loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
133
+               create_by,version,update_submit_status,create_time
134
+        FROM case_application_log
135
+        WHERE case_appli_id = #{caseAppliId} and version=#{version}
136
+    </select>
137
+
138
+    <select id="selectLatestCase" resultMap="CaseApplicationResult">
139
+        SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
140
+               loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
141
+               create_by,version,update_submit_status,create_time
142
+        FROM case_application_log
143
+        WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
144
+    </select>
145
+    <select id="selectMaxVersionByCaseId" resultType="java.lang.Integer">
146
+        SELECT max(version)
147
+        FROM case_application_log
148
+        WHERE case_appli_id = #{caseAppliId}
149
+
150
+    </select>
151
+    <select id="selectMaxVersionBySecret" resultType="java.lang.Integer">
152
+        SELECT max(version)
153
+        FROM case_application_log
154
+        WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
155
+    </select>
156
+
157
+
158
+</mapper>

+ 962
- 25
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml
ファイル差分が大きすぎるため省略します
ファイルの表示