|
@@ -68,6 +68,7 @@ type CoordinatePoint struct {
|
|
|
YDate string
|
|
|
DateType int `description:"日期类型:1-最新日期;2-N天前;3-固定日期"`
|
|
|
DaysAgo int `description:"N天前的N值"`
|
|
|
+ ShowTips int `description:"是否显示标注:0-否;1-是"`
|
|
|
}
|
|
|
|
|
|
// GetChartData
|
|
@@ -165,10 +166,12 @@ func GetChartData(chartInfoId int, config request.ChartConfigReq) (edbList []*da
|
|
|
dateMap := make(map[string]string)
|
|
|
dateTypeMap := make(map[int]int) // 日期配置key对应的日期类型
|
|
|
daysAgoMap := make(map[int]int) // 日期配置key对应的N天前的N值
|
|
|
+ showTipsMap := make(map[int]int) // 日期配置key对应点是否显示标注
|
|
|
|
|
|
for dateIndex, dateConfig := range config.DateConfigList {
|
|
|
dateTypeMap[dateIndex] = dateConfig.DateType
|
|
|
daysAgoMap[dateIndex] = dateConfig.Num
|
|
|
+ showTipsMap[dateIndex] = dateConfig.ShowTips
|
|
|
for _, edbInfoMapping := range mappingList {
|
|
|
// 数据会是正序的
|
|
|
dataList, ok := edbDataListMap[edbInfoMapping.EdbInfoId]
|
|
@@ -423,6 +426,7 @@ func GetChartData(chartInfoId int, config request.ChartConfigReq) (edbList []*da
|
|
|
YDate: dateMap[key2],
|
|
|
DateType: dateTypeMap[dateIndex], // 日期类型
|
|
|
DaysAgo: daysAgoMap[dateIndex], // N天前的N值
|
|
|
+ ShowTips: showTipsMap[dateIndex], // 是否显示标注
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -698,6 +702,8 @@ func AddChartInfo(req request.AddChartReq, sysUser *system.Admin) (chartInfo *da
|
|
|
//chartInfo.SeasonEndDate = req.EndDate
|
|
|
chartInfo.LeftMin = req.LeftMin
|
|
|
chartInfo.LeftMax = req.LeftMax
|
|
|
+ chartInfo.XMin = req.XMin
|
|
|
+ chartInfo.XMax = req.XMax
|
|
|
//chartInfo.RightMin = req.RightMin
|
|
|
//chartInfo.RightMax = req.RightMax
|
|
|
//chartInfo.Disabled = disableVal
|
|
@@ -877,7 +883,11 @@ func EditChartInfo(req request.EditChartReq, sysUser *system.Admin) (chartItem *
|
|
|
chartItem.ChartName = req.ChartName
|
|
|
chartItem.ExtraConfig = string(extraConfigByte)
|
|
|
chartItem.ModifyTime = time.Now()
|
|
|
- chartUpdateCols := []string{"ChartName", "ExtraConfig", "ModifyTime"}
|
|
|
+ chartItem.LeftMin = req.LeftMin
|
|
|
+ chartItem.LeftMax = req.LeftMax
|
|
|
+ chartItem.XMin = req.XMin
|
|
|
+ chartItem.XMax = req.XMax
|
|
|
+ chartUpdateCols := []string{"ChartName", "ExtraConfig", "ModifyTime", "LeftMin", "LeftMax", "XMin", "XMax"}
|
|
|
|
|
|
// 跨品种分析配置
|
|
|
chartInfoCrossVariety, err := cross_varietyModel.GetChartInfoCrossVarietyByChartInfoId(chartItem.ChartInfoId)
|