细节调整
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<select id="selectDeptListName" resultType="Dept">
|
||||
SELECT `Id` deptId, `Name` deptName
|
||||
FROM sys_dept
|
||||
WHERE Id IN
|
||||
WHERE State = 1 AND Id IN
|
||||
<foreach item="item" collection="deptIndexes" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
@@ -43,8 +43,10 @@ public class DeptMapServiceImpl implements DeptMapService {
|
||||
for (DeptMap dept: deptMaps) {
|
||||
DeptConfigVO configVO = new DeptConfigVO();
|
||||
BeanUtils.copyProperties(dept, configVO);
|
||||
configVO.setDeptName(
|
||||
deptList.stream().filter(item -> item.getDeptId().equals(configVO.getDeptId())).collect(Collectors.toList()).get(0).getDeptName());
|
||||
List<Dept> deptData = deptList.stream().filter(item -> item.getDeptId().equals(configVO.getDeptId())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(deptData)) {
|
||||
configVO.setDeptName(deptData.get(0).getDeptName());
|
||||
}
|
||||
deptConfigVOS.add(configVO);
|
||||
}
|
||||
return deptConfigVOS;
|
||||
@@ -96,7 +98,6 @@ public class DeptMapServiceImpl implements DeptMapService {
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.DEPT_BINDED);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user