处理BUG
This commit is contained in:
parent
992afb200e
commit
5ee3daf7d3
@ -240,7 +240,10 @@ public class DepartmentServiceImpl extends BaseService implements IDepartmentSer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ZTreeDTO> listZTreeDepartment(Map<String, Object> params) throws SearchException {
|
public List<ZTreeDTO> listZTreeDepartment(Map<String, Object> params) throws SearchException {
|
||||||
List<ZTreeDTO> zTreeDTOs = ArrayListUtil.deepClone(departmentDao.listZTreeDepartments(params), ZTreeDTO.class);
|
List<ZTreeDTO> zTreeDepartment = departmentDao.listZTreeDepartments(params);
|
||||||
|
List<ZTreeDTO> zTreeDTOs = Arrays.asList(new ZTreeDTO[zTreeDepartment.size()]);
|
||||||
|
Collections.copy(zTreeDTOs, zTreeDepartment);
|
||||||
|
// List<ZTreeDTO> zTreeDTOs = ArrayListUtil.deepClone(departmentDao.listZTreeDepartments(params), ZTreeDTO.class);
|
||||||
for (ZTreeDTO zTreeDTO : zTreeDTOs) {
|
for (ZTreeDTO zTreeDTO : zTreeDTOs) {
|
||||||
Integer subCount = departmentDao.countByParentId(zTreeDTO.getId());
|
Integer subCount = departmentDao.countByParentId(zTreeDTO.getId());
|
||||||
setZTreeInfo(zTreeDTO, subCount);
|
setZTreeInfo(zTreeDTO, subCount);
|
||||||
@ -252,7 +255,7 @@ public class DepartmentServiceImpl extends BaseService implements IDepartmentSer
|
|||||||
public List<ZTreeDTO> listZTreeDepartment(String departmentParentId, Map<String, Object> params) {
|
public List<ZTreeDTO> listZTreeDepartment(String departmentParentId, Map<String, Object> params) {
|
||||||
if (StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) {
|
if (StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) {
|
||||||
List<String> listBaseDepartmentIds = listBaseDepartmentIds();
|
List<String> listBaseDepartmentIds = listBaseDepartmentIds();
|
||||||
if (!Objects.isNull(listBaseDepartmentIds)) {
|
if (listBaseDepartmentIds != null && !listBaseDepartmentIds.isEmpty()) {
|
||||||
params.put("departmentIds", listBaseDepartmentIds);
|
params.put("departmentIds", listBaseDepartmentIds);
|
||||||
return listZTreeDepartment(params);
|
return listZTreeDepartment(params);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user