| | |
| | | |
| | | @Override |
| | | public IPage<GdSupplyDemandVO> selectGdSupplyDemandPage(IPage<GdSupplyDemandVO> page, GdSupplyDemandPageParam gdSupplyDemand) { |
| | | gdSupplyDemand.setDeptList(SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()))); |
| | | List<Long> deptList = new ArrayList<>(); |
| | | if (!AuthUtil.isAdministrator()) { |
| | | deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | } |
| | | gdSupplyDemand.setDeptList(deptList); |
| | | return page.setRecords(baseMapper.selectGdSupplyDemandPage(page, gdSupplyDemand)); |
| | | } |
| | | |
| | |
| | | if (Func.isEmpty(gdSupplyDemand)) { |
| | | throw new ServiceException("需求参数不能为空"); |
| | | } |
| | | GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()))); |
| | | List<Long> deptList = new ArrayList<>(); |
| | | if (!AuthUtil.isAdministrator()) { |
| | | deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | } |
| | | GdSupplyDemandEntity detail = baseMapper.selectGdSupplyDemandDetail(gdSupplyDemand, deptList); |
| | | if (detail == null) { |
| | | throw new ServiceException("未查询到数据"); |
| | | } |