添加煤源类型字段

This commit is contained in:
2023-09-13 09:38:33 +08:00
parent e415d9c835
commit 7b727e5e6e
5 changed files with 40 additions and 7 deletions

View File

@@ -12,6 +12,8 @@ public class CoalInfoDto extends OrgCommonDto {
private String supplierName;
private String coalTypeName;
private String coalType;
@Comment("初始报价")
private Double initPrice;
}

View File

@@ -10,7 +10,7 @@ public class CreateCoalInfoDto extends OrgCommonDto {
@Comment("供应商")
private String supplier;
private String coalType;
@Comment("初始报价")
private Double initPrice;

View File

@@ -10,7 +10,7 @@ public class UpdateCoalInfoDto extends OrgCommonDto {
private String supplier;
private String coalType;
@Comment("初始报价")
private Double initPrice;
}

View File

@@ -6,6 +6,7 @@ import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;
@Data
@Entity
@@ -16,6 +17,23 @@ public class CoalInfoEntity extends OrgCommonEntity {
private SupplierEntity supplier;
@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("初始报价")

View File

@@ -31,7 +31,6 @@
}
]
},
{
"code": "dict.type",
"name": "字典类型",
@@ -44,7 +43,6 @@
"code": "2",
"name": "动态字典"
}
]
},
{
@@ -59,7 +57,6 @@
"code": "2",
"name": "树"
}
]
},
{
@@ -74,8 +71,24 @@
"code": "1",
"name": "失败"
}
]
},
{
"code": "coal.type",
"name": "煤源类型",
"item": [
{
"code": "0",
"name": "精煤"
},
{
"code": "1",
"name": "中煤"
},
{
"code": "2",
"name": "原煤"
}
]
}
]