Pārlūkot izejas kodu

Merge branch 'eta_2.4.2_area_graph_1216@guomengyuan' of hongze/hongze_yb into master

chenhan 1 mēnesi atpakaļ
vecāks
revīzija
b8c670b852

+ 2 - 1
models/tables/chart_edb_mapping/query.go

@@ -35,6 +35,7 @@ type ChartEdbInfoMapping struct {
 	ChartStyle        string    `description:"图表类型"`
 	ChartStyle        string    `description:"图表类型"`
 	ChartColor        string    `description:"颜色"`
 	ChartColor        string    `description:"颜色"`
 	ChartWidth        float64   `description:"线条大小"`
 	ChartWidth        float64   `description:"线条大小"`
+	ChartScale        float64   `description:"参考刻度线"`
 	LatestDate        time.Time `description:"数据最新日期"`
 	LatestDate        time.Time `description:"数据最新日期"`
 	LatestValue       float64   `description:"数据最新值"`
 	LatestValue       float64   `description:"数据最新值"`
 	UniqueCode        string    `description:"指标唯一编码"`
 	UniqueCode        string    `description:"指标唯一编码"`
@@ -94,7 +95,7 @@ func (ct *ChartLibEdbInfoMappingTime) UnmarshalJSON(data []byte) error {
 
 
 // GetMappingListByChartInfoId 根据图表ID获取指标映射列表
 // GetMappingListByChartInfoId 根据图表ID获取指标映射列表
 func GetMappingListByChartInfoId(chartInfoId int) (list []*ChartEdbInfoMapping, err error) {
 func GetMappingListByChartInfoId(chartInfoId int) (list []*ChartEdbInfoMapping, err error) {
-	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.chart_scale`
 
 
 	sql := ` SELECT ` + aField + `,b.source_name,b.source,b.sub_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.latest_date,b.latest_value,b.unique_code,b.edb_info_type AS edb_info_category_type,b.edb_type,
 	sql := ` SELECT ` + aField + `,b.source_name,b.source,b.sub_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.latest_date,b.latest_value,b.unique_code,b.edb_info_type AS edb_info_category_type,b.edb_type,
 a.is_convert, a.convert_type, a.convert_value, a.convert_unit, a.convert_en_unit 
 a.is_convert, a.convert_type, a.convert_value, a.convert_unit, a.convert_en_unit 

+ 2 - 0
services/chart/chart_info.go

@@ -749,6 +749,7 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 			item.ChartStyle = ""
 			item.ChartStyle = ""
 			item.ChartColor = ""
 			item.ChartColor = ""
 			item.ChartWidth = 0
 			item.ChartWidth = 0
+			item.ChartScale = 0
 			item.MaxData = v.MaxValue
 			item.MaxData = v.MaxValue
 			item.MinData = v.MinValue
 			item.MinData = v.MinValue
 		} else {
 		} else {
@@ -762,6 +763,7 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
 			item.ChartStyle = v.ChartStyle
 			item.ChartStyle = v.ChartStyle
 			item.ChartColor = v.ChartColor
 			item.ChartColor = v.ChartColor
 			item.ChartWidth = v.ChartWidth
 			item.ChartWidth = v.ChartWidth
+			item.ChartScale = v.ChartScale
 			item.IsOrder = v.IsOrder
 			item.IsOrder = v.IsOrder
 			item.MaxData = v.MaxData
 			item.MaxData = v.MaxData
 			item.MinData = v.MinData
 			item.MinData = v.MinData