Commit 5e351b95 zshaohui

1053 handle提交

1 个父辈 68ee9dd7
...@@ -524,5 +524,4 @@ public class StatusBean { ...@@ -524,5 +524,4 @@ public class StatusBean {
return newMsg; return newMsg;
} }
} }
} }
...@@ -33,6 +33,23 @@ public enum OP_STATUS { ...@@ -33,6 +33,23 @@ public enum OP_STATUS {
/** /**
* 已结束 * 已结束
*/ */
END END,
/**
* 已从仓位中取出
*/
OUTBOX,
/**
* 机器人正在移栽中
*/
INROBOT,
/**
* 已放到料仓门口
*/
BOXDOOR,
/**
* 已放到料仓门口无料盘
*/
BOXDOOR_NOREEL
; ;
} }
...@@ -5,10 +5,7 @@ import com.google.common.base.Strings; ...@@ -5,10 +5,7 @@ import com.google.common.base.Strings;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.Constants; import com.neotel.smfcore.common.utils.*;
import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.common.utils.YmlUpdateUtil;
import com.neotel.smfcore.core.barcode.service.manager.IComponentManager; import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode; import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.barcode.service.po.Component; import com.neotel.smfcore.core.barcode.service.po.Component;
...@@ -677,6 +674,21 @@ public class DataCache { ...@@ -677,6 +674,21 @@ public class DataCache {
} }
return availableStorageIds; return availableStorageIds;
} }
public List<String> getAvailableStorageIds(DeviceType deviceType){
List<String> availableStorageIds = new ArrayList<>();
for (Storage storage : getAllStorage().values()) {
if(storage.getType().equals(deviceType.name())) {
StatusBean bean = DevicesStatusUtil.getStatusBean(storage.getCid());
if (bean == null || bean.timeOut() || !bean.isAvailable()) {
continue;
}
availableStorageIds.add(storage.getCid());
}
}
return availableStorageIds;
}
public Storage AutoCreateStorage(String cid,String deviceType) { public Storage AutoCreateStorage(String cid,String deviceType) {
//判断cid存在 //判断cid存在
Storage storage = null; Storage storage = null;
...@@ -710,4 +722,24 @@ public class DataCache { ...@@ -710,4 +722,24 @@ public class DataCache {
} }
return 0; return 0;
} }
public String GetConfigCache(String cacheKey ,String configKey,String configValue) {
if (StringUtils.isEmpty(configKey) || StringUtils.isEmpty(cacheKey)) {
return configValue;
}
if (StringUtils.isEmpty(configValue)) {
String cacheValue = getCache(cacheKey);
if (cacheValue == null || StringUtils.isEmpty(cacheValue)) {
return configValue;
}
configValue = cacheValue;
Map<String, Object> updateMap = new HashMap<>();
updateMap.put(configKey, configValue);
YmlUpdateUtil.updateYamlFile(updateMap);
} else {
updateCache(cacheKey, configValue);
}
return configValue;
}
} }
...@@ -309,4 +309,7 @@ public class Storage extends BasePo implements Serializable { ...@@ -309,4 +309,7 @@ public class Storage extends BasePo implements Serializable {
return getGroupId().equals(groupId); return getGroupId().equals(groupId);
} }
public boolean isRobotBox() {
return DeviceType.ROBOT_BOX.name().equals(type);
}
} }
...@@ -210,6 +210,11 @@ public class DataLog extends BasePo implements Serializable { ...@@ -210,6 +210,11 @@ public class DataLog extends BasePo implements Serializable {
*/ */
private MSDAppendInfo msdAppendInfo; private MSDAppendInfo msdAppendInfo;
/**
* 位置信息,如料架编号,托盘编号,移栽编号,皮带线编号,机器人编号等
*/
private String locInfo = "";
public String getBarcode() { public String getBarcode() {
if(barcode == null){ if(barcode == null){
return ""; return "";
...@@ -252,6 +257,13 @@ public class DataLog extends BasePo implements Serializable { ...@@ -252,6 +257,13 @@ public class DataLog extends BasePo implements Serializable {
return OP_STATUS.END.name().equals(status); return OP_STATUS.END.name().equals(status);
} }
public boolean isOutBox(){
return OP_STATUS.OUTBOX.name().equals(status);
}
public boolean isInRobot(){
return OP_STATUS.INROBOT.name().equals(status);
}
/** /**
* 是否是入库任务 * 是否是入库任务
...@@ -287,6 +299,14 @@ public class DataLog extends BasePo implements Serializable { ...@@ -287,6 +299,14 @@ public class DataLog extends BasePo implements Serializable {
return OP.CHECKOUT == type; return OP.CHECKOUT == type;
} }
public boolean isBoxdoor(){
return OP_STATUS.BOXDOOR.name().equals(status) || OP_STATUS.BOXDOOR_NOREEL.equals(status);
}
public boolean isBoxDoorNoReel(){
return OP_STATUS.BOXDOOR_NOREEL.equals(status);
}
/** /**
* 超过5分钟的已完成,已取消的任务都不再 * 超过5分钟的已完成,已取消的任务都不再
*/ */
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!