浏览代码

fix:指标别名

Roc 1 年之前
父节点
当前提交
2d5a5ed706
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      models/chart.go
  2. 1 0
      services/data/chart_info.go

+ 1 - 1
models/chart.go

@@ -107,7 +107,7 @@ type ChartEdbInfoMapping struct {
 
 func GetChartEdbMappingList(chartInfoId int) (list []*ChartEdbInfoMapping, err error) {
 	o := orm.NewOrmUsingDB("data")
-	aField := `a.chart_edb_mapping_id,a.chart_info_id,a.edb_info_id,a.create_time,a.modify_time,a.unique_code,a.max_data,a.min_data,a.is_order,a.is_axis,a.edb_info_type,a.lead_value,a.lead_unit,a.chart_style,a.chart_color,a.predict_chart_color,a.chart_width,a.source as mapping_source`
+	aField := `a.chart_edb_mapping_id,a.chart_info_id,a.edb_info_id,a.create_time,a.modify_time,a.unique_code,a.max_data,a.min_data,a.is_order,a.is_axis,a.edb_info_type,a.lead_value,a.lead_unit,a.chart_style,a.chart_color,a.predict_chart_color,a.chart_width,a.source as mapping_source,a.edb_alias_name`
 	sql := ` SELECT ` + aField + `,b.source_name,b.source,b.edb_code,b.edb_name,b.edb_name_en,b.frequency,b.unit,b.unit_en,b.start_date,b.end_date,b.modify_time,b.edb_type,b.latest_date,b.latest_value,b.unique_code,b.edb_info_type AS edb_info_category_type,b.sub_source
              FROM chart_edb_mapping AS a
 			 INNER JOIN edb_info AS b ON a.edb_info_id=b.edb_info_id

+ 1 - 0
services/data/chart_info.go

@@ -169,6 +169,7 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 		item.ModifyTime = v.ModifyTime
 		item.EdbInfoCategoryType = v.EdbInfoCategoryType
 		item.PredictChartColor = v.PredictChartColor
+		item.EdbAliasName = v.EdbAliasName
 
 		if chartInfoId <= 0 {
 			item.IsAxis = 1