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) { // 黄色