Commit 133b5c2e sunke

条码规则数量带小数点时解析失败的问题

1 个父辈 a20fc42c
......@@ -109,7 +109,7 @@ public class BarcodeRule {
//不是字母和数字才可以作为分割符
String separator = toRegexStr(c + "");
if(trySeparator.indexOf(c) == -1){
String[] ss = ruleStr.split(separator);
String[] ss = ruleStr.split(separator,-1);
if(ss.length > tempArr.length){
trySeparator = c + trySeparator;
......@@ -369,7 +369,7 @@ public class BarcodeRule {
String value = getStrValue(codeArr);
if(!Strings.isNullOrEmpty(value)){
try{
return Integer.valueOf(value);
return Float.valueOf(value).intValue();
}catch (Exception ex){
log.warn(value + " is not a validate int");
}
......@@ -456,7 +456,7 @@ public class BarcodeRule {
}
String[] codeArr = new String[]{codeStr};
if(!Strings.isNullOrEmpty(separator)){
codeArr = codeStr.split(separator);
codeArr = codeStr.split(separator,-1);
//条码与规则长度对应不上
if(codeArr.length != length){
log.info("条码["+codeStr+"]与规则【"+ruleStr+"】长度不同");
......@@ -643,6 +643,9 @@ public class BarcodeRule {
rule = "SP;PN;PRODATEyyw[0:4:0];BATCH;QTY;RI;";
//rule = "SP;PN;PRODATEyyyyMMdd[0:8:0];BATCH;QTY;RI;";
codeStr = "=7x8=[)>@SIIX20@2060GBUW00@1347-01358@5000.000 @@";
rule = "1@[RI]@BATCH@PN@QTY@@";
BarcodeRule br = BarcodeRule.newRule(rule);
Barcode b = br.toCodeBean(codeStr).getBarcode();
if(b != null){
......
......@@ -505,9 +505,9 @@ public class StorageDataController extends BaseController {
String opValue = request.getParameter("opValue");
log.info("界面执行操作:" + opKey +"=" + opValue);
addOp(cid,opKey,opValue);
return "OK"+getText("shelf.msg.opSucess",request.getLocale(),"操作成功");
return "0OK"+getText("shelf.msg.opSucess",request.getLocale(),"操作成功");
}
return "";
return "1操作失败,未找到cid";
}
/**
......
......@@ -393,6 +393,7 @@ workOrder.surplusExecute=surplus material executing
workOrder.surplusFinish=surplus material finished
workOrder.supplementaryExecute=supplementary materials executing
workOrder.supplementaryFinish=supplementary materials finished
workOrder.supplementary=Replenishment
storage.virtual.addPos=Add Position
storage.virtual.pnlimit=Limited Partnumber
......
......@@ -415,3 +415,4 @@ order.out.executing=The order is executing.
order.out.maxOrder=The maximum number of executable orders has been reached.
order.out.noTask=The order has no reel to out.
shelf.error.orderError=The task does not match the specified order [{0}].
workOrder.supplementary=Replenishment
......@@ -414,3 +414,4 @@ order.out.executing=\u5F53\u524D\u5DE5\u5355\u6B63\u5728\u6267\u884C
order.out.maxOrder=\u5DF2\u8FBE\u6700\u5927\u53EF\u6267\u884C\u5DE5\u5355\u6570
order.out.noTask=\u5DE5\u5355\u65E0\u53EF\u6267\u884C\u7684\u4EFB\u52A1
shelf.error.orderError=\u4EFB\u52A1\u4E0E\u6307\u5B9A\u5DE5\u5355[{0}]\u4E0D\u4E00\u81F4
workOrder.supplementary=\u88DC\u5145
......@@ -414,3 +414,4 @@ component.plateSize.empty=\u6599\u76D8\u5C3A\u5BF8\u4E0D\u80FD\u4E3A\u7A7A
storage.chart.temperature=\u6E29\u5EA6
error.barcode.wrongProduceDate=\u751F\u4EA7\u65E5\u671F\u89E3\u6790\u5931\u8D25
shelf.error.orderError=\u4EFB\u52A1\u4E0E\u6307\u5B9A\u5DE5\u5355[{0}]\u4E0D\u4E00\u81F4
workOrder.supplementary=\u8865\u6599
......@@ -456,6 +456,7 @@
<fmt:message key="workOrder.surplusExecute" var="surplusExecute"/>
<fmt:message key="workOrder.supplementaryExecute" var="supplementaryExecute"/>
<fmt:message key="workOrder.supplementaryFinish" var="supplementaryFinish"/>
<fmt:message key="workOrder.supplementary" var="supplementary"/>
<c:set var="scripts" scope="request">
......@@ -519,9 +520,10 @@
var table = $('#orderItemsTable').DataTable();
table.clear();
var btnStr = "${supplementaryFinish}";
for(var i in data){
var opStr = '<button class="btn yellow" onclick="checkoutByPartNumber(\''+data[i].pn+'\',\''+data[i].id+'\');"><i class="fa fa-upload"></i>补料</button>';
var opStr = '<button class="btn yellow" onclick="checkoutByPartNumber(\''+data[i].pn+'\',\''+data[i].id+'\');"><i class="fa fa-upload"></i>'+btnStr+'</button>';
// if(data[i].inventoryNum <= 0 || data[i].outFinished ){
// //已出完或库存不足
// opStr = "";
......
......@@ -296,8 +296,11 @@
var opKey = $(this).attr("id");
disableOptBtn(opKey);
$.post("${ctx}/service/store/saveOp", {opKey: opKey, cid: '${show}', opValue:'doit'}, function (data) {
showMsg(data);
waitting();
});
}else{
showMsg("1操作失败");
}
});
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!