@@ -13,15 +13,15 @@ public enum AddUserCodeEnum { | |||
ADD_IS_FAILED(1100100, "添加失败"), | |||
CODE_IS_NULL(1100101, "编号不能为空"), | |||
USERNAME_IS_NULL(1100102, "账号不能为空"), | |||
REALNAME_IS_NULL(1100103, "姓名不能为空"), | |||
USERNAME_IS_NULL(1100102, "员工账号不能为空"), | |||
REALNAME_IS_NULL(1100103, "员工姓名不能为空"), | |||
ROLE_ID_IS_NULL(1100104, "角色不能为空"), | |||
DEPT_ID_IS_NULL(1100105, "部门不能为空"), | |||
CLIENT_ID_IS_NULL(1100106, "ClientID不能为空"), | |||
TYPE_ID_IS_NULL(1100107, "用户类型不能为空"), | |||
TYPE_ID_IS_NOT_EXISTS(1100108, "用户类型不存在"), | |||
PHONE_NOT_IMATCH(1100109, "手机号不匹配"), | |||
USERNAME_ALREADY_EXISTS(1100110, "系统中已经存在该用户名"), | |||
USERNAME_ALREADY_EXISTS(1100110, "系统中已经存在该账号"), | |||
ROLE_IS_NOT_EXISTS(1100111, "该角色不存在"); | |||
/** |
@@ -201,6 +201,8 @@ public class UpdateDeptService { | |||
// 差集:新增公路 | |||
Collection<String> addRoadIdList = org.apache.commons.collections4.CollectionUtils.subtract(newRoadIdList, oldRoadIdList); | |||
if (!CollectionUtils.isEmpty(addRoadIdList)) { | |||
// 去重,防止前端提交了重复的数据 | |||
addRoadIdList= addRoadIdList.stream().distinct().collect(Collectors.toList()); | |||
this.addRoadToDept(tenantId, newEditDeptRequest.getId(), addRoadIdList); | |||
} | |||
@@ -301,6 +303,8 @@ public class UpdateDeptService { | |||
Collection<String> addSectionIdList = org.apache.commons.collections4.CollectionUtils.subtract(newSectionIdList, oldSectionIdList); | |||
if (!CollectionUtils.isEmpty(addSectionIdList)) { | |||
// 去重,防止前端提交了重复的数据 | |||
addSectionIdList= addSectionIdList.stream().distinct().collect(Collectors.toList()); | |||
// 添加路段和部门数据 | |||
this.addSectionToDept(tenantId, newEditDeptRequest.getId(), addSectionIdList); | |||
} |