6 Commits

Autor SHA1 Mensagem Data
  qitz fb36d28f56 优化签署日志 2 anos atrás
  wangqiong123 3e00799963 Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev 2 anos atrás
  18792927508 dd776e6fab 保存附件 2 anos atrás
  wangqiong123 4875ac4b70 Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev 2 anos atrás
  18792927508 1cece4a0d1 在线修改 2 anos atrás
  qtz b22b49763c Merge branch 'qtz1' of SH-Arbitrate/Mediation-Backend into dev 2 anos atrás

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java Ver arquivo

1
 package com.ruoyi;
1
 package com.ruoyi;
2
 
2
 
3
+import cn.hutool.core.collection.CollectionUtil;
4
+import com.ruoyi.common.constant.CacheConstants;
5
+import com.ruoyi.common.core.domain.entity.SysUser;
6
+import com.ruoyi.common.core.redis.RedisCache;
7
+import com.ruoyi.common.utils.spring.SpringUtils;
8
+import com.ruoyi.system.mapper.SysUserMapper;
3
 import org.springframework.boot.SpringApplication;
9
 import org.springframework.boot.SpringApplication;
4
 import org.springframework.boot.autoconfigure.SpringBootApplication;
10
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
11
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6
 import org.springframework.scheduling.annotation.EnableScheduling;
12
 import org.springframework.scheduling.annotation.EnableScheduling;
7
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
13
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
8
 
14
 
15
+import java.util.List;
16
+
9
 /**
17
 /**
10
  * 启动程序
18
  * 启动程序
11
  * 
19
  * 
30
                 " |  | \\ `'   /|   `-'  /           \n" +
38
                 " |  | \\ `'   /|   `-'  /           \n" +
31
                 " |  |  \\    /  \\      /           \n" +
39
                 " |  |  \\    /  \\      /           \n" +
32
                 " ''-'   `'-'    `-..-'              ");
40
                 " ''-'   `'-'    `-..-'              ");
41
+        // 启动成功后,查询用户表,将用户信息存到redis
42
+        RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
43
+        SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
44
+        List<SysUser> sysUsers = userMapper.selectUserListByIds(null);
45
+        if(CollectionUtil.isNotEmpty(sysUsers)){
46
+            for (SysUser sysUser : sysUsers) {
47
+                redisCache.setCacheObject(CacheConstants.USER_KEY+sysUser.getUserId(),sysUser);
48
+            }
49
+        }
33
     }
50
     }
34
 }
51
 }

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

417
      * @param
417
      * @param
418
      * @return
418
      * @return
419
      */
419
      */
420
-    @GetMapping("/saveOnlyOfficeFile")
420
+    @PostMapping("/saveOnlyOfficeFile")
421
     public AjaxResult saveOnlyOfficeFile(  @RequestBody MsCaseAttach caseAttach) {
421
     public AjaxResult saveOnlyOfficeFile(  @RequestBody MsCaseAttach caseAttach) {
422
         if(caseAttach.getCaseAppliId()==null||StrUtil.isEmpty(caseAttach.getOnlyOfficeFileId())||StrUtil.isEmpty(caseAttach.getAnnexPath())){
422
         if(caseAttach.getCaseAppliId()==null||StrUtil.isEmpty(caseAttach.getOnlyOfficeFileId())||StrUtil.isEmpty(caseAttach.getAnnexPath())){
423
             return error("参数校验失败");
423
             return error("参数校验失败");

+ 4
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java Ver arquivo

46
      * 案件 redis key
46
      * 案件 redis key
47
      */
47
      */
48
     public static final String CASE_KEY = "case_codes:";
48
     public static final String CASE_KEY = "case_codes:";
49
+    /**
50
+     * 所有用户 redis key
51
+     */
52
+    public static final String USER_KEY = "user_key:";
49
 }
53
 }

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java Ver arquivo

224
      * 调解书上传到onlyoffice服务器
224
      * 调解书上传到onlyoffice服务器
225
      * @param annexPath
225
      * @param annexPath
226
      */
226
      */
227
-     JSONArray uploadOnlyOffice(String annexPath);
227
+     JSONArray uploadOnlyOffice(String annexPath,Long id);
228
     /**
228
     /**
229
      * 案件受理
229
      * 案件受理
230
      * @param application
230
      * @param application

+ 7
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Ver arquivo

2163
     @Transactional
2163
     @Transactional
2164
     @Override
2164
     @Override
2165
     public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
2165
     public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
2166
-        if(StrUtil.isEmpty(caseAttach.getAnnexName())){
2166
+        if(StrUtil.isEmpty(caseAttach.getAnnexName())) {
2167
             caseAttach.setAnnexName("调解书");
2167
             caseAttach.setAnnexName("调解书");
2168
+        }
2168
             caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
2169
             caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
2169
             caseAttach.setUseId(getUserInfo().getUserId());
2170
             caseAttach.setUseId(getUserInfo().getUserId());
2170
             caseAttach.setUseAccount(getUserInfo().getUserName());
2171
             caseAttach.setUseAccount(getUserInfo().getUserName());
2171
             // 先删除之前的在新增
2172
             // 先删除之前的在新增
2172
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
2173
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
2173
             msCaseAttachMapper.save(caseAttach);
2174
             msCaseAttachMapper.save(caseAttach);
2174
-        }
2175
+
2175
         return AjaxResult.success();
2176
         return AjaxResult.success();
2176
     }
2177
     }
2177
 
2178
 
3755
        String annexPath=resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX);
3756
        String annexPath=resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX);
3756
        // 如果是调解书或者调解协议上传到onlyoffice服务器
3757
        // 如果是调解书或者调解协议上传到onlyoffice服务器
3757
         if(annexType != null   && annexType.equals(AnnexTypeEnum.MEDIATE_BOOK.getCode())){
3758
         if(annexType != null   && annexType.equals(AnnexTypeEnum.MEDIATE_BOOK.getCode())){
3758
-            JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath);
3759
+            JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath,application.getId());
3759
             if(jsonArray!=null && jsonArray.size() > 0){
3760
             if(jsonArray!=null && jsonArray.size() > 0){
3760
                     for (Object obj : jsonArray) {
3761
                     for (Object obj : jsonArray) {
3761
                         JSONObject jsonObject = (JSONObject) obj;
3762
                         JSONObject jsonObject = (JSONObject) obj;
3784
      */
3785
      */
3785
     @Override
3786
     @Override
3786
     @Transactional
3787
     @Transactional
3787
-    public JSONArray uploadOnlyOffice(String annexPath) {
3788
+    public JSONArray uploadOnlyOffice(String annexPath,Long caseId) {
3788
         annexPath=annexPath.replace("/profile","/home/ruoyi/uploadPath");
3789
         annexPath=annexPath.replace("/profile","/home/ruoyi/uploadPath");
3789
         File file = new File(annexPath);
3790
         File file = new File(annexPath);
3790
         if (file.exists()) {
3791
         if (file.exists()) {
3791
            // 调用onlyoffice
3792
            // 调用onlyoffice
3792
-//            String url = "http://121.40.189.20:9090/files/upload";
3793
             try {
3793
             try {
3794
+                onlyOfficeUrl=  onlyOfficeUrl+ "?caseId="+caseId;
3794
                 Map<String, Object> params = new HashMap<>();
3795
                 Map<String, Object> params = new HashMap<>();
3795
                 params.put("file", file);
3796
                 params.put("file", file);
3796
                 String postResult = HttpUtil.post(onlyOfficeUrl, params);
3797
                 String postResult = HttpUtil.post(onlyOfficeUrl, params);
3806
         }else {
3807
         }else {
3807
             throw new ServiceException("文件不存在");
3808
             throw new ServiceException("文件不存在");
3808
         }
3809
         }
3809
-return null;
3810
+        return null;
3810
     }
3811
     }
3811
 
3812
 
3812
     /**
3813
     /**

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

1033
             String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc();
1033
             String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc();
1034
             String pensonAccountRes = sealSignRecordsel.getPensonAccountRes();
1034
             String pensonAccountRes = sealSignRecordsel.getPensonAccountRes();
1035
             String pensonAccountMedi = sealSignRecordsel.getPensonAccountMedi();
1035
             String pensonAccountMedi = sealSignRecordsel.getPensonAccountMedi();
1036
+            String pensonName = sealSignRecordsel.getPensonName();
1037
+            String orgnNamePsnName = sealSignRecordsel.getOrgnNamePsnName();
1038
+            String pensonNameRes = sealSignRecordsel.getPensonNameRes();
1039
+            String pensonNameMedi = sealSignRecordsel.getPensonNameMedi();
1040
+            Date dateOperate = new Date(operateTime);
1036
 
1041
 
1037
             Integer signStatusApply = sealSignRecordsel.getSignStatusApply();
1042
             Integer signStatusApply = sealSignRecordsel.getSignStatusApply();
1038
             Integer signStatusResponse = sealSignRecordsel.getSignStatusResponse();
1043
             Integer signStatusResponse = sealSignRecordsel.getSignStatusResponse();
1042
             Long caseAppliId = sealSignRecordsel.getCaseAppliId();
1047
             Long caseAppliId = sealSignRecordsel.getCaseAppliId();
1043
             MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseAppliId);
1048
             MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseAppliId);
1044
             Integer mediaResult = caseApplicationselect.getMediaResult();
1049
             Integer mediaResult = caseApplicationselect.getMediaResult();
1050
+            MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
1051
+            Integer caseNode = currentFlow.getNodeId();
1052
+            String caseStatusName = currentFlow.getCaseStatusName();
1053
+
1045
 
1054
 
1046
             if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
1055
             if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
1047
                 if(mediaResult.intValue()==1){
1056
                 if(mediaResult.intValue()==1){
1050
                         //申请人签名
1059
                         //申请人签名
1051
                         sealSignRecordsel.setSignStatusApply(1);
1060
                         sealSignRecordsel.setSignStatusApply(1);
1052
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1061
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1062
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1063
+                        operLog.setCreateNickName(pensonName);
1064
+                        operLog.setCaseStatusName(caseStatusName);
1065
+                        operLog.setCaseAppliId(caseAppliId);
1066
+                        operLog.setCaseNode(caseNode);
1067
+                        operLog.setCreateTime(dateOperate);
1068
+                        caseLogRecordMapper.insert(operLog);
1053
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1&&
1069
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1&&
1054
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1070
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1055
                             // 根据流程id查找下一个流程节点
1071
                             // 根据流程id查找下一个流程节点
1068
                         //被申请人签名
1084
                         //被申请人签名
1069
                         sealSignRecordsel.setSignStatusResponse(1);
1085
                         sealSignRecordsel.setSignStatusResponse(1);
1070
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1086
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1087
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1088
+                        operLog.setCreateNickName(pensonNameRes);
1089
+                        operLog.setCaseStatusName(caseStatusName);
1090
+                        operLog.setCaseAppliId(caseAppliId);
1091
+                        operLog.setCaseNode(caseNode);
1092
+                        operLog.setCreateTime(dateOperate);
1093
+                        caseLogRecordMapper.insert(operLog);
1071
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1094
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1072
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1095
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1073
                             // 根据流程id查找下一个流程节点
1096
                             // 根据流程id查找下一个流程节点
1086
                         //调解员签名
1109
                         //调解员签名
1087
                         sealSignRecordsel.setSignStatusMediator(1);
1110
                         sealSignRecordsel.setSignStatusMediator(1);
1088
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1111
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1112
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1113
+                        operLog.setCreateNickName(pensonNameMedi);
1114
+                        operLog.setCaseStatusName(caseStatusName);
1115
+                        operLog.setCaseAppliId(caseAppliId);
1116
+                        operLog.setCaseNode(caseNode);
1117
+                        operLog.setCreateTime(dateOperate);
1118
+                        caseLogRecordMapper.insert(operLog);
1089
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1119
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1090
                                 signStatusResponse!=null&&signStatusResponse.intValue()==1){
1120
                                 signStatusResponse!=null&&signStatusResponse.intValue()==1){
1091
                             // 根据流程id查找下一个流程节点
1121
                             // 根据流程id查找下一个流程节点
1104
                         sealSignRecordsel.setSealStatus(1);
1134
                         sealSignRecordsel.setSealStatus(1);
1105
                         sealSignRecordsel.setSignFlowStatus(3);
1135
                         sealSignRecordsel.setSignFlowStatus(3);
1106
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1136
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1137
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1138
+                        operLog.setCreateNickName(orgnNamePsnName);
1139
+                        operLog.setCaseStatusName(caseStatusName);
1140
+                        operLog.setCaseAppliId(caseAppliId);
1141
+                        operLog.setCaseNode(caseNode);
1142
+                        operLog.setCreateTime(dateOperate);
1143
+                        caseLogRecordMapper.insert(operLog);
1107
 
1144
 
1108
                         // 根据流程id查找下一个流程节点
1145
                         // 根据流程id查找下一个流程节点
1109
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
1146
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
1163
                         //申请人签名
1200
                         //申请人签名
1164
                         sealSignRecordsel.setSignStatusApply(1);
1201
                         sealSignRecordsel.setSignStatusApply(1);
1165
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1202
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1203
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1204
+                        operLog.setCreateNickName(pensonName);
1205
+                        operLog.setCaseStatusName(caseStatusName);
1206
+                        operLog.setCaseAppliId(caseAppliId);
1207
+                        operLog.setCaseNode(caseNode);
1208
+                        operLog.setCreateTime(dateOperate);
1209
+                        caseLogRecordMapper.insert(operLog);
1166
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1){
1210
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1){
1167
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1211
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1168
                             MsCaseApplication application = new MsCaseApplication();
1212
                             MsCaseApplication application = new MsCaseApplication();
1222
                         //被申请人签名
1266
                         //被申请人签名
1223
                         sealSignRecordsel.setSignStatusResponse(1);
1267
                         sealSignRecordsel.setSignStatusResponse(1);
1224
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1268
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
1269
+                        MsCaseLogRecord operLog = new MsCaseLogRecord();
1270
+                        operLog.setCreateNickName(pensonNameRes);
1271
+                        operLog.setCaseStatusName(caseStatusName);
1272
+                        operLog.setCaseAppliId(caseAppliId);
1273
+                        operLog.setCaseNode(caseNode);
1274
+                        operLog.setCreateTime(dateOperate);
1275
+                        caseLogRecordMapper.insert(operLog);
1225
                         if(signStatusApply!=null&&signStatusApply.intValue()==1){
1276
                         if(signStatusApply!=null&&signStatusApply.intValue()==1){
1226
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1277
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1227
                             MsCaseApplication application = new MsCaseApplication();
1278
                             MsCaseApplication application = new MsCaseApplication();

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java Ver arquivo

355
                 "       \"signConfig\": {\n" +
355
                 "       \"signConfig\": {\n" +
356
                 "           \"availableSignClientTypes\":  \"1\"\n" +
356
                 "           \"availableSignClientTypes\":  \"1\"\n" +
357
                 "       },\n" +
357
                 "       },\n" +
358
-                "        \"notifyUrl\": \"" + signSealCallbackUrl + "\",\n" +
358
+//                "        \"notifyUrl\": \"" + signSealCallbackUrl + "\",\n" +
359
                 "        \"autoFinish\": true\n" +
359
                 "        \"autoFinish\": true\n" +
360
                 "    },\n" +
360
                 "    },\n" +
361
 
361