@@ -1726,6 +1726,10 @@ func GetChartPredictEdbInfoDataListByRuleAnnualValueInversion(edbInfoId int, con
//兼容历史数据
yearList = append(yearList, annualValueInversionConf.Year)
}
+ if len(yearList) == 0 {
+ err = errors.New("同比年份不能为空")
+ return
+ }
// 每年截止到当前日期的累计值
dateTotalMap := make(map[time.Time]float64)