diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java index 9eb62b15f..ede021734 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java @@ -99,4 +99,10 @@ public class DistributionRetentionScanVo { */ private Integer maxQuantity; + + /** + * 包件签收状态 + */ + private String orderPackageStatus; + } 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 a687e88fa..3dfbe1466 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 @@ -1714,6 +1714,7 @@ 1 AS conditions, ldpl.waybill_number AS waybillNumber, ldpl.waybill_id AS waybillId, + ldpl.order_package_status AS orderPackageStatus, 1 AS scanType FROM logpm_distribution_delivery_list AS lddl diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index f38994702..315b03215 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -5646,15 +5646,22 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl retentionScanVos = new ArrayList<>(); //托盘货物都存在该配送任务的包件列表 //进行客户划分 - goodsLsit.forEach(g -> { - DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(g.getAssociationValue(), distrilbutionloadingscanDTO.getDeliveryId()); + for (WarehouseTrayGoodsEntity warehouseTrayGoodsEntity : goodsLsit) { + DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(warehouseTrayGoodsEntity.getAssociationValue(), distrilbutionloadingscanDTO.getDeliveryId()); + + if (Func.isNotEmpty(retentionScanVo)) { + if (retentionScanVo.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){ + log.error("滞留扫描出现签收包件>>>>>>>>>>>>>>>:{}",retentionScanVo.getOrderPackageCode()); + return Resp.scanFail(retentionScanVo.getOrderPackageCode()+"已签收", "此包件已签收"); + } retentionScanVo.setScanType(3); retentionScanVos.add(retentionScanVo); } else { - log.error("#############查询托盘包件信息错误,包件码为:{}", g.getAssociationValue()); + log.error("#############查询托盘包件信息错误,包件码为:{}", warehouseTrayGoodsEntity.getAssociationValue()); } - }); + } + if (Func.isNotEmpty(retentionScanVos)) { trayRetentionVO.setGoodsList(retentionScanVos); return R.data(trayRetentionVO);