浏览代码

Merge branch 'ETA_1.9.4' into debug

zwxi 8 月之前
父节点
当前提交
ef4bab6af5
共有 1 个文件被更改,包括 3 次插入3 次删除
  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 {