|
@@ -158,6 +158,7 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
}
|
|
|
defer os.Remove(saveFilePath)
|
|
|
resp = new(response.StlPreviewResp)
|
|
|
+ resp.OriginEdbInfo.EdbInfoId = edbInfo.EdbInfoId
|
|
|
resp.OriginEdbInfo.Title = edbInfo.EdbName
|
|
|
resp.OriginEdbInfo.ClassifyId = edbInfo.ClassifyId
|
|
|
resp.OriginEdbInfo.MaxData = edbInfo.MaxValue
|
|
@@ -191,6 +192,22 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
resp.EvaluationResult.AdfPValue = strconv.FormatFloat(result.AdfPValue, 'f', -1, 64)
|
|
|
resp.EvaluationResult.LjungBoxPValue = strconv.FormatFloat(result.LbTestPValue, 'f', -1, 64)
|
|
|
|
|
|
+ confMapping, err := stl.GetCalculateStlConfigMappingByConfigId(req.CalculateStlConfigId)
|
|
|
+ if err != nil {
|
|
|
+ msg = "获取配置信息失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, mapping := range confMapping {
|
|
|
+ switch mapping.StlEdbType {
|
|
|
+ case 1:
|
|
|
+ resp.TrendChartInfo.EdbInfoId = mapping.EdbInfoId
|
|
|
+ case 2:
|
|
|
+ resp.SeasonalChartInfo.EdbInfoId = mapping.EdbInfoId
|
|
|
+ case 3:
|
|
|
+ resp.ResidualChartInfo.EdbInfoId = mapping.EdbInfoId
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
bTrend, _ := json.Marshal(trendChart.DataList)
|
|
|
bSeasonal, _ := json.Marshal(seasonalChart.DataList)
|
|
|
bResidual, _ := json.Marshal(residualChart.DataList)
|