Commit f07575d7 LN

1.点料次数更新问题修改。

2.获取库存时,如果是料仓不可用,状态为Offline
1 个父辈 e3ffbf32
......@@ -714,7 +714,7 @@ public class DeviceController {
needResolve = true;
}
log.info("点料信息:barcode:" + barcodeStr + ",amount为:" + amountStr);
log.info("点料信息:barcode:" + barcodeStr + ",amount为:" + amountStr+",offlineMode="+offlineMode);
if (StringUtils.isNotBlank(barcodeStr)) {
Barcode barcode = barcodeManager.findByBarcode(barcodeStr);
......@@ -733,9 +733,9 @@ public class DeviceController {
//处理入库单
InList inList = loadingUtil.getInlist();
if (inList == null) {
return ResultBean.newOkResult(qty);
boolean isInlistReel = loadingUtil.IsInlistReel(barcode.getBarcode());
if (!isInlistReel) {
return ResultBean.newOkResult(barcode.getXrayCount());
}
try {
......
......@@ -221,6 +221,25 @@ public class LoadingUtil {
public InListItem updateItemState( String barcode,String posName,String s){
return updateItemState(barcode,posName,s,"");
}
public boolean IsInlistReel(String barcode) {
try {
InList inList = getInlist();
if (inList == null) {
return false;
}
List<InListItem> inListItems = new ArrayList<>();
for (InListItem item :
inList.getInListItems()) {
if (item.getRi().equals(barcode)) {
return true;
}
}
} catch (Exception exception) {
log.error("IsInlistReel , barcode=" + barcode + ", 出错:" + exception.toString());
}
return false;
}
public InListItem updateItemState( String barcode,String posName,String s,String ngMsg) {
......
......@@ -206,9 +206,15 @@ public class NeotelController {
Map<String, Object> objMap = new HashMap<>();
Storage storage = dataCache.getStorageById(storagePos.getStorageId());
String materialStatus="Available";
StatusBean statusBean = DevicesStatusUtil.getStatusBean(storage.getCid());
if (statusBean == null || statusBean.timeOut() || !statusBean.isAvailable()) {
materialStatus="Offline";
}
objMap.put("towerId", storage.getName());
objMap.put("slot", storagePos.getPosName());
objMap.put("materialStatus", "Available");
//"materialStatus": Available|Offline
objMap.put("materialStatus", materialStatus);
Barcode barcode = storagePos.getBarcode();
if (barcode != null) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!