fix(iam): 人员部门关联关系问题修复
This commit is contained in:
+9
-6
@@ -32,6 +32,7 @@ import com.jero.modules.docking.utils.DockingConstant;
|
|||||||
import com.jero.modules.system.entity.*;
|
import com.jero.modules.system.entity.*;
|
||||||
import com.jero.modules.system.service.*;
|
import com.jero.modules.system.service.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -41,10 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -304,10 +302,15 @@ public class SyncIamService {
|
|||||||
|
|
||||||
// 获取组织机构(多个逗号分隔)
|
// 获取组织机构(多个逗号分隔)
|
||||||
String orgCode = userAcceptDto.getSrmsOrgCode();
|
String orgCode = userAcceptDto.getSrmsOrgCode();
|
||||||
|
|
||||||
String selectedDeparts = null;
|
String selectedDeparts = null;
|
||||||
if (CharSequenceUtil.isNotEmpty(orgCode)){
|
if (CharSequenceUtil.isNotEmpty(orgCode)){
|
||||||
selectedDeparts = orgCode;
|
List<SysDepart> sysDepartList = sysDepartService.list(
|
||||||
|
new LambdaQueryWrapper<SysDepart>()
|
||||||
|
.in(SysDepart::getOrgCode, Arrays.asList(orgCode.split(","))));
|
||||||
|
if (CollectionUtils.isNotEmpty(sysDepartList)){
|
||||||
|
selectedDeparts = sysDepartList.stream().map(SysDepart::getId)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑存储到用户表中,角色是系统自己处理的,更新不会影响角色,所以不传
|
// 编辑存储到用户表中,角色是系统自己处理的,更新不会影响角色,所以不传
|
||||||
|
|||||||
Reference in New Issue
Block a user