diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java index a22f558ec..95a61c883 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java @@ -89,8 +89,8 @@ public class DistributionDeliveryAppController { @GetMapping("/order") @ApiOperationSupport(order = 4) @ApiOperation(value = "查看订单", notes = "DistributionAppDeliveryListDTO") - public R> order(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) { - IPage pages = distributionDeliveryInfoService.selectDistributionAppDeliveryorder(Condition.getPage(query), distributionAppDeliveryListDTO); + public R> order(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { + List pages = distributionDeliveryInfoService.selectDistributionAppDeliveryorder(distributionAppDeliveryListDTO); return R.data(pages); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml index 5cc216c28..a2d8476ec 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml @@ -426,7 +426,7 @@ FROM logpm_distribution_stock_list - service_type = #{par.serviceType} and warehouse_name = #{par.warehouseName} + service_type = #{par.serviceType} and warehouse_id = #{par.warehouseId} and incoming_batch like concat('%',#{par.incomingBatch},'%') diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java index 0f6425591..d798535a8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java @@ -92,7 +92,7 @@ public interface IDistributionDeliveryInfoService extends BaseService selectDistributionAppDeliveryorder(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); + List selectDistributionAppDeliveryorder(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); /** * 从客户查看库存品 * diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java index 6851ce687..a0fbe02a3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java @@ -156,7 +156,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl selectDistributionAppDeliveryorder(IPage page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { + public List selectDistributionAppDeliveryorder(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { //-------------------------------------2023-10-07 客户查看订单详情----------------------------------------------------------------- // 这里先查询出客户的订单信息,然后查询订单的预约包件信息 @@ -332,7 +332,7 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl().lambda() - .in(!reList.isEmpty(), DistributionStockEntity::getReservationId, reList) - ).intValue(); //扫描件数 - Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber(); //配送件数 - if (reNub < deliveryNumber) { - distributionAppDeliveryListVO.setIsstock("备货未完成"); + distributionAppDeliveryListVO.setIsstock("备货未完成"); + List stockEntityList = distributionStockMapper.selectList(new QueryWrapper().lambda() + .eq(DistributionStockEntity::getReservationId, distributionAppDeliveryListVO.getReservationId())); + if (Func.isNotEmpty(stockEntityList)){ + Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber(); //配送件数 + int sum = stockEntityList.stream().mapToInt(DistributionStockEntity::getStockQuantity).sum(); + if (sum == deliveryNumber) { + distributionAppDeliveryListVO.setIsstock("备货完成"); + } } //查询司机 List distributionAppDeliverySelfVOS = distributionDeliverySelfMapper.selectListcustom(distributionAppDeliveryListVO.getId()); @@ -2640,6 +2642,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { if (!Func.equals(dp.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(dp.getOrderPackageReservationStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())) { @@ -2666,12 +2672,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl { orderPackageNum.getAndAdd(p.getQuantity()); DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity(); - reservationPackageEntity.setPacketBarStatus(ReservationPackageStatusConstant.zhengchang.getValue()); + reservationPackageEntity.setPacketBarStatus(ReservationPackageStatusConstant.xinzeng.getValue()); reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode()); reservationPackageEntity.setStockArticleId(s.getId()); reservationPackageEntity.setReservationId(reservationEntity.getId()); @@ -2727,6 +2732,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl stockListVOList = baseMapper.selectAllStockList(stockListDTO); page.setRecords(stockListVOList); return page;