update 取消多余父部门类别编码获取

This commit is contained in:
AprilWind 2024-05-16 17:57:49 +08:00
parent 624fd87751
commit 479b17a8c2
2 changed files with 2 additions and 10 deletions

View File

@ -41,11 +41,6 @@ public class SysDeptVo implements Serializable {
*/
private String parentName;
/**
* 父部门类别编码
*/
private String parentCategory;
/**
* 祖级列表
*/

View File

@ -135,11 +135,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
return null;
}
SysDeptVo parentDept = baseMapper.selectVoOne(new LambdaQueryWrapper<SysDept>()
.select(SysDept::getDeptName, SysDept::getDeptCategory).eq(SysDept::getDeptId, dept.getParentId()));
if (ObjectUtil.isNotNull(parentDept)) {
dept.setParentName(parentDept.getDeptName());
dept.setParentCategory(parentDept.getDeptCategory());
}
.select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId()));
dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null);
return dept;
}