|
@@ -170,6 +170,9 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
return
|
|
|
}
|
|
|
defer os.Remove(saveFilePath)
|
|
|
+ trendName := fmt.Sprintf("%sTrend/F%g", edbInfo.EdbName, confReq.Fraction)
|
|
|
+ seasonalName := fmt.Sprintf("%sSeasonal/F%g", edbInfo.EdbName, confReq.Fraction)
|
|
|
+ residualName := fmt.Sprintf("%sResidual/F%g", edbInfo.EdbName, confReq.Fraction)
|
|
|
resp = new(response.StlPreviewResp)
|
|
|
resp.OriginEdbInfo.EdbInfoId = edbInfo.EdbInfoId
|
|
|
resp.OriginEdbInfo.Title = edbInfo.EdbName
|
|
@@ -182,7 +185,7 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
resp.TrendChartInfo.DataList = trendChart.DataList
|
|
|
resp.TrendChartInfo.MaxData = trendChart.MaxData
|
|
|
resp.TrendChartInfo.MinData = trendChart.MinData
|
|
|
- resp.TrendChartInfo.Title = edbInfo.EdbName + "Trend"
|
|
|
+ resp.TrendChartInfo.Title = trendName
|
|
|
resp.TrendChartInfo.ClassifyId = edbInfo.ClassifyId
|
|
|
resp.TrendChartInfo.Frequency = edbInfo.Frequency
|
|
|
resp.TrendChartInfo.Unit = edbInfo.Unit
|
|
@@ -190,14 +193,14 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
resp.SeasonalChartInfo.MaxData = seasonalChart.MaxData
|
|
|
resp.SeasonalChartInfo.MinData = seasonalChart.MinData
|
|
|
resp.SeasonalChartInfo.ClassifyId = edbInfo.ClassifyId
|
|
|
- resp.SeasonalChartInfo.Title = edbInfo.EdbName + "Seasonal"
|
|
|
+ resp.SeasonalChartInfo.Title = seasonalName
|
|
|
resp.SeasonalChartInfo.Frequency = edbInfo.Frequency
|
|
|
resp.SeasonalChartInfo.Unit = edbInfo.Unit
|
|
|
resp.ResidualChartInfo.DataList = residualChart.DataList
|
|
|
resp.ResidualChartInfo.MaxData = residualChart.MaxData
|
|
|
resp.ResidualChartInfo.MinData = residualChart.MinData
|
|
|
resp.ResidualChartInfo.ClassifyId = edbInfo.ClassifyId
|
|
|
- resp.ResidualChartInfo.Title = edbInfo.EdbName + "Residual"
|
|
|
+ resp.ResidualChartInfo.Title = residualName
|
|
|
resp.ResidualChartInfo.Frequency = edbInfo.Frequency
|
|
|
resp.ResidualChartInfo.Unit = edbInfo.Unit
|
|
|
resp.EvaluationResult.Mean = strconv.FormatFloat(result.ResidualMean, 'f', 4, 64)
|