Commit 684b91df authored by yangyang's avatar yangyang

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

parent 183fa6b5
......@@ -2367,7 +2367,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();
......@@ -2394,6 +2394,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
Privilege.groupUserClient.create(Long.valueOf(roleGroup.getExtend()), userIds);
}
// 绑定两个规定用户组
if (post != null) {
post = post.replace("[", "").replace("]", "").replace("\"", "");
for (String code : post.split(",")) {
DataDictionary groupId = iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getCode, code).likeRight(DataDictionary::getType, QYRYGW));
......@@ -2404,6 +2405,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