mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
自定义板编号配置:支持自定义/时间类型没有配置值不生成该部分
This commit is contained in:
+6
-2
@@ -22,6 +22,7 @@ import com.cf.imes.module.system.api.systemconfig.SystemConfigApi;
|
||||
import com.cf.imes.module.system.api.systemconfig.dto.SystemConfigRespDTO;
|
||||
import com.cf.imes.module.system.enums.customplateno.CustomPlateNoRuleCodeEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StopWatch;
|
||||
@@ -123,10 +124,13 @@ public class CustomPlateNoGenerateServiceImpl implements CustomPlateNoGenerateSe
|
||||
// 遍历规则列表
|
||||
for (CustomPlateNoRuleVO plateNoRule : orgCustomPlateNoRuleVOList) {
|
||||
if (ObjectUtil.equal(CustomPlateNoRuleCodeEnum.CUSTOM.getRuleCode(), plateNoRule.getRuleCode())) {
|
||||
plateDO.getCustomPlateNoBuilder().append(plateNoRule.getStrValue());
|
||||
plateDO.getCustomPlateNoBuilder().append(Optional.ofNullable(plateNoRule.getStrValue()).orElse(""));
|
||||
}
|
||||
if (ObjectUtil.equal(CustomPlateNoRuleCodeEnum.DATE.getRuleCode(), plateNoRule.getRuleCode())) {
|
||||
plateDO.getCustomPlateNoBuilder().append(plateNoRule.getNow().format(DateTimeFormatter.ofPattern(plateNoRule.getDateValue())));
|
||||
String dateValue = plateNoRule.getDateValue();
|
||||
if (StringUtils.isNotEmpty(dateValue)) {
|
||||
plateDO.getCustomPlateNoBuilder().append(plateNoRule.getNow().format(DateTimeFormatter.ofPattern(dateValue)));
|
||||
}
|
||||
}
|
||||
// 遍历规则生成服务列表,获取对应的规则服务
|
||||
for (CustomPlateNoGenerateRuleService ruleService : ruleServices) {
|
||||
|
||||
Reference in New Issue
Block a user