diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java index 439f5c38d..b3c865288 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java @@ -1329,6 +1329,7 @@ public class DistributionStockupAppController extends BladeController { warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch()); warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId()); warehouseUpdownGoodsEntity.setAssociationId(byId.getMaterialId()); + warehouseUpdownGoodsEntity.setAssociationValue(byId.getCargoNumber()); warehouseUpdownGoodsEntity.setAssociationType("4"); warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId()); locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); @@ -1346,10 +1347,10 @@ public class DistributionStockupAppController extends BladeController { //查询包件信息 if (ObjectUtils.isNotNull(list) && list.size() > 1) { - return Resp.scanFail("查询到重复包条信息!!", "查询到重复包条信息!!"); + return Resp.scanFail("查询到重复包条信息!!", "查询到重复包条信息!!"); } if (ObjectUtils.isNull(list)) { - return Resp.scanFail("没有查询到包件信息 ! ", "没有查询到包件信息 ! "); + return Resp.scanFail("没有查询到包件信息!", "没有查询到包件信息 ! "); } log.info(">>>>> obj {}", list.get(0).getConditions()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockOrdercodeRecoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockOrdercodeRecoServiceImpl.java index 6ef4c2924..ffc5109f0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockOrdercodeRecoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockOrdercodeRecoServiceImpl.java @@ -90,14 +90,14 @@ public class DisStockOrdercodeRecoServiceImpl extends BaseServiceImpl locationStockListInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); if (Func.isNotEmpty(locationStockListInformation)){ List IncomingBatchs = locationStockListInformation.stream().map(WarehouseUpdownGoodsEntity::getIncomingBatch).collect(Collectors.toList()); List distributionStockListEntity = distributionStockListMapper.selectList(Wrappers.query().lambda() .eq(DistributionStockListEntity::getCargoNumber, cargoNumber) - .eq(DistributionStockListEntity::getMarketName,mallName) + .eq(DistributionStockListEntity::getMarketName,mallName) .in(DistributionStockListEntity::getIncomingBatch, IncomingBatchs) - .orderByAsc(DistributionStockListEntity::getCreateTime) ); if (Func.isNotEmpty(distributionStockListEntity)){ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 147884b3d..5da777f39 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -260,6 +260,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl> inventoryMap = detailsEntities.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId)); - List inventoryIds = detailsEntities.stream().map(DistributionDeliveryDetailsEntity::getStockListId).collect(Collectors.toList()); - List distributionStockListEntities = distributionStockListService.listByIds(inventoryIds); - if (!distributionStockListEntities.isEmpty()) { - for (DistributionStockListEntity distributionStockListEntity : distributionStockListEntities) { - Map tempMap = new HashMap<>(); - tempMap.put("序号", a); - tempMap.put("运单号", distributionStockListEntity.getIncomingBatch()); - tempMap.put("合同号", distributionStockListEntity.getOrderCode()); - tempMap.put("物料名称", distributionStockListEntity.getDescriptionGoods()); - //构建产品明细 - Map map1 = new HashMap<>(); - map1.put("物料编码", distributionStockListEntity.getCargoNumber()); - map1.put("物料单位", distributionStockListEntity.getCargoUnit()); - map1.put("物料规格", distributionStockListEntity.getCargoNorms()); - //查询此订制品库位信息 - DistributionDeliveryDetailsEntity distributionDeliveryDetailsEntity = inventoryMap.get(distributionStockListEntity.getId()).get(0); - Integer quantity = distributionDeliveryDetailsEntity.getQuantity(); - map1.put("计划数量", quantity); - hejiNum += quantity; - tempMap.put("小计", quantity); - tempMap.put("货位", ""); - tempMap.put("产品明细", map1); - tempMap.put("备货区", ""); - ls.add(tempMap); - a++; - if (!mailNames.toString().contains(distributionStockListEntity.getMarketName())) { - if (!mailNames.toString().isEmpty()) { - mailNames.append(","); - } - mailNames.append(distributionStockListEntity.getMarketName()); - } - if (!consigneeUnit.toString().contains(distributionStockListEntity.getMarketName())) { - if (!consigneeUnit.toString().isEmpty()) { - consigneeUnit.append(","); - } - consigneeUnit.append(distributionStockListEntity.getMarketName()); - } - } - } - } // 构建产品明细的表头 -- 这里目前只处理了定制品和有数据的库存品,对于零担 还没有处理 @@ -5098,6 +5059,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ladingScanEntities = distributionBillLadingScanService.list(Wrappers.query().lambda() + .eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) + .eq(DistributionBillLadingScanEntity::getStockArticleId, distributionStockArticleEntity.getId()) + ); + if (!ladingScanEntities.isEmpty()) { + int sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); + tempMap.put("签收件数", sum); + } ls.add(tempMap); a++; @@ -5148,6 +5119,62 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl> inventoryMap = detailsEntities.stream().collect(Collectors.groupingBy(DistributionDeliveryDetailsEntity::getStockListId)); + List inventoryIds = detailsEntities.stream().map(DistributionDeliveryDetailsEntity::getStockListId).collect(Collectors.toList()); + List distributionStockListEntities = distributionStockListService.listByIds(inventoryIds); + if (!distributionStockListEntities.isEmpty()) { + List> iList = new ArrayList<>(); + for (DistributionStockListEntity distributionStockListEntity : distributionStockListEntities) { + Map tempMap = new HashMap<>(); + tempMap.put("序号", a); + tempMap.put("批次号", distributionStockListEntity.getIncomingBatch()); + tempMap.put("产品名称", distributionStockListEntity.getDescriptionGoods()); + tempMap.put("单位", distributionStockListEntity.getCargoUnit()); + tempMap.put("物料编码", distributionStockListEntity.getCargoNumber()); + tempMap.put("物料单位", distributionStockListEntity.getCargoUnit()); + tempMap.put("物料规格", distributionStockListEntity.getCargoNorms()); + //构建产品明细 + //查询此订制品库位信息 + DistributionDeliveryDetailsEntity distributionDeliveryDetailsEntity = inventoryMap.get(distributionStockListEntity.getId()).get(0); + Integer quantity = distributionDeliveryDetailsEntity.getQuantity(); + //查询签收数量 + List list = disStockListDetailService.list(Wrappers.query().lambda() + .eq(DisStockListDetailEntity::getReservationId, distributionDeliveryDetailsEntity.getBillLadingId()) + .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + tempMap.put("签收件数", 0); + if (!list.isEmpty()) { + int sum = list.stream().filter(l -> InventorySigningStatusConstant.yiqianshou.getValue().equals(l.getStockSignfoStatus())).mapToInt(DisStockListDetailEntity::getNum).sum(); + tempMap.put("签收件数", sum); + } + tempMap.put("数量", quantity); + hejiNum += quantity; + tempMap.put("小计", quantity); + //这里只进行计划指定的批次库位进行整理 + tempMap.put("货位", distributionStockListEntity.getStorageLocation()); + tempMap.put("备货区", ""); + tempMap.put("备货件数",distributionDeliveryDetailsEntity.getRealityQuantity()); + iList.add(tempMap); + a++; + if (!mailNames.toString().contains(distributionStockListEntity.getMarketName())) { + if (!mailNames.toString().isEmpty()) { + mailNames.append(","); + } + mailNames.append(distributionStockListEntity.getMarketName()); + } + if (!consigneeUnit.toString().contains(distributionStockListEntity.getMarketName())) { + if (!consigneeUnit.toString().isEmpty()) { + consigneeUnit.append(","); + } + consigneeUnit.append(distributionStockListEntity.getMarketName()); + } + } + if (!iList.isEmpty()) { + map.put("库存品集合",iList); + } + } + } map.put("收货单单位", consigneeUnit.toString()); map.put("商场名称", mailNames.toString()); @@ -5160,6 +5187,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl