Commit c7059fb9 hc

fix:获取料箱信息方法修改

1 个父辈 1085ac77
......@@ -8,6 +8,7 @@ import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.barcode.utils.CodeResolve;
import com.neotel.smfcore.core.device.enums.OP;
import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.device.util.DataCache;
......@@ -62,6 +63,13 @@ public class BoxHandleUtil {
BoxHandleUtil.taskService = service;
}
private static CodeResolve codeResolve;
@Autowired
public void setCodeResolve(CodeResolve resolve) {
BoxHandleUtil.codeResolve = resolve;
}
/**
* key 为料箱号
......@@ -369,23 +377,27 @@ public class BoxHandleUtil {
String platsize = "";
int boxAllCount = 0;
int boxRemainingCount = 0;
String boxStr = "";
;
String msg = "";
String boxStr = "";
List<List<Integer>> boxPartitionCounts = new ArrayList<>();
if (StringUtils.isNotBlank(code)) {
if (code.startsWith("C07") || code.startsWith("C13") || code.startsWith("C15")) {
//1、获取料箱的
Barcode barcode = codeResolve.resolveOneValideBarcode(code);
if (barcode != null) {
boxStr = barcode.getBarcode();
String endStr = code.substring(code.length() - 1); //得到是A、B面
boxStr = getBoxStr(code, false);
if (boxSideMap.get(boxStr) != null) {
endStr = boxSideMap.get(boxStr);
} else {
boxSideMap.put(boxStr, endStr);
}
//1、获取料箱的
Barcode barcode = barcodeManager.findByBarcode(boxStr);
if (barcode != null) {
List<Barcode> subCodeList = barcode.getSubCodeList();
if (subCodeList != null && !subCodeList.isEmpty()) {
if (subCodeList == null){
subCodeList = new ArrayList<>();
}
//if (subCodeList != null && !subCodeList.isEmpty()) {
if (boxAllCountMap.get(boxStr) == null) {
boxAllCountMap.put(boxStr, subCodeList.size());
}
......@@ -475,7 +487,7 @@ public class BoxHandleUtil {
boxRemainingCount = subCodeList.size();
}
}
}
//}
}
resultMap.put("platsize", platsize);
resultMap.put("boxPartitionCounts", boxPartitionCounts);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!