|
@ -306,18 +306,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
|
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); |
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); |
|
|
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get("wait")) |
|
|
log.info("日志检查!" + device.getExtraValue().get("wait") + standardOrdinarySiteDeviceDriver.getOption()); |
|
|
&& StrUtil.equals("true", this.device.getExtraValue().get("wait").toString()) |
|
|
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) |
|
|
&& StrUtil.equals(task.getTask_type(), "1")) { |
|
|
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString())) { |
|
|
standardOrdinarySiteDeviceDriver.setOption(0); |
|
|
if (standardOrdinarySiteDeviceDriver.getOption() == 1) { |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
|
|
.device_code(this.getDeviceCode()) |
|
|
|
|
|
.content("agvphase:" + phase + "反馈:" + data) |
|
|
|
|
|
.build(); |
|
|
|
|
|
logDto.setLog_level(4); |
|
|
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
|
|
} else { |
|
|
|
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
.device_code(this.getDeviceCode()) |
|
|
.device_code(this.getDeviceCode()) |
|
@ -325,21 +317,10 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
.build(); |
|
|
.build(); |
|
|
logDto.setLog_level(4); |
|
|
logDto.setLog_level(4); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase); |
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setIndex(index); |
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setInst(inst); |
|
|
} |
|
|
} |
|
|
String task_code = inst.getTask_code(); |
|
|
|
|
|
if (ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms")) |
|
|
|
|
|
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())) { |
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
|
jsonObject.put("task_code", task_code); |
|
|
|
|
|
LuceneLogDto logDto1 = LuceneLogDto.builder() |
|
|
|
|
|
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) |
|
|
|
|
|
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDeviceCode()) |
|
|
|
|
|
.build(); |
|
|
|
|
|
logDto1.setLog_level(4); |
|
|
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto1); |
|
|
|
|
|
acsToWmsService.actionFinishRequest2(jsonObject); |
|
|
|
|
|
} |
|
|
|
|
|
this.setPhase(phase); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
@ -349,8 +330,9 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
logDto.setLog_level(4); |
|
|
logDto.setLog_level(4); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 取货完毕
|
|
|
// 取货完毕
|
|
|
//(Itype=1、3,需要WCS反馈)
|
|
|
//(Itype=1、3,需要WCS反馈)
|
|
|
// else if (phase == 0x0A) {
|
|
|
// else if (phase == 0x0A) {
|
|
@ -788,6 +770,11 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); |
|
|
|
|
|
log.info("日志检查!" + device.getExtraValue().get("wait") + standardOrdinarySiteDeviceDriver.getOption()); |
|
|
|
|
|
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) |
|
|
|
|
|
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString())) { |
|
|
|
|
|
if (standardOrdinarySiteDeviceDriver.getOption() == 1) { |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
.device_code(this.getDeviceCode()) |
|
|
.device_code(this.getDeviceCode()) |
|
@ -795,7 +782,20 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
.build(); |
|
|
.build(); |
|
|
logDto.setLog_level(4); |
|
|
logDto.setLog_level(4); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
this.setPhase(phase); |
|
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase); |
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setIndex(index); |
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setInst(inst); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
|
|
.device_code(this.getDeviceCode()) |
|
|
|
|
|
.content("agvphase:" + phase + "反馈:" + data) |
|
|
|
|
|
.build(); |
|
|
|
|
|
logDto.setLog_level(4); |
|
|
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|