Просмотр исходного кода

Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz3

qitz 2 лет назад
Родитель
Сommit
3a7687b31c

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

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate;
2 2
 
3 3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
4 5
 import com.ruoyi.common.annotation.Anonymous;
5 6
 import com.ruoyi.common.annotation.Log;
6 7
 import com.ruoyi.common.core.controller.BaseController;
@@ -8,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
8 9
 import com.ruoyi.common.core.page.TableDataInfo;
9 10
 import com.ruoyi.common.enums.BusinessType;
10 11
 import com.ruoyi.common.exception.EsignDemoException;
12
+import com.ruoyi.common.exception.ServiceException;
11 13
 import com.ruoyi.common.utils.WxAppletNotifyUtils;
12 14
 import com.ruoyi.wisdomarbitrate.domain.*;
13 15
 import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
@@ -37,6 +39,9 @@ public class CaseApplicationController extends BaseController {
37 39
 //    @PreAuthorize("@ss.hasPermi('caseManagement:list')")
38 40
     @GetMapping("/list")
39 41
     public TableDataInfo list(CaseApplication caseApplication) {
42
+        if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
43
+          caseApplication.setSelectCaseStatus("0");
44
+        }
40 45
         startPage();
41 46
         List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
42 47
 //        List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);

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

@@ -0,0 +1,62 @@
1
+package com.ruoyi.web.controller.wisdomarbitrate;
2
+
3
+import cn.hutool.core.util.StrUtil;
4
+import com.ruoyi.common.annotation.Anonymous;
5
+import com.ruoyi.common.core.controller.BaseController;
6
+import com.ruoyi.common.core.domain.AjaxResult;
7
+import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
8
+import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
9
+import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
10
+import com.ruoyi.wisdomarbitrate.service.VideoService;
11
+import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import org.springframework.web.multipart.MultipartFile;
15
+
16
+import javax.servlet.http.HttpServletRequest;
17
+import javax.validation.Valid;
18
+
19
+/**
20
+ * @author wangqiong
21
+ * @description 视频录制
22
+ * @date 2023-10-26 11:25
23
+ */
24
+@RestController
25
+@RequestMapping("/video")
26
+public class VideoController extends BaseController {
27
+    @Autowired
28
+    private VideoService videoService;
29
+
30
+    /**
31
+     * 从腾讯云下载文件到本地
32
+     * @param
33
+     * @return
34
+     */
35
+    @Anonymous
36
+    @PostMapping("/videoRollBack")
37
+    public AjaxResult videoRollBack(  @RequestBody String body, HttpServletRequest request) {
38
+        videoService.videoRollBack(body,request);
39
+       return success();
40
+    }
41
+    /**
42
+     * 根据房间号绑定案件ID
43
+     * @param
44
+     * @return
45
+     */
46
+    @Anonymous
47
+    @PostMapping("/bindCaseId")
48
+    public AjaxResult bindCaseId(@Valid @RequestBody SendRoomNoMessageVO vo) {
49
+
50
+        return videoService.bindCaseId(vo.getId(),vo.getRoomNo());
51
+    }
52
+    /**
53
+     * 根据案件ID查询视频
54
+     * @param caseId 案件id
55
+     * @return
56
+     */
57
+    @GetMapping("/videoList")
58
+    public AjaxResult videoList(  @RequestParam Long caseId) {
59
+
60
+        return videoService.videoList(caseId);
61
+    }
62
+}

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

@@ -55,6 +55,7 @@ public class WeChatUserController extends BaseController {
55 55
         ){
56 56
             return warn("参数校验失败");
57 57
         }
58
+        logger.info("调用小程序注册==="+ientityAuthentication.toString());
58 59
         return weChatUserService.registerUser(ientityAuthentication);
59 60
     }
60 61
 

+ 9
- 0
ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java Просмотреть файл

@@ -132,4 +132,13 @@ public class RuoYiConfig
132 132
     {
133 133
         return getProfile() + "/upload";
134 134
     }
135
+
136
+    /**
137
+     * 获取上传路径
138
+     */
139
+    public static String getVideoUploadPath()
140
+    {
141
+        return getProfile() + "/video";
142
+    }
143
+    // https://1304001529.vod-qcloud.com/b78823bbvodcq1304001529/3ce565bf3270835011486046286/f0.mp4
135 144
 }

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

@@ -9,6 +9,10 @@ import java.util.List;
9 9
 
10 10
 public class CaseApplication  extends BaseEntity {
11 11
     private static final long serialVersionUID = 1L;
12
+    /**
13
+     * 查询案件时区分是否待办案件,0待办案件,1已办案件
14
+     */
15
+    private String selectCaseStatus;
12 16
 
13 17
     /** ID */
14 18
     private Long id;
@@ -26,6 +30,14 @@ public class CaseApplication  extends BaseEntity {
26 30
     /** 仲裁方式 */
27 31
     private Integer arbitratMethod;
28 32
 
33
+    public String getSelectCaseStatus() {
34
+        return selectCaseStatus;
35
+    }
36
+
37
+    public void setSelectCaseStatus(String selectCaseStatus) {
38
+        this.selectCaseStatus = selectCaseStatus;
39
+    }
40
+
29 41
     public Integer getArbitratMethod() {
30 42
         return arbitratMethod;
31 43
     }
@@ -355,6 +367,10 @@ public class CaseApplication  extends BaseEntity {
355 367
      * 用户id
356 368
      */
357 369
     private String userId;
370
+    /**
371
+     * 登录用户用户名
372
+     */
373
+    private String loginUserName;
358 374
     private List<Long> deptIds;
359 375
     /**
360 376
      * 部门长状态
@@ -365,6 +381,14 @@ public class CaseApplication  extends BaseEntity {
365 381
      */
366 382
     private Integer financeStatus;
367 383
 
384
+    public String getLoginUserName() {
385
+        return loginUserName;
386
+    }
387
+
388
+    public void setLoginUserName(String loginUserName) {
389
+        this.loginUserName = loginUserName;
390
+    }
391
+
368 392
     public Integer getFinanceStatus() {
369 393
         return financeStatus;
370 394
     }

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

@@ -84,4 +84,24 @@ public interface CaseApplicationMapper {
84 84
      */
85 85
     int batchDeletecaseApplication(@Param("ids") List<Long> ids);
86 86
 
87
+    /**
88
+     * 绑定房间号
89
+     * @param caseId
90
+     * @param roomId
91
+     */
92
+    void bindCaseId(@Param("caseId")Long caseId,@Param("roomId") String roomId);
93
+
94
+    /**
95
+     * 根据房间号查询案件id
96
+     * @param roomId
97
+     * @return
98
+     */
99
+    Long selectCaseIdByRoomId(@Param("roomId")String roomId);
100
+
101
+    /**
102
+     * 查询已办案件
103
+     * @param caseApplication
104
+     * @return
105
+     */
106
+    List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
87 107
 }

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

@@ -0,0 +1,20 @@
1
+package com.ruoyi.wisdomarbitrate.service;
2
+
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
5
+import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
6
+
7
+import javax.servlet.http.HttpServletRequest;
8
+
9
+/**
10
+ * 视频录制
11
+ */
12
+public interface VideoService {
13
+
14
+
15
+    void videoRollBack(String body, HttpServletRequest request) ;
16
+
17
+    AjaxResult bindCaseId(Long caseId, String roomId);
18
+
19
+    AjaxResult videoList(Long caseId);
20
+}

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

@@ -74,7 +74,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
74 74
             CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
75 75
             //生成编码
76 76
             String equipmentNo = getNewEquipmentNo();
77
-            datas.put("num",equipmentNo);
77
+            datas.put("num", equipmentNo);
78 78
             //获取仲裁记录表里的相关信息
79 79
             ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
80 80
             arbitrateRecord.setCaseAppliId(id);
@@ -102,9 +102,13 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
102 102
                         datas.put("resAddress", affiliate.getResidenAffili());
103 103
                         datas.put("resSex", affiliate.getResponSex());
104 104
                         Date responBirth = affiliate.getResponBirth();
105
-                        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
106
-                        String responBirthStr = sdf.format(responBirth);
107
-                        datas.put("resDateOfBirth",responBirthStr);
105
+                        if (responBirth != null) {
106
+                            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
107
+                            String responBirthStr = sdf.format(responBirth);
108
+                            datas.put("resDateOfBirth", responBirthStr);
109
+
110
+                        }
111
+
108 112
                         datas.put("resContactAddress", affiliate.getContactAddress());
109 113
                         nameAgentList.add(affiliate.getNameAgent());
110 114
                     }
@@ -117,15 +121,15 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
117 121
             datas.put("submissionDate", createTimeStr);
118 122
             Date registerDate = caseApplication1.getRegisterDate();
119 123
             String registerDateStr = sdf.format(registerDate);
120
-            datas.put("acceptDate",registerDateStr);
124
+            datas.put("acceptDate", registerDateStr);
121 125
             //反请求
122 126
             Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
123 127
             String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
124 128
                     "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
125 129
                     "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
126
-            if (adjudicaCounter == null){
130
+            if (adjudicaCounter == null) {
127 131
                 datas.put("counterclaim", null);
128
-            }else if (adjudicaCounter == 1){
132
+            } else if (adjudicaCounter == 1) {
129 133
                 datas.put("counterclaim", counterclaim);
130 134
             } else {
131 135
                 datas.put("counterclaim", null);
@@ -133,10 +137,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
133 137
             //财产保全
134 138
             Integer properPreser = caseApplication1.getProperPreser();
135 139
             String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
136
-                    "第二十八条之规定,将该申请提交至XXX市XXX区法院。";
140
+                    "第二十八条之规定,将该申请提交至法院。";
137 141
             if (properPreser == null) {
138 142
                 datas.put("preservation", null);
139
-            } else if(properPreser == 1) {
143
+            } else if (properPreser == 1) {
140 144
                 datas.put("preservation", preservation);
141 145
             } else {
142 146
                 datas.put("preservation", null);
@@ -145,10 +149,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
145 149
             Integer objectiJuris = caseApplication1.getObjectiJuris();
146 150
             String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
147 151
                     ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
148
-            if (objectiJuris == null){
152
+            if (objectiJuris == null) {
149 153
                 datas.put("jurisdictionalObjection", null);
150
-            }
151
-            else if (objectiJuris == 1) {
154
+            } else if (objectiJuris == 1) {
152 155
                 datas.put("jurisdictionalObjection", jurisdictionalObjection);
153 156
             } else {
154 157
                 datas.put("jurisdictionalObjection", null);
@@ -157,24 +160,26 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
157 160
             datas.put("arbitratorName", arbitratorName);
158 161
             Integer arbitratMethod = caseApplication1.getArbitratMethod();
159 162
             Date hearDate = caseApplication1.getHearDate();
160
-            String hearDateStr = sdf.format(hearDate);
161
-            //线上开庭时
162
-            if (arbitratMethod == 1) {
163
-                String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
164
-                String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
165
-                datas.put("onLine1", onLine1);
166
-                datas.put("hearDate", hearDateStr);
167
-                datas.put("onLine2", onLine2);
168
-            } else {
169
-                //书面仲裁时
170
-                String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
171
-                String written2 = "在仲裁委所在地开庭审理了本案。";
172
-                datas.put("written1", written1);
173
-                datas.put("hearDate1", hearDateStr);
174
-                datas.put("written2", written2);
163
+            if (hearDate!=null){
164
+                String hearDateStr = sdf.format(hearDate);
165
+                //线上开庭时
166
+                if (arbitratMethod == 1) {
167
+                    String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
168
+                    String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
169
+                    datas.put("onLine1", onLine1);
170
+                    datas.put("hearDate", hearDateStr);
171
+                    datas.put("onLine2", onLine2);
172
+                } else {
173
+                    //书面仲裁时
174
+                    String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
175
+                    String written2 = "在仲裁委所在地开庭审理了本案。";
176
+                    datas.put("written1", written1);
177
+                    datas.put("hearDate1", hearDateStr);
178
+                    datas.put("written2", written2);
179
+                }
175 180
             }
176 181
             Integer isAbsence = caseApplication1.getIsAbsence();
177
-            if (isAbsence==null){
182
+            if (isAbsence == null) {
178 183
                 datas.put("absent1", null);
179 184
                 datas.put("absent2", null);
180 185
                 datas.put("absent3", null);
@@ -190,8 +195,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
190 195
                 datas.put("appAgentName1", null);
191 196
                 datas.put("appAgentName2", null);
192 197
                 datas.put("resAgentName", null);
193
-            }
194
-           else if (isAbsence == 1) {
198
+            } else if (isAbsence == 1) {
195 199
                 //缺席审理
196 200
                 String absent1 = "申请人的特别授权委托代理人";
197 201
                 String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
@@ -298,7 +302,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
298 302
             }
299 303
             return AjaxResult.success("裁决书已生成");
300 304
         } catch (IOException e) {
301
-            return AjaxResult.error(e+"请检查文件路径是否有误");
305
+            return AjaxResult.error(e + "请检查文件路径是否有误");
302 306
         }
303 307
     }
304 308
 
@@ -444,9 +448,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
444 448
     }
445 449
 
446 450
     @Override
447
-    public AjaxResult caseFile( List<Long> ids) {
451
+    public AjaxResult caseFile(List<Long> ids) {
448 452
         try {
449
-            for (Long id :ids) {
453
+            for (Long id : ids) {
450 454
                 CaseApplication caseApplication = new CaseApplication();
451 455
                 caseApplication.setId(id);
452 456
                 //更改案件状态(暂时)
@@ -604,7 +608,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
604 608
             CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
605 609
             //生成编码
606 610
             String equipmentNo = getNewEquipmentNo();
607
-            datas.put("num",equipmentNo);
611
+            datas.put("num", equipmentNo);
608 612
             //获取仲裁记录相关信息
609 613
             ArbitrateRecord arbitrateRecord1 = caseApplication.getArbitrateRecord();
610 614
 
@@ -631,10 +635,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
631 635
                         datas.put("resAddress", affiliate.getResidenAffili());
632 636
                         datas.put("resSex", affiliate.getResponSex());
633 637
                         Date responBirth = affiliate.getResponBirth();
634
-                        if(responBirth!=null){
638
+                        if (responBirth != null) {
635 639
                             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
636 640
                             String responBirthStr = sdf.format(responBirth);
637
-                            datas.put("resDateOfBirth",responBirthStr);
641
+                            datas.put("resDateOfBirth", responBirthStr);
638 642
                         }
639 643
                         datas.put("resContactAddress", affiliate.getContactAddress());
640 644
                         nameAgentList.add(affiliate.getNameAgent());
@@ -648,15 +652,15 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
648 652
             datas.put("submissionDate", createTimeStr);
649 653
             Date registerDate = caseApplication1.getRegisterDate();
650 654
             String registerDateStr = sdf.format(registerDate);
651
-            datas.put("acceptDate",registerDateStr);
655
+            datas.put("acceptDate", registerDateStr);
652 656
             //反请求
653 657
             Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
654 658
             String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
655 659
                     "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
656 660
                     "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
657
-            if (adjudicaCounter == null){
661
+            if (adjudicaCounter == null) {
658 662
                 datas.put("counterclaim", null);
659
-            }else if (adjudicaCounter == 1){
663
+            } else if (adjudicaCounter == 1) {
660 664
                 datas.put("counterclaim", counterclaim);
661 665
             } else {
662 666
                 datas.put("counterclaim", null);
@@ -667,7 +671,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
667 671
                     "第二十八条之规定,将该申请提交至XXX市XXX区法院。";
668 672
             if (properPreser == null) {
669 673
                 datas.put("preservation", null);
670
-            } else if(properPreser == 1) {
674
+            } else if (properPreser == 1) {
671 675
                 datas.put("preservation", preservation);
672 676
             } else {
673 677
                 datas.put("preservation", null);
@@ -676,10 +680,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
676 680
             Integer objectiJuris = caseApplication1.getObjectiJuris();
677 681
             String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
678 682
                     ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
679
-            if (objectiJuris == null){
683
+            if (objectiJuris == null) {
680 684
                 datas.put("jurisdictionalObjection", null);
681
-            }
682
-            else if (objectiJuris == 1) {
685
+            } else if (objectiJuris == 1) {
683 686
                 datas.put("jurisdictionalObjection", jurisdictionalObjection);
684 687
             } else {
685 688
                 datas.put("jurisdictionalObjection", null);
@@ -689,7 +692,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
689 692
             Integer arbitratMethod = caseApplication1.getArbitratMethod();
690 693
             Date hearDate = caseApplication1.getHearDate();
691 694
             String hearDateStr = "";
692
-            if(hearDate!=null){
695
+            if (hearDate != null) {
693 696
                 hearDateStr = sdf.format(hearDate);
694 697
             }
695 698
             //线上开庭时
@@ -708,7 +711,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
708 711
                 datas.put("written2", written2);
709 712
             }
710 713
             Integer isAbsence = caseApplication1.getIsAbsence();
711
-            if (isAbsence==null){
714
+            if (isAbsence == null) {
712 715
                 datas.put("absent1", null);
713 716
                 datas.put("absent2", null);
714 717
                 datas.put("absent3", null);
@@ -724,8 +727,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
724 727
                 datas.put("appAgentName1", null);
725 728
                 datas.put("appAgentName2", null);
726 729
                 datas.put("resAgentName", null);
727
-            }
728
-            else if (isAbsence == 1) {
730
+            } else if (isAbsence == 1) {
729 731
                 //缺席审理
730 732
                 String absent1 = "申请人的特别授权委托代理人";
731 733
                 String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
@@ -837,8 +839,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
837 839
             String annexPath = "/uploadPath" + annexName.substring(startIndex);
838 840
             caseAttach.setAnnexPath(annexPath);
839 841
             int startIndexnew = annexName.lastIndexOf("/");
840
-            if(startIndexnew!=-1){
841
-                String annexNamenew  = annexName.substring(startIndexnew+1);
842
+            if (startIndexnew != -1) {
843
+                String annexNamenew = annexName.substring(startIndexnew + 1);
842 844
                 caseAttach.setAnnexName(annexNamenew);
843 845
             }
844 846
 

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

@@ -114,50 +114,56 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
114 114
         Long userId = user.getUserId();
115 115
         // 查询登录人身份证号
116 116
         SysUser sysUser = sysUserMapper.selectUserById(userId);
117
-        List<SysRole> roles = sysUser.getRoles();
118
-        // 没有角色不能查看案件列表
119
-        if(CollectionUtil.isEmpty(roles)){
120
-            throw new ServiceException("该用户没有角色权限");
121
-        }
122
-        startPage();
123
-        for (SysRole role : roles) {
124
-            // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
125
-            if(role.getRoleName().equals("超级管理员")
126
-            ){
127
-                return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
128
-            }
129
-            if(role.getRoleName().equals("仲裁委")
130
-                    ||role.getRoleName().equals("部门长")){
131
-                List<Integer> caseStatusList=new ArrayList<>();
132
-                caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
133
-                caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
134
-                caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
135
-                caseApplication.setDeptHeadStatus(caseStatusList);
136
-            }
137
-            if(role.getRoleName().equals("仲裁员")){
138
-                caseApplication.setUserId(String.valueOf(userId));
139
-            }
140
-            if(role.getRoleName().equals("财务")){
141
-                caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
117
+        // 已办案件
118
+        if(caseApplication.getSelectCaseStatus().equals("1")){
119
+            caseApplication.setLoginUserName(sysUser.getUserName());
120
+            return caseApplicationMapper.selectHandledCase(caseApplication);
121
+        }else { // 待办案件
122
+            List<SysRole> roles = sysUser.getRoles();
123
+            // 没有角色不能查看案件列表
124
+            if (CollectionUtil.isEmpty(roles)) {
125
+                throw new ServiceException("该用户没有角色权限");
142 126
             }
143
-            if(role.getRoleName().equals("法律顾问")){
144
-                // 查询角色有关的用户部门
145
-                List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
146
-                caseApplication.setDeptIds(deptIds);
147
-            }
148
-            if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
149
-                // 查询角色有关的用户部门
150
-                caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
151
-            }
152
-            if(role.getRoleName().equals("被申请人")){
153
-                //
154
-                caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
127
+            startPage();
128
+            for (SysRole role : roles) {
129
+                // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
130
+                if (role.getRoleName().equals("超级管理员")
131
+                ) {
132
+                    return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
133
+                }
134
+                if (role.getRoleName().equals("仲裁委")
135
+                        || role.getRoleName().equals("部门长")) {
136
+                    List<Integer> caseStatusList = new ArrayList<>();
137
+                    caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
138
+                    caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
139
+                    caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
140
+                    caseApplication.setDeptHeadStatus(caseStatusList);
141
+                }
142
+                if (role.getRoleName().equals("仲裁员")) {
143
+                    caseApplication.setUserId(String.valueOf(userId));
144
+                }
145
+                if (role.getRoleName().equals("财务")) {
146
+                    caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
147
+                }
148
+                if (role.getRoleName().equals("法律顾问")) {
149
+                    // 查询角色有关的用户部门
150
+                    List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
151
+                    caseApplication.setDeptIds(deptIds);
152
+                }
153
+                if (StrUtil.isEmpty(caseApplication.getNameId()) && role.getRoleName().equals("申请人")) {
154
+                    // 查询角色有关的用户部门
155
+                    caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
156
+                }
157
+                if (role.getRoleName().equals("被申请人")) {
158
+                    //
159
+                    caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
160
+                }
155 161
             }
156
-        }
157 162
 
158 163
 
159
-        // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
160
-        return caseApplicationMapper.selectCaseApplicationList(caseApplication);
164
+            // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
165
+            return caseApplicationMapper.selectCaseApplicationList(caseApplication);
166
+        }
161 167
 
162 168
     }
163 169
     @Override

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

@@ -192,7 +192,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
192 192
         if (caseApplication1 != null) {
193 193
             int caseStatus = caseApplication1.getCaseStatus();
194 194
             caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
195
-            caseApplication1.setOpenCourtHear(caseEvidenceDTO.getOpenCourtHear());
195
+            //默认书面审理
196
+            caseApplication1.setOpenCourtHear(0);
196 197
             caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
197 198
             caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter());
198 199
             caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris());
@@ -208,7 +209,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
208 209
             //修改案件状态
209 210
             caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
210 211
             //选择仲裁方式
211
-            if (caseEvidenceDTO.getOpenCourtHear() == 1) {   //开庭审理
212
+            if (caseEvidenceDTO.getOpenCourtHear() == null){
213
+                //没选默认书面审理
214
+                caseApplication1.setArbitratMethod(2);  //书面审理
215
+            }else if (caseEvidenceDTO.getOpenCourtHear() == 1){
212 216
                 caseApplication1.setArbitratMethod(1);
213 217
             } else {
214 218
                 caseApplication1.setArbitratMethod(2);  //书面审理

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

@@ -0,0 +1,253 @@
1
+package com.ruoyi.wisdomarbitrate.service.impl;
2
+
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.util.StrUtil;
5
+import cn.hutool.http.HttpUtil;
6
+import com.alibaba.fastjson.JSON;
7
+import com.alibaba.fastjson.JSONArray;
8
+import com.alibaba.fastjson.JSONObject;
9
+import com.ruoyi.common.config.RuoYiConfig;
10
+import com.ruoyi.common.constant.CacheConstants;
11
+import com.ruoyi.common.core.domain.AjaxResult;
12
+import com.ruoyi.common.core.domain.entity.SysUser;
13
+import com.ruoyi.common.core.domain.model.LoginUser;
14
+import com.ruoyi.common.core.redis.RedisCache;
15
+import com.ruoyi.common.utils.SecurityUtils;
16
+import com.ruoyi.common.utils.SmsUtils;
17
+import com.ruoyi.common.utils.StringUtils;
18
+import com.ruoyi.common.utils.spring.SpringUtils;
19
+import com.ruoyi.system.mapper.SysUserMapper;
20
+import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
21
+import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
22
+import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
23
+import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
24
+import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
25
+import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
26
+import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
27
+import com.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper;
28
+import com.ruoyi.wisdomarbitrate.service.VideoService;
29
+import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
30
+import com.tencentcloudapi.common.Credential;
31
+import com.tencentcloudapi.common.exception.TencentCloudSDKException;
32
+import com.tencentcloudapi.common.profile.ClientProfile;
33
+import com.tencentcloudapi.common.profile.HttpProfile;
34
+import com.tencentcloudapi.vod.v20180717.VodClient;
35
+import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosRequest;
36
+import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosResponse;
37
+import lombok.extern.slf4j.Slf4j;
38
+import org.springframework.beans.factory.annotation.Autowired;
39
+import org.springframework.stereotype.Service;
40
+import org.springframework.transaction.annotation.Transactional;
41
+import org.springframework.util.ResourceUtils;
42
+
43
+import javax.crypto.Mac;
44
+import javax.crypto.spec.SecretKeySpec;
45
+import javax.servlet.http.HttpServletRequest;
46
+import java.io.File;
47
+import java.io.IOException;
48
+import java.nio.file.Paths;
49
+import java.text.SimpleDateFormat;
50
+import java.util.*;
51
+import java.util.concurrent.ExecutorService;
52
+import java.util.concurrent.Executors;
53
+import java.util.concurrent.TimeUnit;
54
+
55
+import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
56
+import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
57
+
58
+/**
59
+ * @author wangqiong
60
+ * @description 视频录制
61
+ * @date 2023-10-26 11:45
62
+ */
63
+@Service
64
+@Slf4j
65
+public class VideoServiceImpl implements VideoService {
66
+    @Autowired
67
+    private CaseApplicationMapper caseApplicationMapper;
68
+    @Autowired
69
+    private CaseAttachMapper caseAttachMapper;
70
+
71
+    /**
72
+     *  功能:第三方回调sign校验
73
+     *     参数:
74
+     *     key:控制台配置的密钥key
75
+     *     body:腾讯云回调返回的body体
76
+     *      sign:腾讯云回调返回的签名值sign
77
+     *     返回值:
78
+     *      Status:OK 表示校验通过,FAIL 表示校验失败,具体原因参考Info
79
+     *      Info:成功/失败信息
80
+     * @param body
81
+     * @param request
82
+     * @throws Exception
83
+     */
84
+    @Override
85
+    public void videoRollBack(String body, HttpServletRequest request)  {
86
+        String key = "key";
87
+        String sdkAppId = request.getHeader("SdkAppId");
88
+        String sign = request.getHeader("Sign");
89
+     //   String resultSign = getResultSign(key,body);
90
+    //    log.info("resultSign:"+resultSign);
91
+    //    if (resultSign.equals(sign)) {
92
+            JSONObject jsonObject = (JSONObject) JSON.parse(body);
93
+            Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
94
+            String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
95
+            JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
96
+        String roomId = jsonObject1.getString("RoomId");
97
+        String taskId = jsonObject1.getString("TaskId"); // 任务ID
98
+            String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
99
+            JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
100
+            String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
101
+            JSONObject jsonObject3 = (JSONObject) JSON.parse(tencentVod);
102
+        // 录制视频上传成功
103
+            if (eventType == 311) {
104
+                // 点播平台的唯一 ID
105
+                String fileId = jsonObject3.getString("FileId");
106
+                // 点播平台的播放地址
107
+                String videoUrl = jsonObject3.getString("VideoUrl");
108
+                // 主辅流标识,main 代表主流(摄像头),aux 代表辅流(屏幕分享),mix 代表混流录制
109
+                String mediaId = jsonObject3.getString("MediaId");
110
+                // 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
111
+                try {
112
+                    downloadImage(fileId,videoUrl,roomId);
113
+
114
+                } catch (IOException e) {
115
+                    throw new RuntimeException(e);
116
+                }
117
+            }
118
+
119
+    }
120
+
121
+    @Override
122
+    public AjaxResult bindCaseId(Long caseId, String roomId) {
123
+        caseApplicationMapper .bindCaseId(caseId,roomId);
124
+        return AjaxResult.success();
125
+    }
126
+
127
+    @Override
128
+    public AjaxResult videoList(Long caseId) {
129
+        CaseApplication caseApplication = new CaseApplication();
130
+        caseApplication.setId(caseId);
131
+        caseApplication.setAnnexType(9);
132
+        List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
133
+        if(CollectionUtil.isEmpty(caseAttachList)){
134
+            return AjaxResult.success();
135
+        }
136
+        for (CaseAttach caseAttach : caseAttachList) {
137
+            String annexName = caseAttach.getAnnexName();
138
+            String prefix = "/profile";
139
+            int startIndex = annexName.indexOf(prefix);
140
+            startIndex += prefix.length();
141
+            String annexPath = "/uploadPath" + annexName.substring(startIndex);
142
+            caseAttach.setAnnexPath(annexPath);
143
+            int startIndexnew = annexName.lastIndexOf("/");
144
+            if (startIndexnew != -1) {
145
+                String annexNamenew = annexName.substring(startIndexnew + 1);
146
+                caseAttach.setAnnexName(annexNamenew);
147
+            }
148
+        }
149
+        return  AjaxResult.success(caseAttachList);
150
+    }
151
+
152
+    /**
153
+     *  查询出音视频集合,并下载,在将云点播上面的音视频删除
154
+     * @param fileIds 点播平台唯一ID集合
155
+     * @throws Exception
156
+     */
157
+    private void downloadVideo(String [] fileIds) throws Exception {
158
+        try{
159
+            //创建文件对象
160
+            Properties properties = new Properties();
161
+            //加载文件获取数据 文件带后缀
162
+            properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream
163
+                    ("application.properties"));
164
+            //根据key来获取value
165
+            String secretId = properties.getProperty("secretid");
166
+            String secretKey = properties.getProperty("secretkey");
167
+            // 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
168
+            // 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
169
+            // 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
170
+            Credential cred = new Credential(secretId, secretKey);
171
+            // 实例化一个http选项,可选的,没有特殊需求可以跳过
172
+            HttpProfile httpProfile = new HttpProfile();
173
+            httpProfile.setEndpoint("vod.tencentcloudapi.com");
174
+            // 实例化一个client选项,可选的,没有特殊需求可以跳过
175
+            ClientProfile clientProfile = new ClientProfile();
176
+            clientProfile.setHttpProfile(httpProfile);
177
+            // 实例化要请求产品的client对象,clientProfile是可选的
178
+            VodClient client = new VodClient(cred, "ap-beijing", clientProfile);
179
+            // 实例化一个请求对象,每个接口都会对应一个request对象
180
+            DescribeMediaInfosRequest req = new DescribeMediaInfosRequest();
181
+            req.setFileIds(fileIds);
182
+            String[] basicInfos = {"basicInfo"};
183
+            req.setFilters(basicInfos);
184
+            // 返回的resp是一个DescribeMediaInfosResponse的实例,与请求对象对应
185
+            DescribeMediaInfosResponse resp = client.DescribeMediaInfos(req);
186
+            // 输出json格式的字符串回包
187
+            log.info(DescribeMediaInfosResponse.toJsonString(resp));
188
+            String json = DescribeMediaInfosResponse.toJsonString(resp);
189
+            JSONObject jsonObject = (JSONObject) JSON.parse(json);
190
+            JSONArray jsonArray = jsonObject.getJSONArray("MediaInfoSet"); // 媒体文件信息列表。
191
+            for (int i = 0; i < jsonArray.size(); i++) {
192
+                JSONObject jsonObject1 = jsonArray.getJSONObject(i);
193
+                String fileId = jsonObject1.getString("FileId"); // 点播平台的唯一 ID
194
+                String basicInfo = jsonObject1.getString("BasicInfo"); // 基础信息
195
+                JSONObject jsonObject2 = (JSONObject) JSON.parse(basicInfo);
196
+                String mediaUrl = jsonObject2.getString("MediaUrl"); // 文件地址
197
+                String downPath = downloadImage(null,null,mediaUrl); // 下载音视频(返回本地下载地址)
198
+                // 将未下载的音视频列表查询出来,进行下载到服务器上面,并更新数据库数据
199
+                log.info(downPath); // 本地地址
200
+            }
201
+            log.info("下载音视频成功");
202
+        } catch (TencentCloudSDKException e) {
203
+            log.info(e.toString());
204
+        } catch (IOException e) {
205
+            e.printStackTrace();
206
+        }
207
+        log.info("腾讯云测试成功");
208
+    }
209
+
210
+    /**
211
+     * 将视频下载到本地
212
+     * @param fileUrl 视频路径
213
+     * @return
214
+     */
215
+    @Transactional
216
+    public  String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
217
+        String staticAndMksDir = null;
218
+        if (fileUrl != null) {
219
+            //下载时文件名称
220
+            String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
221
+            fileName = fileName.replace("/", "");
222
+            fileName=fileId+fileName;
223
+                String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
224
+                staticAndMksDir = Paths.get(absPath).toFile().toString();
225
+                HttpUtil.downloadFile(fileUrl, staticAndMksDir );
226
+            Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
227
+            String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
228
+            // 存入数据库
229
+            CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
230
+                    .annexName(annexName)
231
+                    .annexPath(RuoYiConfig.getVideoUploadPath())
232
+                    .annexType(9)
233
+                    .build();
234
+             caseAttachMapper.save(caseAttach);
235
+            return annexName;
236
+        }
237
+        return "";
238
+
239
+    }
240
+    /**
241
+     * @param key 回调秘钥
242
+     * @param body 入参
243
+     * @return 签名 Sign 计算公式中 key 为计算签名 Sign 用的加密密钥。
244
+     * @throws Exception
245
+     */
246
+    private static String getResultSign(String key, String body) throws Exception {
247
+        Mac hmacSha256 = Mac.getInstance("HmacSHA256");
248
+        SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256");
249
+        hmacSha256.init(secret_key);
250
+        return Base64.getEncoder().encodeToString(hmacSha256.doFinal(body.getBytes()));
251
+    }
252
+
253
+}

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

@@ -130,7 +130,6 @@ public class WeChatUserServiceImpl implements WeChatUserService {
130 130
 
131 131
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
132 132
         SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
133
-
134 133
         if(sysUser!=null){
135 134
             sysUser.setIdCard(ientityAuthentication.getIdentityNo());
136 135
             sysUser.setNickName(ientityAuthentication.getName());
@@ -147,7 +146,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
147 146
             sysUser.setUserName(ientityAuthentication.getUserName());
148 147
             sysUser.setPhonenumber(ientityAuthentication.getPhone());
149 148
             sysUser.setEmail(ientityAuthentication.getEmail());
150
-            sysUser.setCreateBy(ientityAuthentication.getPhone());
149
+            sysUser.setCreateBy(ientityAuthentication.getUserName());
151 150
             sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
152 151
             int row = sysUserMapper.insertUser(sysUser);
153 152
             if(row<1) {

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

@@ -46,7 +46,51 @@
46 46
         <result property="adjudicaCounter"   column="adjudica_counter"  />
47 47
         <result property="lockStatus"   column="lock_status"  />
48 48
     </resultMap>
49
-
49
+    <select id="selectHandledCase"  resultMap="CaseApplicationResult">
50
+        select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
51
+        CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
52
+        ELSE '无审理方式'
53
+        END arbitratMethodName,
54
+        c.case_status ,
55
+        CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
56
+        when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
57
+        when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
58
+        when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
59
+        when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
60
+        when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
61
+        when 31 then '待修改开庭时间'
62
+        ELSE '无案件状态'
63
+        END caseStatusName,
64
+        c.hear_date ,c.arbitrat_claims ,
65
+        c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
66
+        c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
67
+        c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
68
+        from case_log_record r
69
+        join case_application c on r.case_appli_id=c.id
70
+        LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
71
+        <where>
72
+            
73
+            <if test="lockStatus != null">
74
+                AND c.lock_status = #{lockStatus}
75
+            </if>
76
+            <if test="caseNum != null and caseNum != ''">
77
+                AND c.case_num = #{caseNum}
78
+            </if>
79
+            <if test="nameId != null and nameId != ''">
80
+                AND ca.application_organ_id=#{nameId}  AND ca.identity_type=1
81
+            </if>
82
+            <if test="loginUserName != null and loginUserName != ''">
83
+                AND r.create_by=#{loginUserName}  AND ca.identity_type=1
84
+            </if>
85
+            <if test="caseStatusList != null and caseStatusList.size() > 0">
86
+                and r.case_node in
87
+                <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
88
+                    #{caseStatus}
89
+                </foreach>
90
+            </if>
91
+        </where>
92
+        order by c.create_time desc,c.case_num desc
93
+    </select>
50 94
     <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
51 95
         select t1.* from(
52 96
         select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
@@ -453,6 +497,9 @@
453 497
     <update id="updateCaseLockStatus">
454 498
         update case_application set lock_status=#{lockStatus} where id = #{id}
455 499
     </update>
500
+    <update id="bindCaseId">
501
+        update case_application set room_id=#{roomId} where id = #{caseId}
502
+    </update>
456 503
 
457 504
     <delete id="deletecaseApplication" parameterType="CaseApplication">
458 505
         delete from case_application where id = #{id}
@@ -559,6 +606,10 @@
559 606
     <select id="selectArbitratorList" resultType="java.lang.String">
560 607
         select a.arbitrator_id  id from case_application a where a.id=#{id}
561 608
     </select>
609
+    <select id="selectCaseIdByRoomId" resultType="java.lang.Long">
610
+        select id
611
+        from case_application where room_id=#{roomId} limit 1
612
+    </select>
562 613
 
563 614
 
564 615