fix: 体系编号生成BUG
This commit is contained in:
@@ -83,7 +83,9 @@ public class YouBianCodeUtil {
|
||||
if (localCode != null && Objects.equals("", localCode)) {
|
||||
return getNextYouBianCode(localCode);
|
||||
} else if (localCode != null) {
|
||||
parentCode = parentCode + "A" + getNextStrNum(Character.getNumericValue(localCode.charAt(localCode.length() - 1)));
|
||||
String lastTwoChars = localCode.substring(localCode.length() - 2); // 获取最后两个字符
|
||||
int num = Integer.parseInt(lastTwoChars); // 将这两个字符转换为数字
|
||||
parentCode = parentCode + "A" + getNextStrNum(num); // 使用这个数字生成parentCode } else {
|
||||
} else {
|
||||
parentCode = parentCode + "A" + getNextStrNum(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user