diff --git a/shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java b/shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java index 86c2b59..502ee5a 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java +++ b/shkj-wms/src/main/java/com/shkj/wms/outbound/SchedulingOutboundInfo.java @@ -91,7 +91,14 @@ public class SchedulingOutboundInfo { // 根据vin获取对应的出库任务数据——主要是过点时间 BaseBarcodesOutQueryBo baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo(); baseBarcodesOutQueryBo.setVin(vin); - BaseBarcodesOut baseBarcodesOut = iBaseBarcodesOutService.getOne(new LambdaQueryWrapper().eq(BaseBarcodesOut::getVin,vin).isNull(BaseBarcodesOut::getIs_cancel)); + BaseBarcodesOut baseBarcodesOut = iBaseBarcodesOutService.getOne( + new LambdaQueryWrapper().eq(BaseBarcodesOut::getVin,vin) + .isNull(BaseBarcodesOut::getIs_cancel).last("limit 1")) + ; + if (baseBarcodesOut == null){ + log.info("vin已出庫"); + return; + } // 通过过点时间获取等于该时间或者大于过点时间的任务数据 只获取一条数据 baseBarcodesOutQueryBo = new BaseBarcodesOutQueryBo(); baseBarcodesOutQueryBo.setTraverseDate(baseBarcodesOut.getTraverseDate());