|
|
@ -234,47 +234,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); |
|
|
|
if (ObjectUtil.isNotEmpty(device.getExtraValue().get("wait")) |
|
|
|
&& StrUtil.equals("true", device.getExtraValue().get("wait").toString()) |
|
|
|
&& StrUtil.equals(task.getTask_type(), "1")) { |
|
|
|
if (standardOrdinarySiteDeviceDriver.getOption() == 1) { |
|
|
|
String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); |
|
|
|
log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); |
|
|
|
if (StrUtil.isEmpty(task_code) || !task_code.equals(task.getTask_code())) { |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
.device_code(this.getDeviceCode()) |
|
|
|
.content("任务号为空") |
|
|
|
.build(); |
|
|
|
logDto.setLog_level(4); |
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
} 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 { |
|
|
|
log.info("等待LMS系统进行确认允许取货,设备号{},option值{}", standardOrdinarySiteDeviceDriver.getDevice_code(), standardOrdinarySiteDeviceDriver.getOption()); |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "等待LMS系统进行确认允许取货,设备号" + device.getDevice_code() + ",指令号" + ikey); |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code()) |
|
|
|
.content("等待LMS系统进行确认允许取货,设备号" + standardOrdinarySiteDeviceDriver.getDevice_code() + ",option当前值" + standardOrdinarySiteDeviceDriver.getOption()) |
|
|
|
.build(); |
|
|
|
logDto.setLog_level(4); |
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
} |
|
|
|
} 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); |
|
|
|
} |
|
|
|
String task_code = standardOrdinarySiteDeviceDriver.getTask_code(); |
|
|
|
log.info("当前任务号{},创建任务号{}", task.getTask_code(), task_code); |
|
|
|
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); |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
@ -372,7 +340,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
acsToWmsService.actionFinishRequest2(jsonObject); |
|
|
|
} |
|
|
|
this.setPhase(phase); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
.device_code(this.getDeviceCode()) |
|
|
@ -615,17 +583,22 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); |
|
|
|
|
|
|
|
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); |
|
|
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase); |
|
|
|
standardOrdinarySiteDeviceDriver.setIndex(index); |
|
|
|
standardOrdinarySiteDeviceDriver.setInst(inst); |
|
|
|
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); |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
.device_code(this.getDeviceCode()) |
|
|
|
.content("agvphase:" + phase + "反馈:" + data) |
|
|
|
.build(); |
|
|
|
logDto.setLog_level(4); |
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
standardOrdinarySiteDeviceDriver.setAgvphase(phase); |
|
|
|
standardOrdinarySiteDeviceDriver.setIndex(index); |
|
|
|
standardOrdinarySiteDeviceDriver.setInst(inst); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) { |
|
|
|
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver(); |
|
|
@ -728,7 +701,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
logDto.setLog_level(4); |
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
} |
|
|
|
}else if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) { |
|
|
|
} else if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) { |
|
|
|
wasteFoilWeighingStationDriver = (WasteFoilWeighingStationDriver) device.getDeviceDriver(); |
|
|
|
if (wasteFoilWeighingStationDriver.getMove() == 0 && wasteFoilWeighingStationDriver.getAction() == 1 |
|
|
|
&& wasteFoilWeighingStationDriver.getError() == 0 && wasteFoilWeighingStationDriver.getMode() == 2) { |
|
|
@ -815,7 +788,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
logDto.setLog_level(4); |
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto); |
|
|
|
this.setPhase(phase); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); |
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder() |
|
|
|
.device_code(this.getDeviceCode()) |
|
|
|