|
|
@@ -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());
|
|
|
@@ -1836,8 +1847,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
1836
|
1847
|
throw new ServiceException("未找到下一个流程节点");
|
|
1837
|
1848
|
}
|
|
1838
|
1849
|
// setMediatorAndDate(application,vo);
|
|
1839
|
|
- application.setMediatorId(vo.getUserList().get(0).getUserId());
|
|
1840
|
|
- application.setMediatorName(vo.getUserList().get(0).getNickName());
|
|
|
1850
|
+ application.setMediatorId(vo.getMediatorId());
|
|
|
1851
|
+ application.setMediatorName(vo.getMediatorName());
|
|
1841
|
1852
|
application.setCaseFlowId(nextFlow.getNodeId());
|
|
1842
|
1853
|
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
|
1843
|
1854
|
msCaseApplicationMapper.updateByPrimaryKeySelective(application);
|
|
|
@@ -2190,6 +2201,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
2190
|
2201
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|
|
2191
|
2202
|
userMapper.insertUser(agentUser);
|
|
2192
|
2203
|
userRoleMapper.insertUserRole(agentUser.getUserId(), roleId);
|
|
|
2204
|
+ // 新增部门用户关联表
|
|
|
2205
|
+// sysUserMapper.insertUser()
|
|
2193
|
2206
|
} else if (null == agentUser.getDeptId() ) {
|
|
2194
|
2207
|
// todo 未关联部门,关联部门
|
|
2195
|
2208
|
agentUser.setDeptId(Long.valueOf(affiliate.getApplicationId()));
|