...
|
...
|
@@ -268,3 +268,23 @@ func (controller ExcelDataController) ImportOrganization() { |
|
|
data, err := excelService.ImportOrganization(cmd)
|
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller ExcelDataController) FileImport() {
|
|
|
excelService := service.NewExcelDataService(nil)
|
|
|
r, err := controller.GetExcelFile()
|
|
|
if err != nil {
|
|
|
controller.Response(nil, err)
|
|
|
return
|
|
|
}
|
|
|
cmd := &command.ImportDataCommand{}
|
|
|
//controller.Unmarshal(cmd)
|
|
|
controller.ParseForm(cmd)
|
|
|
cmd.Operator = controller.GetOperator()
|
|
|
cmd.Reader = r
|
|
|
var data interface{}
|
|
|
switch cmd.Code {
|
|
|
case "ImportCompanyUser":
|
|
|
data, err = excelService.ImportCompanyUser(cmd)
|
|
|
}
|
|
|
controller.Response(data, err)
|
|
|
} |
...
|
...
|
|