Răsfoiți Sursa

fix:修复同比值的上期数据获取的bug

Roc 1 an în urmă
părinte
comite
8998324dfb
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      models/edb_data_calculate_tbz.go

+ 2 - 2
models/edb_data_calculate_tbz.go

@@ -406,8 +406,8 @@ func refreshAllCalculateTbz(to orm.TxOrmer, edbInfoId, source int, fromEdbInfo *
 							break
 						} else {
 							if i >= 1 {
-								preDateDay = preDate.AddDate(0, 0, -i)
-								preDateDayStr = nextDateDay.Format(utils.FormatDate)
+								preDateDay = preDateDay.AddDate(0, 0, -i)
+								preDateDayStr = preDateDay.Format(utils.FormatDate)
 							}
 							if findItem, ok := dataMap[preDateDayStr]; ok { //上一年同期->上一个月找到
 								timestamp := currentDate.UnixNano() / 1e6