|
|
@ -19,8 +19,7 @@ import com.engine.organization.util.page.PageUtil;
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Author weaver_cl
|
|
|
|
* @Author weaver_cl
|
|
|
@ -29,9 +28,7 @@ import java.util.stream.Collectors;
|
|
|
|
* @Version V1.0
|
|
|
|
* @Version V1.0
|
|
|
|
**/
|
|
|
|
**/
|
|
|
|
public class DepartmentServiceImpl extends Service implements DepartmentService {
|
|
|
|
public class DepartmentServiceImpl extends Service implements DepartmentService {
|
|
|
|
private DepartmentMapper getDepartmentMapper() {
|
|
|
|
|
|
|
|
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PageInfo<SingleDeptTreeVO> getDeptListByPid(QuerySingleDeptListParam param) {
|
|
|
|
public PageInfo<SingleDeptTreeVO> getDeptListByPid(QuerySingleDeptListParam param) {
|
|
|
@ -39,9 +36,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
//1.查询分部下所有部门
|
|
|
|
//1.查询分部下所有部门
|
|
|
|
PageUtil.start(param.getCurrent(), param.getPageSize());
|
|
|
|
PageUtil.start(param.getCurrent(), param.getPageSize());
|
|
|
|
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptListByCompId(param.getParentComp());
|
|
|
|
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptListByCompId(param.getParentComp());
|
|
|
|
|
|
|
|
PageInfo<DepartmentPO> pageInfo = new PageInfo<>(departmentPOS);
|
|
|
|
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS);
|
|
|
|
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS);
|
|
|
|
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleDeptTreeVO.class);
|
|
|
|
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS,SingleDeptTreeVO.class);
|
|
|
|
pageInfos.setTotal(departmentPOS.size());
|
|
|
|
pageInfos.setTotal(pageInfo.getTotal());
|
|
|
|
pageInfos.setPageNum(param.getCurrent());
|
|
|
|
pageInfos.setPageNum(param.getCurrent());
|
|
|
|
pageInfos.setPageSize(param.getPageSize());
|
|
|
|
pageInfos.setPageSize(param.getPageSize());
|
|
|
|
|
|
|
|
|
|
|
|