mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
更新deptLevel字段
This commit is contained in:
@@ -209,6 +209,11 @@ public class SysDeptServiceImpl implements SysDeptService {
|
|||||||
String oldAncestors = oldDept.getAncestors();
|
String oldAncestors = oldDept.getAncestors();
|
||||||
dept.setAncestors(newAncestors);
|
dept.setAncestors(newAncestors);
|
||||||
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
||||||
|
|
||||||
|
// 更新deptLevel字段
|
||||||
|
if (StringUtils.isNotBlank(newParentDept.getDeptLevel())) {
|
||||||
|
dept.setDeptLevel(String.valueOf(Integer.parseInt(newParentDept.getDeptLevel()) + 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int result = deptMapper.updateDept(dept);
|
int result = deptMapper.updateDept(dept);
|
||||||
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
|
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
|
||||||
|
|||||||
Reference in New Issue
Block a user