6 Коммиты

Автор SHA1 Сообщение Дата
  qitz fb36d28f56 优化签署日志 2 лет назад
  wangqiong123 3e00799963 Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev 2 лет назад
  18792927508 dd776e6fab 保存附件 2 лет назад
  wangqiong123 4875ac4b70 Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev 2 лет назад
  18792927508 1cece4a0d1 在线修改 2 лет назад
  qtz b22b49763c Merge branch 'qtz1' of SH-Arbitrate/Mediation-Backend into dev 2 лет назад

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java Просмотреть файл

@@ -1,11 +1,19 @@
1 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 9
 import org.springframework.boot.SpringApplication;
4 10
 import org.springframework.boot.autoconfigure.SpringBootApplication;
5 11
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
6 12
 import org.springframework.scheduling.annotation.EnableScheduling;
7 13
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
8 14
 
15
+import java.util.List;
16
+
9 17
 /**
10 18
  * 启动程序
11 19
  * 
@@ -30,5 +38,14 @@ public class RuoYiApplication
30 38
                 " |  | \\ `'   /|   `-'  /           \n" +
31 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 Просмотреть файл

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

+ 4
- 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CacheConstants.java Просмотреть файл

@@ -46,4 +46,8 @@ public class CacheConstants
46 46
      * 案件 redis key
47 47
      */
48 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 Просмотреть файл

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

+ 7
- 6
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Просмотреть файл

@@ -2163,15 +2163,16 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2163 2163
     @Transactional
2164 2164
     @Override
2165 2165
     public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
2166
-        if(StrUtil.isEmpty(caseAttach.getAnnexName())){
2166
+        if(StrUtil.isEmpty(caseAttach.getAnnexName())) {
2167 2167
             caseAttach.setAnnexName("调解书");
2168
+        }
2168 2169
             caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
2169 2170
             caseAttach.setUseId(getUserInfo().getUserId());
2170 2171
             caseAttach.setUseAccount(getUserInfo().getUserName());
2171 2172
             // 先删除之前的在新增
2172 2173
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
2173 2174
             msCaseAttachMapper.save(caseAttach);
2174
-        }
2175
+
2175 2176
         return AjaxResult.success();
2176 2177
     }
2177 2178
 
@@ -3755,7 +3756,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3755 3756
        String annexPath=resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX);
3756 3757
        // 如果是调解书或者调解协议上传到onlyoffice服务器
3757 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 3760
             if(jsonArray!=null && jsonArray.size() > 0){
3760 3761
                     for (Object obj : jsonArray) {
3761 3762
                         JSONObject jsonObject = (JSONObject) obj;
@@ -3784,13 +3785,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3784 3785
      */
3785 3786
     @Override
3786 3787
     @Transactional
3787
-    public JSONArray uploadOnlyOffice(String annexPath) {
3788
+    public JSONArray uploadOnlyOffice(String annexPath,Long caseId) {
3788 3789
         annexPath=annexPath.replace("/profile","/home/ruoyi/uploadPath");
3789 3790
         File file = new File(annexPath);
3790 3791
         if (file.exists()) {
3791 3792
            // 调用onlyoffice
3792
-//            String url = "http://121.40.189.20:9090/files/upload";
3793 3793
             try {
3794
+                onlyOfficeUrl=  onlyOfficeUrl+ "?caseId="+caseId;
3794 3795
                 Map<String, Object> params = new HashMap<>();
3795 3796
                 params.put("file", file);
3796 3797
                 String postResult = HttpUtil.post(onlyOfficeUrl, params);
@@ -3806,7 +3807,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
3806 3807
         }else {
3807 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 Просмотреть файл

@@ -1033,6 +1033,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1033 1033
             String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc();
1034 1034
             String pensonAccountRes = sealSignRecordsel.getPensonAccountRes();
1035 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 1042
             Integer signStatusApply = sealSignRecordsel.getSignStatusApply();
1038 1043
             Integer signStatusResponse = sealSignRecordsel.getSignStatusResponse();
@@ -1042,6 +1047,10 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1042 1047
             Long caseAppliId = sealSignRecordsel.getCaseAppliId();
1043 1048
             MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseAppliId);
1044 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 1055
             if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
1047 1056
                 if(mediaResult.intValue()==1){
@@ -1050,6 +1059,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1050 1059
                         //申请人签名
1051 1060
                         sealSignRecordsel.setSignStatusApply(1);
1052 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 1069
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1&&
1054 1070
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1055 1071
                             // 根据流程id查找下一个流程节点
@@ -1068,6 +1084,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1068 1084
                         //被申请人签名
1069 1085
                         sealSignRecordsel.setSignStatusResponse(1);
1070 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 1094
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1072 1095
                                 signStatusMediator!=null&&signStatusMediator.intValue()==1){
1073 1096
                             // 根据流程id查找下一个流程节点
@@ -1086,6 +1109,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1086 1109
                         //调解员签名
1087 1110
                         sealSignRecordsel.setSignStatusMediator(1);
1088 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 1119
                         if(signStatusApply!=null&&signStatusApply.intValue()==1&&
1090 1120
                                 signStatusResponse!=null&&signStatusResponse.intValue()==1){
1091 1121
                             // 根据流程id查找下一个流程节点
@@ -1104,6 +1134,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1104 1134
                         sealSignRecordsel.setSealStatus(1);
1105 1135
                         sealSignRecordsel.setSignFlowStatus(3);
1106 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 1145
                         // 根据流程id查找下一个流程节点
1109 1146
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
@@ -1163,6 +1200,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1163 1200
                         //申请人签名
1164 1201
                         sealSignRecordsel.setSignStatusApply(1);
1165 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 1210
                         if(signStatusResponse!=null&&signStatusResponse.intValue()==1){
1167 1211
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1168 1212
                             MsCaseApplication application = new MsCaseApplication();
@@ -1222,6 +1266,13 @@ public class MsSignSealServiceImpl implements MsSignSealService {
1222 1266
                         //被申请人签名
1223 1267
                         sealSignRecordsel.setSignStatusResponse(1);
1224 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 1276
                         if(signStatusApply!=null&&signStatusApply.intValue()==1){
1226 1277
                             MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
1227 1278
                             MsCaseApplication application = new MsCaseApplication();

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/SignAward.java Просмотреть файл

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