psh 11 months ago
parent
commit
86e6029765
  1. 84
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

84
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -951,28 +951,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver();
if (driver.getMode() != 0) {
if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
) {
JSONObject form = new JSONObject();
form.put("vehicle_code", "");
form.put("status", 5);
form.put("device_code", device_code);
form.put("task_code", "");
JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
add(form);
}});
if (20000 == result.getIntValue("code")) {
flag = true;
} else {
String resultMessage = result.getString("message");
this.message = resultMessage;
String message = resultMessage + "无法开门。";
driver.setMessage(message);
logServer.deviceExecuteLog(device_code, "", "", message);
}
} else {
// if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
// ) {
// JSONObject form = new JSONObject();
// form.put("vehicle_code", "");
// form.put("status", 5);
// form.put("device_code", device_code);
// form.put("task_code", "");
// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
// add(form);
// }});
// if (20000 == result.getIntValue("code")) {
// flag = true;
// } else {
// String resultMessage = result.getString("message");
// this.message = resultMessage;
// String message = resultMessage + "无法开门。";
// driver.setMessage(message);
// logServer.deviceExecuteLog(device_code, "", "", message);
// }
// } else {
flag = true;
}
// }
} else {
String message = "自动门未联机,无法开门。";
driver.setMessage(message);
@ -1025,28 +1025,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver();
if (driver.getMode() != 0) {
if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
) {
JSONObject form = new JSONObject();
form.put("vehicle_code", "");
form.put("status", 6);
form.put("device_code", device_code);
form.put("task_code", "");
JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
add(form);
}});
if (20000 == result.getIntValue("code")) {
flag = true;
} else {
String resultMessage = result.getString("message");
this.message = resultMessage;
String message = resultMessage + "无法关门。";
driver.setMessage(message);
logServer.deviceExecuteLog(device_code, "", "", message);
}
} else {
// if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
// ) {
// JSONObject form = new JSONObject();
// form.put("vehicle_code", "");
// form.put("status", 6);
// form.put("device_code", device_code);
// form.put("task_code", "");
// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{
// add(form);
// }});
// if (20000 == result.getIntValue("code")) {
// flag = true;
// } else {
// String resultMessage = result.getString("message");
// this.message = resultMessage;
// String message = resultMessage + "无法关门。";
// driver.setMessage(message);
// logServer.deviceExecuteLog(device_code, "", "", message);
// }
// } else {
flag = true;
}
// }
} else {
String message = "自动门未联机,无法关门。";
driver.setMessage(message);

Loading…
Cancel
Save