diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java index a06fb4ee9..98a923531 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java @@ -41,6 +41,9 @@ public class DistributionStockupStockListVO implements Serializable { private Integer unpack;//是否拆包 0 没有 1 拆了 private String sourceType;//是否拆包 1 订单 2导入 + + + // 货位ID 集合 private String allocations; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java index bbef2c2a6..f3c54c30a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java @@ -70,7 +70,7 @@ public interface DistributionReservationMapper extends BaseMapper selectStockupOrderList(@Param("reservationId")Long reservationId,@Param("isZero") String isZero); List selectStockupStockList(@Param("reservationId")Long reservationId); - List selectStockupStockListNew(@Param("reservationId")Long reservationId); + List selectStockupStockListNew(@Param("reservationId")Long reservationId,@Param("warehouseId") Long warehouseId); Integer selectOrderNumByReservationId(@Param("reservationId")Long reservationId); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 4672d55b8..09d6ec569 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -317,8 +317,8 @@ (SELECT SUM(aldrs.reality_num) FROM logpm_distribution_reservation_stocklist AS aldrs WHERE aldrs.reservation_id = #{reservationId} AND aldrs.stocklist_id in (t.aaa)) AS realNum, (SELECT SUM(newldrs.reservation_num) FROM logpm_distribution_reservation_stocklist AS newldrs WHERE newldrs.reservation_id = #{reservationId} AND newldrs.stocklist_id in (t.aaa)) AS planNum, ( - select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number or association_value in ( - SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number) + select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number and warehouse_id=#{warehouseId} or association_value in ( + SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number and warehouse_id=#{warehouseId} ) ) as allocations FROM ( diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java index 7d4d58eb9..5a71f68d5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java @@ -173,7 +173,7 @@ public interface IDistributionReservationService extends BaseService selectStockupOrderList(Long reservationId,String isZero); - List selectStockupStockList(Long reservationId); + List selectStockupStockList(Long reservationId,Long warehouseId); Integer selectOrderNumByReservationId(Long reservationId); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index fa44537e7..36367e490 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -2863,8 +2863,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl selectStockupStockList(Long reservationId) { - return baseMapper.selectStockupStockListNew(reservationId); + public List selectStockupStockList(Long reservationId,Long warehouseId) { + return baseMapper.selectStockupStockListNew(reservationId,warehouseId); } @Override diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index fb9a54b45..2939b2322 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -1135,7 +1135,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl selectStockupStockList(StockupDTO stockupDTO) { + + Long reservationId = stockupDTO.getReservationId();//预约单id + DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); + if (stockupDTO.getTypeService().equals("3")) { //自 List list = distributionStockupService.selectStockupSelf(reservationId); @@ -1163,7 +1167,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl list = distributionReservationService.selectStockupStockList(reservationId); + List list = distributionReservationService.selectStockupStockList(reservationId,reservationEntity.getWarehouseId()); for (int i = 0; i < list.size(); i++) { DistributionStockupStockListVO distributionStockupStockListVO = list.get(i); if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) {