mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
优化
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user