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