浏览代码

fix:没有数据,直接返回

Roc 11 月之前
父节点
当前提交
5272260378
共有 1 个文件被更改,包括 5 次插入0 次删除
  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