Explorar el Código

机关指导处

buzhanyi hace 1 año
padre
commit
50b14a26dc

+ 1 - 1
purchase-system/src/main/java/com/ozs/system/service/impl/SysDeptOrganServiceImpl.java

@@ -72,7 +72,7 @@ public class SysDeptOrganServiceImpl implements SysDeptOrganService {
             //本部门
             LambdaQueryWrapper<SysDeptOrgan> wrapper = new LambdaQueryWrapper<>();
             wrapper.eq(SysDeptOrgan::getDeptId, deptId);
-            String[] ancestors = sysDept.getAncestors().split(",");
+            String[] ancestors = (sysDept.getAncestors() + "," + deptId).split(",");
             //上级(除了顶级组织的每一级)
             if (ancestors.length > 1) {
                 for (int i = 1; i < ancestors.length; i++) {