From b0d19dcca8a241f16bea4bcb8862de9583565408 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Sun, 16 Apr 2023 09:42:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/modules/common/utils/PointUpdateUtil.java | 2 +- .../cockpit/service/impl/CockpitServiceImpl.java | 14 +++----------- .../java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java b/lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java index e1a59b6..db2bc9a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java +++ b/lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java @@ -110,7 +110,7 @@ public class PointUpdateUtil { devices.add(device); // 向ACS查询点位状态 JSONObject deviceStatus = wmsToAcsService.getPointStatus(devices); - if (ObjectUtil.isEmpty(deviceStatus.get("data"))) return null; + if (ObjectUtil.isEmpty(deviceStatus.get("data"))) return DeviceStatusEnum.SHUTDOWN.getCode(); JSONArray statusJSONArray = deviceStatus.getJSONArray("data"); if (ObjectUtil.isEmpty(statusJSONArray)) return DeviceStatusEnum.SHUTDOWN.getCode(); JSONObject deviceJson = statusJSONArray.getJSONObject(0); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java index 93b68da..e8fab23 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/CockpitServiceImpl.java @@ -216,29 +216,21 @@ public class CockpitServiceImpl implements CockpitService{ d.setWork_time(duration.toHours() + ""); } // 设备状态 - d.setDevice_status(PointUpdateUtil.getDeviceStatus(d.getDevice_code())); +// d.setDevice_status(PointUpdateUtil.getDeviceStatus(d.getDevice_code())); DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code()); // 添加图片名字 d.setDevice_url(deviceEnum.getPictureName()); // todo: 区分窑与其他设备 if (d.getDevice_model().equals(DeviceEnum.YAO.getModel())) { + // acs上报 d.setVehicle_qty(15); - d.setVehicle_max_qty(20); + d.setVehicle_max_qty(42); // 最大值 已确认 } // todo: RGV if (d.getDevice_model().equals(DeviceEnum.RGV.getModel())) { d.setDevice_status_name("空位无车,满位有车"); } // todo: 包装机、碟盘机 - // 分类链表 -// if (ObjectUtil.isEmpty(map.get(deviceEnum.getKeyName()))) { -// List de = new ArrayList<>(); -// de.add(d); -// map.put(deviceEnum.getKeyName(), de); -// } else { -// map.get(deviceEnum.getKeyName()).add(d); -// map.put(deviceEnum.getKeyName(), map.get(deviceEnum.getKeyName())); -// } }); return res; } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql index d7e17a1..1146bd1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql @@ -77,7 +77,7 @@ IF(NULLIF(m.material_name, '') IS NULL, '-', m.material_name) as material_name FROM `pdm_bi_device` d - LEFT JOIN pdm_bd_workorder w ON (d.device_id = w.device_id) AND w.order_status <> '5' + LEFT JOIN pdm_bd_workorder w ON (d.device_code = w.device_code) AND w.order_status <> '5' LEFT JOIN md_me_material_detail m ON w.material_id = m.material_id WHERE d.is_used = '1'