Ver Fonte

fix:修复预测指标的开始日期取值错误

Roc há 2 anos atrás
pai
commit
7f57b35085
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      models/edb_info.go

+ 3 - 1
models/edb_info.go

@@ -568,7 +568,9 @@ func GetChartPredictEdbInfoDataListByConfList(predictEdbConfList []*PredictEdbCo
 			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
 		}