Commit 0863fd24 zshaohui

code转大写

1 个父辈 59b40f0d
...@@ -149,6 +149,8 @@ public class CDeviceController { ...@@ -149,6 +149,8 @@ public class CDeviceController {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"物料信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"物料信息"});
} }
codeStr = codeStr.toUpperCase(Locale.ROOT);
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[]{"料串信息"});
} }
......
...@@ -29,10 +29,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -29,10 +29,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j @Slf4j
@RestController @RestController
...@@ -134,6 +131,8 @@ public class GrPutInController { ...@@ -134,6 +131,8 @@ public class GrPutInController {
log.info("获取GR过账信息,料串为:"+materialStr+",物料为:"+codeStr); log.info("获取GR过账信息,料串为:"+materialStr+",物料为:"+codeStr);
codeStr = codeStr.toUpperCase(Locale.ROOT);
//解析条码为barcode //解析条码为barcode
Barcode barcode = codeResolve.resolveCode(codeStr); Barcode barcode = codeResolve.resolveCode(codeStr);
if (barcode == null) { if (barcode == null) {
......
...@@ -89,6 +89,8 @@ public class ManualGrPutInController { ...@@ -89,6 +89,8 @@ public class ManualGrPutInController {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"条码信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"条码信息"});
} }
codeStr = codeStr.toUpperCase(Locale.ROOT);
//解析条码为barcode //解析条码为barcode
Barcode barcode = codeResolve.resolveCode(codeStr); Barcode barcode = codeResolve.resolveCode(codeStr);
if (barcode == null) { if (barcode == null) {
...@@ -130,6 +132,8 @@ public class ManualGrPutInController { ...@@ -130,6 +132,8 @@ public class ManualGrPutInController {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料箱信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料箱信息"});
} }
boxStr = boxStr.toUpperCase(Locale.ROOT);
//如果不是C07,C13,C15开头的 报错 //如果不是C07,C13,C15开头的 报错
if (!boxStr.startsWith("C07") && !boxStr.startsWith("C13") && !boxStr.startsWith("C15")) { if (!boxStr.startsWith("C07") && !boxStr.startsWith("C13") && !boxStr.startsWith("C15")) {
return ResultBean.newErrorResult(-1, "", boxStr + "不是有效的料箱条码"); return ResultBean.newErrorResult(-1, "", boxStr + "不是有效的料箱条码");
...@@ -192,6 +196,9 @@ public class ManualGrPutInController { ...@@ -192,6 +196,9 @@ public class ManualGrPutInController {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料箱信息"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"料箱信息"});
} }
codeStr = codeStr.toUpperCase(Locale.ROOT);
binCode = binCode.toUpperCase(Locale.ROOT);
boxStr = boxStr.toUpperCase(Locale.ROOT);
Barcode noDbBarcode = codeResolve.resolveCode(codeStr); Barcode noDbBarcode = codeResolve.resolveCode(codeStr);
if (noDbBarcode == null) { if (noDbBarcode == null) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!