切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-gateway
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxuhui
3 years ago
提交
0dd525784ed05615d8f2c276aa5814e5016141ae
1 个父辈
b12371b9
添加 选择列导出
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
17 行增加
和
3 行删除
pkg/application/web/excelData/query/excel_data_fields.go
pkg/application/web/excelData/service/service.go
pkg/port/beego/controllers/web_client/excel_data_controller.go
pkg/port/beego/routers/web_excel_data.go
pkg/application/web/excelData/query/excel_data_fields.go
0 → 100644
查看文件 @
0dd5257
package
query
type
ExcelDataFieldsQuery
struct
{
//操作人
// 业务编码
Code
string
`form:"code"`
}
...
...
pkg/application/web/excelData/service/service.go
查看文件 @
0dd5257
...
...
@@ -7,6 +7,7 @@ import (
"github.com/linmadan/egglib-go/core/application"
"github.com/linmadan/egglib-go/utils/excel"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/excelData/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/domainService"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
...
...
@@ -217,9 +218,9 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
},
nil
}
func
(
srv
ExcelDataService
)
GetExcelDataFields
(
code
string
)
(
interface
{},
error
)
{
func
(
srv
ExcelDataService
)
GetExcelDataFields
(
param
*
query
.
ExcelDataFieldsQuery
)
(
interface
{},
error
)
{
dataFileds
:=
[]
DataFieldOptions
{}
switch
c
ode
{
switch
param
.
C
ode
{
case
domain
.
ExportCompanyUser
:
dataFileds
=
(
ExportCompanyUserData
{})
.
AllFields
()
case
domain
.
ExportCooperationUser
:
...
...
pkg/port/beego/controllers/web_client/excel_data_controller.go
查看文件 @
0dd5257
...
...
@@ -291,5 +291,8 @@ func (controller *ExcelDataController) ExportCooperationUser() {
//GetExcelDataFields 获取导出excel数据的可选字段
func
(
controller
*
ExcelDataController
)
GetExcelDataFields
()
{
code
:=
controller
.
GetString
(
":code"
)
var
excelService
=
service
.
NewExcelDataService
(
nil
)
data
,
_
:=
excelService
.
GetExcelDataFields
(
&
query
.
ExcelDataFieldsQuery
{
Code
:
code
})
controller
.
Response
(
data
,
nil
)
}
...
...
pkg/port/beego/routers/web_excel_data.go
查看文件 @
0dd5257
...
...
@@ -15,4 +15,7 @@ func init() {
web
.
Router
(
"/v1/web/file-import"
,
&
web_client
.
ExcelDataController
{},
"Post:FileImport"
)
web
.
Router
(
"/v1/web/file-export"
,
&
web_client
.
ExcelDataController
{},
"Post:FileExport"
)
web
.
Router
(
"/v1/web/file-import-template/:code"
,
&
web_client
.
ExcelDataController
{},
"Get:FileImportTemplate"
)
web
.
Router
(
"/v1/web/file-export/fields/:code"
,
&
web_client
.
ExcelDataController
{},
"Get:GetExcelDataFields"
)
}
...
...
请
注册
或
登录
后发表评论