Ver código fonte

上传下载调解书

18792927508 2 anos atrás
pai
commit
809e457480
14 arquivos alterados com 153 adições e 34 exclusões
  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 Ver arquivo

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

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

1
 package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
1
 package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
2
 
2
 
3
+import cn.hutool.core.util.StrUtil;
3
 import com.alibaba.fastjson.JSONObject;
4
 import com.alibaba.fastjson.JSONObject;
4
 import com.ruoyi.common.annotation.Anonymous;
5
 import com.ruoyi.common.annotation.Anonymous;
5
 import com.ruoyi.common.core.controller.BaseController;
6
 import com.ruoyi.common.core.controller.BaseController;
8
 import com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
9
 import com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
9
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.validation.annotation.Validated;
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
 @RestController
14
 @RestController
17
 @RequestMapping("/identityAuthentication")
15
 @RequestMapping("/identityAuthentication")
25
     @Anonymous
23
     @Anonymous
26
     @PostMapping("/selectIdentityAuthenticaEIDtoken")
24
     @PostMapping("/selectIdentityAuthenticaEIDtoken")
27
     public AjaxResult selectIdentityAuthenticaEIDtoken() {
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
         return success(tokenResult);
45
         return success(tokenResult);
30
     }
46
     }
31
 
47
 
35
     @Anonymous
51
     @Anonymous
36
     @PostMapping("/selectIdentityAuthenticaRespon")
52
     @PostMapping("/selectIdentityAuthenticaRespon")
37
     public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
53
     public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
54
+        if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
55
+            return error("EIDtoken不能为空");
56
+        }
38
         AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
57
         AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
39
         return checkResult;
58
         return checkResult;
40
     }
59
     }

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

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

+ 3
- 0
ruoyi-admin/src/main/resources/application.yml Ver arquivo

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

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

82
      */
82
      */
83
     @Column(name = "other_sys_file_id")
83
     @Column(name = "other_sys_file_id")
84
     private String otherSysFileId;
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 Ver arquivo

95
      * 是否财务,部门长,秘书,0-否,1-是
95
      * 是否财务,部门长,秘书,0-否,1-是
96
      */
96
      */
97
     private Integer otherFlag;
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 Ver arquivo

47
 import java.util.stream.Collectors;
47
 import java.util.stream.Collectors;
48
 import java.util.stream.Stream;
48
 import java.util.stream.Stream;
49
 
49
 
50
+import static com.google.common.io.Files.getFileExtension;
50
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
51
 import static com.ruoyi.common.utils.SecurityUtils.getUsername;
51
 
52
 
52
 @Service
53
 @Service
256
                                 caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode());  //10代表印章图片
257
                                 caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode());  //10代表印章图片
257
                                 caseAttach.setAnnexPath(savePath);
258
                                 caseAttach.setAnnexPath(savePath);
258
                                 caseAttach.setAnnexName(saveName);
259
                                 caseAttach.setAnnexName(saveName);
260
+                                caseAttach.setSuffix(getFileExtension(savePath));
259
                                 int i1 = msCaseAttachMapper.save(caseAttach);
261
                                 int i1 = msCaseAttachMapper.save(caseAttach);
260
                                 if (i1 > 0) {
262
                                 if (i1 > 0) {
261
                                     //将附件id保存到公章管理表里
263
                                     //将附件id保存到公章管理表里
668
         return ajax;
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 Ver arquivo

19
 
19
 
20
     /**
20
     /**
21
      * 获取Eidtoken
21
      * 获取Eidtoken
22
-     *
22
+     * isPC 是否PC端
23
      * @return
23
      * @return
24
      */
24
      */
25
-    JSONObject selectIdentityAuthenticaEIDtoken();
25
+    JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC);
26
 
26
 
27
     /**
27
     /**
28
      * 小程序人脸核身后查询身份认证结果
28
      * 小程序人脸核身后查询身份认证结果
31
      * @return
31
      * @return
32
      */
32
      */
33
     AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
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 Ver arquivo

8
 import com.alibaba.fastjson.JSON;
8
 import com.alibaba.fastjson.JSON;
9
 import com.alibaba.fastjson.JSONObject;
9
 import com.alibaba.fastjson.JSONObject;
10
 import com.ruoyi.common.core.domain.AjaxResult;
10
 import com.ruoyi.common.core.domain.AjaxResult;
11
+import com.ruoyi.common.exception.ServiceException;
11
 import com.ruoyi.system.mapper.SysUserMapper;
12
 import com.ruoyi.system.mapper.SysUserMapper;
12
 import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
13
 import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
13
 import com.ruoyi.wisdomarbitrate.mapper.miniprogress.IdentityAuthenticationMapper;
14
 import com.ruoyi.wisdomarbitrate.mapper.miniprogress.IdentityAuthenticationMapper;
39
     private String credentialSecretKey;
40
     private String credentialSecretKey;
40
     @Value("${identityAuthentication.merchantId}")
41
     @Value("${identityAuthentication.merchantId}")
41
     private String merchantId;
42
     private String merchantId;
43
+    @Value("${identityAuthentication.pcMerchantId}")
44
+    private String pcMerchantId;
42
     @Value("${identityAuthentication.privateKeyHexDecodeinfo}")
45
     @Value("${identityAuthentication.privateKeyHexDecodeinfo}")
43
     private String privateKeyHexDecodeinfo;
46
     private String privateKeyHexDecodeinfo;
44
 
47
 
87
      * @return
90
      * @return
88
      */
91
      */
89
     @Override
92
     @Override
90
-    public JSONObject selectIdentityAuthenticaEIDtoken() {
93
+    public JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC) {
91
         JSONObject objJSON = new JSONObject();
94
         JSONObject objJSON = new JSONObject();
92
         objJSON.put("EidToken", "");
95
         objJSON.put("EidToken", "");
93
         try {
96
         try {
102
             FaceidClient client = new FaceidClient(cred, "", clientProfile);
105
             FaceidClient client = new FaceidClient(cred, "", clientProfile);
103
             // 实例化一个请求对象,每个接口都会对应一个request对象
106
             // 实例化一个请求对象,每个接口都会对应一个request对象
104
             GetEidTokenRequest req = new GetEidTokenRequest();
107
             GetEidTokenRequest req = new GetEidTokenRequest();
105
-            req.setMerchantId(merchantId);
108
+            if(true){
109
+                req.setMerchantId(merchantId);
110
+            }else {
111
+                req.setMerchantId(pcMerchantId);
112
+            }
106
             // 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
113
             // 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
107
             GetEidTokenResponse resp = client.GetEidToken(req);
114
             GetEidTokenResponse resp = client.GetEidToken(req);
108
             // 输出json格式的字符串回包
115
             // 输出json格式的字符串回包
138
     }
145
     }
139
 
146
 
140
     /**
147
     /**
141
-     * 小程序人脸核身后查询身份认证结果
148
+     * 人脸核身后查询身份认证结果
142
      *
149
      *
143
      * @param ientityAuthentication
150
      * @param ientityAuthentication
144
      * @return
151
      * @return
224
         return AjaxResult.success();
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 Ver arquivo

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

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

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

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

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

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java Ver arquivo

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

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

15
         <result property="useAccount"     column="use_account"    />
15
         <result property="useAccount"     column="use_account"    />
16
         <result property="onlyOfficeFileId"     column="only_office_file_id"    />
16
         <result property="onlyOfficeFileId"     column="only_office_file_id"    />
17
         <result property="otherSysFileId"     column="other_sys_file_id"    />
17
         <result property="otherSysFileId"     column="other_sys_file_id"    />
18
+        <result property="suffix"     column="suffix"    />
18
     </resultMap>
19
     </resultMap>
19
     <insert id="save" useGeneratedKeys="true" keyProperty="annexId">
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
     </insert>
23
     </insert>
23
     <insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
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
         VALUES
26
         VALUES
26
         <foreach item="item" index="index" collection="list" separator=",">
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
         </foreach>
31
         </foreach>
31
     </insert>
32
     </insert>
32
     <delete id="deleteByFileIds">
33
     <delete id="deleteByFileIds">