diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java index 18186055..5ecb7eee 100644 --- a/src/com/engine/organization/service/impl/CompServiceImpl.java +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -88,6 +88,7 @@ public class CompServiceImpl extends Service implements CompService { Map datas = new HashMap<>(); PageUtil.start(params.getCurrent(), params.getPageSize()); List parentList = getCompMapper().listParent(); + PageInfo pageInfo = new PageInfo<>(parentList); List list = new ArrayList<>(); list.addAll(parentList); @@ -102,7 +103,7 @@ public class CompServiceImpl extends Service implements CompService { List compListDTOS = CompBO.buildCompDTOList(list, filterList); PageInfo pageInfos = new PageInfo<>(compListDTOS, CompListDTO.class); - pageInfos.setTotal(pageInfos.getTotal()); + pageInfos.setTotal(pageInfo.getTotal()); pageInfos.setPageNum(params.getCurrent()); pageInfos.setPageSize(params.getPageSize()); diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java index f6b4ffe8..c53cc3fc 100644 --- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java +++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java @@ -19,8 +19,7 @@ import com.engine.organization.util.page.PageUtil; import org.apache.commons.collections4.CollectionUtils; import weaver.general.StringUtil; -import java.util.*; -import java.util.stream.Collectors; +import java.util.List; /** * @Author weaver_cl @@ -29,9 +28,7 @@ import java.util.stream.Collectors; * @Version V1.0 **/ public class DepartmentServiceImpl extends Service implements DepartmentService { - private DepartmentMapper getDepartmentMapper() { - return MapperProxyFactory.getProxy(DepartmentMapper.class); - } + @Override public PageInfo getDeptListByPid(QuerySingleDeptListParam param) { @@ -39,9 +36,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService //1.查询分部下所有部门 PageUtil.start(param.getCurrent(), param.getPageSize()); List departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptListByCompId(param.getParentComp()); + PageInfo pageInfo = new PageInfo<>(departmentPOS); List singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS); - PageInfo pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleDeptTreeVO.class); - pageInfos.setTotal(departmentPOS.size()); + PageInfo pageInfos = new PageInfo<>(singleDeptTreeVOS,SingleDeptTreeVO.class); + pageInfos.setTotal(pageInfo.getTotal()); pageInfos.setPageNum(param.getCurrent()); pageInfos.setPageSize(param.getPageSize());