|
@@ -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)
|
|
|
}
|
|
@@ -1002,6 +1007,10 @@ func GetSeasonEdbInfoDataListByXDateNong(result *models.EdbDataResult, latestDat
|
|
|
Value: item.Value,
|
|
|
}
|
|
|
dataTimeT, _ := time.Parse(utils.FormatDate, item.DataTime)
|
|
|
+ year := dataTimeT.Year()
|
|
|
+ newItemDate := dataTimeT.AddDate(nowYear-year, 0, 0)
|
|
|
+ timestamp := newItemDate.UnixNano() / 1e6
|
|
|
+ tmpVal.DataTimestamp = timestamp
|
|
|
if (startTmpT.Before(dataTimeT) && endTmpT.After(dataTimeT)) || startTmpT == dataTimeT || endTmpT == dataTimeT {
|
|
|
tmpV := &tmpVal
|
|
|
if findVal, ok := quarterMap[name]; !ok {
|
|
@@ -2051,7 +2060,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 +2196,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 +2369,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 +2457,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 +2805,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 +2813,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)
|
|
|
}
|