Quellcode durchsuchen

Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

wangqiong123 vor 2 Jahren
Ursprung
Commit
34524284d4

+ 8
- 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java Datei anzeigen

132
      */
132
      */
133
     @Anonymous
133
     @Anonymous
134
     @GetMapping("secretaryRoleByUserId")
134
     @GetMapping("secretaryRoleByUserId")
135
-    public AjaxResult secretaryRoleByUserId(   @RequestParam(value = "userId",required = true) Long userId) {
135
+    public AjaxResult secretaryRoleByUserId(   @RequestParam(value = "userId",required = true) Long userId,@RequestParam(value = "caseId",required = true) Long caseId) {
136
 
136
 
137
-        return  videoService.secretaryRoleByUserId(userId);
137
+        return  videoService.secretaryRoleByUserId(userId,caseId);
138
     }
138
     }
139
     /**
139
     /**
140
      * 根据html字符串转pdf并和案件关联
140
      * 根据html字符串转pdf并和案件关联
235
                 }
235
                 }
236
             }else {
236
             }else {
237
                 // 如果是调解书并且是pdf,则删除之前的在新增
237
                 // 如果是调解书并且是pdf,则删除之前的在新增
238
-//                if(isMediaBook != null && isMediaBook == 1 ){
238
+                if(annexType!=null && annexType.equals(3) ){
239
 //                    if(StrUtil.isNotEmpty(suffix)&&!suffix.equals("pdf")){
239
 //                    if(StrUtil.isNotEmpty(suffix)&&!suffix.equals("pdf")){
240
 //                        return AjaxResult.error("请上传pdf格式文件");
240
 //                        return AjaxResult.error("请上传pdf格式文件");
241
 //                    }
241
 //                    }
242
 //                    annexType=AnnexTypeEnum.MEDIATE_BOOK_PDF.getCode();
242
 //                    annexType=AnnexTypeEnum.MEDIATE_BOOK_PDF.getCode();
243
-//                    // 先删除之前的附件
244
-//                    if(caseId!=null) {
245
-//                        msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
246
-//                    }
247
-//                }
243
+                    // 先删除之前的附件
244
+                    if(caseId!=null) {
245
+                        caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
246
+                    }
247
+                }
248
                 Long annexId = saveCaseAttach(annexType, fileName, file.getOriginalFilename(), caseId);
248
                 Long annexId = saveCaseAttach(annexType, fileName, file.getOriginalFilename(), caseId);
249
 
249
 
250
                 AjaxResult ajax = AjaxResult.success();
250
                 AjaxResult ajax = AjaxResult.success();

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/VideoService.java Datei anzeigen

39
      * @param userId
39
      * @param userId
40
      * @return
40
      * @return
41
      */
41
      */
42
-    AjaxResult secretaryRoleByUserId(Long userId);
42
+    AjaxResult secretaryRoleByUserId(Long userId,Long caseId);
43
 
43
 
44
     /**
44
     /**
45
      * 根据html字符串转pdf并和案件关联
45
      * 根据html字符串转pdf并和案件关联

+ 19
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java Datei anzeigen

321
     }
321
     }
322
 
322
 
323
     @Override
323
     @Override
324
-    public AjaxResult secretaryRoleByUserId(Long userId) {
324
+    public AjaxResult secretaryRoleByUserId(Long userId,Long caseId) {
325
+        CaseApplication application = new CaseApplication();
326
+        application.setId(caseId);
327
+        // 根据案件id查询案件
328
+        CaseApplication caseApplication = caseApplicationMapper.selectCaseApplication(application);
329
+        if(caseApplication==null){
330
+            return AjaxResult.error("案件不存在");
331
+        }
325
         List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
332
         List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
326
         JSONObject jsonObject = new JSONObject();
333
         JSONObject jsonObject = new JSONObject();
327
         boolean isSecretaryRole=false;
334
         boolean isSecretaryRole=false;
328
-        if(CollectionUtil.isNotEmpty(roles)){
335
+        if(caseApplication.getArbitratorId()!=null&& Objects.equals(userId, caseApplication.getArbitratorId())){
336
+            // 是调解员
337
+            if(CollectionUtil.isNotEmpty(roles)){
338
+                for (SysRole role : roles) {
339
+                    if("仲裁员".equals(role.getRoleName())){
340
+                        isSecretaryRole=true;
341
+                        break;
342
+                    }
343
+                }
344
+            }
345
+        }else if(CollectionUtil.isNotEmpty(roles)){
329
             for (SysRole role : roles) {
346
             for (SysRole role : roles) {
330
                 if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
347
                 if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
331
                     isSecretaryRole=true;
348
                     isSecretaryRole=true;

+ 3
- 1
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseAttachMapper.xml Datei anzeigen

108
         update case_attach
108
         update case_attach
109
         <set>
109
         <set>
110
             <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
110
             <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
111
-            <if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
111
+            <if test="annexPath != null and annexPath != ''">annex_path = #{annexPath},</if>
112
+            <if test="onlyOfficeFileId != null and onlyOfficeFileId != ''">only_office_file_id = #{onlyOfficeFileId}</if>
112
         </set>
113
         </set>
113
         <where>
114
         <where>
114
             <if test="caseAppliId != null ">
115
             <if test="caseAppliId != null ">
117
             <if test="annexType != null ">
118
             <if test="annexType != null ">
118
                 AND annex_type  = #{annexType}
119
                 AND annex_type  = #{annexType}
119
             </if>
120
             </if>
121
+
120
         </where>
122
         </where>
121
     </update>
123
     </update>
122
 
124