|
|
@@ -66,9 +66,17 @@ public class MesProductPreService extends CrudService<MesProductPreDao, MesProdu
|
|
|
}
|
|
|
|
|
|
public String getNewSn(String lineSn,String cate){
|
|
|
+ return getNewSn(lineSn,cate,"");
|
|
|
+ }
|
|
|
+
|
|
|
+ // pn:CZ060 产品PN号(195/196/198),为空或不合法时默认195
|
|
|
+ public String getNewSn(String lineSn,String cate,String pn){
|
|
|
//500104004355C230001 cate=1
|
|
|
//0050010400435E6348245C120001 cate=2
|
|
|
String pre = "CZ060195";
|
|
|
+ if("195".equals(pn) || "196".equals(pn) || "198".equals(pn)){
|
|
|
+ pre = "CZ060" + pn;
|
|
|
+ }
|
|
|
String pre2 = "F956210325195AI2";
|
|
|
if(lineSn.equals("CZ061")){
|
|
|
|
|
|
@@ -190,7 +198,8 @@ public class MesProductPreService extends CrudService<MesProductPreDao, MesProdu
|
|
|
if(cate.equals("1")){
|
|
|
String snDate = mesProductPre1.getSn().substring(8,12);
|
|
|
if(snDate.equals(todayStr)){
|
|
|
- int no = Integer.valueOf(mesProductPre1.getSn().substring(12,19));
|
|
|
+ // 16位码:CZ060XXX(8)+年月日(4)+流水号(4),流水号取第12位之后
|
|
|
+ int no = Integer.valueOf(mesProductPre1.getSn().substring(12));
|
|
|
number = no + 1 + i;
|
|
|
}
|
|
|
}else{
|