|
|
package controllers
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"github.com/linmadan/egglib-go/web/beego"
|
|
|
"github.com/xuri/excelize/v2"
|
...
|
...
|
@@ -34,7 +33,12 @@ func (controller *ImportController) Import() { |
|
|
controller.Response(nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "读取excel错误:"+err.Error()))
|
|
|
return
|
|
|
}
|
|
|
dimensions, _ := domain.LoadPerformanceDimensions(rows)
|
|
|
fmt.Println(dimensions)
|
|
|
controller.Response(dimensions, nil)
|
|
|
formType := controller.GetString("type")
|
|
|
switch formType {
|
|
|
case "PerformanceDimension":
|
|
|
dimensions, _ := domain.LoadPerformanceDimensions(rows)
|
|
|
controller.Response(dimensions, nil)
|
|
|
default:
|
|
|
controller.Response(nil, application.ThrowError(application.ARG_ERROR, "请确认您导入的表单类型"))
|
|
|
}
|
|
|
} |
...
|
...
|
|