Browse Source

fix:预测日期的bug修复

Roc 2 years ago
parent
commit
608f8ac003
1 changed files with 3 additions and 1 deletions
  1. 3 1
      services/data/predict_edb_info.go

+ 3 - 1
services/data/predict_edb_info.go

@@ -321,7 +321,9 @@ func GetChartPredictEdbInfoDataListByConfList(predictEdbConfList []*data_manage.
 			predictEdbInfoData, tmpMinValue, tmpMaxValue = GetChartPredictEdbInfoDataListByRuleFinalValueHc(predictEdbConf.PredictEdbInfoId, finalValue, startDate, dataEndTime, frequency, realPredictEdbInfoData, predictEdbInfoData, existMap)
 		}
 		//startDate = dataEndTime.AddDate(0, 0, 1)
-		startDate = dataEndTime
+		if startDate.Before(dataEndTime) {
+			startDate = dataEndTime
+		}
 		if tmpMinValue < minValue {
 			minValue = tmpMinValue
 		}