浏览代码

fix:预测日期的bug修复

Roc 2 年之前
父节点
当前提交
608f8ac003
共有 1 个文件被更改,包括 3 次插入1 次删除
  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
 		}