Commit c56351d1 sunke

感应料架入库无CID处理

1 个父辈 6422255e
...@@ -117,6 +117,9 @@ public class VerticalBoxHandler extends BaseDeviceHandler { ...@@ -117,6 +117,9 @@ public class VerticalBoxHandler extends BaseDeviceHandler {
* 更新或清理(task为null)当前正在执行的任务 * 更新或清理(task为null)当前正在执行的任务
*/ */
public void updateCurrentTask(String cid, DataLog task){ public void updateCurrentTask(String cid, DataLog task){
if(Strings.isNullOrEmpty(cid)){
return;
}
if(task == null){ if(task == null){
operateTaskMap.remove(cid); operateTaskMap.remove(cid);
}else{ }else{
......
...@@ -49,6 +49,9 @@ public enum ORDER_COLOR { ...@@ -49,6 +49,9 @@ public enum ORDER_COLOR {
} }
public static ORDER_COLOR nextColor(Collection<String> excludeColors){ public static ORDER_COLOR nextColor(Collection<String> excludeColors){
excludeColors.add(ORDER_COLOR.BLUE.getRgb());//手动出库
excludeColors.add(ORDER_COLOR.DARKGREEN.getRgb());//入库
ORDER_COLOR[] allColors = values(); ORDER_COLOR[] allColors = values();
if (excludeColors.size() >= allColors.length){ if (excludeColors.size() >= allColors.length){
return null; return null;
......
...@@ -48,7 +48,7 @@ public class DataLog extends BasePo implements Serializable { ...@@ -48,7 +48,7 @@ public class DataLog extends BasePo implements Serializable {
/** /**
* 料仓 cid * 料仓 cid
*/ */
private String cid; private String cid = "";
/** /**
* 分组ID * 分组ID
......
...@@ -166,7 +166,8 @@ public class TaskService { ...@@ -166,7 +166,8 @@ public class TaskService {
public Collection<DataLog> getQueueTasks(String cid) { public Collection<DataLog> getQueueTasks(String cid) {
List<DataLog> tasks = new ArrayList<>(); List<DataLog> tasks = new ArrayList<>();
for (DataLog dataLog : taskMap.values()) { for (DataLog dataLog : taskMap.values()) {
if (dataLog.getCid().equals(cid)) { String taskCid = dataLog.getCid();
if (taskCid.equals(cid)) {
tasks.add(dataLog); tasks.add(dataLog);
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!