|
@ -322,6 +322,9 @@ public class SysDeptServiceImpl implements ISysDeptService { |
|
|
* @param oldAncestors 旧的父ID集合 |
|
|
* @param oldAncestors 旧的父ID集合 |
|
|
*/ |
|
|
*/ |
|
|
public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors, String newAllName, String oldAllName) { |
|
|
public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors, String newAllName, String oldAllName) { |
|
|
|
|
|
if (null == oldAllName) { |
|
|
|
|
|
oldAllName = ""; |
|
|
|
|
|
} |
|
|
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId); |
|
|
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId); |
|
|
for (SysDept child : children) { |
|
|
for (SysDept child : children) { |
|
|
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors)); |
|
|
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors)); |
|
@ -341,6 +344,9 @@ public class SysDeptServiceImpl implements ISysDeptService { |
|
|
* @param newAllName 新的父ID集合 |
|
|
* @param newAllName 新的父ID集合 |
|
|
*/ |
|
|
*/ |
|
|
public void updateDeptChildrenNew(Long deptId, String newAllName, String oldAllName) { |
|
|
public void updateDeptChildrenNew(Long deptId, String newAllName, String oldAllName) { |
|
|
|
|
|
if (null == oldAllName) { |
|
|
|
|
|
oldAllName = ""; |
|
|
|
|
|
} |
|
|
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId); |
|
|
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId); |
|
|
for (SysDept child : children) { |
|
|
for (SysDept child : children) { |
|
|
if (!StringUtils.isEmpty(child.getAllName())) { |
|
|
if (!StringUtils.isEmpty(child.getAllName())) { |
|
|