mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 设置dept等级
This commit is contained in:
@@ -192,7 +192,7 @@ public class SysDeptServiceImpl implements SysDeptService {
|
||||
}
|
||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||
// 更新deptLevel字段
|
||||
if (StringUtils.isNotBlank(info.getDeptLevel())) {
|
||||
if (StringUtils.isBlank(dept.getDeptLevel()) && StringUtils.isNotBlank(info.getDeptLevel())) {
|
||||
dept.setDeptLevel(String.valueOf(Integer.parseInt(info.getDeptLevel()) + 1));
|
||||
}
|
||||
return deptMapper.insertDept(dept);
|
||||
@@ -215,7 +215,7 @@ public class SysDeptServiceImpl implements SysDeptService {
|
||||
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
||||
|
||||
// 更新deptLevel字段
|
||||
if (StringUtils.isNotBlank(newParentDept.getDeptLevel())) {
|
||||
if (StringUtils.isBlank(dept.getDeptLevel()) && StringUtils.isNotBlank(newParentDept.getDeptLevel())) {
|
||||
dept.setDeptLevel(String.valueOf(Integer.parseInt(newParentDept.getDeptLevel()) + 1));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user