mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-17 03:31:54 +08:00
[fix] 修改标签
This commit is contained in:
@@ -21,6 +21,7 @@ import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.pms.enums.ErrorCodeConstants.PROJECT_NOT_EXISTS;
|
||||
@@ -167,9 +168,14 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
if (projectDO == null) {
|
||||
return prefix + "0001";
|
||||
} else {
|
||||
String sequence = projectDO.getCode();
|
||||
String sequence = null;
|
||||
if (type.equals(CODE)) {
|
||||
sequence = projectDO.getCode();
|
||||
} else if (type.equals(TRACKING_CODE)) {
|
||||
sequence = projectDO.getTrackingCode();
|
||||
}
|
||||
// 截取最后四位
|
||||
String lastSequence = sequence.substring(sequence.length() - 4);
|
||||
String lastSequence = Objects.requireNonNull(sequence).substring(sequence.length() - 4);
|
||||
// 自增1
|
||||
int lastNumber = Integer.parseInt(lastSequence);
|
||||
lastNumber = lastNumber + increment;
|
||||
|
Reference in New Issue
Block a user