Browse Source

Merge branch 'fix/2023-01-09' into debug

Roc 2 years ago
parent
commit
f772524c82
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/predict_edb_info_rule.go

+ 1 - 1
models/predict_edb_info_rule.go

@@ -811,7 +811,7 @@ func GetChartPredictEdbInfoDataListByRuleSeason(edbInfoId int, yearsList []int,
 			var isFindHistoryCurrent, isFindHistoryLast bool //是否找到前几年的数据
 
 			//前几年当日的日期
-			tmpHistoryCurrentDate := currentDate.AddDate(year-currentDate.Year(), 0, moveDay)
+			tmpHistoryCurrentDate := currentDate.AddDate(year-currentDate.Year(), 0, -moveDay)
 			for i := 0; i <= 35; i++ { // 前后35天找数据,找到最近的值,先向后面找,再往前面找
 				tmpDate := tmpHistoryCurrentDate.AddDate(0, 0, i)
 				if val, ok := existMap[tmpDate.Format(utils.FormatDate)]; ok {