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 79483d786..9c704d1c3 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 @@ -601,13 +601,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) ); + boolean flag = abnormalEntities.stream().allMatch(a -> !distributionDeliveryListEntity.getId().equals(a.getDeliveryListId()) || !distrilbutionloadingscanDTO.getReservationId().equals(a.getReservationId())); if (flag){ - return Resp.scanFail("包件已存在异常", "包件已存在异常"); + //该异常属于其他车次 + String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); + log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect); + return Resp.scanFail("包件已在其他车次存在异常", "包件已在其他车次存在异常"); } - String collect = abnormalEntities.stream().map(DistributionLoadscanAbnormalEntity::getTrainNumber).collect(Collectors.joining(",")); - log.info("包件已在其他车次存在异常 >>>>当前车次:{},其他车次:{}",distributionDeliveryListEntity.getTrainNumber(),collect); - return Resp.scanFail("包件在其他车次存在异常", "包件在其他车次存在异常"); } //异步确认包条扫描信息 // distributionAsyncService.changeOrderSignforStatus(distrilbutionloadingscanDTO.getBarcode());