fix: 添加堆垛机,下发信号日志
This commit is contained in:
@@ -184,22 +184,24 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
log.info("未找到指令号{}对应的指令", ikey);
|
||||
} else {
|
||||
String agvcar = inst.getCarno();
|
||||
Device agvDevice = deviceAppService.findDeviceByCode(agvcar);
|
||||
if (agvDevice != null) {
|
||||
if (agvDevice.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
||||
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) agvDevice.getDeviceDriver();
|
||||
agvNdcTwoDeviceDriver.setInstruction(null);
|
||||
if("1".equals(inst.getInstruction_type()) || "2".equals(inst.getInstruction_type()) || "3".equals(inst.getInstruction_type())) {
|
||||
String agvcar = inst.getCarno();
|
||||
Device agvDevice = deviceAppService.findDeviceByCode(agvcar);
|
||||
if (agvDevice != null) {
|
||||
if (agvDevice.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
||||
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) agvDevice.getDeviceDriver();
|
||||
agvNdcTwoDeviceDriver.setInstruction(null);
|
||||
}
|
||||
}
|
||||
inst.setInstruction_status("2");
|
||||
try {
|
||||
instructionService.finish(inst);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// ndc会向A1和A2都上报反馈任务完成
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
}
|
||||
inst.setInstruction_status("2");
|
||||
try {
|
||||
instructionService.finish(inst);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// ndc会向A1和A2都上报反馈任务完成
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
}
|
||||
}
|
||||
//请求删除任务
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油漆线
|
||||
* 纸管库
|
||||
*/
|
||||
@Service
|
||||
public class PaperTubeConveyor2Defination implements OpcDeviceDriverDefination {
|
||||
|
||||
Reference in New Issue
Block a user