Przeglądaj źródła

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

hejinbo 2 lat temu
rodzic
commit
20d8d2e045

+ 0
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java Wyświetl plik

392
      * @param reservedConferenceVO
392
      * @param reservedConferenceVO
393
      * @return
393
      * @return
394
      */
394
      */
395
-    @Anonymous
396
     @PostMapping("/reservedConference")
395
     @PostMapping("/reservedConference")
397
     public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception {
396
     public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception {
398
 
397
 
430
 
429
 
431
         return  success(caseApplicationService.reserveConferenceList(caseId));
430
         return  success(caseApplicationService.reserveConferenceList(caseId));
432
     }
431
     }
433
-
434
 }
432
 }

+ 16
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java Wyświetl plik

78
     @Anonymous
78
     @Anonymous
79
     @PostMapping("/openCloudRecording")
79
     @PostMapping("/openCloudRecording")
80
     private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo)  {
80
     private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo)  {
81
-        if(vo.getCaseId()==null || StrUtil.isEmpty(vo.getRoomId())){
81
+        if(vo.getCaseId()==null || vo.getRoomId()==null){
82
             return AjaxResult.error("参数错误");
82
             return AjaxResult.error("参数错误");
83
         }
83
         }
84
         return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId());
84
         return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId());
93
     public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){
93
     public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){
94
         return videoService.closeDeleteCloudRecording(taskId);
94
         return videoService.closeDeleteCloudRecording(taskId);
95
     }
95
     }
96
+    /**
97
+     * 解散房间
98
+     * @param reservedConferenceVO
99
+     * @return
100
+     */
101
+    @Anonymous
102
+    @PostMapping("/dissolveRoom")
103
+    public AjaxResult dissolveRoom(   @RequestBody ReservedConferenceVO reservedConferenceVO) {
104
+        if( reservedConferenceVO.getRoomId()==null){
105
+            return error("参数校验失败");
106
+        }
107
+
108
+        return  videoService.dissolveRoom(reservedConferenceVO.getRoomId());
109
+    }
110
+
96
 
111
 
97
 }
112
 }

+ 9
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/ReservedConference.java Wyświetl plik

17
      * id
17
      * id
18
      */
18
      */
19
     private Long id;
19
     private Long id;
20
+    /**
21
+     * 用户id
22
+     */
23
+    private Long userId;
20
     /**
24
     /**
21
      * 案件id
25
      * 案件id
22
      */
26
      */
24
     /**
28
     /**
25
      * 房间号
29
      * 房间号
26
      */
30
      */
27
-    private String roomId;
31
+    private long roomId;
28
     /**
32
     /**
29
      * 预定会议开始时间
33
      * 预定会议开始时间
30
      */
34
      */
35
      */
39
      */
36
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
40
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
37
     private Date scheduleEndTime;
41
     private Date scheduleEndTime;
38
-    /**
39
-     * 会议类型,0-创建会议,1-预约会议
40
-     */
41
-    private Integer roomType;
42
+
42
 
43
 
43
     public ReservedConference() {
44
     public ReservedConference() {
44
     }
45
     }
45
 
46
 
46
-    public ReservedConference(Long caseId, String roomId, Date scheduleStartTime, Date scheduleEndTime,Integer roomType) {
47
+    public ReservedConference(Long caseId, Long userId, long roomId, Date scheduleStartTime, Date scheduleEndTime) {
47
         this.caseId = caseId;
48
         this.caseId = caseId;
49
+        this.userId = userId;
48
         this.roomId = roomId;
50
         this.roomId = roomId;
49
         this.scheduleStartTime = scheduleStartTime;
51
         this.scheduleStartTime = scheduleStartTime;
50
         this.scheduleEndTime = scheduleEndTime;
52
         this.scheduleEndTime = scheduleEndTime;
51
-        this.roomType = roomType;
53
+
52
     }
54
     }
53
 }
55
 }

+ 4
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/ReservedConferenceVO.java Wyświetl plik

15
 @Data
15
 @Data
16
 public class ReservedConferenceVO {
16
 public class ReservedConferenceVO {
17
     /**
17
     /**
18
-     * 房主id
18
+     * 用户id
19
      */
19
      */
20
-    @NotEmpty(message = "房主id不能为空")
20
+
21
     private String ownerId;
21
     private String ownerId;
22
     /**
22
     /**
23
      * 房间号id
23
      * 房间号id
24
      */
24
      */
25
-    private String roomId;
25
+    private Long roomId;
26
     @NotNull(message = "会议开始时间不能为空")
26
     @NotNull(message = "会议开始时间不能为空")
27
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
27
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
28
     private Date scheduleStartTime;
28
     private Date scheduleStartTime;
29
-    @NotNull(message = "会议结束时间不能为空")
29
+
30
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
30
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
31
     private Date scheduleEndTime;
31
     private Date scheduleEndTime;
32
     @NotNull(message = "案件id不能为空")
32
     @NotNull(message = "案件id不能为空")

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java Wyświetl plik

109
      * 查询最大房间号
109
      * 查询最大房间号
110
      * @return
110
      * @return
111
      */
111
      */
112
-    Integer selectMaxRoomId();
112
+    Long selectMaxRoomId();
113
 
113
 
114
     /**
114
     /**
115
      * 修改案件版本号
115
      * 修改案件版本号

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java Wyświetl plik

101
      * 腾讯云销毁房间回调
101
      * 腾讯云销毁房间回调
102
      * @return
102
      * @return
103
      */
103
      */
104
-    String createRoomId(Long caseId);
104
+    long createRoomId(Long caseId);
105
 
105
 
106
     /**
106
     /**
107
      * 根据案件id查询已预约的会议
107
      * 根据案件id查询已预约的会议
111
     List<ReservedConference> reserveConferenceList(Long caseId);
111
     List<ReservedConference> reserveConferenceList(Long caseId);
112
 
112
 
113
     AjaxResult deleteRoom(  String roomId);
113
     AjaxResult deleteRoom(  String roomId);
114
+
114
 }
115
 }

+ 8
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/VideoService.java Wyświetl plik

23
      * @param roomId
23
      * @param roomId
24
      * @return
24
      * @return
25
      */
25
      */
26
-    AjaxResult openCloudRecording(long caseId,String roomId);
26
+    AjaxResult openCloudRecording(long caseId,long roomId);
27
 
27
 
28
     AjaxResult closeDeleteCloudRecording(String taskId);
28
     AjaxResult closeDeleteCloudRecording(String taskId);
29
+
30
+    /**
31
+     * 解散房间
32
+     * @param roomId
33
+     * @return
34
+     */
35
+    AjaxResult dissolveRoom( Long roomId);
29
 }
36
 }

+ 18
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java Wyświetl plik

85
 
85
 
86
         }else {
86
         }else {
87
             vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
87
             vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
88
+            // 修改日志表提交状态
89
+            caseApplicationLogMapper.updateStatus(vo);
88
         }
90
         }
89
-        // 修改日志表提交状态
90
-        caseApplicationLogMapper.updateStatus(vo);
91
+
91
         return AjaxResult.success();
92
         return AjaxResult.success();
92
     }
93
     }
93
 
94
 
117
                 caseApplicationLogMapper.updateStatus(vo);
118
                 caseApplicationLogMapper.updateStatus(vo);
118
                 // 根据caseLogId查询相关人员表
119
                 // 根据caseLogId查询相关人员表
119
                 List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
120
                 List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
120
-                caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
121
                 // 更新案件主表
121
                 // 更新案件主表
122
                 caseApplicationMapper.updataCaseApplication(caseApplicationLog);
122
                 caseApplicationMapper.updataCaseApplication(caseApplicationLog);
123
 
123
 
142
             return AjaxResult.success();
142
             return AjaxResult.success();
143
         } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
143
         } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
144
             // 如果版本号为1,则直接返回
144
             // 如果版本号为1,则直接返回
145
-            if(vo.getVersion() <= 1){
146
-                return AjaxResult.success();
147
-            }
145
+
148
             // 审核修改撤销状态
146
             // 审核修改撤销状态
149
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
147
             if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
150
                 agreeRevoke(vo);
148
                 agreeRevoke(vo);
219
         compareCaseVO.setBeforeCase(beforeCase);
217
         compareCaseVO.setBeforeCase(beforeCase);
220
         compareCaseVO.setAfterCase(afterCase);
218
         compareCaseVO.setAfterCase(afterCase);
221
         // 对比两个版本修改的字段
219
         // 对比两个版本修改的字段
222
-        String[] columns = {"caseLogId","caseSubjectAmount", "caseName"};
223
-        String[] affiliateColumns = {"identityNum", "workAddress"};
220
+        String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
221
+                "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
222
+        String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
223
+                "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
224
+        "compLegalperPost","responSex","responBirth"};
224
         StringBuilder changeColumn = new StringBuilder();
225
         StringBuilder changeColumn = new StringBuilder();
225
         for (String column : columns) {
226
         for (String column : columns) {
226
             String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
227
             String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
312
      * @param vo
313
      * @param vo
313
      */
314
      */
314
     private void agreeRevoke(UpdateSubmitVO vo) {
315
     private void agreeRevoke(UpdateSubmitVO vo) {
316
+        CaseApplication caseApplicationLog;
315
         // 查询日志记录表上个版本未被拒绝数据
317
         // 查询日志记录表上个版本未被拒绝数据
316
-        CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion()-1);
317
-        if (caseApplicationLog == null) {
318
+        if(vo.getVersion()<=1){
319
+            caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
320
+
321
+        }else {
322
+            caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
323
+        }
324
+         if (caseApplicationLog == null) {
318
             return;
325
             return;
319
         }
326
         }
320
         // 将日志表改版本的状态改为拒绝
327
         // 将日志表改版本的状态改为拒绝
322
         caseApplicationLogMapper.updateStatus(vo);
329
         caseApplicationLogMapper.updateStatus(vo);
323
         // 根据caseLogId查询相关人员表
330
         // 根据caseLogId查询相关人员表
324
         List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
331
         List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
325
-        caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
332
+
326
         // 更新案件主表
333
         // 更新案件主表
327
         caseApplicationMapper.updataCaseApplication(caseApplicationLog);
334
         caseApplicationMapper.updataCaseApplication(caseApplicationLog);
328
 
335
 

+ 26
- 98
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java Wyświetl plik

188
                     caseApplication.setDeptIds(deptIds);
188
                     caseApplication.setDeptIds(deptIds);
189
                 }
189
                 }
190
                 if ("申请人".equals(role.getRoleName())) {
190
                 if ("申请人".equals(role.getRoleName())) {
191
-                    caseApplication.setIsOtherRole(1);
191
+                //    caseApplication.setIsOtherRole(1);
192
                     // 查询有关的用户部门
192
                     // 查询有关的用户部门
193
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
193
                     caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
194
                 }
194
                 }
264
                 caseApplication.setDeptIds(deptIds);
264
                 caseApplication.setDeptIds(deptIds);
265
             }
265
             }
266
             if ("申请人".equals(role.getRoleName())) {
266
             if ("申请人".equals(role.getRoleName())) {
267
-                caseApplication.setIsOtherRole(1);
267
+              //  caseApplication.setIsOtherRole(1);
268
                 // 查询角色有关的用户部门
268
                 // 查询角色有关的用户部门
269
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
269
                 caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
270
             }
270
             }
1014
 
1014
 
1015
             caseApplicationMapper.updataCaseApplication(caseApplication);
1015
             caseApplicationMapper.updataCaseApplication(caseApplication);
1016
             // 修改记录表状态为同意提交修改的内容
1016
             // 修改记录表状态为同意提交修改的内容
1017
-            caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
1017
+            caseApplication.setUpdateSubmitStatus(0);
1018
         }else {
1018
         }else {
1019
             // 修改记录表状态为已提交修改的内容
1019
             // 修改记录表状态为已提交修改的内容
1020
             caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
1020
             caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
1235
 
1235
 
1236
     @Override
1236
     @Override
1237
     public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
1237
     public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
1238
-        CaseApplication caseApplicationselect=new CaseApplication();
1239
-        if(caseApplication.getVersion()!=null) {
1240
-             caseApplicationselect=caseApplicationLogMapper.selectByCaseIdAndVersion(caseApplication.getId(),caseApplication.getVersion());
1241
-
1242
-        }
1243
-        else {
1244
-             caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
1245
-
1246
-
1247
-        }
1248
-        caseApplicationselect.setId(caseApplication.getId());
1249
-
1238
+        CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
1239
+        CaseAffiliate caseAffiliate = new CaseAffiliate();
1240
+        caseAffiliate.setCaseAppliId(caseApplication.getId());
1250
 
1241
 
1251
         ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
1242
         ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
1252
         arbitrateRecord.setCaseAppliId(caseApplication.getId());
1243
         arbitrateRecord.setCaseAppliId(caseApplication.getId());
1275
             }
1266
             }
1276
         }
1267
         }
1277
         caseApplicationselect.setCaseAttachList(caseAttachList);
1268
         caseApplicationselect.setCaseAttachList(caseAttachList);
1278
-        List<CaseAffiliate> caseAffiliatListeselect;
1279
-        if(caseApplication.getVersion()!=null) {
1280
-            caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationselect.getCaseLogId());
1281
-
1282
-        }else {
1283
-            CaseAffiliate caseAffiliate = new CaseAffiliate();
1284
-            caseAffiliate.setCaseAppliId(caseApplication.getId());
1285
-            caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1286
-        }
1287
 
1269
 
1270
+        List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
1288
         if (caseAffiliatListeselect != null) {
1271
         if (caseAffiliatListeselect != null) {
1289
             // 查询组织机构
1272
             // 查询组织机构
1290
             List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1273
             List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
1307
                     ;
1290
                     ;
1308
                 } else if (identityType == 2) {
1291
                 } else if (identityType == 2) {
1309
                     respondentName.append(caseAffiliateselect.getName()).append(",");
1292
                     respondentName.append(caseAffiliateselect.getName()).append(",");
1293
+                    ;
1310
                 }
1294
                 }
1311
             }
1295
             }
1312
             caseApplicationselect.setApplicantName(applicantName.toString());
1296
             caseApplicationselect.setApplicantName(applicantName.toString());
2708
      */
2692
      */
2709
     @Transactional
2693
     @Transactional
2710
     @Override
2694
     @Override
2711
-    public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) throws Exception {
2712
-        // 创建房间必须拿administrator生成usersig,否则调用腾讯云接口报7004,生成administrator的userSig
2713
-        String administrator = "administrator";
2714
-        String userSign = generateUserSign(administrator);
2715
-        if (StrUtil.isEmpty(userSign)) {
2716
-            return AjaxResult.error("生成userSign失败");
2717
-        }
2718
-        // 生成房间号id
2719
-        String roomId = generateRoomId();
2720
-//        String roomId = reservedConferenceVO.getRoomId();
2721
-        Date startTime = reservedConferenceVO.getScheduleStartTime();
2722
-        Date endTime = reservedConferenceVO.getScheduleEndTime();
2723
-        Random rand = new Random();
2724
-        int random = rand.nextInt(214748365);
2725
-        String url = "https://roomkit.trtc.tencent-cloud.com/room_api/v1/roomctl/create?usersig=" + userSign + "&identifier=" + administrator + "&sdkappid=" + sdkAppId + "&random=" + random + "&contenttype=json";
2726
-        HttpPost post = new HttpPost(url);
2727
-        String result = "";
2728
-        //添加参数
2729
-        JSONObject bodyParams = new JSONObject();
2730
-        JSONObject roomParams = new JSONObject();
2731
-        bodyParams.put("ownerId", reservedConferenceVO.getOwnerId());
2732
-        bodyParams.put("roomId", roomId);
2733
-        bodyParams.put("scheduleStartTime", startTime);
2734
-        bodyParams.put("scheduleEndTime", endTime);
2735
-
2736
-        bodyParams.put("scheduleStartTime", startTime.getTime() / 1000);
2737
-        bodyParams.put("scheduleEndTime", endTime.getTime() / 1000);
2738
-        roomParams.put("roomType", 1);
2739
-        bodyParams.put("roomInfo", roomParams);
2740
-        StringEntity postingString = new StringEntity(bodyParams.toString());
2741
-        post.setEntity(postingString);
2742
-        CloseableHttpClient client = HttpClients.createDefault();
2743
-        //启动执行请求,并获得返回值
2744
-        CloseableHttpResponse response = client.execute(post);
2745
-        //得到返回的entity对象
2746
-        HttpEntity entity = response.getEntity();
2747
-        //把实体对象转换为string
2748
-        result = EntityUtils.toString(entity, "UTF-8");
2749
-        if (StrUtil.isNotEmpty(result)) {
2750
-            JSONObject resJson = JSONObject.parseObject(result);
2751
-            switch ((int) resJson.get("errorCode")) {
2752
-                case 0:
2753
-                    // todo  不需要绑定,以后删        绑定房间号和案件id
2754
-                    caseApplicationMapper.bindCaseId(reservedConferenceVO.getCaseId(), roomId);
2755
-
2756
-                    // 新增预约会议表
2757
-                    ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId,
2758
-                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
2759
-                    reservedConferenceMapper.insert(conference);
2760
-                    return success("预约会议成功");
2761
-
2762
-                case 42002:
2763
-                    return AjaxResult.error("预定会议无效");
2764
-                case 42003:
2765
-                    return AjaxResult.error("预定会议必须是会议场景");
2766
-                case 84005:
2767
-                    return AjaxResult.error("房间号已被占用");
2768
-                default:
2769
-                    return AjaxResult.error(resJson.getString("errorMessage"));
2770
-            }
2695
+    public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO)  {
2771
 
2696
 
2772
-        } else {
2773
-            return AjaxResult.error("预约会议失败");
2774
-        }
2697
+        // 新增预约会议表
2698
+        ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(),SecurityUtils.getUserId(), reservedConferenceVO.getRoomId(),
2699
+                            reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime());
2700
+
2701
+    reservedConferenceMapper.insert(conference);
2702
+    return success("预约会议成功");
2775
     }
2703
     }
2776
 
2704
 
2777
 
2705
 
2780
      */
2708
      */
2781
     @Transactional
2709
     @Transactional
2782
     @Override
2710
     @Override
2783
-    public String createRoomId(Long caseId) {
2784
-        String roomId = generateRoomId();
2711
+    public long createRoomId(Long caseId) {
2712
+        long roomId = generateRoomId();
2785
         // 新增预约会议表
2713
         // 新增预约会议表
2786
-        ReservedConference conference = new ReservedConference(caseId, roomId,
2787
-                null, null,0);
2788
-        reservedConferenceMapper.insert(conference);
2714
+//        ReservedConference conference = new ReservedConference(caseId, roomId,
2715
+//                null, null,0);
2716
+//        reservedConferenceMapper.insert(conference);
2789
         // 绑定案件与房间号
2717
         // 绑定案件与房间号
2790
-        caseApplicationMapper.bindCaseId(caseId, roomId);
2718
+        caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
2791
         return roomId;
2719
         return roomId;
2792
     }
2720
     }
2793
 
2721
 
2796
      *
2724
      *
2797
      * @return
2725
      * @return
2798
      */
2726
      */
2799
-    public String generateRoomId() {
2727
+    public Long generateRoomId() {
2800
         // 查询最大房间号
2728
         // 查询最大房间号
2801
-        Integer maxRoomId = caseApplicationMapper.selectMaxRoomId();
2729
+        Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
2802
 
2730
 
2803
-        if (null == maxRoomId || maxRoomId >999999) {
2804
-            return "000001";
2731
+        if (null == maxRoomId || maxRoomId >4294967294L) {
2732
+            return 1L;
2805
         } else {
2733
         } else {
2806
-            return String.format("%06d", maxRoomId);
2734
+            return maxRoomId+1;
2807
         }
2735
         }
2808
 
2736
 
2809
     }
2737
     }

+ 25
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java Wyświetl plik

171
      * @return
171
      * @return
172
      */
172
      */
173
     @Override
173
     @Override
174
-    public AjaxResult openCloudRecording(long caseId,String roomId) {
174
+    public AjaxResult openCloudRecording(long caseId,long roomId) {
175
         try {
175
         try {
176
             String userId="recorder_"+roomId;
176
             String userId="recorder_"+roomId;
177
 
177
 
189
             // 实例化一个请求对象,每个接口都会对应一个request对象
189
             // 实例化一个请求对象,每个接口都会对应一个request对象
190
             CreateCloudRecordingRequest req = new CreateCloudRecordingRequest();
190
             CreateCloudRecordingRequest req = new CreateCloudRecordingRequest();
191
             req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同
191
             req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同
192
-            req.setRoomId(roomId); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId
192
+            req.setRoomId(String.valueOf(roomId)); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId
193
             req.setRoomIdType(1L);
193
             req.setRoomIdType(1L);
194
             /**
194
             /**
195
              *  录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),
195
              *  录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),
266
 
266
 
267
     }
267
     }
268
 
268
 
269
+    @Override
270
+    public AjaxResult dissolveRoom( Long roomId) {
271
+        Credential cred = new Credential(secretId, secretKey);
272
+        // 实例化一个http选项,可选的,没有特殊需求可以跳过
273
+        HttpProfile httpProfile = new HttpProfile();
274
+        httpProfile.setEndpoint("trtc.tencentcloudapi.com");
275
+        // 实例化一个client选项,可选的,没有特殊需求可以跳过
276
+        ClientProfile clientProfile = new ClientProfile();
277
+        clientProfile.setHttpProfile(httpProfile);
278
+        // 实例化要请求产品的client对象,clientProfile是可选的
279
+        TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
280
+        DismissRoomRequest req = new DismissRoomRequest();
281
+        req.setSdkAppId(sdkAppId);
282
+        req.setRoomId(roomId);
283
+        try {
284
+            DismissRoomResponse resp = client.DismissRoom(req);
285
+            return AjaxResult.success((JSONObject) JSON.toJSON(resp));
286
+        } catch (TencentCloudSDKException e) {
287
+            return AjaxResult.error("解散房间失败");
288
+        }
289
+
290
+    }
291
+
269
 
292
 
270
     /**
293
     /**
271
      *  查询出音视频集合,并下载,在将云点播上面的音视频删除
294
      *  查询出音视频集合,并下载,在将云点播上面的音视频删除

+ 1
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationLogMapper.xml Wyświetl plik

128
 
128
 
129
 
129
 
130
     <select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
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,
131
+        SELECT case_appli_id id,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,
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
133
                create_by,version,update_submit_status,create_time
134
         FROM case_application_log
134
         FROM case_application_log

+ 94
- 100
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseApplicationMapper.xml Wyświetl plik

126
                         instr (t.arbitrator_id,#{userId})>0)
126
                         instr (t.arbitrator_id,#{userId})>0)
127
                     </if>
127
                     </if>
128
                     <!--申请人-->
128
                     <!--申请人-->
129
-                    <if test="applicationOrganId != null and applicationOrganId != ''">
130
-                        or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
131
-                        <!--暂时改为可以查询到生成裁决书之前所有的案件状态-->
132
-                        and (t.case_status &lt;= 10 or t.case_status=31))
129
+<!--                    <if test="applicationOrganId != null and applicationOrganId != ''">-->
130
+<!--                        or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
131
+<!--                        &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
132
+<!--                        and (t.case_status &lt;= 10 or t.case_status=31))-->
133
 
133
 
134
-                    </if>
134
+<!--                    </if>-->
135
                     <!--部门长-->
135
                     <!--部门长-->
136
                     <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
136
                     <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
137
                         or (t.identity_type=1 and t.case_status in
137
                         or (t.identity_type=1 and t.case_status in
158
                 </where>
158
                 </where>
159
                 union
159
                 union
160
             </if>
160
             </if>
161
-<!--            <if test="applicationOrganId != null and applicationOrganId != ''">-->
161
+            <if test="applicationOrganId != null and applicationOrganId != ''">
162
 
162
 
163
 
163
 
164
-<!--                &lt;!&ndash;申请人案件&ndash;&gt;-->
165
-<!--                select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,-->
166
-<!--                CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'-->
167
-<!--                ELSE '无审理方式'-->
168
-<!--                END arbitratMethodName,-->
169
-<!--                c.case_status ,-->
170
-<!--                CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'-->
171
-<!--                when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'-->
172
-<!--                when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'-->
173
-<!--                when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'-->
174
-<!--                when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'-->
175
-<!--                when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'-->
176
-<!--                when 31 then '待修改开庭时间'-->
177
-<!--                ELSE '无案件状态'-->
178
-<!--                END caseStatusName,-->
179
-<!--                c.hear_date ,l.arbitrat_claims ,-->
180
-<!--                l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag-->
181
-<!--                ,l.fee_payable ,-->
182
-<!--                c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,-->
183
-<!--                c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name-->
184
-<!--                as-->
185
-<!--                applicantName,-->
186
-<!--                c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus-->
187
-<!--                from case_application c-->
188
-<!--                JOIN case_application_log l ON c.id = l.case_appli_id-->
189
-<!--                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1-->
190
-
191
-<!--                <where>-->
192
-<!--                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1-->
193
-<!--                    and l.version=(SELECT-->
194
-<!--                    max( version ) version-->
195
-<!--                    FROM-->
196
-<!--                    case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
197
-<!--                    <if test="applicationOrganId != null and applicationOrganId != ''">-->
198
-<!--                        AND ca.application_organ_id = #{applicationOrganId}-->
199
-<!--                    </if>-->
200
-<!--                    <if test="caseStatus != null">-->
201
-<!--                        AND c.case_status = #{caseStatus}-->
202
-<!--                    </if>-->
203
-<!--                    <if test="caseNum != null and caseNum != ''">-->
204
-<!--                        AND c.case_num = #{caseNum}-->
205
-<!--                    </if>-->
206
-<!--                    <if test="nameId != null and nameId != ''">-->
207
-<!--                        AND ca.application_organ_id=#{nameId}-->
208
-<!--                    </if>-->
164
+                <!--申请人案件-->
165
+                select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,
166
+                CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
167
+                ELSE '无审理方式'
168
+                END arbitratMethodName,
169
+                c.case_status ,
170
+                CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
171
+                when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
172
+                when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
173
+                when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
174
+                when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
175
+                when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
176
+                when 31 then '待修改开庭时间'
177
+                ELSE '无案件状态'
178
+                END caseStatusName,
179
+                c.hear_date ,l.arbitrat_claims ,
180
+                l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag
181
+                ,l.fee_payable ,
182
+                c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,
183
+                c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
184
+                as
185
+                applicantName,
186
+                c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1) as updateSubmitStatus
187
+                from case_application c
188
+                JOIN case_application_log l ON c.id = l.case_appli_id and c.version=l.version
189
+                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1
209
 
190
 
210
-<!--                    <if test="lockStatus != null">-->
211
-<!--                        AND c.lock_status = #{lockStatus}-->
212
-<!--                    </if>-->
213
-<!--                </where>-->
214
-<!--                union-->
215
-<!--            </if>-->
191
+                <where>
192
+                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
193
+
194
+                    <if test="applicationOrganId != null and applicationOrganId != ''">
195
+                        AND ca.application_organ_id = #{applicationOrganId}
196
+                    </if>
197
+                    <if test="caseStatus != null">
198
+                        AND c.case_status = #{caseStatus}
199
+                    </if>
200
+                    <if test="caseNum != null and caseNum != ''">
201
+                        AND c.case_num = #{caseNum}
202
+                    </if>
203
+                    <if test="nameId != null and nameId != ''">
204
+                        AND ca.application_organ_id=#{nameId}
205
+                    </if>
206
+
207
+                    <if test="lockStatus != null">
208
+                        AND c.lock_status = #{lockStatus}
209
+                    </if>
210
+                </where>
211
+                union
212
+            </if>
216
             <!--秘书案件-->
213
             <!--秘书案件-->
217
             <if test="deptIds != null and deptIds.size() > 0">
214
             <if test="deptIds != null and deptIds.size() > 0">
218
 
215
 
447
                 FROM
444
                 FROM
448
                 case_application_log
445
                 case_application_log
449
                 WHERE
446
                 WHERE
450
-                update_submit_status IN ( 1, 2 ) and c.id = case_appli_id)
447
+                c.id = case_appli_id)
451
             </if>
448
             </if>
452
         </trim>
449
         </trim>
453
         ) t1
450
         ) t1
679
 <!--                </foreach> )-->
676
 <!--                </foreach> )-->
680
 <!--            </if>-->
677
 <!--            </if>-->
681
             <!--申请人-->
678
             <!--申请人-->
682
-            <if test="applicationOrganId != null and applicationOrganId != ''">
683
-                or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
684
-                <!--暂时改为可以查询到生成裁决书之前所有的案件状态-->
685
-                and (t.case_status &lt;= 10 or t.case_status=31))
686
-            <!-- and t.case_status in (0,2,17))-->
679
+<!--            <if test="applicationOrganId != null and applicationOrganId != ''">-->
680
+<!--                or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
681
+<!--                &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
682
+<!--                and (t.case_status &lt;= 10 or t.case_status=31))-->
683
+<!--            &lt;!&ndash; and t.case_status in (0,2,17))&ndash;&gt;-->
687
 
684
 
688
-         </if>
685
+<!--         </if>-->
689
          <!--部门长-->
686
          <!--部门长-->
690
             <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
687
             <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
691
                 or (t.identity_type=1 and t.case_status in
688
                 or (t.identity_type=1 and t.case_status in
711
         </where>
708
         </where>
712
             union
709
             union
713
         </if>
710
         </if>
714
-<!--            <if test="applicationOrganId != null and applicationOrganId != ''">-->
715
-<!--                &lt;!&ndash;申请人案件&ndash;&gt;-->
716
-
717
-<!--                select l.case_appli_id id ,-->
718
-<!--                c.case_status,ca.application_organ_id,-->
719
-<!--                c.arbitrator_id,ca.identity_num , ca.identity_type-->
720
-<!--                from case_application c-->
721
-<!--                JOIN case_application_log l ON c.id = l.case_appli_id-->
722
-<!--                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1-->
723
-<!--                <where>-->
724
-<!--                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1-->
725
-<!--                    and l.version=(SELECT-->
726
-<!--                    max( version ) version-->
727
-<!--                    FROM-->
728
-<!--                    case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
729
-<!--                    <if test="applicationOrganId != null and applicationOrganId != ''">-->
730
-<!--                        AND ca.application_organ_id = #{applicationOrganId}-->
731
-<!--                    </if>-->
732
-<!--                    <if test="caseStatus != null">-->
733
-<!--                        AND c.case_status = #{caseStatus}-->
734
-<!--                    </if>-->
735
-<!--                    <if test="caseNum != null and caseNum != ''">-->
736
-<!--                        AND c.case_num = #{caseNum}-->
737
-<!--                    </if>-->
738
-<!--                    <if test="nameId != null and nameId != ''">-->
739
-<!--                        AND ca.application_organ_id=#{nameId}-->
740
-<!--                    </if>-->
711
+            <if test="applicationOrganId != null and applicationOrganId != ''">
712
+                <!--申请人案件-->
741
 
713
 
742
-<!--                    <if test="lockStatus != null">-->
743
-<!--                        AND c.lock_status = #{lockStatus}-->
744
-<!--                    </if>-->
745
-<!--                </where>-->
746
-<!--                union-->
747
-<!--            </if>-->
714
+                select l.case_appli_id id ,
715
+                c.case_status,ca.application_organ_id,
716
+                c.arbitrator_id,ca.identity_num , ca.identity_type
717
+                from case_application c
718
+                JOIN case_application_log l ON c.id = l.case_appli_id
719
+                JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version
720
+                <where>
721
+                    (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
722
+
723
+                    <if test="applicationOrganId != null and applicationOrganId != ''">
724
+                        AND ca.application_organ_id = #{applicationOrganId}
725
+                    </if>
726
+                    <if test="caseStatus != null">
727
+                        AND c.case_status = #{caseStatus}
728
+                    </if>
729
+                    <if test="caseNum != null and caseNum != ''">
730
+                        AND c.case_num = #{caseNum}
731
+                    </if>
732
+                    <if test="nameId != null and nameId != ''">
733
+                        AND ca.application_organ_id=#{nameId}
734
+                    </if>
735
+
736
+                    <if test="lockStatus != null">
737
+                        AND c.lock_status = #{lockStatus}
738
+                    </if>
739
+                </where>
740
+                union
741
+            </if>
748
             <!--秘书案件-->
742
             <!--秘书案件-->
749
             <if test="deptIds != null and deptIds.size() > 0">
743
             <if test="deptIds != null and deptIds.size() > 0">
750
 
744
 
794
                 JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
788
                 JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
795
                 AND ca.identity_type = 1
789
                 AND ca.identity_type = 1
796
                 WHERE
790
                 WHERE
797
-                l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
791
+                l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
798
                 <if test="deptIds != null and deptIds.size() > 0">
792
                 <if test="deptIds != null and deptIds.size() > 0">
799
                     and ca.application_organ_id in
793
                     and ca.application_organ_id in
800
                     <foreach item="item" collection="deptIds" open="(" separator="," close=")">
794
                     <foreach item="item" collection="deptIds" open="(" separator="," close=")">
819
                 FROM
813
                 FROM
820
                 case_application_log
814
                 case_application_log
821
                 WHERE
815
                 WHERE
822
-                update_submit_status IN ( 1, 4 ) and c.id = case_appli_id)
816
+                 c.id = case_appli_id)
823
 
817
 
824
             </if>
818
             </if>
825
         </trim>
819
         </trim>
1594
         from case_application where room_id like concat('%', #{roomId}, '%')  limit 1
1588
         from case_application where room_id like concat('%', #{roomId}, '%')  limit 1
1595
     </select>
1589
     </select>
1596
 
1590
 
1597
-    <select id="selectMaxRoomId" resultType="java.lang.Integer">
1591
+    <select id="selectMaxRoomId" resultType="java.lang.Long">
1598
         select max(room_id+1) as maxRoomId
1592
         select max(room_id+1) as maxRoomId
1599
         from reserved_conference ;
1593
         from reserved_conference ;
1600
     </select>
1594
     </select>

+ 4
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ReservedConferenceMapper.xml Wyświetl plik

10
         room_id,
10
         room_id,
11
         schedule_start_time,
11
         schedule_start_time,
12
         schedule_end_time,
12
         schedule_end_time,
13
-        room_type
13
+        user_id
14
         )values(
14
         )values(
15
                 #{caseId},
15
                 #{caseId},
16
                 #{roomId},
16
                 #{roomId},
17
                 #{scheduleStartTime},
17
                 #{scheduleStartTime},
18
                 #{scheduleEndTime},
18
                 #{scheduleEndTime},
19
-                #{roomType}
19
+                #{userId}
20
         )
20
         )
21
     </insert>
21
     </insert>
22
     <delete id="deleteByRoomId">
22
     <delete id="deleteByRoomId">
29
         </foreach>
29
         </foreach>
30
     </delete>
30
     </delete>
31
     <select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
31
     <select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
32
-        select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime
33
-        from reserved_conference where case_id=#{caseId} and room_type=1
32
+        select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime,user_id userId
33
+        from reserved_conference where case_id=#{caseId}
34
     </select>
34
     </select>
35
 
35
 
36
 
36