解釋:找資料庫中的最近新增的賬號 以上的方法,都比較的好用和方便。其實這些我都要百度,是同事寫的,真強! ...
public String next() { long appBootTimes = systemVariableService.getAppBootTimes(); return Long.toString(appBootTimes * 10000000000000000l + seq.incrementAndGet(), Character.MAX_RADIX); }
解釋:找資料庫中的最近新增的賬號
public String nextNo() { return Long.toString(seq.incrementAndGet()); }
public String nextTradeNo() { return "T" + LocalDate.now().format(DateTimeFormatter.ofPattern("uuuuMMdd")) + next(); }
public String nextFileName(String suffix) { return LocalDate.now().format(DateTimeFormatter.ofPattern("uuuuMMdd")) + "/" + UUID.randomUUID() + (StringUtils.isNotBlank(suffix) ? ("." + suffix) : ""); }
public String nextPurchaseNo(){ return "PO"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getPurchaseNumbers("PO"); }
public String nextSalesNo(){ System.out.println(systemVariableService.getSalesNumbers("SO")); return "SO"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getSalesNumbers("SO"); }
public String nextReceiptNo(){ return "SI"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getReceiptNumbers("SI"); }
public String nextLoadingListNo(){ return "LL"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getLoadingListNumbers("LL"); }
public String nextDeliverNo(){ return "DL"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getDeliverNumbers("DL"); }
public String nextOtherInNo(){ return "OI"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getOtherInNumbers("OI"); }
public String nextOtherOutNo(){ return "OO"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.getOtherOutNumbers("OO"); }
public String nextPromotionNo(){ return "HD"+LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + "-" + systemVariableService.nextPromotionNo("HD"); }
public String nextBalanceFeeNo() { return "FT" + systemVariableService.getBalanceFeeNumbers(); }
以上的方法,都比較的好用和方便。其實這些我都要百度,是同事寫的,真強!