Browse Source

fix: 大屏分拣拆码垛位

master
李永德 1 year ago
parent
commit
50922a29bf
  1. 8
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java

8
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; JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res;
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
JSONObject jsonObject = data.getJSONObject(i); JSONObject jsonObject = data.getJSONObject(i);
if (jsonObject.getInteger("move") == 1 if (jsonObject.getInteger("move") != 0
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
&& jsonObject.getInteger("encoder_qty") > 0) { && jsonObject.getInteger("encoder_qty") > 0) {
// 绿色 // 绿色
jsonObject.put("color_status", ColorEnum.GREEN.getIndex()); 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")) && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
&& jsonObject.getInteger("encoder_qty") == 0) { && jsonObject.getInteger("encoder_qty") == 0) {
// 黄色 // 黄色
@ -349,12 +349,12 @@ public class BigScreenServiceImpl implements BigScreenService {
JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res; JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res;
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
JSONObject jsonObject = data.getJSONObject(i); JSONObject jsonObject = data.getJSONObject(i);
if (jsonObject.getInteger("move") == 1 if (jsonObject.getInteger("move") != 0
&& ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty")) && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
&& jsonObject.getInteger("encoder_qty") > 0) { && jsonObject.getInteger("encoder_qty") > 0) {
// 绿色 // 绿色
jsonObject.put("color_status", ColorEnum.GREEN.getIndex()); 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")) && ObjectUtil.isNotEmpty(jsonObject.getInteger("encoder_qty"))
&& jsonObject.getInteger("encoder_qty") == 0) { && jsonObject.getInteger("encoder_qty") == 0) {
// 黄色 // 黄色

Loading…
Cancel
Save