Browse Source

fix: 大屏

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

2
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);

14
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<DeviceInfoDto> 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;
}

2
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'

Loading…
Cancel
Save