Parcourir la source

Merge branch 'eta/1.1.6' into debug

Roc il y a 1 an
Parent
commit
ede0ee7868
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      models/base_calculate.go

+ 8 - 1
models/base_calculate.go

@@ -1662,7 +1662,14 @@ func (obj BaseCalculate) Rjz() (dateDataMap map[time.Time]float64, err error, er
 
 	fromFrequency := obj.FromFrequency
 	if fromFrequency == `` {
-		err = errors.New("错误的频度:" + fromFrequency)
+		errMsg = "原指标的频度不能为空"
+		err = errors.New(errMsg)
+		return
+	}
+
+	if obj.FromFrequency == "日度" {
+		errMsg = "日度指标无需进行日均值计算"
+		err = errors.New(errMsg)
 		return
 	}