...
|
...
|
@@ -136,11 +136,20 @@ func (controller *ExcelDataController) GetFileWithExt() (io.Reader, string, erro |
|
|
}
|
|
|
|
|
|
func (controller *ExcelDataController) FileImportTemplate() {
|
|
|
excelService := service.NewExcelDataService(nil)
|
|
|
cmd := &command.ImportDataCommand{}
|
|
|
// excelService := service.NewExcelDataService(nil)
|
|
|
code := controller.GetString(":code")
|
|
|
cmd.Code = code
|
|
|
var data interface{}
|
|
|
data, err := excelService.FileImportTemplate(cmd)
|
|
|
controller.Response(data, err)
|
|
|
// cmd := &command.ImportDataCommand{}
|
|
|
// cmd.Code = code
|
|
|
// var data interface{}
|
|
|
// data, err := excelService.FileImportTemplate(cmd)
|
|
|
// controller.Response(data, err)
|
|
|
|
|
|
switch code {
|
|
|
case "ImportProductTrouble":
|
|
|
controller.Ctx.Output.Download("./download/excel_tpl/事故管理导入.xlsx")
|
|
|
case "ImportProductRecordLevel2":
|
|
|
controller.Ctx.Output.Download("./download/excel_tpl/二级品审核导入.xlsx")
|
|
|
case "ImportAttendance":
|
|
|
controller.Ctx.Output.Download("./download/excel_tpl/工时管理导入.xlsx")
|
|
|
}
|
|
|
} |
...
|
...
|
|