|
|
@@ -419,15 +419,20 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|
419
|
419
|
SmsUtils.sendSms(request);
|
|
420
|
420
|
}
|
|
421
|
421
|
} else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
|
|
422
|
|
- return "该申请代理人已存在,与申请机构不匹配";
|
|
|
422
|
+// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
|
|
|
423
|
+ if(null!=agentUser.getDept()&&StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
|
|
|
424
|
+ return "该申请代理人已在【" + agentUser.getDept().getDeptName()+"】申请机构下存在,请检查填写信息是否正确";
|
|
|
425
|
+ }else {
|
|
|
426
|
+ return "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确";
|
|
|
427
|
+ }
|
|
423
|
428
|
} else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())){
|
|
424
|
429
|
// 同步用户表和案件关联人表的手机号和名称
|
|
425
|
430
|
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
|
426
|
431
|
caseAffiliate.setNameAgent(agentUser.getNickName());
|
|
427
|
432
|
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
|
428
|
433
|
// 新增角色为申请人
|
|
429
|
|
- if(agentUser.getRoleIds()!=null) {
|
|
430
|
|
- List<Long> longList = Arrays.asList(agentUser.getRoleIds());
|
|
|
434
|
+ if(CollectionUtil.isNotEmpty(agentUser.getRoles())) {
|
|
|
435
|
+ List<Long> longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
|
431
|
436
|
if(!longList.contains(roleId)) {
|
|
432
|
437
|
ArrayList<SysUserRole> sysUserRoles = new ArrayList<>();
|
|
433
|
438
|
SysUserRole sysUserRole = new SysUserRole();
|