|
|
|
@ -672,9 +672,21 @@ public class PlcService {
|
|
|
|
CronTab.putTime(street.getId());
|
|
|
|
CronTab.putTime(street.getId());
|
|
|
|
plcCmdInfo.setStreetName(street.getName());
|
|
|
|
plcCmdInfo.setStreetName(street.getName());
|
|
|
|
List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id", street.getId()));
|
|
|
|
List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id", street.getId()));
|
|
|
|
|
|
|
|
|
|
|
|
lightSources.forEach(lightSource -> {
|
|
|
|
lightSources.forEach(lightSource -> {
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(), lightSource.getPort(), configProperties.getLightSource().getIndex(), 1);
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(), lightSource.getPort(), configProperties.getLightSource().getIndex(), 1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
Thread thread = new Thread(() -> {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
Thread.sleep(30000);
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//关闭光源
|
|
|
|
|
|
|
|
streetController.closeStreetLightSource(street.getId());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
thread.start();
|
|
|
|
|
|
|
|
|
|
|
|
log.info("盘点摄像头变化参数:" + plcCmdInfo.toString());
|
|
|
|
log.info("盘点摄像头变化参数:" + plcCmdInfo.toString());
|
|
|
|
Integer cameraId = getCameraByPlcCmdE(plcCmdInfo, plcCmdInfo.getLeftRight1());
|
|
|
|
Integer cameraId = getCameraByPlcCmdE(plcCmdInfo, plcCmdInfo.getLeftRight1());
|
|
|
|
String code = "E1" + "-" + plcCmdInfo.getEndStr(1, plcCmdInfo.getFromAround());
|
|
|
|
String code = "E1" + "-" + plcCmdInfo.getEndStr(1, plcCmdInfo.getFromAround());
|
|
|
|
@ -740,8 +752,6 @@ public class PlcService {
|
|
|
|
long s = end - startTime;
|
|
|
|
long s = end - startTime;
|
|
|
|
log.info("time:{}millisecond", s);
|
|
|
|
log.info("time:{}millisecond", s);
|
|
|
|
|
|
|
|
|
|
|
|
//关闭光源
|
|
|
|
|
|
|
|
streetController.closeStreetLightSource(street.getId());
|
|
|
|
|
|
|
|
return algorithmPojo;
|
|
|
|
return algorithmPojo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -829,8 +839,8 @@ public class PlcService {
|
|
|
|
//古井贡酒没有side使用双伸单伸Separation代替全部side
|
|
|
|
//古井贡酒没有side使用双伸单伸Separation代替全部side
|
|
|
|
plcCmdInfo = new PlcCmdInfo(dataInfo.getSRMNumber(), dataInfo.getTaskId(),
|
|
|
|
plcCmdInfo = new PlcCmdInfo(dataInfo.getSRMNumber(), dataInfo.getTaskId(),
|
|
|
|
dataInfo.getFromSeparation(), dataInfo.getFromDirection(), dataInfo.getFromColumn(),
|
|
|
|
dataInfo.getFromSeparation(), dataInfo.getFromDirection(), dataInfo.getFromColumn(),
|
|
|
|
dataInfo.getFromStorey(), dataInfo.getFromSeparation(), dataInfo.getToSeparation(),
|
|
|
|
dataInfo.getFromRow(), dataInfo.getFromSeparation(), dataInfo.getToSeparation(),
|
|
|
|
dataInfo.getToDirection(), dataInfo.getToColumn(), dataInfo.getToStorey(),
|
|
|
|
dataInfo.getToDirection(), dataInfo.getToColumn(), dataInfo.getToRow(),
|
|
|
|
dataInfo.getToSeparation(), lotnum);
|
|
|
|
dataInfo.getToSeparation(), lotnum);
|
|
|
|
plcCmdInfo.setFromDirection(dataInfo.getFromDirection());
|
|
|
|
plcCmdInfo.setFromDirection(dataInfo.getFromDirection());
|
|
|
|
plcCmdInfo.setToDirection(dataInfo.getToDirection());
|
|
|
|
plcCmdInfo.setToDirection(dataInfo.getToDirection());
|
|
|
|
@ -843,6 +853,13 @@ public class PlcService {
|
|
|
|
plcCmdInfo.setToSeparation(dataInfo.getToSeparation());
|
|
|
|
plcCmdInfo.setToSeparation(dataInfo.getToSeparation());
|
|
|
|
plcCmdInfo.setFromAround(dataInfo.getFromAround());
|
|
|
|
plcCmdInfo.setFromAround(dataInfo.getFromAround());
|
|
|
|
plcCmdInfo.setToSide(dataInfo.getToSeparation());
|
|
|
|
plcCmdInfo.setToSide(dataInfo.getToSeparation());
|
|
|
|
|
|
|
|
if( dataInfo.getToStorey()!=null ){
|
|
|
|
|
|
|
|
plcCmdInfo.setToRow(dataInfo.getToStorey());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if( dataInfo.getFromStorey()!=null ){
|
|
|
|
|
|
|
|
plcCmdInfo.setFromRow(dataInfo.getFromStorey());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//左右不交换
|
|
|
|
//左右不交换
|
|
|
|
if (dataInfo.getFromDirection() != null) {
|
|
|
|
if (dataInfo.getFromDirection() != null) {
|
|
|
|
if (dataInfo.getFromDirection() == 1) {
|
|
|
|
if (dataInfo.getFromDirection() == 1) {
|
|
|
|
|