|
@ -15,6 +15,7 @@ import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.agv.utils.ErrorUtil; |
|
|
import org.nl.acs.device_driver.basedriver.agv.utils.ErrorUtil; |
|
|
|
|
|
import org.nl.acs.device_driver.basedriver.agv.utils.SocketUtil; |
|
|
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.standard_autodoor.StandardAutoDoorDeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.standard_autodoor.StandardAutoDoorDeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.standard_elevator.StandardElevatorDeviceDriver; |
|
|
import org.nl.acs.device_driver.basedriver.standard_elevator.StandardElevatorDeviceDriver; |
|
@ -77,6 +78,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
int last_electric_qty = 0; |
|
|
int last_electric_qty = 0; |
|
|
int last_status = 0; |
|
|
int last_status = 0; |
|
|
int last_error = 0; |
|
|
int last_error = 0; |
|
|
|
|
|
boolean wcsFlag = false; |
|
|
|
|
|
boolean wmsFlag = false; |
|
|
|
|
|
|
|
|
String error_code = "0"; |
|
|
String error_code = "0"; |
|
|
String error_message = ""; |
|
|
String error_message = ""; |
|
@ -100,8 +103,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
List<Instruction> insts = null; |
|
|
List<Instruction> insts = null; |
|
|
Instruction inst = null; |
|
|
Instruction inst = null; |
|
|
boolean flag = false; |
|
|
boolean flag = false; |
|
|
boolean wcsFlag = false; |
|
|
|
|
|
boolean wmsFlag = false; |
|
|
|
|
|
boolean link_flag = false; |
|
|
boolean link_flag = false; |
|
|
if (ikey != 0) { |
|
|
if (ikey != 0) { |
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); |
|
|
inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); |
|
@ -199,7 +200,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
|
|
|
|
|
if ("true".equals(device.getExtraValue().get("reqWms")) |
|
|
if ("true".equals(device.getExtraValue().get("reqWms")) |
|
|
&& !inst.getTask_code().startsWith("-") |
|
|
&& !inst.getTask_code().startsWith("-") |
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())) { |
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) && !wmsFlag) { |
|
|
JSONObject form = new JSONObject(); |
|
|
JSONObject form = new JSONObject(); |
|
|
form.put("vehicle_code", inst.getVehicle_code()); |
|
|
form.put("vehicle_code", inst.getVehicle_code()); |
|
|
form.put("status", 1); |
|
|
form.put("status", 1); |
|
@ -227,6 +228,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
@ -276,12 +279,14 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
if (driver.getMode() != 0 |
|
|
if (driver.getMode() != 0 |
|
|
&& driver.getMove() != 0 |
|
|
&& (driver.getMove() != 0 |
|
|
&& driver.getNumber() != 0) { |
|
|
|| driver.getNumber() != 0)) { |
|
|
if (!inst.getTask_code().startsWith("-") |
|
|
if (!inst.getTask_code().startsWith("-") |
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) |
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) |
|
|
&& "true".equals(device.getExtraValue().get("reqWms"))) { |
|
|
&& "true".equals(device.getExtraValue().get("reqWms"))) { |
|
@ -327,6 +332,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -416,7 +423,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
wmsFlag = true; |
|
|
wmsFlag = true; |
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
if (wcsFlag && wmsFlag) { |
|
|
if (wcsFlag && wmsFlag) { |
|
@ -424,6 +431,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
@ -452,7 +461,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
// String message = "";
|
|
|
// String message = "";
|
|
@ -473,6 +482,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
@ -500,7 +511,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = ""; |
|
|
String message = ""; |
|
@ -524,6 +535,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV取货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -610,7 +623,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
wmsFlag = true; |
|
|
wmsFlag = true; |
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
if (wcsFlag && wmsFlag) { |
|
|
if (wcsFlag && wmsFlag) { |
|
@ -618,6 +631,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
@ -646,7 +661,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = ""; |
|
|
String message = ""; |
|
@ -667,6 +682,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
@ -692,7 +709,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = ""; |
|
|
String message = ""; |
|
@ -709,6 +726,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -796,7 +815,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
wmsFlag = true; |
|
|
wmsFlag = true; |
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
if (wcsFlag && wmsFlag) { |
|
|
if (wcsFlag && wmsFlag) { |
|
@ -804,36 +823,38 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) { |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
|
StandardInspectSiteDeviceDriver driver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver(); |
|
|
|
|
|
|
|
|
if (driver.getMode() != 0 |
|
|
if (driver.getMode() != 0 |
|
|
&& driver.getMove() != 0) { |
|
|
&& driver.getMove() != 0) { |
|
|
if (!inst.getTask_code().startsWith("-") |
|
|
// if (!inst.getTask_code().startsWith("-")
|
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) |
|
|
// && "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
|
|
|
&& "true".equals(device.getExtraValue().get("reqWms"))) { |
|
|
// && "true".equals(device.getExtraValue().get("reqWms"))) {
|
|
|
JSONObject form = new JSONObject(); |
|
|
// JSONObject form = new JSONObject();
|
|
|
form.put("vehicle_code", inst.getVehicle_code()); |
|
|
// form.put("vehicle_code", inst.getVehicle_code());
|
|
|
form.put("status", 4); |
|
|
// form.put("status", 4);
|
|
|
form.put("device_code", device_code); |
|
|
// form.put("device_code", device_code);
|
|
|
form.put("task_code", inst.getTask_code()); |
|
|
// form.put("task_code", inst.getTask_code());
|
|
|
JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ |
|
|
// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
|
|
|
add(form); |
|
|
// add(form);
|
|
|
}}); |
|
|
// }});
|
|
|
|
|
|
//
|
|
|
if (20000 == result.getIntValue("code")) { |
|
|
// if (20000 == result.getIntValue("code")) {
|
|
|
flag = true; |
|
|
// flag = true;
|
|
|
} else { |
|
|
// } else {
|
|
|
String resultMessage = result.getString("message"); |
|
|
// String resultMessage = result.getString("message");
|
|
|
this.message = resultMessage; |
|
|
// this.message = resultMessage;
|
|
|
String message = resultMessage + "不允许AGV放货后离开。"; |
|
|
// String message = resultMessage + "不允许AGV放货后离开。";
|
|
|
driver.setMessage(message); |
|
|
// driver.setMessage(message);
|
|
|
logServer.deviceExecuteLog(device_code, "", "", message); |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = ""; |
|
|
String message = ""; |
|
|
if (driver.getMode() == 0) { |
|
|
if (driver.getMode() == 0) { |
|
@ -853,35 +874,37 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
} else if (device.getDeviceDriver() instanceof FoldDiscSiteDeviceDriver) { |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
FoldDiscSiteDeviceDriver driver = (FoldDiscSiteDeviceDriver) device.getDeviceDriver(); |
|
|
if (driver.getMode() != 0 |
|
|
if (driver.getMode() != 0 |
|
|
&& driver.getMove() != 0 |
|
|
&& (driver.getMove() != 0 |
|
|
&& driver.getNumber() != 0) { |
|
|
|| driver.getNumber() != 0)) { |
|
|
if (!inst.getTask_code().startsWith("-") |
|
|
// if (!inst.getTask_code().startsWith("-")
|
|
|
&& "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) |
|
|
// && "1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
|
|
|
&& "true".equals(device.getExtraValue().get("reqWms"))) { |
|
|
// && "true".equals(device.getExtraValue().get("reqWms"))) {
|
|
|
JSONObject form = new JSONObject(); |
|
|
// JSONObject form = new JSONObject();
|
|
|
form.put("vehicle_code", inst.getVehicle_code()); |
|
|
// form.put("vehicle_code", inst.getVehicle_code());
|
|
|
form.put("status", 4); |
|
|
// form.put("status", 4);
|
|
|
form.put("device_code", device_code); |
|
|
// form.put("device_code", device_code);
|
|
|
form.put("task_code", inst.getTask_code()); |
|
|
// form.put("task_code", inst.getTask_code());
|
|
|
JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ |
|
|
// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
|
|
|
add(form); |
|
|
// add(form);
|
|
|
}}); |
|
|
// }});
|
|
|
if (20000 == result.getIntValue("code")) { |
|
|
// if (20000 == result.getIntValue("code")) {
|
|
|
flag = true; |
|
|
// flag = true;
|
|
|
} else { |
|
|
// } else {
|
|
|
String resultMessage = result.getString("message"); |
|
|
// String resultMessage = result.getString("message");
|
|
|
this.message = resultMessage; |
|
|
// this.message = resultMessage;
|
|
|
String message = resultMessage + "不允许AGV放货后离开。"; |
|
|
// String message = resultMessage + "不允许AGV放货后离开。";
|
|
|
driver.setMessage(message); |
|
|
// driver.setMessage(message);
|
|
|
logServer.deviceExecuteLog(device_code, "", "", message); |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
} |
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = ""; |
|
|
String message = ""; |
|
|
if (driver.getMode() == 0) { |
|
|
if (driver.getMode() == 0) { |
|
@ -904,6 +927,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
this.message = ""; |
|
|
this.message = ""; |
|
|
driver.setMessage(""); |
|
|
driver.setMessage(""); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
logServer.deviceExecuteLog(device_code, "", "", "允许AGV放货后离开。"); |
|
|
|
|
|
wmsFlag = false; |
|
|
|
|
|
wcsFlag = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -940,7 +965,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
device_code = old_device_code; |
|
|
device_code = old_device_code; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
if (ObjectUtil.isEmpty(device_code)) { |
|
|
if (ObjectUtil.isEmpty(device_code)) { |
|
|
log.info(agvaddr + "对应设备号为空!"); |
|
|
log.info(agvaddr + "对应设备号为空!"); |
|
@ -971,7 +995,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = "自动门未联机,无法开门。"; |
|
|
String message = "自动门未联机,无法开门。"; |
|
@ -994,6 +1018,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else if (phase == 0x51) {//离开区域
|
|
|
} else if (phase == 0x51) {//离开区域
|
|
|
if (agvaddr == 0) { |
|
|
if (agvaddr == 0) { |
|
|
agvaddr = agvaddr_copy; |
|
|
agvaddr = agvaddr_copy; |
|
@ -1014,7 +1039,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
device_code = old_device_code; |
|
|
device_code = old_device_code; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
if (ObjectUtil.isEmpty(device_code)) { |
|
|
if (ObjectUtil.isEmpty(device_code)) { |
|
|
log.info(agvaddr + "对应设备号为空!"); |
|
|
log.info(agvaddr + "对应设备号为空!"); |
|
@ -1045,7 +1069,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// logServer.deviceExecuteLog(device_code, "", "", message);
|
|
|
// }
|
|
|
// }
|
|
|
// } else {
|
|
|
// } else {
|
|
|
flag = true; |
|
|
flag = true; |
|
|
// }
|
|
|
// }
|
|
|
} else { |
|
|
} else { |
|
|
String message = "自动门未联机,无法关门。"; |
|
|
String message = "自动门未联机,无法关门。"; |
|
|