|
@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import lombok.Data; |
|
|
import lombok.Data; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.nl.acs.AcsConfig; |
|
|
import org.nl.acs.agv.server.NDCAgvService; |
|
|
import org.nl.acs.agv.server.NDCAgvService; |
|
|
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; |
|
|
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
@ -128,7 +129,11 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
inst.setCarno(String.valueOf(carno)); |
|
|
inst.setCarno(String.valueOf(carno)); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); |
|
|
|
|
|
|
|
|
|
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
|
|
|
if (StrUtil.equals(hasWms, "1")) { |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
|
|
|
if (!StrUtil.startWith(task.getTask_code(), "-")) { |
|
|
JSONObject request = new JSONObject(); |
|
|
JSONObject request = new JSONObject(); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
@ -138,6 +143,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//到达取货点
|
|
|
//到达取货点
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
|
} else if (phase == 0x03) { |
|
|
} else if (phase == 0x03) { |
|
@ -197,7 +204,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
} |
|
|
} |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
|
|
|
|
|
|
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
|
|
|
if (StrUtil.equals(hasWms, "1")) { |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
|
|
|
if (!StrUtil.startWith(task.getTask_code(), "-")) { |
|
|
JSONObject request = new JSONObject(); |
|
|
JSONObject request = new JSONObject(); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
@ -207,6 +217,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//取货完毕
|
|
|
//取货完毕
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
@ -279,7 +291,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
} |
|
|
} |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
|
|
|
|
|
|
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
|
|
|
if (StrUtil.equals(hasWms, "1")) { |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
|
|
|
if (!StrUtil.startWith(task.getTask_code(), "-")) { |
|
|
JSONObject request = new JSONObject(); |
|
|
JSONObject request = new JSONObject(); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
@ -289,6 +304,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//到达放货点
|
|
|
//到达放货点
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
@ -341,7 +358,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
} |
|
|
} |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data); |
|
|
|
|
|
|
|
|
|
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
|
|
|
if (StrUtil.equals(hasWms, "1")) { |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
TaskDto task = SpringContextHolder.getBean(TaskService.class).findByCodeFromCache(inst.getTask_code()); |
|
|
|
|
|
if (!StrUtil.startWith(task.getTask_code(), "-")) { |
|
|
JSONObject request = new JSONObject(); |
|
|
JSONObject request = new JSONObject(); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("REQCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
|
request.put("TASKCODE", task.getTask_code()); |
|
@ -351,6 +371,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("AGVCODE", this.device_code); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
request.put("REQTIME", DateUtil.now()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//放货完毕
|
|
|
//放货完毕
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
|