部门树增加下级节点

This commit is contained in:
wanggeng 2021-12-28 18:59:28 +08:00
parent a8d5dee3fe
commit b574e06488

View File

@ -27,6 +27,7 @@ import ink.wgink.service.department.pojo.vos.*;
import ink.wgink.service.department.service.IDepartmentAdjustmentService; import ink.wgink.service.department.service.IDepartmentAdjustmentService;
import ink.wgink.service.department.service.IDepartmentService; import ink.wgink.service.department.service.IDepartmentService;
import ink.wgink.service.department.service.IDepartmentUserService; import ink.wgink.service.department.service.IDepartmentUserService;
import ink.wgink.util.ArrayListUtil;
import ink.wgink.util.UUIDUtil; import ink.wgink.util.UUIDUtil;
import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.string.WStringUtil; import ink.wgink.util.string.WStringUtil;
@ -345,7 +346,13 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
params.put("departmentParentId", departmentParentId); params.put("departmentParentId", departmentParentId);
} }
params.put("departmentType", departmentType); params.put("departmentType", departmentType);
return departmentDao.listZTree(params); List<ZTreeDTO> sourceZTreeDTO = departmentDao.listZTree(params);
List<ZTreeDTO> zTreeDTOs = ArrayListUtil.deepClone(sourceZTreeDTO, ZTreeDTO.class);
for (ZTreeDTO zTreeDTO : zTreeDTOs) {
Integer subCount = departmentDao.countByParentId(zTreeDTO.getId());
setZTreeInfo(zTreeDTO, subCount);
}
return zTreeDTOs;
} }
@Override @Override