|
@@ -53,10 +53,10 @@ public class SysDeptOrganServiceImpl implements SysDeptOrganService {
|
|
|
String[] ancestors = sysDept.getAncestors().split(",");
|
|
|
//上级(除了顶级组织的每一级)
|
|
|
for (int i = 2; i < ancestors.length; i++) {
|
|
|
- String did = ancestors[i];
|
|
|
LambdaQueryWrapper<SysDeptOrgan> wrapperT = new LambdaQueryWrapper<>();
|
|
|
List<SysDeptOrgan> organsT;
|
|
|
- if (!ObjectUtils.isEmpty(did) && !did.equals("0")) {
|
|
|
+ if (!ObjectUtils.isEmpty(ancestors[i]) && !ancestors[i].equals("0")) {
|
|
|
+ String did = ancestors[i];
|
|
|
wrapperT.eq(SysDeptOrgan::getDeptId, did);
|
|
|
organsT = deptOrganMapper.selectList(wrapperT);
|
|
|
SysDept sysDeptTwo = sysDeptMapper.selectDeptById(Long.parseLong(did));
|