|
|
@@ -212,8 +212,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
212
|
212
|
}
|
|
213
|
213
|
startPage();
|
|
214
|
214
|
// 查询案件列表
|
|
215
|
|
- List<MsCaseApplicationVO> caseApplicationList = msCaseApplicationMapper.list(req, caseStatusNames);
|
|
216
|
|
- return caseApplicationList;
|
|
|
215
|
+ return msCaseApplicationMapper.list(req, caseStatusNames);
|
|
217
|
216
|
}
|
|
218
|
217
|
|
|
219
|
218
|
@Override
|
|
|
@@ -271,12 +270,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
271
|
270
|
List<MsCaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
|
272
|
271
|
// 保存案件相关人员
|
|
273
|
272
|
if (affiliate != null) {
|
|
274
|
|
- // 设置申请人
|
|
|
273
|
+ // 设置申请机构
|
|
275
|
274
|
if (StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==1) {
|
|
276
|
275
|
// 组装申请机构
|
|
277
|
276
|
insertDept(affiliate);
|
|
278
|
277
|
// 新增申请机构代理人
|
|
279
|
278
|
insertAgentUser(affiliate);
|
|
|
279
|
+ }else if(StrUtil.isNotEmpty(affiliate.getApplicationName())&&affiliate.getOrganizeFlag()==0){
|
|
|
280
|
+ // 申请人为自然人
|
|
|
281
|
+ //
|
|
280
|
282
|
}
|
|
281
|
283
|
// 压缩包导入,则根据身份证号获取性别和出生日期
|
|
282
|
284
|
String identityNum = affiliate.getRespondentIdentityNum();
|
|
|
@@ -915,6 +917,15 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
915
|
917
|
if (currentFlow == null) {
|
|
916
|
918
|
return AjaxResult.error("当前流程不存在");
|
|
917
|
919
|
}
|
|
|
920
|
+ Integer miniProgressFlag = vo.getMiniProgressFlag() == null ? MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag();
|
|
|
921
|
+ // 先删除已选择的调解员,在新增
|
|
|
922
|
+ Example mediatorExample = new Example(MsCaseMediator.class);
|
|
|
923
|
+ Example.Criteria mediatorCriteria = mediatorExample.createCriteria();
|
|
|
924
|
+ mediatorCriteria.andEqualTo("caseAppliId", vo.getId());
|
|
|
925
|
+ mediatorCriteria.andEqualTo("type", miniProgressFlag);
|
|
|
926
|
+
|
|
|
927
|
+ msCaseMediatorMapper.deleteByExample(mediatorExample);
|
|
|
928
|
+
|
|
918
|
929
|
// 获取选择的调解员id
|
|
919
|
930
|
List<Long> userIds = vo.getUserList().stream().map(SysUser::getUserId).collect(Collectors.toList());
|
|
920
|
931
|
// 新增案件预约表
|
|
|
@@ -923,7 +934,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
923
|
934
|
mediator.setCaseAppliId(vo.getId());
|
|
924
|
935
|
mediator.setMediatorId(sysUser.getUserId());
|
|
925
|
936
|
mediator.setMediatorName(sysUser.getNickName());
|
|
926
|
|
- mediator.setType(vo.getMiniProgressFlag()==null?MediatorTypeEnum.PC.getCode() : vo.getMiniProgressFlag());
|
|
|
937
|
+ mediator.setType(miniProgressFlag);
|
|
927
|
938
|
msCaseMediatorMapper.insert(mediator);
|
|
928
|
939
|
}
|
|
929
|
940
|
|
|
|
@@ -977,10 +988,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
977
|
988
|
Example.Criteria criteria = example.createCriteria();
|
|
978
|
989
|
if(vo.getMiniProgressFlag() == null) {
|
|
979
|
990
|
// 申请人预约,需要查询被申请人是否预约,identity_type不为空
|
|
980
|
|
- criteria.andIsNotNull("type");
|
|
|
991
|
+ criteria.andEqualTo("type", MediatorTypeEnum.MI_NI_PROGRESS.getCode());
|
|
981
|
992
|
}else {
|
|
982
|
993
|
// 被申请人预约,需要查询申请人是否预约,identity_type为空
|
|
983
|
|
- criteria.andIsNull("type");
|
|
|
994
|
+ criteria.andEqualTo("type", MediatorTypeEnum.PC.getCode());
|
|
984
|
995
|
}
|
|
985
|
996
|
criteria.andEqualTo("caseAppliId", vo.getId());
|
|
986
|
997
|
// criteria.andEqualTo("mediatorId", user.getUserId());
|
|
|
@@ -1898,8 +1909,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1898
|
1909
|
throw new ServiceException("未找到下一个流程节点");
|
|
1899
|
1910
|
}
|
|
1900
|
1911
|
// setMediatorAndDate(application,vo);
|
|
1901
|
|
- application.setMediatorId(vo.getUserList().get(0).getUserId());
|
|
1902
|
|
- application.setMediatorName(vo.getUserList().get(0).getNickName());
|
|
|
1912
|
+ application.setMediatorId(vo.getMediatorId());
|
|
|
1913
|
+ application.setMediatorName(vo.getMediatorName());
|
|
1903
|
1914
|
application.setCaseFlowId(nextFlow.getNodeId());
|
|
1904
|
1915
|
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
|
1905
|
1916
|
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
|
|
@@ -2252,6 +2263,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
2252
|
2263
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
|
2253
|
2264
|
userMapper.insertUser(agentUser);
|
|
2254
|
2265
|
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
|
|
2266
|
+ // 新增部门用户关联表
|
|
|
2267
|
+// sysUserMapper.insertUser()
|
|
2255
|
2268
|
} else if (null == agentUser.getDeptId() ) {
|
|
2256
|
2269
|
// todo 未关联部门,关联部门
|
|
2257
|
2270
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|