Browse Source

fix: 修复点位校验出现异常、工单关联为id

master
李永德 2 years ago
parent
commit
d9d680a309
  1. 1
      lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java
  2. 3
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_DEVICE.wql

1
lms/nladmin-system/src/main/java/org/nl/modules/common/utils/PointUpdateUtil.java

@ -110,6 +110,7 @@ public class PointUpdateUtil {
devices.add(device); devices.add(device);
// 向ACS查询点位状态 // 向ACS查询点位状态
JSONObject deviceStatus = wmsToAcsService.getPointStatus(devices); JSONObject deviceStatus = wmsToAcsService.getPointStatus(devices);
if (ObjectUtil.isEmpty(deviceStatus.get("data"))) return null;
JSONArray statusJSONArray = deviceStatus.getJSONArray("data"); JSONArray statusJSONArray = deviceStatus.getJSONArray("data");
if (ObjectUtil.isEmpty(statusJSONArray)) return DeviceStatusEnum.SHUTDOWN.getCode(); if (ObjectUtil.isEmpty(statusJSONArray)) return DeviceStatusEnum.SHUTDOWN.getCode();
JSONObject deviceJson = statusJSONArray.getJSONObject(0); JSONObject deviceJson = statusJSONArray.getJSONObject(0);

3
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 IF(NULLIF(m.material_name, '') IS NULL, '-', m.material_name) as material_name
FROM FROM
`pdm_bi_device` d `pdm_bi_device` d
LEFT JOIN pdm_bd_workorder w ON ( d.device_code = w.device_code LEFT JOIN pdm_bd_workorder w ON (d.device_id = w.device_id) AND w.order_status <> '5'
OR d.extend_code = w.device_code ) AND w.order_status <> '5'
LEFT JOIN md_me_material_detail m ON w.material_id = m.material_id LEFT JOIN md_me_material_detail m ON w.material_id = m.material_id
WHERE WHERE
d.is_used = '1' d.is_used = '1'

Loading…
Cancel
Save