diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index d95e375b8..fa76b69b5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -1598,11 +1598,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl lineCarsOrderList = carsLoadLineDTO.getAddList(); //把lineCarsOrderList中的所有运单号合并成一个集合 List waybillNos = lineCarsOrderList.stream().map(TrunklineCarsOrderDTO::getWaybillNo).collect(Collectors.toList()); - List freezeOrAbolishWaybillList = warehouseWaybillClient.findFreezeOrAbolishByWaybillNos(waybillNos); - if (!CollUtil.isEmpty(freezeOrAbolishWaybillList)) { - log.warn("##########saveNew: 运单有变动,请重新做计划"); - throw new CustomerException(400, "运单有变动,请重新做计划"); + if(!waybillNos.isEmpty()){ + List freezeOrAbolishWaybillList = warehouseWaybillClient.findFreezeOrAbolishByWaybillNos(waybillNos); + if (!CollUtil.isEmpty(freezeOrAbolishWaybillList)) { + log.warn("##########saveNew: 运单有变动,请重新做计划"); + throw new CustomerException(400, "运单有变动,请重新做计划"); + } } + for (TrunklineCarsOrderDTO carsOrderDTO : lineCarsOrderList) { Integer planNum = carsOrderDTO.getPlanNum(); String orderCode = carsOrderDTO.getOrderCode();