Browse Source

fix:没有数据,直接返回

Roc 11 months ago
parent
commit
5272260378
1 changed files with 5 additions and 0 deletions
  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