This commit is contained in:
2024-04-18 15:18:43 +08:00
parent 8d0ccdbc4f
commit 0669cf83eb
2 changed files with 4 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
package cn.lihongjie.coal.coalInfo.dto;
import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.common.DictCode;
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
import lombok.Data;
@@ -14,6 +16,7 @@ public class CoalInfoDto extends OrgCommonDto {
private String supplierName;
@DictTranslate(dictKey = DictCode.COAL_TYPE)
private String coalTypeName;
private String coalType;

View File

@@ -9,7 +9,6 @@ import jakarta.persistence.ManyToOne;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
@Data
@Entity
@@ -22,14 +21,7 @@ public class CoalInfoEntity 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 = 'coal.type'\n"
+ " and i.code = coal_type)")
private String coalTypeName;
@Comment("初始报价")
private Double initPrice;