|
@@ -69,7 +69,7 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
case LAST_N_YEARS:
|
|
|
condition += " AND data_time >=?"
|
|
|
year := time.Now().Year()
|
|
|
- lastNyear, er := strconv.Atoi(confReq.LastNYear)
|
|
|
+ lastNyear, er := strconv.Atoi(req.LastNYear)
|
|
|
if er != nil {
|
|
|
msg = "最近N年输入不合法"
|
|
|
err = er
|
|
@@ -158,7 +158,7 @@ func GenerateStlEdbData(req *request.StlConfigReq, adminId int) (resp *response.
|
|
|
msg = "保存数据到Excel失败"
|
|
|
return
|
|
|
}
|
|
|
- //defer os.Remove(loadFilePath)
|
|
|
+ defer os.Remove(loadFilePath)
|
|
|
|
|
|
saveFilePath := exPath + "/" + strconv.Itoa(adminId) + "_" + time.Now().Format(utils.FormatDateTimeUnSpace) + "_res" + ".xlsx"
|
|
|
result, err := execStlPythonCode(loadFilePath, saveFilePath, confReq.Period, confReq.Seasonal, confReq.Trend, confReq.TrendDeg, confReq.SeasonalDeg, confReq.LowPassDeg, confReq.Fraction, confReq.Robust)
|