rev:解决异步多次请求
This commit is contained in:
@@ -433,7 +433,6 @@ 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());
|
||||||
@@ -443,6 +442,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
future.completeExceptionally(e);
|
future.completeExceptionally(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.requiresShipDeviceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendDeviceStatus(JSONObject param) {
|
public void sendDeviceStatus(JSONObject param) {
|
||||||
@@ -452,11 +452,11 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
try {
|
try {
|
||||||
acsToWmsService.sendDeviceStatus(param);
|
acsToWmsService.sendDeviceStatus(param);
|
||||||
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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.requiresShipDeviceUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void taskDeviceUpdate(int task) {
|
private void taskDeviceUpdate(int task) {
|
||||||
|
|||||||
Reference in New Issue
Block a user