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'