diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index d604e0af6..4fba54874 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -87,6 +87,7 @@ public class DistributionStockupAppController extends BladeController { private final IDistributionStockArticleService distributionStockArticleService; private final IDistributionParcelListService distributionParcelListService; private final IDistributionReservationPackageService distributionReservationPackageService; + private final IDistributionReservationStocklistService distributionReservationStocklistService; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient; private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient; @@ -465,14 +466,35 @@ public class DistributionStockupAppController extends BladeController { log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId()); return R.fail(3002, "备货库存品ID不能为空"); } - List list = distributionStockupService.getLocationSelection(stockupDTO); //自提 - if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ - return R.data(list); - } - List listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO); //商配 - if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ - return R.data(listMarket); + //查询库存品信息 + DistributionReservationStocklistEntity byId = distributionReservationStocklistService.getById(stockupDTO.getDeliveryDetailsId()); + if(ObjectUtils.isNotNull(byId)){ + DistributionStockListEntity byId1 = iDistributionStockListService.getById(byId.getStocklistId()); + if(byId1.getSourceType().equals("2")){ + //导入 + List list = distributionStockupService.getLocationSelection(stockupDTO); //自提 + if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ + return R.data(list); + } + List listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO); //商配 + if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ + return R.data(listMarket); + } + }else{ + //订单 + List list = distributionStockupService.getLocationSelectionOrder(stockupDTO); //自提 + if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ + return R.data(list); + } + List listMarket = distributionStockupService.getLocationMarketSelectionOrder(stockupDTO); //商配 + if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ + return R.data(listMarket); + } + + } + } + return Resp.scanFail("当前待备货的库存品未上架,请上架后在继续备货操作!!!","当前待备货的库存品未上架,请上架后在继续备货操作!!!"); } @@ -733,7 +755,7 @@ public class DistributionStockupAppController extends BladeController { WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); warehouseUpdownGoodsEntity.setAssociationId(list.get(0).getId()); - warehouseUpdownGoodsEntity.setAssociationType("4"); + warehouseUpdownGoodsEntity.setAssociationType("3"); warehouseUpdownGoodsEntity.setWarehouseId(byId.getWarehouseId()); locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity); if(locationInformation.isEmpty()){ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml index 364c0e74c..f778e1201 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml @@ -60,8 +60,7 @@ - SELECT lddl.id id, lddl.train_number trainNumber, @@ -167,7 +166,6 @@ lddl.loading_time loadingTime, lddl.note_number noteNumber, lddl.source source, - lddl.vehicle_name vehicleName, ( SELECT COALESCE ( @@ -189,8 +187,11 @@ logpm_distribution_signfor lds WHERE lddl.id = lds.delivery_id - ) scannedNumber + ) scannedNumber, + GROUP_CONCAT(DISTINCT ldr.consignee SEPARATOR ',') clineName FROM logpm_distribution_delivery_list lddl + left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id + LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id lddl.is_deleted = 0 @@ -205,6 +206,9 @@ and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') + + and ldr.consignee like concat('%',#{param.clineName},'%') + and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') @@ -239,6 +243,20 @@ and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%') + GROUP BY lddl.id , + lddl.train_number , + lddl.warehouse_name , + lddl.warehouse_id , + lddl.type , + lddl.kind , + lddl.vehicle_name , + lddl.driver_name , + lddl.vehicle_id , + lddl.driver_id , + lddl.distribution_company , + lddl.delivery_status , + lddl.delivery_list_loading_status + + + +