|
@@ -160,7 +160,7 @@ func RefreshStlData(edbInfoId int) (msg string, err error) {
|
|
|
msg = "保存数据到Excel失败"
|
|
|
return
|
|
|
}
|
|
|
- defer os.Remove(loadFilePath)
|
|
|
+ //defer os.Remove(loadFilePath)
|
|
|
saveFilePath := exPath + "/" + strconv.Itoa(fromEdbInfo.SysUserId) + "_" + time.Now().Format(utils.FormatDateTimeUnSpace) + "_res" + ".xlsx"
|
|
|
err = execStlPythonCode(loadFilePath, saveFilePath, stlConfig.Period, stlConfig.Seasonal, stlConfig.Trend, stlConfig.TrendDeg, stlConfig.SeasonalDeg, stlConfig.LowPassDeg, stlConfig.Fraction, stlConfig.Robust)
|
|
|
if err != nil {
|
|
@@ -173,7 +173,7 @@ func RefreshStlData(edbInfoId int) (msg string, err error) {
|
|
|
msg = "解析Excel失败"
|
|
|
return
|
|
|
}
|
|
|
- defer os.Remove(saveFilePath)
|
|
|
+ //defer os.Remove(saveFilePath)
|
|
|
edbInfo, err := models.GetEdbInfoById(edbInfoId)
|
|
|
if err != nil {
|
|
|
msg = "获取指标信息失败"
|
|
@@ -552,6 +552,8 @@ print(output)
|
|
|
}
|
|
|
|
|
|
pythonCode = fmt.Sprintf(pythonCode, path, period, seasonal, trend, fraction, seasonalDeg, trendDeg, lowPassDeg, robustStr, toPath)
|
|
|
+ utils.FileLog.Info("stlpythoncode")
|
|
|
+ utils.FileLog.Info(pythonCode)
|
|
|
cmd := exec.Command(utils.PYTHON_PATH, "-c", pythonCode)
|
|
|
_, err = cmd.CombinedOutput()
|
|
|
if err != nil {
|