批次号为空时插入库存出现空字符串

dev
anthonywj 2 years ago
parent 0dec5c2ed0
commit 9afe11946b

@ -1,5 +1,7 @@
package com.glxp.api.entity.basic;
import cn.hutool.core.util.StrUtil;
/**
* @author
* @date 2020/9/22.

@ -109,7 +109,7 @@ public class FilterUdiUtils {
String expireDate = "";
String serialNo = null;
String udi = "";
String[] spilts = data.split("#",data.length());
String[] spilts = data.split("#", data.length());
if (spilts != null && spilts.length >= 5) {
udi = spilts[1];
produceDate = spilts[2];
@ -117,9 +117,13 @@ public class FilterUdiUtils {
batchNo = spilts[4];
if (spilts.length > 6) {
serialNo = spilts[5];
if (serialNo != null && serialNo.equals("")) {
serialNo = null;
}
}
if (StrUtil.isEmpty(batchNo)) {
batchNo = null;
}
if (StrUtil.isEmpty(serialNo)) {
serialNo = null;
}
}

Loading…
Cancel
Save