|
|
@@ -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);
|