18792927508 2 anni fa
parent
commit
c53dffddfd

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

@@ -165,7 +165,7 @@ public class MsCaseApplicationController extends BaseController {
165 165
      */
166 166
     @PostMapping("/updateBooking")
167 167
     public AjaxResult updateBooking(@RequestBody BookingVO vo ) {
168
-        if(vo.getId()==null || CollectionUtil.isEmpty(vo.getHerDates())|| CollectionUtil.isEmpty(vo.getUserList())){
168
+        if(vo.getId()==null || CollectionUtil.isEmpty(vo.getUserList())){
169 169
             return error("参数校验失败");
170 170
         }
171 171
         return caseApplicationService.updateBooking(vo);

+ 63
- 0
ruoyi-common/src/main/java/com/ruoyi/common/enums/MediatorTypeEnum.java Vedi File

@@ -0,0 +1,63 @@
1
+package com.ruoyi.common.enums;
2
+
3
+import com.ruoyi.common.interfaces.EnumsInterface;
4
+
5
+/**
6
+ * @author wangqiong
7
+ * @description 选择调解员入口枚举
8
+ * @date 2023-11-17 14:05
9
+ */
10
+public enum MediatorTypeEnum implements EnumsInterface
11
+{
12
+    PC(0, "PC"),
13
+    MI_NI_PROGRESS(1, "小程序"),
14
+
15
+    ;
16
+
17
+    private final Integer code;
18
+    private final String text;
19
+
20
+    MediatorTypeEnum(Integer code, String text)
21
+    {
22
+        this.code = code;
23
+        this.text = text;
24
+    }
25
+
26
+    public Integer getCode()
27
+    {
28
+        return code;
29
+    }
30
+
31
+    public String getText()
32
+    {
33
+        return text;
34
+    }
35
+
36
+    /**
37
+     * 根据code获取text
38
+     * @param codeNo
39
+     * @return
40
+     */
41
+    public static String getTextByCode(Integer codeNo){
42
+        for (MediatorTypeEnum value : MediatorTypeEnum.values()) {
43
+            if (value.getCode().equals(codeNo)){
44
+                return value.getText();
45
+            }
46
+        }
47
+        return codeNo.toString();
48
+    }
49
+
50
+    /**
51
+     * 根据text获取code
52
+     * @param textStr
53
+     * @return
54
+     */
55
+    public static String getCodeByText(String textStr){
56
+        for (MediatorTypeEnum value : MediatorTypeEnum.values()) {
57
+            if (value.getText().equals(textStr)){
58
+                return value.getText();
59
+            }
60
+        }
61
+        return textStr;
62
+    }
63
+}

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseApplication.java Vedi File

@@ -84,7 +84,7 @@ public class MsCaseApplication {
84 84
      * 调解员id
85 85
      */
86 86
     @Column(name = "mediator_id")
87
-    private String mediatorId;
87
+    private Long mediatorId;
88 88
 
89 89
     /**
90 90
      * 调解员名称

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseMediator.java Vedi File

@@ -31,7 +31,7 @@ public class MsCaseMediator {
31 31
      * 调解员id
32 32
      */
33 33
     @Column(name = "mediator_id")
34
-    private String mediatorId;
34
+    private Long mediatorId;
35 35
 
36 36
     /**
37 37
      * 调解员名称

+ 16
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/BookingVO.java Vedi File

@@ -1,6 +1,7 @@
1 1
 package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
2 2
 
3 3
 import com.ruoyi.common.core.domain.entity.SysUser;
4
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseMediator;
4 5
 import lombok.Data;
5 6
 
6 7
 import java.util.List;
@@ -15,13 +16,17 @@ import java.util.List;
15 16
 @Data
16 17
 public class BookingVO {
17 18
     /**
18
-     * 调解员列表
19
+     * 申请人调解员列表
19 20
      */
20 21
     private List<SysUser> userList;
21 22
     /**
22
-     * 调解员列表
23
+     * 申请人调解员列表
23 24
      */
24
-    private List<MediatorVO> mediatorList;
25
+    private List<MsCaseMediator> mediatorList;
26
+    /**
27
+     * 被申请人调解员列表
28
+     */
29
+    private List<MsCaseMediator>resMediatorList;
25 30
     /**
26 31
      * 开庭日期集合
27 32
      */
@@ -38,6 +43,14 @@ public class BookingVO {
38 43
      * 批次
39 44
      */
40 45
     private String batchNumber;
46
+    /**
47
+     * 调解员id
48
+     */
49
+    private Long mediatorId;
50
+    /**
51
+     * 调解员
52
+     */
53
+    private String mediatorName;
41 54
     /**
42 55
      * 是否被申请人,1-被申请人,空为申请人
43 56
      */

+ 141
- 94
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Vedi File

@@ -13,6 +13,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
13 13
 import com.ruoyi.common.core.domain.entity.*;
14 14
 import com.ruoyi.common.core.domain.model.LoginUser;
15 15
 import com.ruoyi.common.enums.AnnexTypeEnum;
16
+import com.ruoyi.common.enums.MediatorTypeEnum;
16 17
 import com.ruoyi.common.enums.YesOrNoEnum;
17 18
 import com.ruoyi.common.exception.EsignDemoException;
18 19
 import com.ruoyi.common.exception.ServiceException;
@@ -869,8 +870,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
869 870
             return AjaxResult.error("暂无调解员");
870 871
         }
871 872
         List<Long> userIds = users.stream().map(SysUser::getUserId).collect(Collectors.toList());
872
-        // todo 状态为未结束的是待办数量,结束的是已办数量
873
-        Map<String, List<MsCaseApplication>> caseMap=null;
873
+        //  状态为未结束的是待办数量,结束的是已办数量
874
+        Map<Long, List<MsCaseApplication>> caseMap=null;
874 875
 
875 876
         List<MsCaseApplication> caseApplicationList = msCaseApplicationMapper.listMediator(userIds);
876 877
         if (CollectionUtil.isNotEmpty(caseApplicationList)) {
@@ -885,8 +886,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
885 886
             if(caseMap==null){
886 887
                 mediatorVO.setTodoAmount(0L);
887 888
                 mediatorVO.setCompleteAmount(0L);
888
-            } else if(caseMap.containsKey(String.valueOf(user.getUserId()))) {
889
-                List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
889
+            } else if(caseMap.containsKey(user.getUserId())) {
890
+                List<MsCaseApplication> applications = caseMap.get(user.getUserId());
890 891
                 // 已办案件
891 892
                 long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
892 893
                 mediatorVO.setTodoAmount(applications.size()-count);
@@ -914,14 +915,18 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
914 915
         if (currentFlow == null) {
915 916
             return AjaxResult.error("当前流程不存在");
916 917
         }
918
+        // 获取选择的调解员id
919
+        List<Long> userIds = vo.getUserList().stream().map(SysUser::getUserId).collect(Collectors.toList());
917 920
         // 新增案件预约表
918
-        MsCaseMediator mediator = new MsCaseMediator();
919
-        mediator.setCaseAppliId(vo.getId());
920
-        mediator.setMediatorId(String.valueOf(vo.getUserList().get(0).getUserId()));
921
-        mediator.setMediatorName(String.valueOf(vo.getUserList().get(0).getUserName()));
922
-        mediator.setHearDate(String.valueOf(vo.getHerDates().get(0)));
923
-        mediator.setType(vo.getMiniProgressFlag());
924
-        msCaseMediatorMapper.insert(mediator);
921
+        for (SysUser sysUser : vo.getUserList()) {
922
+            MsCaseMediator mediator = new MsCaseMediator();
923
+            mediator.setCaseAppliId(vo.getId());
924
+            mediator.setMediatorId(sysUser.getUserId());
925
+            mediator.setMediatorName(sysUser.getNickName());
926
+            mediator.setType(vo.getMiniProgressFlag()==null?MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag());
927
+            msCaseMediatorMapper.insert(mediator);
928
+        }
929
+
925 930
         // 申请人预约
926 931
         if (vo.getMiniProgressFlag() == null) {
927 932
             // 新增日志
@@ -931,12 +936,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
931 936
                 return AjaxResult.error("被申请人身份证为空");
932 937
             }
933 938
 
934
-            SysUser user = userMapper.selectUserByIdCard(msCaseAffiliate.getRespondentIdentityNum());
939
+         //   SysUser user = userMapper.selectUserByIdCard(msCaseAffiliate.getRespondentIdentityNum());
935 940
             // 被申请人存在
936
-            if (user != null) {
941
+        //    if (user != null) {
937 942
                 // 判断被申请人信息查询案件预约表
938
-                isReservation( vo,user);
939
-            }
943
+                isReservation( vo,userIds);
944
+         //   }
940 945
 
941 946
         } else {
942 947
             // 被申请人预约
@@ -946,11 +951,11 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
946 951
                 return AjaxResult.error("申请代理人手机号为空");
947 952
             }
948 953
 
949
-            SysUser user = userMapper.selectUserByPhone(msCaseAffiliate.getContactTelphoneAgent());
950
-            if(user!=null){
954
+         //   SysUser user = userMapper.selectUserByPhone(msCaseAffiliate.getContactTelphoneAgent());
955
+          //  if(user!=null){
951 956
                 // 判断申请人是否预约
952
-                isReservation( vo,user);
953
-            }
957
+                isReservation( vo,userIds);
958
+         //   }
954 959
 
955 960
         }
956 961
         return AjaxResult.success();
@@ -959,9 +964,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
959 964
     /**
960 965
      * 判断申请人/被申请人是否预约
961 966
      * @param vo
962
-     * @param user
967
+     * @param userIds 选择的调解员ids
963 968
      */
964
-    private void isReservation( BookingVO vo, SysUser user) {
969
+    private void isReservation( BookingVO vo,  List<Long> userIds ) {
970
+        // 查询所有调解员
971
+        List<SysUser> mediatorUsers = sysUserMapper.selectUserByRole("调解员");
972
+        if (CollectionUtil.isEmpty(mediatorUsers)) {
973
+            throw new ServiceException("暂无调解员");
974
+        }
975
+        Map<Long, SysUser> userMap = mediatorUsers.stream().collect(Collectors.toMap(SysUser::getUserId, Function.identity()));
965 976
         Example example = new Example(MsCaseMediator.class);
966 977
         Example.Criteria criteria = example.createCriteria();
967 978
         if(vo.getMiniProgressFlag() == null) {
@@ -973,14 +984,50 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
973 984
         }
974 985
         criteria.andEqualTo("caseAppliId", vo.getId());
975 986
      //   criteria.andEqualTo("mediatorId", user.getUserId());
976
-        int count = msCaseMediatorMapper.selectCountByExample(example);
977
-        if (count > 0) {
978
-            // 申请人已预约,更新主表流程节点
987
+        List<MsCaseMediator> msCaseMediators = msCaseMediatorMapper.selectByExample(example);
988
+        if (CollectionUtil.isNotEmpty(msCaseMediators)) {
989
+            MsCaseApplication application = new MsCaseApplication();
990
+            // 申请人或者被申请人已预约,更新主表流程节点
979 991
             MsCaseFlow nextFlow = caseFlowMapper.nextFlow(vo.getCaseFlowId());
980 992
             if (nextFlow == null) {
981 993
                throw new ServiceException("未找到下一个流程");
982 994
             }
983
-            MsCaseApplication application = new MsCaseApplication();
995
+            // 取出另一方的调解员id
996
+            List<Long> mediatorIds = msCaseMediators.stream().map(MsCaseMediator::getMediatorId).collect(Collectors.toList());
997
+            // 取出申请人和被申请人选择调解员交集,交集>1,根据优先级确定调解员(优先级查调解员已结束的案件)
998
+            List<Long> intersectionWithoutModifyOriginal = new ArrayList<>(userIds);
999
+            // 交集
1000
+            List<Long> intersection = new ArrayList<>(intersectionWithoutModifyOriginal);
1001
+            intersection.retainAll(mediatorIds);
1002
+            // 有一个交集,则直接更新主表调解员
1003
+            if(intersection.size()==1){
1004
+                application.setMediatorId(intersection.get(0));
1005
+                application.setMediatorName(userMap.get(intersection.get(0)).getNickName());
1006
+            }else if(intersection.size()>1){
1007
+                // 查询调解员的案件,有多个交集,根据优先级获取
1008
+                List<MsCaseApplication> caseApplicationList = msCaseApplicationMapper.listMediator(userIds);
1009
+                if (CollectionUtil.isNotEmpty(caseApplicationList)) {
1010
+                    Map<Long, List<MsCaseApplication>> caseMap = caseApplicationList.stream().collect(Collectors.groupingBy(MsCaseApplication::getMediatorId, Collectors.toList()));
1011
+                    long maxCount=0;
1012
+                    for (Long userId : intersection) {
1013
+                        if (caseMap.containsKey(userId)) {
1014
+                            List<MsCaseApplication> applications = caseMap.get(userId);
1015
+                            // 已办案件
1016
+                            long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1017
+                            if(count>=maxCount){
1018
+                                maxCount=count;
1019
+                                application.setMediatorId(userId);
1020
+                                application.setMediatorName(userMap.get(userId).getNickName());
1021
+                            }
1022
+                        }
1023
+                    }
1024
+
1025
+                }else {
1026
+                    // 没有案件,则随机取一个调解员
1027
+                    application.setMediatorId(intersection.get(0));
1028
+                    application.setMediatorName(userMap.get(intersection.get(0)).getNickName());
1029
+                }
1030
+            }
984 1031
             application.setId(vo.getId());
985 1032
             application.setCaseFlowId(nextFlow.getId());
986 1033
             application.setCaseStatusName(nextFlow.getCaseStatusName());
@@ -1002,21 +1049,21 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1002 1049
      * @param application
1003 1050
      * @param vo
1004 1051
      */
1005
-    private void setMediatorAndDate(MsCaseApplication application, BookingVO vo) {
1006
-        if(CollectionUtil.isNotEmpty(vo.getUserList())) {
1007
-            List<SysUser> userList = vo.getUserList();
1008
-            List<Long> userIds = userList.stream().map(SysUser::getUserId).collect(Collectors.toList());
1009
-            List<String> userNames = userList.stream().map(SysUser::getUserName).collect(Collectors.toList());
1010
-            String mediatorIds = StrUtil.join(",", userIds);
1011
-            String mediatorNames = StrUtil.join(",", userNames);
1012
-            application.setMediatorId(mediatorIds);
1013
-            application.setMediatorName(mediatorNames);
1014
-        }
1015
-        if(CollectionUtil.isNotEmpty( vo.getHerDates())) {
1016
-            String herDates = StrUtil.join(",", vo.getHerDates());
1017
-            application.setHearDate(herDates);
1018
-        }
1019
-    }
1052
+//    private void setMediatorAndDate(MsCaseApplication application, BookingVO vo) {
1053
+//        if(CollectionUtil.isNotEmpty(vo.getUserList())) {
1054
+//            List<SysUser> userList = vo.getUserList();
1055
+//            List<Long> userIds = userList.stream().map(SysUser::getUserId).collect(Collectors.toList());
1056
+//            List<String> userNames = userList.stream().map(SysUser::getUserName).collect(Collectors.toList());
1057
+//            String mediatorIds = StrUtil.join(",", userIds);
1058
+//            String mediatorNames = StrUtil.join(",", userNames);
1059
+//            application.setMediatorId(mediatorIds);
1060
+//            application.setMediatorName(mediatorNames);
1061
+//        }
1062
+//        if(CollectionUtil.isNotEmpty( vo.getHerDates())) {
1063
+//            String herDates = StrUtil.join(",", vo.getHerDates());
1064
+//            application.setHearDate(herDates);
1065
+//        }
1066
+//    }
1020 1067
 
1021 1068
     /**
1022 1069
      * 核实调解员
@@ -1049,60 +1096,58 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1049 1096
      */
1050 1097
     @Override
1051 1098
     public AjaxResult selectReservation(Long id) {
1099
+        // 查询案件主表
1100
+        MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(id);
1101
+        if (application == null) {
1102
+            return AjaxResult.error("该案件不存在");
1103
+        }
1052 1104
         BookingVO result = new BookingVO();
1053
-
1054
-      //  MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(id);
1055
-        // todo 返回申请人预约信息,预约信息查预约表
1056
-    //    criteria.andEqualTo("mediatorId", SecurityUtils.getUserId());
1057
-        MsCaseMediator msCaseMediator = msCaseMediatorMapper.selectLastApplicant(id);
1058
-        if(msCaseMediator==null){
1105
+        result.setMediatorId(application.getMediatorId());
1106
+        result.setMediatorName(application.getMediatorName());
1107
+        Example example = new Example(MsCaseAffiliate.class);
1108
+        example.createCriteria().andEqualTo("caseAppliId", id);
1109
+        List<MsCaseMediator> msCaseMediators = msCaseMediatorMapper.selectByExample(example);
1110
+        if(CollectionUtil.isEmpty(msCaseMediators)){
1059 1111
             return AjaxResult.success(result);
1060 1112
         }
1061
-//        if(caseApplication == null){
1062
-//            return AjaxResult.error("该案件不存在");
1063
-//        }
1113
+        Map<Integer, List<MsCaseMediator>> mediatorMap = msCaseMediators.stream().collect(Collectors.groupingBy(MsCaseMediator::getType));
1114
+        // 申请人
1115
+        result.setMediatorList(mediatorMap.get(MediatorTypeEnum.PC.getCode()));
1116
+        result.setResMediatorList(mediatorMap.get(MediatorTypeEnum.MI_NI_PROGRESS.getCode()));
1064 1117
 
1065
-        // 调解员是一个的处理
1066
-        if( StrUtil.isNotEmpty(msCaseMediator.getMediatorId()) && StrUtil.isNotEmpty(msCaseMediator.getMediatorName())){
1067 1118
             // 查询用户
1068
-            SysUser user = userMapper.selectUserById(Long.valueOf(msCaseMediator.getMediatorId()));
1069
-            if(user==null){
1070
-                return AjaxResult.error("调解员已被删除");
1071
-            }
1072
-            // 查询待办数量
1073
-            List<Long> mediatorIds = new ArrayList<>();
1074
-            mediatorIds.add(user.getUserId());
1075
-            Map<String, List<MsCaseApplication>> caseMap=null;
1076
-            List<MsCaseApplication> caseApplicationList = msCaseApplicationMapper.listMediator(mediatorIds);
1077
-            if (CollectionUtil.isNotEmpty(caseApplicationList)) {
1078
-                caseMap = caseApplicationList.stream().collect(Collectors.groupingBy(MsCaseApplication::getMediatorId, Collectors.toList()));
1119
+//            SysUser user = userMapper.selectUserById(Long.valueOf(msCaseMediator.getMediatorId()));
1120
+//            if(user==null){
1121
+//                return AjaxResult.error("调解员已被删除");
1122
+//            }
1123
+//            // 查询待办数量
1124
+//            List<Long> mediatorIds = new ArrayList<>();
1125
+//            mediatorIds.add(user.getUserId());
1126
+//            Map<Long, List<MsCaseApplication>> caseMap=null;
1127
+//            List<MsCaseApplication> caseApplicationList = msCaseApplicationMapper.listMediator(mediatorIds);
1128
+//            if (CollectionUtil.isNotEmpty(caseApplicationList)) {
1129
+//                caseMap = caseApplicationList.stream().collect(Collectors.groupingBy(MsCaseApplication::getMediatorId, Collectors.toList()));
1130
+//
1131
+//            }
1132
+//            MediatorVO mediatorVO = new MediatorVO();
1133
+//            mediatorVO.setMediatorId(user.getUserId());
1134
+//            mediatorVO.setMediatorName(user.getNickName());
1135
+//            mediatorVO.setSpecialty(user.getSpecialty());
1136
+//            if(caseMap==null){
1137
+//                mediatorVO.setTodoAmount(0L);
1138
+//                mediatorVO.setCompleteAmount(0L);
1139
+//            }
1140
+//
1141
+//            else if(caseMap.containsKey(String.valueOf(user.getUserId()))) {
1142
+//                List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
1143
+//                // 已办案件
1144
+//                long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1145
+//                mediatorVO.setTodoAmount(applications.size()-count);
1146
+//                mediatorVO.setCompleteAmount(count);
1147
+//            }
1148
+
1079 1149
 
1080
-            }
1081
-            MediatorVO mediatorVO = new MediatorVO();
1082
-            mediatorVO.setMediatorId(user.getUserId());
1083
-            mediatorVO.setMediatorName(user.getNickName());
1084
-            mediatorVO.setSpecialty(user.getSpecialty());
1085
-            if(caseMap==null){
1086
-                mediatorVO.setTodoAmount(0L);
1087
-                mediatorVO.setCompleteAmount(0L);
1088
-            }
1089 1150
 
1090
-            else if(caseMap.containsKey(String.valueOf(user.getUserId()))) {
1091
-                List<MsCaseApplication> applications = caseMap.get(String.valueOf(user.getUserId()));
1092
-                // 已办案件
1093
-                long count = applications.stream().filter(caseApplication -> !caseApplication.getCaseStatusName().equals("结束")).count();
1094
-                mediatorVO.setTodoAmount(applications.size()-count);
1095
-                mediatorVO.setCompleteAmount(count);
1096
-            }
1097
-            List<MediatorVO> mediatorVOS = new ArrayList<>();
1098
-            mediatorVOS.add(mediatorVO);
1099
-            result.setMediatorList(mediatorVOS);
1100
-        }
1101
-        if(StrUtil.isNotEmpty(msCaseMediator.getHearDate())){
1102
-            List<String> herdates = new ArrayList<>();
1103
-            herdates.add(msCaseMediator.getHearDate());
1104
-            result.setHerDates(herdates);
1105
-        }
1106 1151
         return AjaxResult.success(result);
1107 1152
     }
1108 1153
 
@@ -1220,9 +1265,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1220 1265
                             //发起签署
1221 1266
                             sealSignRecord.setFilename(fileName);
1222 1267
 
1223
-                            String arbitratorId = caseApplication.getMediatorId();
1224
-                            if (StringUtils.isNotEmpty(arbitratorId)) {
1225
-                                SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
1268
+                            Long arbitratorId = caseApplication.getMediatorId();
1269
+                            if (null!=arbitratorId) {
1270
+                                SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
1226 1271
                                 if (sysUser == null) {
1227 1272
                                     return AjaxResult.error();
1228 1273
                                 }
@@ -1483,9 +1528,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1483 1528
                                     //发起签署
1484 1529
                                     sealSignRecord.setFilename(fileName);
1485 1530
 
1486
-                                    String arbitratorId = caseApplication.getMediatorId();
1487
-                                    if (StringUtils.isNotEmpty(arbitratorId)) {
1488
-                                        SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
1531
+                                    Long arbitratorId = caseApplication.getMediatorId();
1532
+                                    if (arbitratorId!=null) {
1533
+                                        SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
1489 1534
                                         if (sysUser == null) {
1490 1535
                                             return AjaxResult.error();
1491 1536
                                         }
@@ -1727,7 +1772,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1727 1772
         if (nextFlow == null) {
1728 1773
             throw new ServiceException("未找到下一个流程节点");
1729 1774
         }
1730
-        setMediatorAndDate(application,vo);
1775
+     //   setMediatorAndDate(application,vo);
1776
+        application.setMediatorId(vo.getUserList().get(0).getUserId());
1777
+        application.setMediatorName(vo.getUserList().get(0).getNickName());
1731 1778
         application.setCaseFlowId(nextFlow.getNodeId());
1732 1779
         application.setCaseStatusName(nextFlow.getCaseStatusName());
1733 1780
         msCaseApplicationMapper.updateByPrimaryKeySelective(application);

+ 7
- 10
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Vedi File

@@ -10,7 +10,6 @@ import com.alibaba.fastjson.JSONObject;
10 10
 import com.google.gson.Gson;
11 11
 import com.google.gson.JsonArray;
12 12
 import com.google.gson.JsonObject;
13
-import com.ruoyi.common.constant.CaseApplicationConstants;
14 13
 import com.ruoyi.common.constant.FileTransformation;
15 14
 import com.ruoyi.common.core.domain.AjaxResult;
16 15
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
@@ -21,7 +20,6 @@ import com.ruoyi.common.exception.EsignDemoException;
21 20
 import com.ruoyi.common.exception.ServiceException;
22 21
 import com.ruoyi.common.utils.EmailOutUtil;
23 22
 import com.ruoyi.common.utils.SmsUtils;
24
-import com.ruoyi.common.utils.StringUtils;
25 23
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
26 24
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
27 25
 import com.ruoyi.system.mapper.SysUserMapper;
@@ -31,9 +29,11 @@ import com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage;
31 29
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseLogRecord;
32 30
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
33 31
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
34
-import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
35 32
 import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
36
-import com.ruoyi.wisdomarbitrate.domain.entity.mscase.*;
33
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
34
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
35
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
36
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseLogRecord;
37 37
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
38 38
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseLogRecordVO;
39 39
 import com.ruoyi.wisdomarbitrate.mapper.dept.DeptIdentifyMapper;
@@ -53,13 +53,10 @@ import org.springframework.stereotype.Service;
53 53
 import org.springframework.transaction.annotation.Transactional;
54 54
 import tk.mybatis.mapper.entity.Example;
55 55
 
56
-import static com.ruoyi.common.utils.SecurityUtils.getUsername;
57
-
58 56
 import javax.annotation.Resource;
59 57
 import java.io.File;
60 58
 import java.time.LocalDate;
61 59
 import java.util.*;
62
-import java.util.stream.Collectors;
63 60
 
64 61
 import static com.ruoyi.common.core.domain.AjaxResult.success;
65 62
 
@@ -151,9 +148,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
151 148
                                 //发起签署
152 149
                                 sealSignRecord.setFilename(fileName);
153 150
 
154
-                                String arbitratorId = caseApplication.getMediatorId();
155
-                                if (StringUtils.isNotEmpty(arbitratorId)) {
156
-                                    SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
151
+                                Long arbitratorId = caseApplication.getMediatorId();
152
+                                if (arbitratorId!=null) {
153
+                                    SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
157 154
                                     if (sysUser == null) {
158 155
                                         return AjaxResult.error();
159 156
                                     }