Commit 79fe85a8 authored by yangyang's avatar yangyang

fix(人员同步): 增加判断,岗位不为空

parent 6a28c37e
......@@ -2348,7 +2348,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
});
// 添加人员管理角色
String post = tzsUserInfoDto.getPost();
if (post.contains(PersonManageRoleEnum.code.getId().toString())) {
if (post != null && post.contains(PersonManageRoleEnum.code.getId().toString())) {
CompanyModel companyModel = Optional.ofNullable(Privilege.companyClient.seleteOne(companySeq)).map(FeignClientResult::getResult).orElse(null);
if (!ValidationUtil.isEmpty(companyModel)) {
String companyType = companyModel.getCompanyType();
......@@ -2374,6 +2374,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if (!ObjectUtils.isEmpty(roleGroup) && roleGroup.getExtend() != null) {
Privilege.groupUserClient.create(Long.valueOf(roleGroup.getExtend()), userIds);
}
if (post != null) {
// 绑定两个规定用户组
post = post.replace("[", "").replace("]", "").replace("\"", "");
for (String code : post.split(",")) {
......@@ -2385,6 +2386,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
}
}
public void refreshAdminUserRole(List<TzsUserInfo> userInfos, List<String> userId) {
List<String> adminUserIdList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment