| | |
| | | @Resource |
| | | private TCrmClinicMapper crmClinicMapper; |
| | | |
| | | |
| | | @Resource |
| | | private TErpClinicInventoryGoodsMapper erpClinicInventoryGoodsMapper; |
| | | |
| | |
| | | tErpGoodsVO.setTypeName(tErpGoodsVO.getTypeName()); |
| | | } |
| | | } |
| | | List<String> unitIds = list.stream().map(TErpGoods::getPackingUnitId).collect(Collectors.toList()); |
| | | if (!unitIds.isEmpty()) { |
| | | List<TErpGoodsUnit> unitList = erpGoodsUnitMapper.selectBatchIds(unitIds); |
| | | for (TErpGoodsVO tErpGoodsVO : list) { |
| | | unitList.stream().filter(t -> t.getId().equals(tErpGoodsVO.getPackingUnitId())).findFirst().ifPresent(t -> tErpGoodsVO.setPackingUnitName(t.getUnitName())); |
| | | } |
| | | } |
| | | List<String> supplierIds = list.stream().map(TErpGoods::getSupplierClinicId).collect(Collectors.toList()); |
| | | if (!supplierIds.isEmpty()) { |
| | | List<TCrmSupplier> supplierClinicList = crmSupplierMapper.selectBatchIds(supplierIds); |
| | | for (TErpGoodsVO tErpGoodsVO : list) { |
| | | supplierClinicList.stream().filter(t -> tErpGoodsVO.getGoodsSource()==1 && t.getId().equals(tErpGoodsVO.getSupplierClinicId())).findFirst().ifPresent(t -> tErpGoodsVO.setSupplierName(t.getSupplierName())); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |