|
@@ -84,15 +84,18 @@ type EdbInfoCalculateMappingInfo struct {
|
|
|
Sort int `description:"计算指标名称排序"`
|
|
|
CreateTime time.Time `description:"创建时间"`
|
|
|
ModifyTime time.Time `description:"修改时间"`
|
|
|
- EdbType int `description:"指标类型:1:基础指标,2:计算指标"`
|
|
|
+ FromEdbType int `description:"来源指标类型:1:基础指标,2:计算指标"`
|
|
|
+ FromEdbInfoType int `description:"来源指标类型: 0-基础指标; 1-预测指标"`
|
|
|
+ FromClassifyId int `description:"来源指标分类ID"`
|
|
|
+ FromUniqueCode string `description:"来源指标唯一编码"`
|
|
|
}
|
|
|
|
|
|
// GetEdbInfoCalculateMappingListByEdbInfoId 根据生成的指标id获取来源的指标id列表
|
|
|
func GetEdbInfoCalculateMappingListByEdbInfoId(edbInfoId int) (items []*EdbInfoCalculateMappingInfo, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
- sql := ` SELECT a.*,b.edb_type FROM edb_info_calculate_mapping AS a
|
|
|
+ sql := ` SELECT a.*,b.edb_type as from_edb_type,b.edb_info_type as from_edb_info_type, b.unique_code AS from_unique_code, b.classify_id AS from_classify_id FROM edb_info_calculate_mapping AS a
|
|
|
INNER JOIN edb_info AS b ON a.from_edb_info_id=b.edb_info_id
|
|
|
WHERE a.edb_info_id=? `
|
|
|
_, err = o.Raw(sql, edbInfoId).QueryRows(&items)
|
|
|
return
|
|
|
-}
|
|
|
+}
|