Browse Source

更新

master
loujf 2 years ago
parent
commit
d76a4422a5
  1. 40
      hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java
  2. 16
      hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_manipulator_inspect_site/StandardManipulatorInspectSiteDeviceDriver.java

40
hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java

@ -107,29 +107,45 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
} }
// public synchronized String getStatus() {
// JSONObject jo = new JSONObject();
//
// if (action == 1) {
// jo.put("name", this.getDevice().getDevice_code());
// jo.put("status", "OPEN");
// jo.put("action", action);
// jo.put("mode", mode);
//
// } else if (action == 2) {
// jo.put("name", this.getDevice().getDevice_code());
// jo.put("status", "CLOSE");
// jo.put("action", action);
// jo.put("mode", mode);
//
// } else {
// jo.put("name", this.getDevice().getDevice_code());
// jo.put("status", "ERROR");
// jo.put("action", action);
// jo.put("mode", mode);
// }
// System.out.println("查询自动门状态,device_code:"+this.getDevice().getDevice_code() +",action:" + action +",mode:"+mode+",param:"+jo);
//
// return jo.toString();
// }
public synchronized String getStatus() { public synchronized String getStatus() {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
if (action == 1) { if (action == 1 && mode == 2) {
jo.put("name", this.getDevice().getDevice_code()); jo.put("name", this.getDevice().getDevice_code());
jo.put("status", "OPEN"); jo.put("status", "OPEN");
jo.put("action", action); } else if (action == 2 && mode == 2) {
jo.put("mode", mode);
} else if (action == 2) {
jo.put("name", this.getDevice().getDevice_code()); jo.put("name", this.getDevice().getDevice_code());
jo.put("status", "CLOSE"); jo.put("status", "CLOSE");
jo.put("action", action);
jo.put("mode", mode);
} else { } else {
jo.put("name", this.getDevice().getDevice_code()); jo.put("name", this.getDevice().getDevice_code());
jo.put("status", "ERROR"); jo.put("status", "ERROR");
jo.put("action", action);
jo.put("mode", mode);
} }
System.out.println("查询自动门状态,device_code:"+this.getDevice().getDevice_code() +",action:" + action +",mode:"+mode+",param:"+jo);
return jo.toString(); return jo.toString();
} }

16
hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_manipulator_inspect_site/StandardManipulatorInspectSiteDeviceDriver.java

@ -190,16 +190,16 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic
break; break;
case 3: case 3:
//申请空盘 //申请空盘
if (!requireSucess && this.move == 0) { // if (!requireSucess && this.move == 0) {
applyEmpty(); // applyEmpty();
} // }
break; // break;
case 4: case 4:
//申请搬运任务 //申请搬运任务
if (!requireSucess && this.move != 0) { // if (!requireSucess && this.move != 0) {
autoCreateTask(); // autoCreateTask();
} // }
break; // break;
case 5: case 5:
break; break;
} }

Loading…
Cancel
Save