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(); StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver();
if (driver.getMode() != 0) { if (driver.getMode() != 0) {
if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) // if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
) { // ) {
JSONObject form = new JSONObject(); // JSONObject form = new JSONObject();
form.put("vehicle_code", ""); // form.put("vehicle_code", "");
form.put("status", 5); // form.put("status", 5);
form.put("device_code", device_code); // form.put("device_code", device_code);
form.put("task_code", ""); // form.put("task_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 + "无法开门。"; // String message = resultMessage + "无法开门。";
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 = "自动门未联机,无法开门。";
driver.setMessage(message); driver.setMessage(message);
@ -1025,28 +1025,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver(); StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver();
if (driver.getMode() != 0) { if (driver.getMode() != 0) {
if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) // if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue())
) { // ) {
JSONObject form = new JSONObject(); // JSONObject form = new JSONObject();
form.put("vehicle_code", ""); // form.put("vehicle_code", "");
form.put("status", 6); // form.put("status", 6);
form.put("device_code", device_code); // form.put("device_code", device_code);
form.put("task_code", ""); // form.put("task_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 + "无法关门。"; // String message = resultMessage + "无法关门。";
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 = "自动门未联机,无法关门。";
driver.setMessage(message); driver.setMessage(message);

Loading…
Cancel
Save