作者 Your Name

更新excel数据导入

@@ -2,10 +2,12 @@ package web_client @@ -2,10 +2,12 @@ package web_client
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers"  
6 "io" 5 "io"
7 "strings" 6 "strings"
8 7
  8 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers"
  9 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
  10 +
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
10 12
11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/command" 13 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/command"
@@ -15,6 +17,7 @@ import ( @@ -15,6 +17,7 @@ import (
15 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query" 17 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query"
16 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/service" 18 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/service"
17 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" 19 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
  20 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture"
18 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 21 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
19 ) 22 )
20 23
@@ -180,6 +183,18 @@ func (controller *ExcelDataController) FileImport() { @@ -180,6 +183,18 @@ func (controller *ExcelDataController) FileImport() {
180 importDividendsOrder(controller) 183 importDividendsOrder(controller)
181 case domain.ImportDividendsReturnOrders: 184 case domain.ImportDividendsReturnOrders:
182 importDividendsReturnedOrder(controller) 185 importDividendsReturnedOrder(controller)
  186 + case "ImportProductRecordLevel2":
  187 + //车间制造-二级品审核导入
  188 + fn := middleware.RedirectInternalService("/v1/web", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{}))
  189 + fn(controller.Ctx)
  190 + case "ImportAttendance":
  191 + // 车间制造-工时管理导入
  192 + fn := middleware.RedirectInternalService("/v1/web", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{}))
  193 + fn(controller.Ctx)
  194 + case "ImportProductTrouble":
  195 + //车间制造-事故管理导入
  196 + fn := middleware.RedirectInternalService("/v1/web", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{}))
  197 + fn(controller.Ctx)
183 default: 198 default:
184 defaultImport(controller) 199 defaultImport(controller)
185 } 200 }
@@ -366,7 +381,7 @@ func (controller *ExcelDataController) ExportCostStructuredDailyFillingAbnormalL @@ -366,7 +381,7 @@ func (controller *ExcelDataController) ExportCostStructuredDailyFillingAbnormalL
366 fileExport(controller, domain.ExportCostStructuredDailyFillingAbnormalLog) 381 fileExport(controller, domain.ExportCostStructuredDailyFillingAbnormalLog)
367 } 382 }
368 383
369 -//GetExcelDataFields 获取导出excel数据的可选字段 384 +// GetExcelDataFields 获取导出excel数据的可选字段
370 func (controller *ExcelDataController) GetExcelDataFields() { 385 func (controller *ExcelDataController) GetExcelDataFields() {
371 code := controller.GetString(":code") 386 code := controller.GetString(":code")
372 var excelService = service.NewExcelDataService(nil) 387 var excelService = service.NewExcelDataService(nil)