diff --git a/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java b/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java index 9d58ba3..4f8e8e3 100644 --- a/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java +++ b/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java @@ -240,7 +240,10 @@ public class DepartmentServiceImpl extends BaseService implements IDepartmentSer @Override public List listZTreeDepartment(Map params) throws SearchException { - List zTreeDTOs = ArrayListUtil.deepClone(departmentDao.listZTreeDepartments(params), ZTreeDTO.class); + List zTreeDepartment = departmentDao.listZTreeDepartments(params); + List zTreeDTOs = Arrays.asList(new ZTreeDTO[zTreeDepartment.size()]); + Collections.copy(zTreeDTOs, zTreeDepartment); + // List zTreeDTOs = ArrayListUtil.deepClone(departmentDao.listZTreeDepartments(params), ZTreeDTO.class); for (ZTreeDTO zTreeDTO : zTreeDTOs) { Integer subCount = departmentDao.countByParentId(zTreeDTO.getId()); setZTreeInfo(zTreeDTO, subCount); @@ -252,7 +255,7 @@ public class DepartmentServiceImpl extends BaseService implements IDepartmentSer public List listZTreeDepartment(String departmentParentId, Map params) { if (StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) { List listBaseDepartmentIds = listBaseDepartmentIds(); - if (!Objects.isNull(listBaseDepartmentIds)) { + if (listBaseDepartmentIds != null && !listBaseDepartmentIds.isEmpty()) { params.put("departmentIds", listBaseDepartmentIds); return listZTreeDepartment(params); }