@@ -0,0 +1,12 @@ | |||
package cn.com.taiji.invw.tools; | |||
import java.time.LocalDateTime; | |||
import java.time.format.DateTimeFormatter; | |||
public class GenerateNoUtil { | |||
public static String generateApplyNo(LocalDateTime now) { | |||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"); | |||
return "SQ" + now.format(formatter) | |||
+ (int) ((Math.random() * 9 + 1) * Math.pow(10, 5)); | |||
} | |||
} |