Prechádzať zdrojové kódy

Merge branch 'ETA_1.9.4' into debug

zwxi 8 mesiacov pred
rodič
commit
ef4bab6af5
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      services/data/chart_info.go

+ 3 - 3
services/data/chart_info.go

@@ -3921,8 +3921,7 @@ func SeasonChartData(dataList []*data_manage.ChartEdbInfoMapping, seasonExtraCon
 							} else {
 								// 如果跨年且大于等于一年
 								// double后截取
-								newDate = dateTime.AddDate(time.Now().Year()-dateTime.Year()-1, 0, 0)
-								startDate = startDate.AddDate(-1, 0, 0)
+								newDate = dateTime.AddDate(time.Now().Year()-dateTime.Year(), 0, 0)
 								if newDate.After(startDate) {
 									// 处理上下限列表
 									if value, ok := maxValueMap[newDate]; ok {
@@ -3944,7 +3943,8 @@ func SeasonChartData(dataList []*data_manage.ChartEdbInfoMapping, seasonExtraCon
 									dataTimeMap[newDate] = newDate
 								}
 
-								newDate = dateTime.AddDate(time.Now().Year()-dateTime.Year(), 0, 0)
+								newDate = dateTime.AddDate(time.Now().Year()-dateTime.Year()+1, 0, 0)
+								endDate = endDate.AddDate(1, 0, 0)
 								if newDate.Before(endDate) {
 									// 处理上下限列表
 									if value, ok := maxValueMap[newDate]; ok {