|
@@ -29,6 +29,7 @@ public class BusinessIdGenerator {
|
|
|
return businessId.toString();
|
|
|
}
|
|
|
|
|
|
+ //商品序号
|
|
|
public static String generateBusinessIdForProduct(int currentSerialNumber) {
|
|
|
StringBuilder businessId = new StringBuilder();
|
|
|
businessId.append(PREFIX_P);
|
|
@@ -39,6 +40,7 @@ public class BusinessIdGenerator {
|
|
|
return businessId.toString();
|
|
|
}
|
|
|
|
|
|
+ //产品录入编号
|
|
|
public static String generateBusinessIdForProductYl(int currentSerialNumber) {
|
|
|
StringBuilder businessId = new StringBuilder();
|
|
|
businessId.append(getDatePart());
|
|
@@ -48,6 +50,17 @@ public class BusinessIdGenerator {
|
|
|
return businessId.toString();
|
|
|
}
|
|
|
|
|
|
+ //产品加工增值
|
|
|
+ public static String generateBusinessIdForProductZz(int currentSerialNumber) {
|
|
|
+ StringBuilder businessId = new StringBuilder();
|
|
|
+ businessId.append("JZ");
|
|
|
+ businessId.append(getDatePart());
|
|
|
+ businessId.append(FIXED_MIDDLE_PART);
|
|
|
+ businessId.append(getSerialNumberPart(currentSerialNumber));
|
|
|
+ System.out.println(businessId);
|
|
|
+ return businessId.toString();
|
|
|
+ }
|
|
|
+
|
|
|
private static String getDatePart() {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyMMddHHmmss");
|
|
|
return sdf.format(new Date());
|