上线版本

This commit is contained in:
张江玮
2023-02-22 08:40:14 +08:00
parent c83be923c3
commit 9419f61e20
7 changed files with 96 additions and 55 deletions

View File

@@ -141,6 +141,8 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
boolean emptyHasGoodsRequireSucess = true;
//条码改变请求标记
boolean updateBarcodeRequireSucess = true;
//光电变更
boolean moveUpdateSuccess = true;
private int instruction_finished_time_out;
@@ -215,6 +217,7 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
if (apply_task.toString().equals("true") && move == 1) {
this.setEmptyHasGoodsRequireSucess(false);
}
this.setMoveUpdateSuccess(false);
logServer.deviceItemValue(this.device_code, "move", String.valueOf(move));
logServer.deviceExecuteLog(this.device_code, "", "", "信号move" + last_move + "->" + move);
}
@@ -251,7 +254,7 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
logServer.deviceExecuteLog(this.device_code, "", "", "信号order" + last_order + "->" + order);
}
if (barcode != last_barcode) {
this.setUpdateBarcodeRequireSucess(false);
this.setUpdateBarcodeRequireSucess(false);
logServer.deviceItemValue(this.device_code, "barcode", String.valueOf(barcode));
logServer.deviceExecuteLog(this.device_code, "", "", "信号barcode" + last_barcode + "->" + barcode);
}
@@ -265,8 +268,10 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
applyMoveEmpty();
}
if (!updateBarcodeRequireSucess) {
updateBarcode();
if (!updateBarcodeRequireSucess || !moveUpdateSuccess) {
if (device_code.startsWith("MLZ") || "GT03".equals(device_code)) {
updateBarcode();
}
}
@@ -561,15 +566,22 @@ public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements De
if (inspect_in_stocck.toString().equals("true")) {
json.put("is_first", "true");
}
String prx = "00";
if (barcode < 10) {
prx = "000";
int barcode;
if (move == 0) {
barcode = 0;
} else {
barcode = this.barcode;
}
json.put("device_code", device_code);
json.put("barcode", prx + barcode);
json.put("barcode", String.valueOf(barcode));
JSONObject resp = acsToWmsService.updateBarcode(json);
if (StrUtil.equals(resp.getString("status"), "200")) {
this.setUpdateBarcodeRequireSucess(true);
if (!this.updateBarcodeRequireSucess) {
this.setUpdateBarcodeRequireSucess(true);
}
if (!this.moveUpdateSuccess) {
this.setMoveUpdateSuccess(true);
}
logServer.deviceInfo("acs更新条码", this.getDevice_code(), "更新满料盅库位条码信息成功!");
}
}