diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java new file mode 100644 index 000000000..09c6594b5 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DeliveryOrderInfoVO.java @@ -0,0 +1,15 @@ +package com.logpm.distribution.vo; + +import lombok.Data; + +/** + * 订单查询VO + */ +@Data +public class DeliveryOrderInfoVO { + + + private Integer deliveryNum; + + private Integer signingNum; +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java index a00758288..3ca0cc29f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java @@ -456,6 +456,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl>>>>>>>>>>>>>:{}",split[finalJ]); String dictValue = freightBiz.stream().filter(q -> q.getDictValue().equals(split[finalJ])).findFirst().get().getDictKey(); business.setTypeService(dictValue); list.add(business); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java index 64c0083b3..1cccc09f3 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java @@ -167,7 +167,6 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl>>>",data); try { - boolean flag = false; ListdrivermiddleEntities = new ArrayList<>(); //对导入数据进行处理 for (BasicdataVehicleImportExcel datum : data) { @@ -193,12 +192,18 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl getOrderListByWaybill(@Param("waybillNumber") String waybillNumber); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 939d577d6..49488b181 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -1052,5 +1052,11 @@ WHERE ldsa.order_code = #{orderCode} AND ldsa.warehouse_id = #{warehouseId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index 13a32671e..8fe7de884 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -219,4 +219,12 @@ public interface IDistributionStockArticleService extends BaseService>>>>>>>>>>>>>> 车次状态维护2 代码执行 deliveryLoadingNum={}",deliveryLoadingNum); int loadingNum = 0; - int signingNum = 0; int deliveryQuantity = deliveryListEntity.getDeliveryNumber() + (Objects.isNull(deliveryListEntity.getInventoryNub()) ? 0 : deliveryListEntity.getInventoryNub()); if (Func.isNotEmpty(deliveryLoadingNum)) { loadingNum += deliveryLoadingNum.getInventoryLoadingQuantity() + deliveryLoadingNum.getPackageLoadingQuantity(); @@ -6847,6 +6846,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())); log.info(">>>>>>>>>>>>>>> 车次状态维护4 代码执行 anyMatch={}",anyMatch); + log.info(">>>>>>>>>>>>>>> 当前车次复核数量:{}", list.stream().filter(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())).count() +); if (anyMatch) { deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue()); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 17ed76bc1..ef0a0a65a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -49,6 +49,7 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.common.IsOrNoConstant; +import org.springblade.common.constant.loading.LoadingStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.order.OrderStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant; @@ -129,7 +130,10 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl selectDistributionStockArticlePage(IPage page, DistributionStockArticleVO distributionStockArticle) { @@ -1627,6 +1631,99 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl ids = baseMapper.getOrderListByWaybill(code); + List reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.query().lambda() + .in(DistributionReservationStockarticleEntity::getStockArticleId, ids) + .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(reservationStockarticleEntityList)){ + for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { + if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){ + //查询包件数量 + List packageEntityList = distributionReservationPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(packageEntityList)){ + a += packageEntityList.size(); + } + }else if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.yes.getValue())){ + //查询零担配送数量 + List zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationZeroPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()) + .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(zeroPackageEntityList)){ + a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); + } + }else { + log.error(method+"配送订单无类型"); + return R.fail("数据错误!!!"); + } + } + } + List list = distributionLoadscanService.list(Wrappers.query().lambda() + .in(DistributionLoadscanEntity::getOrderId, ids) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(list)){ + b = list.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); + } + deliveryOrderInfoVO.setDeliveryNum(a); + deliveryOrderInfoVO.setSigningNum(b); + return R.data(deliveryOrderInfoVO); + case 2: + DistributionStockArticleEntity one = this.getOne(Wrappers.query().lambda() + .eq(DistributionStockArticleEntity::getOrderCode, code) + ); + if (Func.isNotEmpty(one)){ + if (one.getIsZero().equals(IsOrNoConstant.no.getValue())){ + //查询包件数量 + List packageEntityList = distributionReservationPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationPackageEntity::getStockArticleId, one.getId()) + .ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(packageEntityList)){ + a += packageEntityList.size(); + } + }else if (one.getIsZero().equals(IsOrNoConstant.yes.getValue())){ + //查询零担配送数量 + List zeroPackageEntityList = distributionReservationZeroPackageService.list(Wrappers.query().lambda() + .eq(DistributionReservationZeroPackageEntity::getStockArticleId, one.getId()) + .ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); + if (Func.isNotEmpty(zeroPackageEntityList)){ + a += zeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum(); + } + }else { + log.error(method+"配送订单无类型"); + return R.fail("数据错误!!!"); + } + } + //订单 + deliveryOrderInfoVO.setDeliveryNum(a); + deliveryOrderInfoVO.setSigningNum(b); + return R.data(deliveryOrderInfoVO); + default: + log.error(method+"缺少参数type"); + return R.fail("查无此信息"); + } + } + @Override public DistributionStockArticleEntity findZeroByOrderCodeAndWarehouseId(String orderCode, Long warehouseId) {