|
|
|
|
@ -153,13 +153,18 @@ public class PlcService {
|
|
|
|
|
update.setLeftRight2(plcCmdInfo.getLeftRight2());
|
|
|
|
|
update.setColumn2(plcCmdInfo.getColumn2());
|
|
|
|
|
update.setRow2(plcCmdInfo.getRow2());
|
|
|
|
|
LocalDateTime endDownLoadTime = endTime.plusSeconds(5);
|
|
|
|
|
Duration duration = Duration.between(order.getStartTime(),endDownLoadTime);
|
|
|
|
|
|
|
|
|
|
if(duration.toMinutes() > 50){
|
|
|
|
|
endDownLoadTime = order.getStartTime().plusMinutes(50);
|
|
|
|
|
}
|
|
|
|
|
if (street.getCamera1Id() != null) {
|
|
|
|
|
String path = cameraVideo(street.getCamera1Id(),order.getStartTime(),endTime.plusSeconds(5));
|
|
|
|
|
String path = cameraVideo(street.getCamera1Id(),order.getStartTime(),endDownLoadTime);
|
|
|
|
|
update.setVideoPath1(path);
|
|
|
|
|
}
|
|
|
|
|
if (street.getCamera2Id() != null) {
|
|
|
|
|
String path = cameraVideo(street.getCamera2Id(),order.getStartTime(),endTime.plusSeconds(5));
|
|
|
|
|
String path = cameraVideo(street.getCamera2Id(),order.getStartTime(),endDownLoadTime);
|
|
|
|
|
update.setVideoPath2(path);
|
|
|
|
|
}
|
|
|
|
|
orderMapper.updateById(update);
|
|
|
|
|
@ -588,12 +593,22 @@ public class PlcService {
|
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),configProperties.getLightSource().getIndex(),1);
|
|
|
|
|
});
|
|
|
|
|
Integer cameraId = getCameraByPlcCmd(plcCmdInfo,plcCmdInfo.getLeftRight1());
|
|
|
|
|
gyrateCameraByCode(cameraId, cmdCode);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
|
|
if(plcCmdInfo.getSeparation1() == 1 && configProperties.getScanCodeMode().getTray() == 2){
|
|
|
|
|
//内测
|
|
|
|
|
String c = cmdCode + "-" + plcCmdInfo.getLeftRightStr(1) + "-IN";
|
|
|
|
|
log.info("camera ptz"+c);
|
|
|
|
|
gyrateCameraByCode(cameraId, c);
|
|
|
|
|
}else {
|
|
|
|
|
gyrateCameraByCode(cameraId, cmdCode);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String path = PathUtil.createFileNameByRowColumn("jpg",cameraId,plcCmdInfo.getRow1(),plcCmdInfo.getColumn1());
|
|
|
|
|
cameraCapture(cameraId,false,null,path);
|
|
|
|
|
//托盘码
|
|
|
|
|
|