From 9ca945a6f1026e7a35979db6d64c9b629c50245a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-S9HJSOEB=5C=E6=98=8A=E5=A4=A9?= Date: Fri, 31 Mar 2023 11:38:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=9C=80=E5=90=8E=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E7=9A=84=E6=8B=8D=E7=85=A7=E7=AE=97=E5=9C=A8=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/main/java/com/zhehekeji/web/service/PlcService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/com/zhehekeji/web/service/PlcService.java b/web/src/main/java/com/zhehekeji/web/service/PlcService.java index 2c057c4..a2ecea5 100644 --- a/web/src/main/java/com/zhehekeji/web/service/PlcService.java +++ b/web/src/main/java/com/zhehekeji/web/service/PlcService.java @@ -6,6 +6,7 @@ import com.zhehekeji.common.util.PathUtil; import com.zhehekeji.web.config.ConfigProperties; import com.zhehekeji.web.entity.*; import com.zhehekeji.web.lib.*; +import com.zhehekeji.web.lib.hik.HCNetSDK; import com.zhehekeji.web.mapper.*; import com.zhehekeji.web.pojo.OrderVO; import com.zhehekeji.web.service.RFID.RFIDMap; @@ -151,12 +152,13 @@ public class PlcService { OrderRealtime.stopOrder(street.getId()); Order update = new Order(); update.setId(order.getId()); - update.setEndTime(endTime); update.setInOut2(plcCmdInfo.getSide2()); update.setLeftRight2(plcCmdInfo.getLeftRight2()); update.setColumn2(plcCmdInfo.getColumn2()); update.setRow2(plcCmdInfo.getRow2()); - LocalDateTime endDownLoadTime = endTime.plusSeconds(5); + //将最后一次的拍照算在工单时间 + LocalDateTime endDownLoadTime = endTime.plusNanos(configProperties.getCameraConfig().getC4DelayCaptureTime()*1000000); + update.setEndTime(endTime); Duration duration = Duration.between(order.getStartTime(),endDownLoadTime); if(duration.toMinutes() > 50){