Commit 3aa08038 zshaohui

料架任务没有亮灯颜色,默认是蓝色

1 个父辈 06a7df16
...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.handler.impl; ...@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.handler.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
import com.neotel.smfcore.core.device.enums.OP_STATUS; import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.order.enums.ORDER_COLOR; import com.neotel.smfcore.core.order.enums.ORDER_COLOR;
...@@ -58,7 +59,12 @@ public class AccShelfHandler extends BaseDeviceHandler{ ...@@ -58,7 +59,12 @@ public class AccShelfHandler extends BaseDeviceHandler{
List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid()); List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid());
for (DataLog task : for (DataLog task :
dataLogs) { dataLogs) {
statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String colorName = ORDER_COLOR.fromRgb(task.getLightColor()).name();
statusBean.addData("open", task.getPosName() + "=" + colorName);
log.info("库位[" + task.getPosName() + "][" + task.getType() + "]+亮灯:" + colorName);
} }
return statusBean; return statusBean;
......
...@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; ...@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
import com.neotel.smfcore.common.bean.ResultBean; import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.SecurityUtils; import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.bean.CodeBean; import com.neotel.smfcore.core.barcode.bean.CodeBean;
import com.neotel.smfcore.core.barcode.service.po.Barcode; import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.bean.StatusBean; import com.neotel.smfcore.core.device.bean.StatusBean;
...@@ -107,6 +108,9 @@ public class NLMShelfHandler extends BaseDeviceHandler { ...@@ -107,6 +108,9 @@ public class NLMShelfHandler extends BaseDeviceHandler {
for (DataLog task : for (DataLog task :
dataLogs) { dataLogs) {
// statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); // statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name());
if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String color = ORDER_COLOR.fromRgb(task.getLightColor()).name(); String color = ORDER_COLOR.fromRgb(task.getLightColor()).name();
addMergeData(statusBean, task, "open", color); addMergeData(statusBean, task, "open", color);
} }
......
...@@ -246,7 +246,12 @@ public class NLPShelfHandler extends BaseDeviceHandler { ...@@ -246,7 +246,12 @@ public class NLPShelfHandler extends BaseDeviceHandler {
List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid()); List<DataLog> dataLogs = getLightGuideTask(outMap,statusBean.getCid());
for (DataLog task : dataLogs) { for (DataLog task : dataLogs) {
statusBean.addData("open", task.getPosName() + "=" + ORDER_COLOR.fromRgb(task.getLightColor()).name()); if (StringUtils.isBlank(task.getLightColor())){
task.setLightColor(ORDER_COLOR.BLUE.name());
}
String colorName = ORDER_COLOR.fromRgb(task.getLightColor()).name();
statusBean.addData("open", task.getPosName() + "=" + colorName);
log.info("库位[" + task.getPosName() + "][" + task.getType() + "]+亮灯:" + colorName);
} }
return statusBean; return statusBean;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!