diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 0830e7776..ffdbfd6c6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -5320,7 +5320,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> loadingMap = null; Map> reservationMap = null; if (!loadscanEntityList.isEmpty()){ - loadingMap = loadscanEntityList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getPackageId)); + loadingNumber = signforEntity.getLoadedNumber() - loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum(); + signingNumber = signforEntity.getReceivedQuantity() - loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getReceivedQuantity).sum(); + loadingMap = loadscanEntityList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getPackageId)); } //查询对应的计划品类 List reservationZeroPackageEntity = distributionReservationZeroPackageService.list(Wrappers.query().lambda() @@ -5330,6 +5332,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl zeroPackageEntities = reservationMap.get(parcelNumberDTO.getParcelListId()); DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.query().lambda() @@ -5354,15 +5358,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionReservationZeroPackageEntity.getQuantity()){ log.info("#############零担签收超过计划数量ParcelListId:{},计划:{}录入,:{}",parcelNumberDTO.getParcelListId(),distributionReservationZeroPackageEntity.getQuantity(),parcelNumberDTO.getSigningNum()); } - int i1 =parcelNumberDTO.getSigningNum() - distributionLoadscanEntity.getReceivedQuantity() ; - signingNumber += i1; - int i2 = parcelNumberDTO.getSigningNum() -distributionLoadscanEntity.getLoadedNub() ; - loadingNumber += i2; if (distributionLoadscanEntity.getLoadedNub() < parcelNumberDTO.getSigningNum()){ //将装车和签收进行统一数量 distributionLoadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum()); distributionLoadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum()); } + deliveryNumber = distributionParcelNumberEntity.getDeliveryQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); handQuantity = distributionParcelNumberEntity.getHandQuantity() + distributionLoadscanEntity.getReceivedQuantity() - parcelNumberDTO.getSigningNum(); outboundQuantity = distributionParcelNumberEntity.getOutboundQuantity() - distributionLoadscanEntity.getReceivedQuantity() + parcelNumberDTO.getSigningNum(); @@ -5373,8 +5374,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:"); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml index 39f3ae8a4..6f7be516b 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml @@ -89,6 +89,7 @@ sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum, sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum from logpm_distribution_loadscan t + where t.scan_status != 1 group by t.delivery_id) loadScan on loadScan.delivery_id = d.id left join (select t.delivery_id, @@ -215,6 +216,7 @@ sum(if(t.is_abnormal_loading = 1, 0, 1)) exLoadedNum, sum(if(t.is_abnormal_signing = 1, 0, 1)) exReNum from logpm_distribution_loadscan t + where t.scan_status != 1 group by t.delivery_id) loadScan on loadScan.delivery_id = lddl.id left join (select t.delivery_id,