作者 Administrator

合并分支 'test' 到 'master'

Test



查看合并请求 !30
@@ -122,7 +122,7 @@ spec: @@ -122,7 +122,7 @@ spec:
122 - name: SUPLUS_SALE_APP 122 - name: SUPLUS_SALE_APP
123 value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com" 123 value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com"
124 - name: ALLIED_CREATION_REPORTING_SYSTEM 124 - name: ALLIED_CREATION_REPORTING_SYSTEM
125 - value: "https://allied-creation-reporting-system-dev.fjmaimaimai.com" 125 + value: "http://allied-creation-reporting-system-dev.fjmaimaimai.com"
126 # - name: REDIS_HOST 126 # - name: REDIS_HOST
127 # valueFrom: 127 # valueFrom:
128 # configMapKeyRef: 128 # configMapKeyRef:
@@ -26,6 +26,7 @@ func (dto *DepartmentUsersDto) LoadDto(dataType int, subDepartment *allied_creat @@ -26,6 +26,7 @@ func (dto *DepartmentUsersDto) LoadDto(dataType int, subDepartment *allied_creat
26 if dataType == 1 { 26 if dataType == 1 {
27 for i := range userSearch.Users { 27 for i := range userSearch.Users {
28 user := userSearch.Users[i] 28 user := userSearch.Users[i]
  29 + user.UserInfo.UserCode = user.UserCode
29 dto.Users = append(dto.Users, map[string]interface{}{ 30 dto.Users = append(dto.Users, map[string]interface{}{
30 "userId": user.UserId, 31 "userId": user.UserId,
31 "userInfo": user.UserInfo, 32 "userInfo": user.UserInfo,
  1 +package query
  2 +
  3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured"
  6 +)
  7 +
  8 +type CostDailyFillingAbnormalLogQuery struct {
  9 + *cost_structured.SearchDailyFillingAbnormalLogRequest
  10 + //操作人
  11 + Operator domain.Operator `json:"-"`
  12 + SelectedField []string `json:"selectedField"`
  13 +}
@@ -3,6 +3,7 @@ package service @@ -3,6 +3,7 @@ package service
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture" 5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture"
  6 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured"
6 7
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query" 8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query"
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
@@ -137,3 +138,15 @@ func (srv ExcelDataService) ExportWorkshopAttendanceStatics(cmd *query.Manufactu @@ -137,3 +138,15 @@ func (srv ExcelDataService) ExportWorkshopAttendanceStatics(cmd *query.Manufactu
137 } 138 }
138 return ExportWorkshopAttendanceStaticsData{SourceData: result.Grid.List, SelectedField: cmd.SelectedField}, nil 139 return ExportWorkshopAttendanceStaticsData{SourceData: result.Grid.List, SelectedField: cmd.SelectedField}, nil
139 } 140 }
  141 +
  142 +// ExportDailyFillingAbnormalLog 导出每日 填报异常日志记录
  143 +func (srv ExcelDataService) ExportDailyFillingAbnormalLog(cmd *query.CostDailyFillingAbnormalLogQuery) (ExportDailyFillingAbnormalLog, error) {
  144 + creationUserGateway := cost_structured.NewHttpLibCostStructured(cmd.Operator)
  145 + cmd.PageNumber = 1
  146 + cmd.PageSize = 10000
  147 + result, err := creationUserGateway.SearchDailyFillingAbnormalLog(*cmd.SearchDailyFillingAbnormalLogRequest)
  148 + if err != nil {
  149 + return ExportDailyFillingAbnormalLog{}, fmt.Errorf("获取每日填报异常日志记录数据失败:%w", err)
  150 + }
  151 + return ExportDailyFillingAbnormalLog{SourceData: result.Grid.List, SelectedField: cmd.SelectedField}, nil
  152 +}
@@ -271,6 +271,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -271,6 +271,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
271 {EnName: "benchmark", CnName: "标杆值"}, 271 {EnName: "benchmark", CnName: "标杆值"},
272 {EnName: "highest", CnName: "历史最高值"}, 272 {EnName: "highest", CnName: "历史最高值"},
273 {EnName: "yesterdayActual", CnName: "昨日实际值"}, 273 {EnName: "yesterdayActual", CnName: "昨日实际值"},
  274 +
  275 + {EnName: "desiredValue", CnName: "主干-理想值"},
  276 + {EnName: "indicatedValue", CnName: "主干-考核值"},
  277 + {EnName: "factoryPriceDesiredValue", CnName: "树桩-出厂价-理想值"},
  278 + {EnName: "factoryPriceIndicatedValue", CnName: "树桩-出厂价-考核值"},
  279 + {EnName: "factoryPriceActualValue", CnName: "树桩-出厂价-现状值"},
  280 + {EnName: "costPriceDesiredValue", CnName: "树桩-成本-理想值"},
  281 + {EnName: "costPriceIndicatedValue", CnName: "树桩-成本-考核值"},
  282 + {EnName: "costPriceActualValue", CnName: "树桩-成本-现状值"},
274 } 283 }
275 var buf bytes.Buffer 284 var buf bytes.Buffer
276 tee := io.TeeReader(importDataCommand.Reader, &buf) 285 tee := io.TeeReader(importDataCommand.Reader, &buf)
@@ -381,6 +390,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm @@ -381,6 +390,15 @@ func (srv ExcelDataService) ImportCost(importDataCommand *command.ImportDataComm
381 Highest: strings.TrimSpace(v["highest"]), 390 Highest: strings.TrimSpace(v["highest"]),
382 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]), 391 YesterdayActual: strings.TrimSpace(v["yesterdayActual"]),
383 Types: importCostCommand.Types, 392 Types: importCostCommand.Types,
  393 +
  394 + DesiredValue: strings.TrimSpace(v["desiredValue"]),
  395 + IndicatedValue: strings.TrimSpace(v["indicatedValue"]),
  396 + FactoryPriceDesiredValue: strings.TrimSpace(v["factoryPriceDesiredValue"]),
  397 + FactoryPriceIndicatedValue: strings.TrimSpace(v["factoryPriceIndicatedValue"]),
  398 + FactoryPriceActualValue: strings.TrimSpace(v["factoryPriceActualValue"]),
  399 + CostPriceDesiredValue: strings.TrimSpace(v["costPriceDesiredValue"]),
  400 + CostPriceIndicatedValue: strings.TrimSpace(v["costPriceIndicatedValue"]),
  401 + CostPriceActualValue: strings.TrimSpace(v["costPriceActualValue"]),
384 } 402 }
385 if len(ossFile) > 0 { 403 if len(ossFile) > 0 {
386 item.Urls = ossFile 404 item.Urls = ossFile
@@ -458,7 +476,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import @@ -458,7 +476,7 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
458 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx", 476 domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210927/object/1632743214_rNHm6ZBXZaC5xKTrsE7M4h45MY6n6Ff3.xlsx",
459 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx", 477 domain.ImportProducts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220120/object/1642670543_cbraNKjNPHcbN6RNBYQBrwhC7BXGbDWp.xlsx",
460 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx", 478 domain.ImportDevices: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20220126/object/1643184320_hT6sY5BKHmBa4TynfSGSCGyZ2KTTtzkj.xlsx",
461 - domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/test/20220318/object/1647587204_B5azRmr2TB73jRKWsnFyDe4yxXJWnrDT.xlsx", 479 + domain.ImportCosts: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/opportunity/dev_online/20220526/object/1653555125_NGNbjmKpxCyks5CwztFsfj2dBNWerks5.xlsx",
462 } 480 }
463 var url string 481 var url string
464 var ok bool 482 var ok bool
  1 +package service
  2 +
  3 +import (
  4 + "github.com/linmadan/egglib-go/utils/excel"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured"
  6 +)
  7 +
  8 +//ExportDailyFillingAbnormalLog 导出每日 填报异常日志记录
  9 +type ExportDailyFillingAbnormalLog struct {
  10 + SourceData []cost_structured.DailyFillingAbnormalLogItem
  11 + SelectedField []string
  12 +}
  13 +
  14 +var _ excel.ExcelMaker = (*ExportWorkshopAttendanceStaticsData)(nil)
  15 +
  16 +func (data ExportDailyFillingAbnormalLog) AllFields() []DataFieldOptions {
  17 + return []DataFieldOptions{
  18 + {EnName: "abnormalTypeDescription", CnName: "异常类型"},
  19 + {EnName: "projectTypeDescription", CnName: "项目分类"},
  20 + {EnName: "projectName", CnName: "项目名称"},
  21 + {EnName: "itemName", CnName: "细项名称"},
  22 + {EnName: "userName", CnName: "负责人"},
  23 + {EnName: "actualValue", CnName: "现状值"},
  24 + {EnName: "targetValue", CnName: "目标值"},
  25 + {EnName: "remark", CnName: "填报说明"},
  26 + {EnName: "createdAt", CnName: "异常日期"},
  27 + }
  28 +}
  29 +
  30 +func (data ExportDailyFillingAbnormalLog) DataFieldList() []excel.DataField {
  31 + fields := []excel.DataField{}
  32 + allFields := data.AllFields()
  33 + for _, value2 := range allFields {
  34 + if len(data.SelectedField) == 0 || value2.IsDefault {
  35 + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName})
  36 + continue
  37 + }
  38 + for _, value3 := range data.SelectedField {
  39 + if value2.EnName == value3 {
  40 + fields = append(fields, excel.DataField{EnName: value2.EnName, CnName: value2.CnName})
  41 + }
  42 + }
  43 + }
  44 + return fields
  45 +}
  46 +
  47 +func (data ExportDailyFillingAbnormalLog) CellValue(index int, enName string) (value interface{}) {
  48 + if index > data.DataListLen() {
  49 + return ""
  50 + }
  51 + switch enName {
  52 + case "abnormalTypeDescription":
  53 + return data.SourceData[index].AbnormalTypeDescription
  54 + case "projectTypeDescription":
  55 + return data.SourceData[index].ProjectTypeDescription
  56 + case "projectName":
  57 + return data.SourceData[index].ProjectName
  58 + case "itemName":
  59 + return data.SourceData[index].ItemName
  60 + case "userName":
  61 + return data.SourceData[index].UserName
  62 + case "actualValue":
  63 + return data.SourceData[index].ActualValue
  64 + case "targetValue":
  65 + return data.SourceData[index].TargetValue
  66 + case "remark":
  67 + return data.SourceData[index].Remark
  68 + case "createdAt":
  69 + return data.SourceData[index].CreatedAt
  70 + }
  71 + return nil
  72 +}
  73 +
  74 +func (data ExportDailyFillingAbnormalLog) DataListLen() int {
  75 + return len(data.SourceData)
  76 +}
  77 +
  78 +func (data ExportDailyFillingAbnormalLog) TableTitle() []string {
  79 + return nil
  80 +}
@@ -65,6 +65,35 @@ type CostManagemant struct { @@ -65,6 +65,35 @@ type CostManagemant struct {
65 Types int `json:"types"` 65 Types int `json:"types"`
66 // 昨日实际值 66 // 昨日实际值
67 YesterdayActual string `json:"yesterdayActual"` 67 YesterdayActual string `json:"yesterdayActual"`
  68 +
  69 + // 出厂价-理想值
  70 + FactoryPriceDesiredValue string `json:"factoryPriceDesiredValue"`
  71 + // 成本-理想值
  72 + CostPriceDesiredValue string `json:"costPriceDesiredValue"`
  73 + // 毛利-理想值
  74 + ProfitPriceDesiredValue string `json:"profitPriceDesiredValue"`
  75 + // 毛利率-理想值
  76 + ProfitProportionDesiredValue string `json:"profitProportionDesiredValue"`
  77 + // 出厂价-考核值
  78 + FactoryPriceIndicatedValue string `json:"factoryPriceIndicatedValue"`
  79 + // 成本-考核值
  80 + CostPriceIndicatedValue string `json:"costPriceIndicatedValue"`
  81 + // 毛利-考核值
  82 + ProfitPriceIndicatedValue string `json:"profitPriceIndicatedValue"`
  83 + // 毛利率-考核值
  84 + ProfitProportionIndicatedValue string `json:"profitProportionIndicatedValue"`
  85 + // 出厂价-现状值
  86 + FactoryPriceActualValue string `json:"factoryPriceActualValue"`
  87 + // 成本-现状值
  88 + CostPriceActualValue string `json:"costPriceActualValue"`
  89 + // 毛利-现状值
  90 + ProfitPriceActualValue string `json:"profitPriceActualValue"`
  91 + // 毛利率-现状值
  92 + ProfitProportionActualValue string `json:"profitProportionActualValue"`
  93 + // 理想值
  94 + DesiredValue string `json:"desiredValue"`
  95 + // 考核值
  96 + IndicatedValue string `json:"indicatedValue"`
68 } 97 }
69 98
70 type NodeType struct { 99 type NodeType struct {
@@ -109,4 +138,4 @@ func GetTargetPeriod(targetPeriod string) int { @@ -109,4 +138,4 @@ func GetTargetPeriod(targetPeriod string) int {
109 return 0 138 return 0
110 } 139 }
111 return -1 140 return -1
112 -}  
  141 +}
@@ -91,6 +91,9 @@ const ( @@ -91,6 +91,9 @@ const (
91 ExportManufactureEmployeeAttendanceStatics = "ExportManufactureEmployeeAttendanceStatics" 91 ExportManufactureEmployeeAttendanceStatics = "ExportManufactureEmployeeAttendanceStatics"
92 // 车间工时 92 // 车间工时
93 ExportManufactureWorkshopAttendanceStatics = "ExportManufactureWorkshopAttendanceStatics" 93 ExportManufactureWorkshopAttendanceStatics = "ExportManufactureWorkshopAttendanceStatics"
  94 +
  95 + // 成本结构化 - 每日填报异常日志
  96 + ExportCostStructuredDailyFillingAbnormalLog = "ExportCostStructuredDailyFillingAbnormalLog"
94 ) 97 )
95 98
96 const ( 99 const (
  1 +package cost_structured
  2 +
  3 +import "fmt"
  4 +
  5 +type (
  6 + SearchDailyFillingAbnormalLogRequest struct {
  7 + //页码
  8 + PageNumber int64 `json:"pageNumber" valid:"Required"`
  9 + //每页显示数目
  10 + PageSize int64 `json:"pageSize" valid:"Required"`
  11 + // 1:填报异常 2.结果异常
  12 + AbnormalType int `cname:"1:填报异常 2.结果异常" json:"abnormalType"`
  13 + // 项目分类 风险|成本
  14 + ProjectType int `cname:"项目分类 风险|成本" json:"projectType,omitempty"`
  15 + // 项目id
  16 + ProjectId int64 `cname:"项目id" json:"projectId,string,omitempty"`
  17 + // 细项名称
  18 + ItemName string `cname:"细项名称" json:"itemName,omitempty"`
  19 + // 负责人名称
  20 + PrincipalName string `cname:"负责人名称" json:"principalName,omitempty"`
  21 + //开始时间
  22 + BeginTime string `json:"beginTime,omitempty"`
  23 + //结束时间
  24 + EndTime string `json:"endTime,omitempty"`
  25 + }
  26 + SearchDailyFillingAbnormalLogResponse struct {
  27 + Grid struct {
  28 + List []DailyFillingAbnormalLogItem `json:"list"`
  29 + Total int `json:"total"`
  30 + } `json:"grid"`
  31 + }
  32 + DailyFillingAbnormalLogItem struct {
  33 + DailyFillingAbnormalLogID int `json:"dailyFillingAbnormalLogId"`
  34 + AbnormalType int `json:"abnormalType"`
  35 + ProjectType int `json:"projectType"`
  36 + ProjectID int64 `json:"projectId"`
  37 + CostManagementID int64 `json:"costManagementId"`
  38 + UserName string `json:"userName"`
  39 + ProjectName string `json:"projectName"`
  40 + ItemName string `json:"itemName"`
  41 + TargetValue string `json:"targetValue"`
  42 + ActualValue string `json:"actualValue"`
  43 + Remark string `json:"remark"`
  44 + CreatedAt string `json:"createdAt"`
  45 + AbnormalTypeDescription string `json:"abnormalTypeDescription"`
  46 + ProjectTypeDescription string `json:"projectTypeDescription"`
  47 + }
  48 +)
  49 +
  50 +//SearchEmployeeAttendanceStatics 搜索员工工时统计
  51 +func (gateway HttpLibCostStructured) SearchDailyFillingAbnormalLog(param SearchDailyFillingAbnormalLogRequest) (*SearchDailyFillingAbnormalLogResponse, error) {
  52 + url := fmt.Sprintf("%s%s", gateway.BaseUrl(), "/daily-filling-abnormal-logs/search")
  53 + method := "post"
  54 + var data SearchDailyFillingAbnormalLogResponse
  55 + err := gateway.FastDoRequest(url, method, param, &data)
  56 + return &data, err
  57 +}
@@ -72,7 +72,7 @@ func init() { @@ -72,7 +72,7 @@ func init() {
72 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.CheckAccessToken()) 72 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.CheckAccessToken())
73 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/cost", cost_structured.NewHttpLibCostStructured(domain.Operator{}))) 73 web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/cost", cost_structured.NewHttpLibCostStructured(domain.Operator{})))
74 web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.CheckAccessToken()) 74 web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.CheckAccessToken())
75 - web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.RedirectInternalService("/chart-editor", chart_editor.NewHttpLibAlliedChartEditor(domain.Operator{}))) 75 + web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/chart-editor", chart_editor.NewHttpLibAlliedChartEditor(domain.Operator{})))
76 } 76 }
77 77
78 func AllowCors() func(ctx *context.Context) { 78 func AllowCors() func(ctx *context.Context) {
@@ -187,14 +187,14 @@ func (controller *ExcelDataController) FileImport() { @@ -187,14 +187,14 @@ func (controller *ExcelDataController) FileImport() {
187 187
188 func defaultImport(controller *ExcelDataController) { 188 func defaultImport(controller *ExcelDataController) {
189 var ( 189 var (
190 - data interface{}  
191 - err error  
192 - r io.Reader  
193 - ext string 190 + data interface{}
  191 + err error
  192 + r io.Reader
  193 + ext string
194 fileName string 194 fileName string
195 ) 195 )
196 excelService := service.NewExcelDataService(nil) 196 excelService := service.NewExcelDataService(nil)
197 - r, ext,fileName, err = controller.GetFileWithExt() 197 + r, ext, fileName, err = controller.GetFileWithExt()
198 if err != nil { 198 if err != nil {
199 controller.Response(nil, err) 199 controller.Response(nil, err)
200 return 200 return
@@ -217,7 +217,7 @@ func defaultImport(controller *ExcelDataController) { @@ -217,7 +217,7 @@ func defaultImport(controller *ExcelDataController) {
217 case domain.ImportDevices: 217 case domain.ImportDevices:
218 data, err = excelService.ImportDevice(cmd) 218 data, err = excelService.ImportDevice(cmd)
219 case domain.ImportCosts: 219 case domain.ImportCosts:
220 - data,err = excelService.ImportCost(cmd) 220 + data, err = excelService.ImportCost(cmd)
221 default: 221 default:
222 err = fmt.Errorf("导入不存在 Code:%v", cmd.Code) 222 err = fmt.Errorf("导入不存在 Code:%v", cmd.Code)
223 } 223 }
@@ -300,6 +300,13 @@ func fileExport(controller *ExcelDataController, code string) { @@ -300,6 +300,13 @@ func fileExport(controller *ExcelDataController, code string) {
300 companyUserListQuery.Operator = exportDataCommand.Operator 300 companyUserListQuery.Operator = exportDataCommand.Operator
301 data, err = excelService.ExportWorkshopAttendanceStatics(companyUserListQuery) 301 data, err = excelService.ExportWorkshopAttendanceStatics(companyUserListQuery)
302 filename = "导出车间工时汇总" 302 filename = "导出车间工时汇总"
  303 +
  304 + case domain.ExportCostStructuredDailyFillingAbnormalLog:
  305 + query := &query.CostDailyFillingAbnormalLogQuery{}
  306 + controllers.Must(exportDataCommand.UnmarshalQuery(query))
  307 + query.Operator = exportDataCommand.Operator
  308 + data, err = excelService.ExportDailyFillingAbnormalLog(query)
  309 + filename = "异常记录"
303 default: 310 default:
304 err = fmt.Errorf("export type :%v not exists", exportDataCommand.Code) 311 err = fmt.Errorf("export type :%v not exists", exportDataCommand.Code)
305 } 312 }
@@ -355,6 +362,10 @@ func (controller *ExcelDataController) ExportManufactureWorkshopAttendanceStatic @@ -355,6 +362,10 @@ func (controller *ExcelDataController) ExportManufactureWorkshopAttendanceStatic
355 fileExport(controller, domain.ExportManufactureWorkshopAttendanceStatics) 362 fileExport(controller, domain.ExportManufactureWorkshopAttendanceStatics)
356 } 363 }
357 364
  365 +func (controller *ExcelDataController) ExportCostStructuredDailyFillingAbnormalLog() {
  366 + fileExport(controller, domain.ExportCostStructuredDailyFillingAbnormalLog)
  367 +}
  368 +
358 //GetExcelDataFields 获取导出excel数据的可选字段 369 //GetExcelDataFields 获取导出excel数据的可选字段
359 func (controller *ExcelDataController) GetExcelDataFields() { 370 func (controller *ExcelDataController) GetExcelDataFields() {
360 code := controller.GetString(":code") 371 code := controller.GetString(":code")
@@ -7,6 +7,7 @@ import ( @@ -7,6 +7,7 @@ import (
7 "github.com/beego/beego/v2/server/web" 7 "github.com/beego/beego/v2/server/web"
8 "github.com/beego/beego/v2/server/web/context" 8 "github.com/beego/beego/v2/server/web/context"
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway"
  10 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
10 "io/ioutil" 11 "io/ioutil"
11 "net/http" 12 "net/http"
12 "strings" 13 "strings"
@@ -39,7 +40,7 @@ func RedirectInternalService(prefix string, svr internalService) web.FilterFunc @@ -39,7 +40,7 @@ func RedirectInternalService(prefix string, svr internalService) web.FilterFunc
39 method := strings.ToLower(ctx.Request.Method) 40 method := strings.ToLower(ctx.Request.Method)
40 url := strings.Replace(ctx.Request.RequestURI, prefix, "", 1) 41 url := strings.Replace(ctx.Request.RequestURI, prefix, "", 1)
41 req := svr.CreateRequest(svr.BaseUrl()+url, method) 42 req := svr.CreateRequest(svr.BaseUrl()+url, method)
42 - 43 + log.Logger.Debug(method + " 请求url:" + svr.BaseUrl() + url)
43 // 传递当前登录信息(可配置) 44 // 传递当前登录信息(可配置)
44 loginToken, ok := FormCtxLoginToken(ctx) 45 loginToken, ok := FormCtxLoginToken(ctx)
45 if ok && loginToken.CompanyId > 0 && loginToken.OrgId > 0 { 46 if ok && loginToken.CompanyId > 0 && loginToken.OrgId > 0 {
@@ -52,7 +53,6 @@ func RedirectInternalService(prefix string, svr internalService) web.FilterFunc @@ -52,7 +53,6 @@ func RedirectInternalService(prefix string, svr internalService) web.FilterFunc
52 } 53 }
53 req.Header("orgIds", fmt.Sprintf("%v", strings.Join(orgIdList, ","))) 54 req.Header("orgIds", fmt.Sprintf("%v", strings.Join(orgIdList, ",")))
54 } 55 }
55 -  
56 req.Body(ctx.Input.RequestBody) 56 req.Body(ctx.Input.RequestBody)
57 response, err := req.Response() 57 response, err := req.Response()
58 if err != nil { 58 if err != nil {
@@ -15,6 +15,8 @@ func init() { @@ -15,6 +15,8 @@ func init() {
15 web.Router("/v1/web/excel/export/manufacture-employee-attendance-statics", &web_client.ExcelDataController{}, "Post:ExportManufactureEmployeeAttendanceStatics") 15 web.Router("/v1/web/excel/export/manufacture-employee-attendance-statics", &web_client.ExcelDataController{}, "Post:ExportManufactureEmployeeAttendanceStatics")
16 web.Router("/v1/web/excel/export/manufacture-workshop-attendance-statics", &web_client.ExcelDataController{}, "Post:ExportManufactureWorkshopAttendanceStatics") 16 web.Router("/v1/web/excel/export/manufacture-workshop-attendance-statics", &web_client.ExcelDataController{}, "Post:ExportManufactureWorkshopAttendanceStatics")
17 17
  18 + web.Router("/v1/web/excel/export/cost-structured-daily-filling-abnormal-log", &web_client.ExcelDataController{}, "Post:ExportCostStructuredDailyFillingAbnormalLog")
  19 +
18 web.Router("/v1/web/excel/import/dividends-orders", &web_client.ExcelDataController{}, "Post:ImportDividendsOrder") 20 web.Router("/v1/web/excel/import/dividends-orders", &web_client.ExcelDataController{}, "Post:ImportDividendsOrder")
19 web.Router("/v1/web/excel/import/dividends-returned-orders", &web_client.ExcelDataController{}, "Post:ImportDividendsReturnedOrder") 21 web.Router("/v1/web/excel/import/dividends-returned-orders", &web_client.ExcelDataController{}, "Post:ImportDividendsReturnedOrder")
20 22