|
|
|
|
@ -322,9 +322,9 @@ public class PlcService {
|
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
|
//只进行相机方向判断左边
|
|
|
|
|
if (code.contains("L")) {
|
|
|
|
|
return street.getCamera1Id();
|
|
|
|
|
} else {
|
|
|
|
|
return street.getCamera2Id();
|
|
|
|
|
} else {
|
|
|
|
|
return street.getCamera1Id();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -373,6 +373,7 @@ public class PlcService {
|
|
|
|
|
public String cameraCapture(Integer cameraId, Boolean delay, Long delayTime, String path) {
|
|
|
|
|
//String path = PathUtil.createFileName("jpg",cameraId);
|
|
|
|
|
String realPath = configProperties.getSavePath().getMediaPath() + path;
|
|
|
|
|
log.info("capture picture, cameraId:{},path:{}delayTime:{}", cameraId, realPath,delayTime);
|
|
|
|
|
if (delay) {
|
|
|
|
|
TaskDelayExecutor.addPicDelayTask(cameraId, realPath, delayTime);
|
|
|
|
|
} else {
|
|
|
|
|
@ -646,7 +647,7 @@ public class PlcService {
|
|
|
|
|
log.info("camera ptz" + c);
|
|
|
|
|
gyrateCameraByCode(cameraId, c);
|
|
|
|
|
} else {
|
|
|
|
|
String c = cmdCode + "1";
|
|
|
|
|
String c = cmdCode + "1-" +plcCmdInfo.getEndStr(1);
|
|
|
|
|
gyrateCameraByCode(cameraId, c);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
@ -812,7 +813,7 @@ public class PlcService {
|
|
|
|
|
plcCmdInfo.setFromSeparation(dataInfo.getFromSeparation());
|
|
|
|
|
plcCmdInfo.setToSeparation(dataInfo.getToSeparation());
|
|
|
|
|
plcCmdInfo.setToSide(dataInfo.getToSide());
|
|
|
|
|
//左右不换过来
|
|
|
|
|
//左右不交换
|
|
|
|
|
if(dataInfo.getFromDirection() == 1){
|
|
|
|
|
//dataInfo.setFromDirection(2);
|
|
|
|
|
plcCmdInfo.setLeftRight1(dataInfo.getFromDirection());
|
|
|
|
|
@ -821,7 +822,7 @@ public class PlcService {
|
|
|
|
|
plcCmdInfo.setLeftRight1(dataInfo.getFromDirection());
|
|
|
|
|
}
|
|
|
|
|
if(dataInfo.getToDirection() != null && dataInfo.getToDirection() == 1){
|
|
|
|
|
//dataInfo.setToDirection(2);
|
|
|
|
|
//dataInfo.setToDirection(2);
|
|
|
|
|
plcCmdInfo.setLeftRight2(dataInfo.getToDirection());
|
|
|
|
|
}else {
|
|
|
|
|
//dataInfo.setToDirection(1);
|
|
|
|
|
@ -877,7 +878,7 @@ public class PlcService {
|
|
|
|
|
//执行动作,需要保存执行到第几步了
|
|
|
|
|
Integer times = GoodsActionTimes.get(dataInfo.getCmdName());
|
|
|
|
|
plcCmdInfo.setTimes(times);
|
|
|
|
|
code = code + "-" + plcCmdInfo.getLeftRightStr(times) + plcCmdInfo.getInOutStr(times);
|
|
|
|
|
code = code + "-" + plcCmdInfo.getEndStr(times);
|
|
|
|
|
//执行动作
|
|
|
|
|
try {
|
|
|
|
|
action(plcCmdInfo, times, code);
|
|
|
|
|
|