|
@@ -612,6 +612,7 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ nowYear := time.Now().Year()
|
|
|
newDataList := make([]*models.EdbDataList, 0)
|
|
|
for _, v := range dataList {
|
|
|
dataTime, e := time.Parse(utils.FormatDate, v.DataTime)
|
|
@@ -619,6 +620,10 @@ func getEdbDataMapList(chartInfoId, chartType int, calendar, startDate, endDate
|
|
|
err = errors.New("季节性图处理右轴指标数据转换日期失败,Err:" + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ dataTimeT, _ := time.Parse(utils.FormatDate, v.DataTime)
|
|
|
+ year := dataTimeT.Year()
|
|
|
+ newItemDate := dataTimeT.AddDate(nowYear-year, 0, 0)
|
|
|
+ v.DataTimestamp = newItemDate.UnixNano() / 1e6
|
|
|
if dataTime.Equal(rightAxisDate) || dataTime.After(rightAxisDate) {
|
|
|
newDataList = append(newDataList, v)
|
|
|
}
|
|
@@ -2051,7 +2056,7 @@ func SeasonChartData(dataList []*models.ChartEdbInfoMapping, seasonExtraConfig s
|
|
|
continue
|
|
|
}
|
|
|
// 农历时dataTimeList的年份为最新年份,图例时间的年份才是真实年份
|
|
|
- chartLegend,_ := strconv.Atoi(v.ChartLegend)
|
|
|
+ chartLegend, _ := strconv.Atoi(v.ChartLegend)
|
|
|
if chartLegend < startYear {
|
|
|
continue
|
|
|
}
|
|
@@ -2187,7 +2192,7 @@ func SeasonChartData(dataList []*models.ChartEdbInfoMapping, seasonExtraConfig s
|
|
|
continue
|
|
|
}
|
|
|
// 农历时dataTimeList的年份为最新年份,图例时间的年份才是真实年份
|
|
|
- chartLegend,_ := strconv.Atoi(v.ChartLegend)
|
|
|
+ chartLegend, _ := strconv.Atoi(v.ChartLegend)
|
|
|
if chartLegend < startYear {
|
|
|
continue
|
|
|
}
|
|
@@ -2360,7 +2365,7 @@ func SeasonChartData(dataList []*models.ChartEdbInfoMapping, seasonExtraConfig s
|
|
|
continue
|
|
|
}
|
|
|
// 农历时dataTimeList的年份为最新年份,图例时间的年份才是真实年份
|
|
|
- chartLegend,_ := strconv.Atoi(quarterDataList[i].ChartLegend)
|
|
|
+ chartLegend, _ := strconv.Atoi(quarterDataList[i].ChartLegend)
|
|
|
if chartLegend < startYear {
|
|
|
continue
|
|
|
}
|
|
@@ -2448,7 +2453,7 @@ func SeasonChartData(dataList []*models.ChartEdbInfoMapping, seasonExtraConfig s
|
|
|
continue
|
|
|
}
|
|
|
// 农历时dataTimeList的年份为最新年份,图例时间的年份才是真实年份
|
|
|
- chartLegend,_ := strconv.Atoi(quarterDataList[i].ChartLegend)
|
|
|
+ chartLegend, _ := strconv.Atoi(quarterDataList[i].ChartLegend)
|
|
|
if chartLegend < startYear {
|
|
|
continue
|
|
|
}
|
|
@@ -2796,6 +2801,7 @@ func getEdbDataMapListForSeason(chartInfoId, chartType int, calendar, startDate,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ nowYear := time.Now().Year()
|
|
|
newList := make([]*models.EdbDataList, 0)
|
|
|
for _, v := range newDataList {
|
|
|
dataTime, e := time.Parse(utils.FormatDate, v.DataTime)
|
|
@@ -2803,6 +2809,10 @@ func getEdbDataMapListForSeason(chartInfoId, chartType int, calendar, startDate,
|
|
|
err = errors.New("季节性图处理右轴指标数据转换日期失败,Err:" + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ dataTimeT, _ := time.Parse(utils.FormatDate, v.DataTime)
|
|
|
+ year := dataTimeT.Year()
|
|
|
+ newItemDate := dataTimeT.AddDate(nowYear-year, 0, 0)
|
|
|
+ v.DataTimestamp = newItemDate.UnixNano() / 1e6
|
|
|
if dataTime.Equal(rightAxisDate) || dataTime.After(rightAxisDate) {
|
|
|
newList = append(newList, v)
|
|
|
}
|