From d9d680a309065091cbafb9d48823c2b3d3cbef33 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Fri, 14 Apr 2023 21:28:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=87=BA=E7=8E=B0=E5=BC=82=E5=B8=B8=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=85=B3=E8=81=94=E4=B8=BAid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/nl/modules/common/utils/PointUpdateUtil.java | 1 + .../src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql | 3 +-- 2 files changed, 2 insertions(+), 2 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 eb8924f..e1a59b6 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,6 +110,7 @@ public class PointUpdateUtil { devices.add(device); // 向ACS查询点位状态 JSONObject deviceStatus = wmsToAcsService.getPointStatus(devices); + if (ObjectUtil.isEmpty(deviceStatus.get("data"))) return null; 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/wql/COCKPIT_DEVICE.wql b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql index d977e01..d7e17a1 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,8 +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_code = w.device_code - OR d.extend_code = w.device_code ) AND w.order_status <> '5' + LEFT JOIN pdm_bd_workorder w ON (d.device_id = w.device_id) AND w.order_status <> '5' LEFT JOIN md_me_material_detail m ON w.material_id = m.material_id WHERE d.is_used = '1'