Commit c653c100 authored by yanghao's avatar yanghao

chore: 跟进编码生成bug修复

parent 255c39ba
...@@ -229,7 +229,7 @@ public class CodeUtils { ...@@ -229,7 +229,7 @@ public class CodeUtils {
*/ */
public static String getOddFollowupNumbers(String maxOddNumbers) { public static String getOddFollowupNumbers(String maxOddNumbers) {
// 格式: GJ+年份YYYY+六位数 // 格式: GJ+年份YYYY+六位数
int numberLength = 14; int numberLength = 12;
//获取当前日期并将其进行格式化 //获取当前日期并将其进行格式化
String formatYear = getDateTime("yyyy"); String formatYear = getDateTime("yyyy");
...@@ -237,7 +237,7 @@ public class CodeUtils { ...@@ -237,7 +237,7 @@ public class CodeUtils {
int newEndIntNum; int newEndIntNum;
//判断数据中的最大单号是否存在,是否包含当前日期 //判断数据中的最大单号是否存在,是否包含当前日期
if (StringUtils.isNotEmpty(maxOddNumbers) && maxOddNumbers.length() == numberLength && if (StringUtils.isNotEmpty(maxOddNumbers) && maxOddNumbers.length() == numberLength &&
maxOddNumbers.substring(2, 8).equals(formatYear)) { maxOddNumbers.substring(2, 6).equals(formatYear)) {
//截取后四位数 //截取后四位数
String endNum = maxOddNumbers.substring(maxOddNumbers.length() - 6); String endNum = maxOddNumbers.substring(maxOddNumbers.length() - 6);
//把截取的最后六位数解析为int //把截取的最后六位数解析为int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment