|
|
@@ -236,13 +236,13 @@ public class CommonUitl {
|
|
|
public static Boolean checkProductSn(String sn,String cateSn){
|
|
|
switch (cateSn){
|
|
|
case "ZHXT":
|
|
|
- // 21位流水码验证
|
|
|
- if(sn.length() == 21){
|
|
|
+ // 21位或22位流水码验证
|
|
|
+ if(sn.length() == 21 || sn.length() == 22){
|
|
|
// 21位流水码格式:+KA99IS3031 + 生产日期(4位) + 生产流水号(4位) + 原材料追溯码(2位,01)
|
|
|
// 例如:+KA99IS3031RA1800A201
|
|
|
-
|
|
|
+
|
|
|
// 1. 验证固定前缀:+KA99IS3031 或 +KA64IS3031
|
|
|
- List<String> prefixList = Arrays.asList("+KA99IS3031", "+KA64IS3031","+KB24IS3031","+KC14IS3031","+KB60IS3031");
|
|
|
+ List<String> prefixList = Arrays.asList("+KA99IS3031", "+KA64IS3031","+KB24IS3031","+KC14IS3031","+KB60IS3031","+KB87IS3031");
|
|
|
String snPrefix = sn.substring(0, 11);
|
|
|
if(!prefixList.contains(snPrefix)){
|
|
|
return false;
|