Bläddra i källkod

fix:没有数据,直接返回

Roc 11 månader sedan
förälder
incheckning
5272260378
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      models/predict_edb_info_rule.go

+ 5 - 0
models/predict_edb_info_rule.go

@@ -1492,6 +1492,11 @@ func GetChartPredictEdbInfoDataListByRuleAnnualValueInversion(edbInfoId int, con
 	newPredictEdbInfoData = predictEdbInfoData
 	index := len(allDataList)
 
+	// 没有数据,直接返回
+	if index <= 0 {
+		return
+	}
+
 	// 配置的年度值
 	yearValueConfig := annualValueInversionConf.Value