001型数据自动递增

DecimalFormat decimalFormat=new DecimalFormat("000");
String code="XQ20190417000019";
String codenew=code.substring(10, code.length());
int i=Integer.parseInt(codenew)+1;
String k=decimalFormat.format(i);
System.out.println(k);

posted @ 2021-12-22 17:22  老屋上的仙人掌  阅读(107)  评论(0)    收藏  举报