rev:解决异步多次请求
This commit is contained in:
@@ -433,7 +433,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
JSONObject param = new JSONObject() ;
|
||||
param.put("device_code", device_code);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,参数:" + param);
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "有货变无货请求LMS,接口返回:" + response.body());
|
||||
@@ -443,6 +442,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
future.completeExceptionally(e);
|
||||
}
|
||||
});
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
}
|
||||
|
||||
public void sendDeviceStatus(JSONObject param) {
|
||||
@@ -452,11 +452,11 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
try {
|
||||
acsToWmsService.sendDeviceStatus(param);
|
||||
future.complete("Async operation completed");
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
} catch (Exception e) {
|
||||
future.completeExceptionally(e);
|
||||
}
|
||||
});
|
||||
this.requiresShipDeviceUpdate = true;
|
||||
}
|
||||
|
||||
private void taskDeviceUpdate(int task) {
|
||||
|
||||
Reference in New Issue
Block a user