From 8532c9634391cbc846707732a1a8a9467aa7bfe5 Mon Sep 17 00:00:00 2001 From: ljw Date: Sun, 4 Jan 2026 13:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=9C=BA=E6=97=B6=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=97=B6=E9=97=B4=EF=BC=9A=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E5=A4=A7=E4=BA=8E=E8=BF=9B=E5=9C=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B43=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/service/TruckWeighingBusinessService.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/njzscloud-svr/src/main/java/com/njzscloud/dispose/cst/order/service/TruckWeighingBusinessService.java b/njzscloud-svr/src/main/java/com/njzscloud/dispose/cst/order/service/TruckWeighingBusinessService.java index 668deef..95cfed0 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/dispose/cst/order/service/TruckWeighingBusinessService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/dispose/cst/order/service/TruckWeighingBusinessService.java @@ -17,6 +17,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.io.ByteArrayInputStream; +import java.time.Duration; import java.time.LocalDateTime; import java.util.Base64; import java.util.List; @@ -68,6 +69,18 @@ public class TruckWeighingBusinessService { boolean isComing = isTruckComing(orderTrans); boolean isLeaving = isTruckLeaving(orderTrans); if (isLeaving) { + // 出场时检查时间:当前时间必须大于进场时间3分钟 + if (orderTrans.getInTime() != null) { + long minutesSinceEntry = Duration.between(orderTrans.getInTime(), LocalDateTime.now()).toMinutes(); + if (minutesSinceEntry < 3) { + log.warn("车辆 {} 出场时间过早,进场时间: {}, 当前已过 {} 分钟,不满足最少3分钟要求", + licensePlate, orderTrans.getInTime(), minutesSinceEntry); + return; + } + } else { + return; + } + // 出场时检查是否已看料 if (!CheckStatus.YiKanLiao.equals(orderTrans.getCheckStatus())) { handle.playVoice(licensePlate + VoiceConstants.VOICE_UNCHECKED);