Commit 2757b55c zshaohui

1.退回大库,选择库别

2.展示禁用料 具体信息
1 个父辈 20869713
...@@ -1143,6 +1143,8 @@ public class LuxsanApi extends DefaultSmfApiListener { ...@@ -1143,6 +1143,8 @@ public class LuxsanApi extends DefaultSmfApiListener {
} }
log.info("批量禁用入参为:"+JSON.toJSONString(paramList)); log.info("批量禁用入参为:"+JSON.toJSONString(paramList));
Map<String,String> resultMap = new HashMap<>();
List<String> reelList = new ArrayList<>(); List<String> reelList = new ArrayList<>();
try { try {
String resultStr = HttpHelper.postJson(batchCheckReelUrl, paramList); String resultStr = HttpHelper.postJson(batchCheckReelUrl, paramList);
...@@ -1162,8 +1164,10 @@ public class LuxsanApi extends DefaultSmfApiListener { ...@@ -1162,8 +1164,10 @@ public class LuxsanApi extends DefaultSmfApiListener {
for (int j = 0; j < resultList.size(); j++) { for (int j = 0; j < resultList.size(); j++) {
JSONObject result = resultList.getJSONObject(j); JSONObject result = resultList.getJSONObject(j);
String reelId = result.getString("reelId"); String reelId = result.getString("reelId");
String message = result.getString("message");
if (StringUtils.isNotBlank(reelId)){ if (StringUtils.isNotBlank(reelId)){
reelList.add(reelId); reelList.add(reelId);
resultMap.put(reelId,message);
} }
} }
} }
...@@ -1176,7 +1180,8 @@ public class LuxsanApi extends DefaultSmfApiListener { ...@@ -1176,7 +1180,8 @@ public class LuxsanApi extends DefaultSmfApiListener {
for (Barcode barcode : barcodeList) { for (Barcode barcode : barcodeList) {
if(reelList.contains(barcode.getBarcode())) { if(reelList.contains(barcode.getBarcode())) {
barcode.setDisableMsg("禁用料"); String message = resultMap.get(barcode.getBarcode());
barcode.setDisableMsg(message);
barcodeManager.save(barcode); barcodeManager.save(barcode);
} else { } else {
if (StringUtils.isNotEmpty(barcode.getDisableMsg())) { if (StringUtils.isNotEmpty(barcode.getDisableMsg())) {
......
...@@ -44,16 +44,16 @@ public class ReturnTowerController { ...@@ -44,16 +44,16 @@ public class ReturnTowerController {
log.info("退回大库为:" + JSON.toJSONString(paramMap)); log.info("退回大库为:" + JSON.toJSONString(paramMap));
String materialStr = paramMap.get("materialStr"); String materialStr = paramMap.get("materialStr");
//String warehouseCode = paramMap.get("warehouseCode"); String warehouseCode = paramMap.get("warehouseCode");
String codeStr = paramMap.get("codeStr"); String codeStr = paramMap.get("codeStr");
if (StringUtils.isEmpty(materialStr)) { if (StringUtils.isEmpty(materialStr)) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料串信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料串信息"});
} }
/*if (StringUtils.isEmpty(warehouseCode)) { if (StringUtils.isEmpty(warehouseCode)) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"库别信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"库别信息"});
}*/ }
//判断料串信息是否正确 //判断料串信息是否正确
if (StringUtils.isEmpty(materialStr) || !materialStr.startsWith("B00")) { if (StringUtils.isEmpty(materialStr) || !materialStr.startsWith("B00")) {
...@@ -71,18 +71,6 @@ public class ReturnTowerController { ...@@ -71,18 +71,6 @@ public class ReturnTowerController {
return ResultBean.newErrorResult(-1, "smfcore.error.barcode.noValidCode", "条码无效"); return ResultBean.newErrorResult(-1, "smfcore.error.barcode.noValidCode", "条码无效");
} }
String warehouseCode = barcode.getWarehouseCode();
if (StringUtils.isEmpty(warehouseCode)){
Barcode reelBarcode = LuxsanApi.fetchReel(barcode);
if (reelBarcode == null){
return ResultBean.newErrorResult(-1, "", "未找到"+barcode.getBarcode()+"的库别信息");
}
warehouseCode = reelBarcode.getWarehouseCode();
if (StringUtils.isEmpty(warehouseCode)) {
return ResultBean.newErrorResult(-1, "", "未找到"+barcode.getBarcode()+"的库别信息");
}
}
//获取尺寸信息 //获取尺寸信息
BrandQtyResult result = LuxsanApi.brandQtyUrl(new BrandQtyRequest(barcode.getPartNumber(), barcode.getProvider())); BrandQtyResult result = LuxsanApi.brandQtyUrl(new BrandQtyRequest(barcode.getPartNumber(), barcode.getProvider()));
if (result == null) { if (result == null) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!