|
@@ -4192,8 +4192,7 @@ func SeasonChartData(dataList []*data_manage.ChartEdbInfoMapping, seasonExtraCon
|
|
err = errors.New("时间格式化异常, Err:" + e.Error())
|
|
err = errors.New("时间格式化异常, Err:" + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- yearRange := time.Now().Year() - seasonConfig.SamePeriodAverage.Year
|
|
|
|
- startYear := time.Now().AddDate(-yearRange, 0, 0).Year()
|
|
|
|
|
|
+ startYear := time.Now().AddDate(-seasonConfig.SamePeriodAverage.Year, 0, 0).Year()
|
|
if dateTime.Year() < startYear {
|
|
if dateTime.Year() < startYear {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
@@ -4243,8 +4242,7 @@ func SeasonChartData(dataList []*data_manage.ChartEdbInfoMapping, seasonExtraCon
|
|
|
|
|
|
// 自定义同期标准差
|
|
// 自定义同期标准差
|
|
if seasonConfig.SamePeriodStandardDeviation.Year > 1 && seasonConfig.SamePeriodStandardDeviation.Multiple > 0 {
|
|
if seasonConfig.SamePeriodStandardDeviation.Year > 1 && seasonConfig.SamePeriodStandardDeviation.Multiple > 0 {
|
|
- yearRange := time.Now().Year() - seasonConfig.SamePeriodAverage.Year
|
|
|
|
- startYear := time.Now().AddDate(-yearRange, 0, 0).Year()
|
|
|
|
|
|
+ startYear := time.Now().AddDate(-seasonConfig.SamePeriodStandardDeviation.Year, 0, 0).Year()
|
|
|
|
|
|
// 先算均值,再算标准差
|
|
// 先算均值,再算标准差
|
|
handleDataMap := make(map[string]float64)
|
|
handleDataMap := make(map[string]float64)
|