// 设置初始化值为5
private static AtomicInteger count = new AtomicInteger(5);

//
生成发票流水号的8位年月日与4位序列号 private static String issueInvoiceSerival(){ Timestamp curDate = new Timestamp(System.currentTimeMillis()); String[] str = curDate.toString().split(" ")[0].split("-"); String dateTemp = str[0] + str[1] + str [2]; return dateTemp + String.format("%04d", count.incrementAndGet()); } // Java之四位序列号生成方式 String.format("%04d", count.incrementAndGet());

 

https://www.cnblogs.com/zhaoyan001/p/8885360.html】

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-05-20
猜你喜欢
  • 2021-06-26
  • 2021-11-07
  • 2021-12-16
  • 2021-06-24
  • 2021-07-03
  • 2021-10-09
  • 2022-12-23
相关资源
相似解决方案