|
|
@ -203,20 +203,22 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
//下发请求取货信号
|
|
|
|
hj1DeviceDriver.writing(2); |
|
|
|
//反馈WMS请求取货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction()); |
|
|
|
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() != 0 && (hj1DeviceDriver.getAction() == 1)) { |
|
|
|
if (hj1DeviceDriver.getTo_command() == 2) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 1; |
|
|
|
flag = true; |
|
|
|
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
|
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
} else { |
|
|
|
log.info("到达{}取货点,成品码垛信号不为2,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction()); |
|
|
|
hj1DeviceDriver.writing(2); |
|
|
|
//反馈WMS请求取货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
} |
|
|
|
hj1DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj1DeviceDriver.getMode() == 0) { |
|
|
@ -243,19 +245,21 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
//下发请求取货信号
|
|
|
|
hj2DeviceDriver.writing(2); |
|
|
|
//反馈WMS请求取货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction()); |
|
|
|
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() != 0 && (hj2DeviceDriver.getAction() == 1)) { |
|
|
|
if (hj2DeviceDriver.getTo_command() == 2) { |
|
|
|
agv_status = 1; |
|
|
|
flag = true; |
|
|
|
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
|
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
} else { |
|
|
|
log.info("到达{}取货点,裸瓷码垛信号不为2,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction()); |
|
|
|
hj2DeviceDriver.writing(2); |
|
|
|
//反馈WMS请求取货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
} |
|
|
|
hj2DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj2DeviceDriver.getMode() == 0) { |
|
|
@ -281,6 +285,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver(); |
|
|
|
//有货,待机,运行取货
|
|
|
|
log.info("tofix==================agv到达取货点=================="); |
|
|
|
log.info("到达{}取货点请求取货,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction()); |
|
|
|
if (ssxDeviceDriver.getMove() == 1 & ssxDeviceDriver.getMode() == 1 & ssxDeviceDriver.getAction() == 1) { |
|
|
|
log.info("tofix==================agv到达取货点,有货,待机,运行取货,允许AGV取货=================="); |
|
|
|
//agv进入取货
|
|
|
@ -310,6 +315,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//到达普通站点
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
log.info("到达{}取货点请求取货", device_code); |
|
|
|
log.info("tofix==================agv到达普通站点取货点===================agvphase:" + phase + "反馈成功"); |
|
|
|
inst.setExecute_status("1"); |
|
|
|
instructionService.update(inst); |
|
|
@ -367,16 +373,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
|
hj1DeviceDriver.writing(3); |
|
|
|
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction()); |
|
|
|
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() == 0) { |
|
|
|
if (hj1DeviceDriver.getTo_command() == 3) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}取货完成,成品码垛信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction()); |
|
|
|
hj1DeviceDriver.writing(3); |
|
|
|
} |
|
|
|
hj1DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj1DeviceDriver.getMode() == 0) { |
|
|
@ -398,16 +406,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (device.getDeviceDriver() instanceof Hj2DeviceDriver) { |
|
|
|
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver(); |
|
|
|
hj2DeviceDriver.writing(3); |
|
|
|
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction()); |
|
|
|
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() == 0) { |
|
|
|
if (hj2DeviceDriver.getTo_command() == 3) { |
|
|
|
flag = true; |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}取货完成,裸瓷码垛信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction()); |
|
|
|
hj2DeviceDriver.writing(3); |
|
|
|
} |
|
|
|
hj2DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
|
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj2DeviceDriver.getMode() == 0) { |
|
|
@ -428,17 +439,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
//到达输送线取货完成
|
|
|
|
if (device.getDeviceDriver() instanceof SsxDeviceDriver) { |
|
|
|
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver(); |
|
|
|
log.info("tofix==================agv取货完成=================="); |
|
|
|
log.info("{}取货完成,写入3,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction()); |
|
|
|
if (ssxDeviceDriver.getMode() != 0 && ssxDeviceDriver.getMove() == 0) { |
|
|
|
if (ssxDeviceDriver.getTo_command() == 3) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, ssxDeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("取货完成")), "取货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}取货完成,输送线信号不为3,再次写入,Mode:{},command{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getTo_command(), ssxDeviceDriver.getAction()); |
|
|
|
ssxDeviceDriver.writing(3); |
|
|
|
} |
|
|
|
ssxDeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
log.info("tofix==================agv允许取货离开=================="); |
|
|
|
String message = ""; |
|
|
@ -459,7 +471,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//到达普通站点
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
log.info("tofix==================agv到达普通站点取货完成==================agvphase:" + phase + "反馈成功"); |
|
|
|
log.info("{}取货完成", device_code); |
|
|
|
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
|
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
flag = true; |
|
|
@ -512,21 +524,23 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
|
hj1DeviceDriver.writing(4); |
|
|
|
log.info("到达{}放货点请求放货,写入4,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction()); |
|
|
|
//反馈WMS请求放货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() == 0 && (hj1DeviceDriver.getAction() == 1)) { |
|
|
|
if (hj1DeviceDriver.getTo_command() == 4) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 2; |
|
|
|
flag = true; |
|
|
|
//让agv进入
|
|
|
|
data = getData(data, index, inst, task); |
|
|
|
} else { |
|
|
|
log.info("到达{}放货点,成品信号不为4,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction()); |
|
|
|
hj1DeviceDriver.writing(4); |
|
|
|
//反馈WMS请求放货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
} |
|
|
|
hj1DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj1DeviceDriver.getMode() == 0) { |
|
|
@ -552,21 +566,23 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver(); |
|
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
|
hj2DeviceDriver.writing(4); |
|
|
|
log.info("到达{}放货点请求放货,写入4,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction()); |
|
|
|
//反馈WMS请求放货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() == 0 && (hj2DeviceDriver.getAction() == 1)) { |
|
|
|
if (hj2DeviceDriver.getTo_command() == 4) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 2; |
|
|
|
flag = true; |
|
|
|
//让agv进入
|
|
|
|
data = getData(data, index, inst, task); |
|
|
|
} else { |
|
|
|
log.info("到达{}放货点,裸瓷信号不为4,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction()); |
|
|
|
hj2DeviceDriver.writing(4); |
|
|
|
//反馈WMS请求放货
|
|
|
|
sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货"))); |
|
|
|
//sendAgvTaskStatus(inst, device_code, Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("请求取货")));
|
|
|
|
} |
|
|
|
hj2DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj2DeviceDriver.getMode() == 0) { |
|
|
@ -589,8 +605,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//输送线到达放货点
|
|
|
|
if (device.getDeviceDriver() instanceof SsxDeviceDriver) { |
|
|
|
log.info("tofix==================agv到达放货点=================="); |
|
|
|
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver(); |
|
|
|
log.info("到达{}放货点,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction()); |
|
|
|
//无货,待机,运行放货
|
|
|
|
if (ssxDeviceDriver.getMove() == 0 & ssxDeviceDriver.getMode() == 1 & ssxDeviceDriver.getAction() == 1) { |
|
|
|
log.info("tofix==================agv到达放货点,无货,待机,运行放货,允许AGV放货=================="); |
|
|
@ -621,7 +637,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//普通站点
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
log.info("tofix==================agv到达放货点==================agvphase:" + phase + "反馈成功"); |
|
|
|
log.info("到达{}放货点", device_code); |
|
|
|
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
|
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
flag = true; |
|
|
@ -671,16 +687,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (device.getDeviceDriver() instanceof Hj1DeviceDriver) { |
|
|
|
hj1DeviceDriver = (Hj1DeviceDriver) device.getDeviceDriver(); |
|
|
|
hj1DeviceDriver.writing(5); |
|
|
|
log.info("{}放货完成,写入5确认,Mode:{},Move{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getMove(), hj1DeviceDriver.getAction()); |
|
|
|
if (hj1DeviceDriver.getMode() != 0 && hj1DeviceDriver.getMove() != 0) { |
|
|
|
if (hj1DeviceDriver.getTo_command() == 5) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, hj1DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}放货完成,成品码垛信号不为5,Mode:{},command{},Action:{}", device_code, hj1DeviceDriver.getMode(), hj1DeviceDriver.getTo_command(), hj1DeviceDriver.getAction()); |
|
|
|
hj1DeviceDriver.writing(5); |
|
|
|
} |
|
|
|
hj1DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj1DeviceDriver.getMode() == 0) { |
|
|
@ -702,16 +720,18 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
if (device.getDeviceDriver() instanceof Hj2DeviceDriver) { |
|
|
|
hj2DeviceDriver = (Hj2DeviceDriver) device.getDeviceDriver(); |
|
|
|
hj2DeviceDriver.writing(5); |
|
|
|
log.info("{}放货完成,写入5确认,Mode:{},Move{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getMove(), hj2DeviceDriver.getAction()); |
|
|
|
if (hj2DeviceDriver.getMode() != 0 && hj2DeviceDriver.getMove() != 0) { |
|
|
|
if (hj2DeviceDriver.getTo_command() == 5) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, hj2DeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}放货完成,裸瓷码垛信号不为5,Mode:{},command{},Action:{}", device_code, hj2DeviceDriver.getMode(), hj2DeviceDriver.getTo_command(), hj2DeviceDriver.getAction()); |
|
|
|
hj2DeviceDriver.writing(5); |
|
|
|
} |
|
|
|
hj2DeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (hj2DeviceDriver.getMode() == 0) { |
|
|
@ -731,19 +751,20 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//到达输送线放货完成
|
|
|
|
if (device.getDeviceDriver() instanceof SsxDeviceDriver) { |
|
|
|
log.info("tofix==================agv放货完成=================="); |
|
|
|
ssxDeviceDriver = (SsxDeviceDriver) device.getDeviceDriver(); |
|
|
|
ssxDeviceDriver.writing(4); |
|
|
|
log.info("{}放货完成,写入4确认,Mode:{},Move{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getMove(), ssxDeviceDriver.getAction()); |
|
|
|
if (ssxDeviceDriver.getMode() != 0 && ssxDeviceDriver.getMove() != 0) { |
|
|
|
if (ssxDeviceDriver.getTo_command() == 4) { |
|
|
|
//反馈车辆动作
|
|
|
|
agv_status = 0; |
|
|
|
flag = true; |
|
|
|
data = actionComplete(index, inst, device_code, ssxDeviceDriver.getTo_command(), Integer.parseInt(AgvActionEnum.ACTION_STATUS.code("放货完成")), "放货完成"); |
|
|
|
} else { |
|
|
|
log.info("{}放货完成,输送线信号不为4,Mode:{},command{},Action:{}", device_code, ssxDeviceDriver.getMode(), ssxDeviceDriver.getTo_command(), ssxDeviceDriver.getAction()); |
|
|
|
ssxDeviceDriver.writing(4); |
|
|
|
} |
|
|
|
ssxDeviceDriver.setMessage(""); |
|
|
|
flag = true; |
|
|
|
} else { |
|
|
|
String message = ""; |
|
|
|
if (ssxDeviceDriver.getMode() == 0) { |
|
|
@ -764,8 +785,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
//agv普通站点放货完成
|
|
|
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { |
|
|
|
log.info("tofix==================agv普通站点放货完成==================agvphase:" + phase + "反馈成功"); |
|
|
|
//让agv进入,phase agv运行阶段,index agv任务号 0 用不上
|
|
|
|
log.info("{}放货完成", device_code); |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
flag = true; |
|
|
|
} |
|
|
@ -826,7 +846,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
//反馈ndc动作完成
|
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
//todo 接口,反馈AGV动作信息
|
|
|
|
sendAgvTaskStatus(inst, device_code, status); |
|
|
|
//sendAgvTaskStatus(inst, device_code, status);
|
|
|
|
log.info(action + "请求离开,当前输送to_command:" + to_command); |
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", action); |
|
|
|
return data; |
|
|
@ -900,19 +920,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
} |
|
|
|
|
|
|
|
private byte[] getData(byte[] data, int index, Instruction inst, TaskDto task) { |
|
|
|
if (!"2".equals(task.getTask_type())) { |
|
|
|
String resp = acsToWmsService.requestTaskAgain(task.getNext_point_code(), task.getExt_task_id(), inst.getVehicle_code()); |
|
|
|
JSONObject respjson = JSONObject.parseObject(resp); |
|
|
|
String next_device_code = respjson.getString("next_point_code"); |
|
|
|
task.setNext_point_code(next_device_code); |
|
|
|
int start_address = deviceService.queryAddressBydeviceCode(inst.getStart_point_code()); |
|
|
|
int next_address = deviceService.queryAddressBydeviceCode(next_device_code); |
|
|
|
taskService.update(task); |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, 0, 0); |
|
|
|
log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase); |
|
|
|
} else { |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
|
} |
|
|
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|