1
This commit is contained in:
@@ -683,7 +683,6 @@ public class AgvServiceImpl implements AgvService {
|
||||
HttpResponse result = HttpRequest.get(agvurl)
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
System.out.println("查询agv指令数据:" + result.body());
|
||||
|
||||
return result;
|
||||
} else {
|
||||
|
||||
@@ -100,38 +100,36 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
mode = this.itemProtocol.getMode();
|
||||
action = this.itemProtocol.getAction();
|
||||
error = this.itemProtocol.getError();
|
||||
if (mode != last_mode) {
|
||||
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (action != last_action) {
|
||||
this.execute_log.log("设备:" + device_code + ",last_action -> action:" + last_action + "->" + action);
|
||||
}
|
||||
if (error != last_error) {
|
||||
//this.execute_log.setContainer("");
|
||||
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error);
|
||||
}
|
||||
|
||||
last_action = action;
|
||||
last_mode = mode;
|
||||
last_error = error;
|
||||
//message = StringFormatUtl.format("设备报警:{}", new Object[]{});
|
||||
|
||||
// String manual_create_task = this.getDevice().getExtraValue().get("manual_create_task").toString();
|
||||
|
||||
}
|
||||
|
||||
public synchronized String getStatus() {
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
if (action == 1 && mode == 2) {
|
||||
if (action == 1) {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "OPEN");
|
||||
} else if (action == 2 && mode == 2) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user