Browse Source

fix:预测指标支持动态换茬

Roc 2 years ago
parent
commit
c9ef492320
1 changed files with 2 additions and 2 deletions
  1. 2 2
      logic/predict_edb.go

+ 2 - 2
logic/predict_edb.go

@@ -156,7 +156,7 @@ func AddPredictEdbInfo(sourceEdbInfoId, classifyId int, edbName string, ruleList
 		}
 		//1:最新,2:固定值,3:同比,4:同差,5:环比,6:环差,7:N期移动均值,8:N期段线性外推值,9:动态环差,10:根据 给定终值后插值 规则获取预测数据,11:根据 季节性 规则获取预测数据,12:根据 移动平均同比 规则获取预测数据
 		// 环比、环差、动态环差、季节性、移动平均同比不支持年度
-		if sourceEdbInfo.Frequency == "年度" && utils.InArrayByInt([]int{5, 6, 9, 11, 12}, v.RuleType) {
+		if sourceEdbInfo.Frequency == "年度" && utils.InArrayByInt([]int{5, 6, 11, 12}, v.RuleType) {
 			errMsg = "环比、环差、动态环差、季节性、移动平均同比不支持年度指标"
 			err = errors.New(errMsg)
 			return
@@ -443,7 +443,7 @@ func EditPredictEdbInfo(edbInfoId, classifyId int, edbName string, ruleList []mo
 		}
 		//1:最新,2:固定值,3:同比,4:同差,5:环比,6:环差,7:N期移动均值,8:N期段线性外推值,9:动态环差,10:根据 给定终值后插值 规则获取预测数据,11:根据 季节性 规则获取预测数据,12:根据 移动平均同比 规则获取预测数据
 		// 环比、环差、动态环差、季节性、移动平均同比不支持年度
-		if sourceEdbInfo.Frequency == "年度" && utils.InArrayByInt([]int{5, 6, 9, 11, 12}, v.RuleType) {
+		if sourceEdbInfo.Frequency == "年度" && utils.InArrayByInt([]int{5, 6, 11, 12}, v.RuleType) {
 			errMsg = "环比、环差、动态环差、季节性、移动平均同比不支持年度指标"
 			err = errors.New(errMsg)
 			return