From 50922a29bf3d9daaf6ec23702cf9a8c1f4ad1325 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Sun, 2 Jul 2023 17:32:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B1=8F=E5=88=86=E6=8B=A3?= =?UTF-8?q?=E6=8B=86=E7=A0=81=E5=9E=9B=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/wms/cockpit/service/impl/BigScreenServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java index c27a2be..96a78d5 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java @@ -211,12 +211,12 @@ public class BigScreenServiceImpl implements BigScreenService { JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; for (int i = 0; i < data.size(); i++) { JSONObject jsonObject = data.getJSONObject(i); - if (jsonObject.getInteger("move") == 1 + if (jsonObject.getInteger("move") != 0 && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && jsonObject.getInteger("encoder_qty") > 0) { // 绿色 jsonObject.put("color_status", ColorEnum.GREEN.getIndex()); - } else if (jsonObject.getInteger("move") == 1 + } else if (jsonObject.getInteger("move") != 0 && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && jsonObject.getInteger("encoder_qty") == 0) { // 黄色 @@ -349,12 +349,12 @@ public class BigScreenServiceImpl implements BigScreenService { JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; for (int i = 0; i < data.size(); i++) { JSONObject jsonObject = data.getJSONObject(i); - if (jsonObject.getInteger("move") == 1 + if (jsonObject.getInteger("move") != 0 && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && jsonObject.getInteger("encoder_qty") > 0) { // 绿色 jsonObject.put("color_status", ColorEnum.GREEN.getIndex()); - } else if (jsonObject.getInteger("move") == 1 + } else if (jsonObject.getInteger("move") != 0 && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && jsonObject.getInteger("encoder_qty") == 0) { // 黄色