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){