rev 优化
This commit is contained in:
@@ -257,6 +257,10 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
last_inst_message = inst_message;
|
last_inst_message = inst_message;
|
||||||
if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) {
|
if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) {
|
||||||
this.requiresShipDeviceUpdate = false;
|
this.requiresShipDeviceUpdate = false;
|
||||||
|
if(mode>0 )
|
||||||
|
{
|
||||||
|
shipDeviceUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
|
||||||
@@ -430,12 +434,12 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
JSONObject param = new JSONObject() ;
|
JSONObject param = new JSONObject() ;
|
||||||
param.put("device_code", device_code);
|
param.put("device_code", device_code);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,参数:" + param);
|
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,参数:" + param);
|
||||||
|
this.requiresShipDeviceUpdate = true;
|
||||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||||
if (response == null || response.getStatus() == 200) {
|
if (response == null || response.getStatus() == 200) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,接口返回:" + response.body());
|
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,接口返回:" + response.body());
|
||||||
}
|
}
|
||||||
future.complete("Async operation completed");
|
future.complete("Async operation completed");
|
||||||
this.requiresShipDeviceUpdate = true;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
future.completeExceptionally(e);
|
future.completeExceptionally(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user