@@ -1327,6 +1327,11 @@ func (this *ChartInfoController) PreviewChartInfoDetail() {
mappingList[k] = v
}
+ if req.ChartType == utils.CHART_TYPE_SEASON && req.DateType == utils.DateTypeNYears {
+ // 季节性图表,要特殊处理起始日期, 最近N年
+ dateMax = time.Date(dateMax.Year()+1, 1, 1, 0, 0, 0, 0, time.Local)
+ }
+
// 开始/结束日期
startDate, endDate := utils.GetDateByDateTypeV2(req.DateType, req.StartDate, req.EndDate, req.StartYear, dateMax)
if startDate == "" {
@@ -11,12 +11,13 @@ import (
"eta/eta_api/services/data/data_manage_permission"
"eta/eta_api/utils"
"fmt"
- "github.com/shopspring/decimal"
"math"
"sort"
"strconv"
"strings"
"time"
+ "github.com/shopspring/decimal"
)
func ChartInfoRefreshV1(chartInfoId int) (err error) {