| | |
| | | import com.ruoyi.system.mapper.*; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TClinicGoodsWarehouseQuery; |
| | | import com.ruoyi.system.query.TErpGoodsAdminQuery; |
| | | import com.ruoyi.system.query.TErpGoodsInventoryQuery; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.service.TErpGoodsService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TErpGoodsVO> pageAdminList(TErpGoodsAdminQuery query) { |
| | | PageInfo<TErpGoodsVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TErpGoodsVO> list = this.baseMapper.pageAdminList(query, pageInfo); |
| | | if (list.isEmpty()) { |
| | | return pageInfo; |
| | | } |
| | | List<String> typeIds = list.stream().map(TErpGoods::getTypeId).collect(Collectors.toList()); |
| | | if (!typeIds.isEmpty()) { |
| | | List<TErpGoodsType> typeList = erpGoodsTypeMapper.selectBatchIds(typeIds); |
| | | for (TErpGoodsVO tErpGoodsVO : list) { |
| | | typeList.stream().filter(t -> t.getId().equals(tErpGoodsVO.getTypeId())).findFirst().ifPresent(t -> tErpGoodsVO.setTypeName(t.getTypeName())); |
| | | } |
| | | } |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public List<TErpGoodsVO> listExport(TErpGoodsQuery query, SysUser user) { |
| | | List<TErpGoodsVO> list = this.baseMapper.listExport(query, user); |
| | | if (list.isEmpty()) { |