From 297cb2d2940c112a84786d2124d118d33157e058 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Tue, 25 Apr 2023 18:04:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B1=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/cockpit/service/dto/WorkorderDto.java | 3 +++ .../service/impl/CockpitServiceImpl.java | 17 +++++++---------- .../nl/wms/cockpit/wql/COCKPIT_PRODUCTION.wql | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/WorkorderDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/WorkorderDto.java index 750615c..59df345 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/WorkorderDto.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/dto/WorkorderDto.java @@ -48,12 +48,15 @@ public class WorkorderDto implements Serializable{ * 生产量(已完成数量) */ private BigDecimal real_qty; + private BigDecimal qualified_qty; + private BigDecimal unqualified_qty; /** * 生产状态1未生产2已下发3生产中4停止5完成 */ private String order_status; + private String order_status_name; /** * 班次类型 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 d7f7c0c..1d49bfa 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 @@ -212,16 +212,13 @@ public class CockpitServiceImpl implements CockpitService{ .addParam("flag", "3") .process() .getResultJSONArray(0); -// JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(result); -// if (ObjectUtil.isEmpty(devicesStatus)) { -// return null; -// } -// JSONArray data = ObjectUtil.isNotEmpty( -// devicesStatus.getJSONArray("data"))?devicesStatus.getJSONArray("data"):null; -// if (ObjectUtil.isEmpty(data)) { -// return null; -// } - if(ObjectUtil.isNotEmpty(result)) { //todo: result -> data + JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(result); + if (ObjectUtil.isEmpty(devicesStatus)) { + return null; + } + JSONArray data = ObjectUtil.isNotEmpty( + devicesStatus.getJSONArray("data"))?devicesStatus.getJSONArray("data"):result; + if(ObjectUtil.isNotEmpty(data)) { res = result.toJavaList(DeviceInfoDto.class); res.forEach(d -> { DeviceEnum deviceEnum = DeviceEnum.get(d.getDevice_model(), d.getDevice_code()); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PRODUCTION.wql b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PRODUCTION.wql index e906e83..f78e1e1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PRODUCTION.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PRODUCTION.wql @@ -47,7 +47,7 @@ IF 输入.flag = "1" PAGEQUERY SELECT - dicts.label order_status, + dicts.label order_status_name, material.material_code, device.device_name, workorder.*