Procházet zdrojové kódy

Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

wangqiong123 před 2 roky
rodič
revize
0fb56c95db
14 změnil soubory, kde provedl 153 přidání a 34 odebrání
  1. 3
    0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  2. 24
    5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/miniprogress/IdentityAuthenticationController.java
  3. 10
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java
  4. 3
    0
      ruoyi-admin/src/main/resources/application.yml
  5. 5
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseAttach.java
  6. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java
  7. 3
    7
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/dept/impl/DeptIdentifyServiceImpl.java
  8. 8
    2
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/IdentityAuthenticationService.java
  9. 36
    4
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java
  10. 42
    11
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java
  11. 3
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java
  12. 3
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java
  13. 4
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java
  14. 5
    4
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAttachMapper.xml

+ 3
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java Zobrazit soubor

@@ -23,6 +23,8 @@ import javax.servlet.http.HttpServletResponse;
23 23
 import java.util.ArrayList;
24 24
 import java.util.List;
25 25
 
26
+import static com.google.common.io.Files.getFileExtension;
27
+
26 28
 /**
27 29
  * 通用请求处理
28 30
  * 
@@ -116,6 +118,7 @@ public class CommonController
116 118
                 .annexType(annexType)
117 119
                 .useId(SecurityUtils.getUserId())
118 120
                 .useAccount(SecurityUtils.getUsername())
121
+                .suffix(getFileExtension(path))
119 122
                 .build();
120 123
         msCaseAttachMapper.save(caseAttach);
121 124
         return caseAttach.getAnnexId();

+ 24
- 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/miniprogress/IdentityAuthenticationController.java Zobrazit soubor

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
2 2
 
3
+import cn.hutool.core.util.StrUtil;
3 4
 import com.alibaba.fastjson.JSONObject;
4 5
 import com.ruoyi.common.annotation.Anonymous;
5 6
 import com.ruoyi.common.core.controller.BaseController;
@@ -8,10 +9,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
8 9
 import com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
9 10
 import org.springframework.beans.factory.annotation.Autowired;
10 11
 import org.springframework.validation.annotation.Validated;
11
-import org.springframework.web.bind.annotation.PostMapping;
12
-import org.springframework.web.bind.annotation.RequestBody;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-import org.springframework.web.bind.annotation.RestController;
12
+import org.springframework.web.bind.annotation.*;
15 13
 
16 14
 @RestController
17 15
 @RequestMapping("/identityAuthentication")
@@ -25,7 +23,25 @@ public class IdentityAuthenticationController extends BaseController {
25 23
     @Anonymous
26 24
     @PostMapping("/selectIdentityAuthenticaEIDtoken")
27 25
     public AjaxResult selectIdentityAuthenticaEIDtoken() {
28
-        JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
26
+        JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken(false);
27
+        return success(tokenResult);
28
+    }
29
+    /**
30
+     * 获取PC端EIDtoken
31
+     */
32
+    @Anonymous
33
+    @PostMapping("/selectPCIdentityAuthenticaEIDtoken")
34
+    public AjaxResult selectPCIdentityAuthenticaEIDtoken() {
35
+        JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken(true);
36
+        return success(tokenResult);
37
+    }
38
+    /**
39
+     * H5轮询获取E证通Token状态
40
+     */
41
+    @Anonymous
42
+    @GetMapping("/selectPCEIDtokenStatus")
43
+    public AjaxResult selectPCEIDtokenStatus(@RequestParam String eidToken) {
44
+        JSONObject tokenResult = identityAuthenticationService.selectPCEIDtokenStatus(eidToken);
29 45
         return success(tokenResult);
30 46
     }
31 47
 
@@ -35,6 +51,9 @@ public class IdentityAuthenticationController extends BaseController {
35 51
     @Anonymous
36 52
     @PostMapping("/selectIdentityAuthenticaRespon")
37 53
     public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
54
+        if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
55
+            return error("EIDtoken不能为空");
56
+        }
38 57
         AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
39 58
         return checkResult;
40 59
     }

+ 10
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java Zobrazit soubor

@@ -27,6 +27,8 @@ import javax.servlet.http.HttpServletRequest;
27 27
 import javax.validation.Valid;
28 28
 import java.util.Objects;
29 29
 
30
+import static com.google.common.io.Files.getFileExtension;
31
+
30 32
 /**
31 33
  * 视频会议控制层
32 34
  * @Author wangqiong
@@ -69,6 +71,11 @@ public class MsVideoConferenceController extends BaseController {
69 71
             String filePath = RuoYiConfig.getUploadPath();
70 72
             // 上传并返回新文件名称
71 73
             String fileName = FileUploadUtils.upload(filePath, file);
74
+            String suffix = getFileExtension(fileName);
75
+            if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
76
+                // 上传到onlyoffice
77
+                officeFlag=1;
78
+            }
72 79
             String url = serverConfig.getUrl() + fileName;
73 80
             if(officeFlag != null && officeFlag == 1){
74 81
                 // officeFlag,fileName为annexPath
@@ -83,7 +90,7 @@ public class MsVideoConferenceController extends BaseController {
83 90
                         JSONObject jsonObject = (JSONObject) obj;
84 91
                          caseAttach = MsCaseAttach.builder()
85 92
                                 .caseAppliId(caseId)
86
-                                .annexName(jsonObject.getString("fileName"))
93
+                                .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
87 94
                                 .annexType(annexType)
88 95
                                 .onlyOfficeFileId(jsonObject.getString("fileId"))
89 96
                                 .build();
@@ -93,6 +100,7 @@ public class MsVideoConferenceController extends BaseController {
93 100
                                  caseAttach.setAnnexPath(replace);
94 101
 
95 102
                          }
103
+                         caseAttach.setSuffix( (getFileExtension(caseAttach.getAnnexPath())));
96 104
                         msCaseAttachMapper.save(caseAttach);
97 105
                     }
98 106
                     if(caseAttach==null){
@@ -136,6 +144,7 @@ public class MsVideoConferenceController extends BaseController {
136 144
                 .annexType(annexType)
137 145
                 .useId(SecurityUtils.getUserId())
138 146
                 .useAccount(SecurityUtils.getUsername())
147
+                .suffix(getFileExtension(path))
139 148
                 .build();
140 149
 
141 150
         msCaseAttachMapper.save(caseAttach);

+ 3
- 0
ruoyi-admin/src/main/resources/application.yml Zobrazit soubor

@@ -172,7 +172,10 @@ elegent:
172 172
 identityAuthentication:
173 173
   credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
174 174
   credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
175
+#  小程序端人脸核身商户id
175 176
   merchantId: 0NSJ2309281116194321
177
+#  pc端人脸核身商户id
178
+  pcMerchantId: 0NSJ2309281116194321
176 179
   privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
177 180
 # 腾讯云即时通信相关配置
178 181
 imConfig:

+ 5
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseAttach.java Zobrazit soubor

@@ -82,4 +82,9 @@ public class MsCaseAttach {
82 82
      */
83 83
     @Column(name = "other_sys_file_id")
84 84
     private String otherSysFileId;
85
+    /**
86
+     * 附件后缀
87
+     */
88
+    @Column(name = "suffix")
89
+    private String suffix;
85 90
 }

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java Zobrazit soubor

@@ -95,5 +95,9 @@ public class MsCaseApplicationVO extends MsCaseApplication {
95 95
      * 是否财务,部门长,秘书,0-否,1-是
96 96
      */
97 97
     private Integer otherFlag;
98
+    /**
99
+     * 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
100
+     */
101
+    private Integer mediationFileFlag=0;
98 102
 
99 103
 }

+ 3
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/dept/impl/DeptIdentifyServiceImpl.java Zobrazit soubor

@@ -47,6 +47,7 @@ import java.util.function.Function;
47 47
 import java.util.stream.Collectors;
48 48
 import java.util.stream.Stream;
49 49
 
50
+import static com.google.common.io.Files.getFileExtension;
50 51
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
51 52
 
52 53
 @Service
@@ -256,6 +257,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
256 257
                                 caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode());  //10代表印章图片
257 258
                                 caseAttach.setAnnexPath(savePath);
258 259
                                 caseAttach.setAnnexName(saveName);
260
+                                caseAttach.setSuffix(getFileExtension(savePath));
259 261
                                 int i1 = msCaseAttachMapper.save(caseAttach);
260 262
                                 if (i1 > 0) {
261 263
                                     //将附件id保存到公章管理表里
@@ -668,11 +670,5 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
668 670
         return ajax;
669 671
     }
670 672
 
671
-    private String getFileExtension(String fileName) {
672
-        int lastDotIndex = fileName.lastIndexOf(".");
673
-        if (lastDotIndex > 0 && lastDotIndex < fileName.length() - 1) {
674
-            return fileName.substring(lastDotIndex + 1);
675
-        }
676
-        return "";
677
-    }
673
+
678 674
 }

+ 8
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/IdentityAuthenticationService.java Zobrazit soubor

@@ -19,10 +19,10 @@ public interface IdentityAuthenticationService {
19 19
 
20 20
     /**
21 21
      * 获取Eidtoken
22
-     *
22
+     * isPC 是否PC端
23 23
      * @return
24 24
      */
25
-    JSONObject selectIdentityAuthenticaEIDtoken();
25
+    JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC);
26 26
 
27 27
     /**
28 28
      * 小程序人脸核身后查询身份认证结果
@@ -31,4 +31,10 @@ public interface IdentityAuthenticationService {
31 31
      * @return
32 32
      */
33 33
     AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
34
+
35
+    /**
36
+     * H5轮询获取EIDtoken状态
37
+     * @return
38
+     */
39
+    JSONObject selectPCEIDtokenStatus(String eidToken);
34 40
 }

+ 36
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java Zobrazit soubor

@@ -8,6 +8,7 @@ import cn.hutool.crypto.symmetric.SymmetricCrypto;
8 8
 import com.alibaba.fastjson.JSON;
9 9
 import com.alibaba.fastjson.JSONObject;
10 10
 import com.ruoyi.common.core.domain.AjaxResult;
11
+import com.ruoyi.common.exception.ServiceException;
11 12
 import com.ruoyi.system.mapper.SysUserMapper;
12 13
 import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
13 14
 import com.ruoyi.wisdomarbitrate.mapper.miniprogress.IdentityAuthenticationMapper;
@@ -39,6 +40,8 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
39 40
     private String credentialSecretKey;
40 41
     @Value("${identityAuthentication.merchantId}")
41 42
     private String merchantId;
43
+    @Value("${identityAuthentication.pcMerchantId}")
44
+    private String pcMerchantId;
42 45
     @Value("${identityAuthentication.privateKeyHexDecodeinfo}")
43 46
     private String privateKeyHexDecodeinfo;
44 47
 
@@ -87,7 +90,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
87 90
      * @return
88 91
      */
89 92
     @Override
90
-    public JSONObject selectIdentityAuthenticaEIDtoken() {
93
+    public JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC) {
91 94
         JSONObject objJSON = new JSONObject();
92 95
         objJSON.put("EidToken", "");
93 96
         try {
@@ -102,7 +105,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
102 105
             FaceidClient client = new FaceidClient(cred, "", clientProfile);
103 106
             // 实例化一个请求对象,每个接口都会对应一个request对象
104 107
             GetEidTokenRequest req = new GetEidTokenRequest();
105
-            req.setMerchantId(merchantId);
108
+            if(true){
109
+                req.setMerchantId(merchantId);
110
+            }else {
111
+                req.setMerchantId(pcMerchantId);
112
+            }
106 113
             // 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
107 114
             GetEidTokenResponse resp = client.GetEidToken(req);
108 115
             // 输出json格式的字符串回包
@@ -138,7 +145,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
138 145
     }
139 146
 
140 147
     /**
141
-     * 小程序人脸核身后查询身份认证结果
148
+     * 人脸核身后查询身份认证结果
142 149
      *
143 150
      * @param ientityAuthentication
144 151
      * @return
@@ -224,7 +231,32 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
224 231
         return AjaxResult.success();
225 232
     }
226 233
 
227
-
234
+    @Override
235
+    public JSONObject selectPCEIDtokenStatus(String eidToken) {
236
+        JSONObject objJSON = null;
237
+        try {
238
+            Credential cred = new Credential(credentialSecretId, credentialSecretKey);
239
+            // 实例化一个http选项,可选的,没有特殊需求可以跳过
240
+            HttpProfile httpProfile = new HttpProfile();
241
+            httpProfile.setEndpoint("faceid.tencentcloudapi.com");
242
+            // 实例化一个client选项,可选的,没有特殊需求可以跳过
243
+            ClientProfile clientProfile = new ClientProfile();
244
+            clientProfile.setHttpProfile(httpProfile);
245
+            // 实例化要请求产品的client对象,clientProfile是可选的
246
+            FaceidClient client = new FaceidClient(cred, "", clientProfile);
247
+            // 实例化一个请求对象,每个接口都会对应一个request对象
248
+            GetEidResultRequest req = new GetEidResultRequest();
249
+            req.setEidToken(eidToken);
250
+            // 返回的resp是一个GetEidResultResponse的实例,与请求对象对应
251
+            GetEidResultResponse resp = client.GetEidResult(req);
252
+            // 输出json格式的字符串回包,Status	String	枚举:init:token未验证 doing: 验证中 finished: 验证完成 timeout: token已超时
253
+            String s = GetEidResultResponse.toJsonString(resp);
254
+            objJSON = JSON.parseObject(s);
255
+        } catch (TencentCloudSDKException e) {
256
+            throw new ServiceException("获取E证通Token状态失败");
257
+        }
258
+        return objJSON;
259
+    }
228 260
 
229 261
 
230 262
 }

+ 42
- 11
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Zobrazit soubor

@@ -79,6 +79,7 @@ import java.util.concurrent.ExecutorService;
79 79
 import java.util.function.Function;
80 80
 import java.util.stream.Collectors;
81 81
 
82
+import static com.google.common.io.Files.getFileExtension;
82 83
 import static com.ruoyi.common.utils.BookMarkUtil.getBookmarkByDocx;
83 84
 import static com.ruoyi.common.utils.PageUtils.startPage;
84 85
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -193,8 +194,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
193 194
      */
194 195
     @Override
195 196
     public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
196
-        // 是否调解员
197
-        boolean isMediatorRole=false;
197
+        // 查询所有流程
198
+        Example allFlowExample = new Example(MsCaseFlow.class);
199
+        allFlowExample.setOrderByClause("sort asc");
200
+        List<MsCaseFlow> allCaseFlows = caseFlowMapper.selectByExample(allFlowExample);
201
+        if (CollectionUtil.isEmpty(allCaseFlows)) {
202
+            throw new ServiceException("未配置案件流程");
203
+        }
198 204
         // 根据用户查询角色
199 205
         LoginUser loginUser = SecurityUtils.getLoginUser();
200 206
         // 根据id查询用户
@@ -205,7 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
205 211
             startPage();
206 212
             List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
207 213
             // 设置申请人被申请人及签名按钮限
208
-            setAfflicate(isMediatorRole,list,loginUser.getUserId(),roles);
214
+            setAfflicate(new HashMap<>(),list,loginUser.getUserId(),roles);
209 215
             return list;
210 216
         }
211 217
         if(CollectionUtil.isEmpty(roles) ){
@@ -227,6 +233,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
227 233
             throw new ServiceException("该角色为绑定案件流程");
228 234
         }
229 235
         List<Integer> caseFlowIds = caseFlows.stream().map(MsCaseFlow::getId).collect(Collectors.toList());
236
+        // 流程名称分组
237
+        Map<String, Integer> flowNameMap = allCaseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getCaseStatusName, MsCaseFlow::getSort, (k1, k2) -> k2));
238
+
230 239
         // 是否查询所有
231 240
         boolean isSelectAll = false;
232 241
 
@@ -240,7 +249,6 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
240 249
                     roleIds=null;
241 250
                 }
242 251
                 if(StrUtil.equals(role.getRoleName(),"调解员")) {
243
-                    isMediatorRole=true;
244 252
                     req.setMediatorId(String.valueOf(sysUser.getUserId()));
245 253
                 }
246 254
             }
@@ -257,25 +265,26 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
257 265
         // 查询案件列表
258 266
         List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
259 267
         // 设置申请人被申请人及签名按钮限
260
-        setAfflicate(isMediatorRole,list,loginUser.getUserId(),roles);
268
+        setAfflicate(flowNameMap,list,loginUser.getUserId(),roles);
261 269
         return list;
262 270
     }
263 271
 
264 272
     /**
265 273
      * 设置申请人被申请人及签名按钮限
266
-     * @param isMediatorRole 是否调解员
274
+     * @param
267 275
      * @param list
268 276
      * @param loginUserId 当前登录用户id
269 277
      */
270
-    private void setAfflicate(boolean isMediatorRole,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
278
+    private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
271 279
         if(CollectionUtil.isEmpty(list)){
272 280
             return;
273 281
         }
274
-        isMediatorRole=false;
282
+        // 是否调解员
283
+       boolean isMediatorRole=false;
275 284
         // 查询申请人和被申请人
276 285
         List<Long> caseIds = list.stream().map(MsCaseApplicationVO::getId).collect(Collectors.toList());
277
-
278
-
286
+        Integer mediatorSort = flowNameMap.get("待调解");
287
+        Integer sendSort = flowNameMap.get("待送达");
279 288
         List<MsCaseAffiliate> affiliateList = msCaseAffiliateMapper.selectUserRoleByCaseIds(caseIds);
280 289
         // 根据案件id分组
281 290
         Map<Long, List<MsCaseAffiliate>> affiliateMap=null;
@@ -362,6 +371,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
362 371
             }else {
363 372
                 vo.setSignButtonFlag(0);
364 373
             }
374
+            // 调解员,并且在待调节后,送达前,显示
375
+            if(mediatorSort!=null && sendSort!=null && isMediatorRole
376
+                    && null!=flowNameMap.get(vo.getCaseStatusName())
377
+                    && flowNameMap.get(vo.getCaseStatusName())>mediatorSort
378
+                    && flowNameMap.get(vo.getCaseStatusName())<=sendSort){
379
+                vo.setMediationFileFlag(1);
380
+            }
365 381
             for (SysRole role : roles) {
366 382
                 if(StrUtil.isNotEmpty(role.getRoleName())){
367 383
                     if(StrUtil.contains(role.getRoleName(),"财务")
@@ -371,6 +387,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
371 387
                     ){
372 388
                        vo.setOtherFlag(1);
373 389
                     }
390
+                    if(role.getRoleName().equals("法律顾问")){
391
+                        // 顾问可以上传下载调解书
392
+                        vo.setMediationFileFlag(1);
393
+                    }
374 394
 
375 395
                 }
376 396
             }
@@ -413,6 +433,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
413 433
         if (CollectionUtil.isEmpty(allCaseFlows)) {
414 434
             throw new ServiceException("未配置案件流程");
415 435
         }
436
+
416 437
         List<MsCaseFlow> caseFlows = allCaseFlows;
417 438
         MsCaseApplicationReq req = new MsCaseApplicationReq();
418 439
         if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
@@ -690,6 +711,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
690 711
             if (CollectionUtil.isNotEmpty(caseAttachList)) {
691 712
                 for (MsCaseAttach caseAttach : caseAttachList) {
692 713
                     caseAttach.setCaseAppliId(caseApplication.getId());
714
+                    if(StrUtil.isNotEmpty(caseAttach.getAnnexPath())){
715
+                        caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
716
+                    }
693 717
                 }
694 718
                 if(!caseApplication.isImportFlag()) {
695 719
                     // 修改案件附件
@@ -1522,6 +1546,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1522 1546
                         .annexType(annexType)
1523 1547
                         .useId(SecurityUtils.getUserId())
1524 1548
                         .useAccount(SecurityUtils.getUsername())
1549
+                        .suffix(getFileExtension(path))
1525 1550
                         .build();
1526 1551
                 int count = msCaseAttachMapper.save(caseAttach);
1527 1552
                 if (count > 0 ) {
@@ -2399,7 +2424,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2399 2424
     @Override
2400 2425
     public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
2401 2426
         if(StrUtil.isEmpty(caseAttach.getAnnexName())) {
2402
-            caseAttach.setAnnexName("调解书");
2427
+            caseAttach.setAnnexName("调解书.docx");
2403 2428
         }
2404 2429
         if(StrUtil.isNotEmpty(caseAttach.getAnnexPath())) {
2405 2430
             String replace = caseAttach.getAnnexPath().replace("/home/ruoyi/uploadPath", "/profile");
@@ -2408,6 +2433,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2408 2433
             caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
2409 2434
             caseAttach.setUseId(getUserInfo().getUserId());
2410 2435
             caseAttach.setUseAccount(getUserInfo().getUserName());
2436
+            caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
2411 2437
             // 先删除之前的在新增
2412 2438
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
2413 2439
             msCaseAttachMapper.save(caseAttach);
@@ -2415,6 +2441,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2415 2441
         return AjaxResult.success();
2416 2442
     }
2417 2443
 
2444
+
2418 2445
     /**
2419 2446
      * 查询预约信息
2420 2447
      * @param id
@@ -3434,6 +3461,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3434 3461
                     }
3435 3462
 
3436 3463
                 }
3464
+                caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
3437 3465
 
3438 3466
                 //保存到附件表里,先删除之前的在保存
3439 3467
                 msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
@@ -3471,6 +3499,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3471 3499
                         caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
3472 3500
                     }
3473 3501
                 }
3502
+                caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
3474 3503
                 msCaseAttachMapper.save(caseAttach);
3475 3504
                 }
3476 3505
 
@@ -3479,6 +3508,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3479 3508
 
3480 3509
     }
3481 3510
 
3511
+
3512
+
3482 3513
     /**
3483 3514
      * 调解书上传到onlyoffice服务器
3484 3515
      * @param annexPath

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Zobrazit soubor

@@ -76,6 +76,7 @@ import java.util.concurrent.CompletableFuture;
76 76
 import java.util.concurrent.ExecutorService;
77 77
 import java.util.stream.Collectors;
78 78
 
79
+import static com.google.common.io.Files.getFileExtension;
79 80
 import static com.ruoyi.common.core.domain.AjaxResult.success;
80 81
 @Slf4j
81 82
 @Service
@@ -1144,6 +1145,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1144 1145
                 caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
1145 1146
                 caseAttach.setAnnexPath(savePath);
1146 1147
                 caseAttach.setAnnexName(saveName);
1148
+                caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
1147 1149
                 log.info("调解书保存======="+downLoadFile);
1148 1150
                 caseAttachMapper.save(caseAttach);
1149 1151
                 //  对接北明,调用上传附件接口
@@ -1225,6 +1227,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1225 1227
                             caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode());  //10代表印章图片
1226 1228
                             caseAttach.setAnnexPath(savePath);
1227 1229
                             caseAttach.setAnnexName(saveName);
1230
+                            caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
1228 1231
                             int i1 = caseAttachMapper.save(caseAttach);
1229 1232
                             if (i1 > 0) {
1230 1233
                                 //将附件id保存到公章管理表里

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java Zobrazit soubor

@@ -59,6 +59,7 @@ import java.nio.file.Paths;
59 59
 import java.util.*;
60 60
 import java.util.stream.Collectors;
61 61
 
62
+import static com.google.common.io.Files.getFileExtension;
62 63
 import static com.ruoyi.common.core.domain.AjaxResult.error;
63 64
 import static com.ruoyi.common.core.domain.AjaxResult.success;
64 65
 import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
@@ -554,6 +555,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
554 555
                     caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
555 556
                 }
556 557
             }
558
+            caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
557 559
             caseAttachMapper.save(caseAttach);
558 560
             return AjaxResult.success();
559 561
         }else {
@@ -607,6 +609,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
607 609
                                 caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
608 610
                             }
609 611
                         }
612
+                        caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
610 613
                         caseAttachMapper.save(caseAttach);
611 614
 
612 615
                         return annexName;

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Zobrazit soubor

@@ -36,6 +36,8 @@ import java.util.List;
36 36
 import java.util.UUID;
37 37
 import java.util.stream.Collectors;
38 38
 
39
+import static com.google.common.io.Files.getFileExtension;
40
+
39 41
 @Component
40 42
 public class FixSelectFlowDetailUtils {
41 43
     @Autowired
@@ -121,6 +123,7 @@ public class FixSelectFlowDetailUtils {
121 123
                                                 caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode());  //10代表印章图片
122 124
                                                 caseAttach.setAnnexPath(savePath);
123 125
                                                 caseAttach.setAnnexName(saveName);
126
+                                                caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
124 127
                                                 int i1 = caseAttachMapper.save(caseAttach);
125 128
                                                 if (i1 > 0) {
126 129
                                                     //将印章信息保存到公章管理表里
@@ -217,6 +220,7 @@ public class FixSelectFlowDetailUtils {
217 220
                                         caseAttach.setAnnexPath(savePath);
218 221
                                         caseAttach.setAnnexName(saveName);
219 222
                                         int i1 = caseAttachMapper.save(caseAttach);
223
+                                        caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
220 224
                                         if (i1 > 0) {
221 225
                                             //将附件id保存到公章管理表里
222 226
                                             Long annexId1 = caseAttach.getAnnexId();

+ 5
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAttachMapper.xml Zobrazit soubor

@@ -15,18 +15,19 @@
15 15
         <result property="useAccount"     column="use_account"    />
16 16
         <result property="onlyOfficeFileId"     column="only_office_file_id"    />
17 17
         <result property="otherSysFileId"     column="other_sys_file_id"    />
18
+        <result property="suffix"     column="suffix"    />
18 19
     </resultMap>
19 20
     <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
20
-        INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
21
-        VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId})
21
+        INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
22
+        VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId},#{suffix})
22 23
     </insert>
23 24
     <insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
24
-        INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
25
+        INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
25 26
         VALUES
26 27
         <foreach item="item" index="index" collection="list" separator=",">
27 28
 
28 29
 
29
-         (#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId})
30
+         (#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId},#{item.suffix})
30 31
         </foreach>
31 32
     </insert>
32 33
     <delete id="deleteByFileIds">