|
|
|
@ -734,11 +734,17 @@ public class PlcService {
|
|
|
|
if (lock.tryLock()) {
|
|
|
|
if (lock.tryLock()) {
|
|
|
|
//队列中没有任务,发送取图指令
|
|
|
|
//队列中没有任务,发送取图指令
|
|
|
|
if (GetPhotoDelayExecutor.cameraDelayTasks.size() == 0 && ClientChanel.get(dataInfo.getSRMNumber()) != null) {
|
|
|
|
if (GetPhotoDelayExecutor.cameraDelayTasks.size() == 0 && ClientChanel.get(dataInfo.getSRMNumber()) != null) {
|
|
|
|
ClientChanel.get(dataInfo.getSRMNumber()).writeAndFlush(transmissionPojo.toString(TransmissionType.GPS));
|
|
|
|
ClientChanel.get(street.getPlcId()).writeAndFlush(transmissionPojo.toString(TransmissionType.GPS));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//放置到队列中,等待取图返回后删除
|
|
|
|
//放置到队列中,等待取图返回后删除
|
|
|
|
GetPhotoDelayExecutor.addCameraDelayTask(street.getPlcId(), transmissionPojo.toString(TransmissionType.GPS), configProperties.getQueueSpanTime());
|
|
|
|
GetPhotoDelayExecutor.addCameraDelayTask(street.getPlcId(), transmissionPojo.toString(TransmissionType.GPS), configProperties.getQueueSpanTime());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configProperties.isInventorySimulationFollow()) {
|
|
|
|
|
|
|
|
ClientChanel.get(dataInfo.getSRMNumber()).writeAndFlush(
|
|
|
|
|
|
|
|
(new TransmissionPojo(street, transmissionPojo.getRow(), transmissionPojo.getColumn(), transmissionPojo.getDirection(), "")).toString(TransmissionType.GPS));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
log.error("取图命令 error", e);
|
|
|
|
log.error("取图命令 error", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
@ -749,6 +755,7 @@ public class PlcService {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void visualCalculationResults(TransmissionPojo transmissionPojo) {
|
|
|
|
public void visualCalculationResults(TransmissionPojo transmissionPojo) {
|
|
|
|
CheckLog checkLog = checkLogMapper.selectById(transmissionPojo.getCheckId());
|
|
|
|
CheckLog checkLog = checkLogMapper.selectById(transmissionPojo.getCheckId());
|
|
|
|
Stock stock = stockMapper.selectOne(new QueryWrapper<Stock>().eq("check_Num", checkLog.getId()));
|
|
|
|
Stock stock = stockMapper.selectOne(new QueryWrapper<Stock>().eq("check_Num", checkLog.getId()));
|
|
|
|
|