部门代码调整
This commit is contained in:
@@ -314,7 +314,7 @@ public class DeptController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门id获取所有子部门的code
|
* 根据部门id获取所有子部门的code(pms项目专用)
|
||||||
* @author cdf
|
* @author cdf
|
||||||
* @date 2022/11/25
|
* @date 2022/11/25
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -326,18 +326,18 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getDepSonIdtByDeptId(String id) {
|
public List<String> getDepSonIdtByDeptId(String id) {
|
||||||
List<String> sonIds = this.baseMapper.getDeptSonIds(id);
|
List<String> sonIds = this.baseMapper.getDeptSonIds(id);
|
||||||
if(CollectionUtil.isNotEmpty(sonIds)){
|
|
||||||
sonIds.add(id);
|
sonIds.add(id);
|
||||||
}
|
|
||||||
return sonIds;
|
return sonIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getDepSonSelfCodetByDeptId(String id) {
|
public List<String> getDepSonSelfCodetByDeptId(String id) {
|
||||||
List<String> sonIds = this.baseMapper.getDeptSonSlfeIds(id);
|
Dept dept = this.getDeptById(id);
|
||||||
if(CollectionUtil.isNotEmpty(sonIds)){
|
if(Objects.isNull(dept)){
|
||||||
sonIds.add(id);
|
throw new BusinessException(UserResponseEnum.DEPT_MISSING);
|
||||||
}
|
}
|
||||||
|
List<String> sonIds = this.baseMapper.getDeptSonSlfeIds(id);
|
||||||
|
sonIds.add(dept.getCode());
|
||||||
return sonIds;
|
return sonIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user