This commit is contained in:
2024-04-18 15:15:44 +08:00
parent d6e6fbf968
commit 8d0ccdbc4f
2 changed files with 6 additions and 25 deletions

View File

@@ -3,6 +3,8 @@ package cn.lihongjie.coal.coalBlend.dto;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.coalBlend.entity.CoalBlendConstrainVo;
import cn.lihongjie.coal.coalBlend.entity.CoalParameterDefVo;
import cn.lihongjie.coal.common.DictCode;
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
@@ -11,7 +13,6 @@ import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
import java.util.List;
@@ -31,19 +32,14 @@ public class CoalBlendDto extends OrgCommonDto {
private List<CoalBlendResultInfoDto> results;
@DictTranslate(dictKey = DictCode.COAL_BLENDTYPE)
private String blendTypeName;
private String blendType;
@Comment("煤类型")
private String coalType;
@Formula(
"(select i.name\n"
+ "from t_dictionary d,\n"
+ " t_dictionary_item i\n"
+ "where d.id = i.dictionary_id\n"
+ " and d.code = 'coalBlend.coalType'\n"
+ " and i.code = coal_type)")
@DictTranslate(dictKey = DictCode.COALBLEND_COALTYPE)
private String coalTypeName;

View File

@@ -18,7 +18,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
import org.springframework.util.StopWatch;
import java.math.BigDecimal;
@@ -53,26 +52,12 @@ public class CoalBlendEntity extends OrgCommonEntity {
@Comment("煤类型")
private String coalType;
@Formula(
"(select i.name\n"
+ "from t_dictionary d,\n"
+ " t_dictionary_item i\n"
+ "where d.id = i.dictionary_id\n"
+ " and d.code = 'coalBlend.coalType'\n"
+ " and i.code = coal_type)")
private String coalTypeName;
@Comment("配煤类型")
private String blendType;
@Formula(
"(select i.name\n"
+ "from t_dictionary d,\n"
+ " t_dictionary_item i\n"
+ "where d.id = i.dictionary_id\n"
+ " and d.code = 'coal.blendType'\n"
+ " and i.code = blend_type)")
private String blendTypeName;
@Comment("结果个数")
private Integer count = 20;