Commit 23aac61f zshaohui

1.功能优化

1 个父辈 8f064138
......@@ -526,13 +526,16 @@ public class MaterialBoxController {
public ResultBean boxFillUp(@RequestBody Map<String, String> paramMap) {
String code = paramMap.get("barcode"); //料盒编码
String fillUpCode = paramMap.get("fillUp"); //是否已满
if (StringUtils.isBlank(code)){
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料盒条码"});
}
boolean fillUp = false;
if (StringUtils.isNotBlank(fillUpCode)) {
fillUp = Boolean.valueOf(fillUpCode);
}
Barcode barcode = barcodeManager.findByBarcode(code);
if (barcode == null) {
return ResultBean.newErrorResult(-1, "smfcore.valueNotExist", "{}料箱不存在", new String[]{"料箱", code});
return ResultBean.newErrorResult(-1, "smfcore.valueNotExist", "{0}不存在", new String[]{"料箱"});
}
barcode.setFillUp(fillUp);
barcodeManager.save(barcode);
......@@ -558,17 +561,17 @@ public class MaterialBoxController {
String type = paramMap.get("type");
log.info("出库请求--barcode:{},type:{}", barcode, type);
if (StringUtils.isBlank(type)) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "请选择出库方式", new String[]{"type"});
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空}", new String[]{"出库方式"});
}
StoragePos pos = null;
if ("1".equals(type)) {
if (StringUtils.isBlank(barcode)) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{}出库同规格物料最少料箱时,{}不能为空", new String[]{"barcode"});
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "出库同规格物料最少料箱时,{0}不能为空", new String[]{"物料信息"});
}
//解析barcode条码
CodeBean codeBean = codeResolve.resolveSingleCode("=1x1=" + barcode);
if (!codeBean.isValid()) {
return ResultBean.newErrorResult(-1, "smfcore.error.barcode.invalid", "{}条码无效", new String[]{"barcode"});
return ResultBean.newErrorResult(-1, "smfcore.error.barcode.invalid", "{0}条码无效", new String[]{barcode});
}
pos = getAvailableBox(codeBean.getBarcode().getPartNumber());
} else if ("2".equals(type)) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!