Browse Source

fix 自动更新工单状态

master
张江玮 1 year ago
parent
commit
1b0bd699df
  1. 5
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java
  2. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoUpdateWorkOrder.java

5
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java

@ -433,8 +433,9 @@ public class BigScreenServiceImpl implements BigScreenService {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
d1.put("device_code", "LQD01"); d1.put("device_code", "LQD01");
res.add(d1); res.add(d1);
d1.put("device_code", "HCD01"); JSONObject d2 = new JSONObject();
res.add(d1); d1.put("device_code", "KCD01");
res.add(d2);
JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res); JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res);
// JSONObject devicesStatus = null; // JSONObject devicesStatus = null;
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res;

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoUpdateWorkOrder.java

@ -51,7 +51,7 @@ public class AutoUpdateWorkOrder {
TaskUtils.addAutoUpdateColum(yzWorkOrderUpdate); TaskUtils.addAutoUpdateColum(yzWorkOrderUpdate);
for (int i = 0; i < yzData.size(); i++) { for (int i = 0; i < yzData.size(); i++) {
JSONObject newData = yzData.getJSONObject(i); JSONObject newData = yzData.getJSONObject(i);
yzWorkOrderUpdate.put("real_qty", newData.getString("reql_qty")); yzWorkOrderUpdate.put("real_qty", newData.getString("real_qty"));
yzWorkOrderUpdate.put("qualified_qty", newData.getString("qualified")); yzWorkOrderUpdate.put("qualified_qty", newData.getString("qualified"));
yzWorkOrderUpdate.put("unqualified_qty", newData.getString("unqualified")); yzWorkOrderUpdate.put("unqualified_qty", newData.getString("unqualified"));
workOrderTable.update(yzWorkOrderUpdate, "workorder_id = " + newData.getString("workorder_id")); workOrderTable.update(yzWorkOrderUpdate, "workorder_id = " + newData.getString("workorder_id"));
@ -62,7 +62,7 @@ public class AutoUpdateWorkOrder {
TaskUtils.addAutoUpdateColum(fjWorkOrderUpdate); TaskUtils.addAutoUpdateColum(fjWorkOrderUpdate);
for (int i = 0; i < fjData.size(); i++) { for (int i = 0; i < fjData.size(); i++) {
JSONObject newData = fjData.getJSONObject(i); JSONObject newData = fjData.getJSONObject(i);
yzWorkOrderUpdate.put("real_qty", newData.getString("reql_qty")); yzWorkOrderUpdate.put("real_qty", newData.getString("real_qty"));
workOrderTable.update(yzWorkOrderUpdate, "workorder_id = " + newData.getString("workorder_id")); workOrderTable.update(yzWorkOrderUpdate, "workorder_id = " + newData.getString("workorder_id"));
} }
} }

Loading…
Cancel
Save