切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-gateway
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
Your Name
3 years ago
提交
0138eabff9f5ba8dc45a99a2cad289d902ca7d99
2 个父辈
1f26bddb
5ecd28c8
Merge branch 'test' of
http://gitlab.fjmaimaimai.com/allied-creation/allied-crea…
…tion-gateway into test
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
58 行增加
和
43 行删除
Dockerfile
pkg/application/mobile/cooperation/service/credit_accounts_company.go
pkg/application/mobile/cooperation/service/credit_accounts_person.go
pkg/application/web/excelData/service/service.go
pkg/domain/enums.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_credit_account.go
pkg/port/beego/controllers/web_client/excel_data_controller.go
Dockerfile
查看文件 @
0138eab
FROM 192.168.0.243:5000/mmm/allied-creation-gateway:20210809
ENV APP_DIR $GOPATH/src/project-202109
09
ENV APP_DIR $GOPATH/src/project-202109
16
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR/
COPY ./pkg pkg
...
...
pkg/application/mobile/cooperation/service/credit_accounts_company.go
查看文件 @
0138eab
...
...
@@ -124,8 +124,8 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi
PageSize
:
cmd
.
PageSize
,
PaymentStatus
:
2
,
OrgId
:
cmd
.
Operator
.
OrgId
,
BeginTime
:
beginTime
,
EndTime
:
endTime
,
PaymentBeginTime
:
beginTime
,
PaymentEndTime
:
endTime
,
CooperationContractNumbers
:
cooperationContractNumbers
,
}
resultMenu
,
err
:=
gateway
.
CreditAccountsSearch
(
req
)
...
...
@@ -137,10 +137,10 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi
"cooperationContractNumbers"
:
cooperationContractNumbers
,
}
if
cmd
.
BeginTime
>
0
{
queryOptions
[
"
b
eginTime"
]
=
beginTime
queryOptions
[
"
paymentB
eginTime"
]
=
beginTime
}
if
cmd
.
EndTime
>
0
{
queryOptions
[
"
e
ndTime"
]
=
endTime
queryOptions
[
"
paymentE
ndTime"
]
=
endTime
}
// 2.分红统计
dividendStatisticsResult
,
err
:=
gateway
.
CooperationStatistics
(
allied_creation_cooperation
.
CreditAccountStatistics
,
queryOptions
)
...
...
@@ -200,10 +200,10 @@ func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.Cre
"sortByActuallyPaidAmount"
:
2
,
}
if
cmd
.
BeginTime
>
0
{
queryOptions
[
"
b
eginTime"
]
=
time
.
Unix
(
cmd
.
BeginTime
/
1000
,
0
)
queryOptions
[
"
paymentB
eginTime"
]
=
time
.
Unix
(
cmd
.
BeginTime
/
1000
,
0
)
}
if
cmd
.
EndTime
>
0
{
queryOptions
[
"
e
ndTime"
]
=
time
.
Unix
(
cmd
.
EndTime
/
1000
,
0
)
queryOptions
[
"
paymentE
ndTime"
]
=
time
.
Unix
(
cmd
.
EndTime
/
1000
,
0
)
}
cooperationUsersStatistics
,
err
:=
gateway
.
CooperationStatistics
(
allied_creation_cooperation
.
CompanyPaymentHistoryStatistics
,
queryOptions
)
if
err
!=
nil
{
...
...
pkg/application/mobile/cooperation/service/credit_accounts_person.go
查看文件 @
0138eab
...
...
@@ -25,12 +25,12 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit
endTime
=
time
.
Unix
(
cmd
.
EndTime
/
1000
,
0
)
}
resultMenu
,
err
:=
gateway
.
CreditAccountsSearch
(
allied_creation_cooperation
.
ReqCreditAccountsSearch
{
PageNumber
:
cmd
.
PageNumber
+
1
,
//手机序号从0开始的
PageSize
:
cmd
.
PageSize
,
PaymentStatus
:
2
,
UserBaseId
:
cmd
.
Operator
.
UserBaseId
,
BeginTime
:
beginTime
,
EndTime
:
endTime
,
PageNumber
:
cmd
.
PageNumber
+
1
,
//手机序号从0开始的
PageSize
:
cmd
.
PageSize
,
PaymentStatus
:
2
,
UserBaseId
:
cmd
.
Operator
.
UserBaseId
,
PaymentBeginTime
:
beginTime
,
PaymentEndTime
:
endTime
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
err
.
Error
())
...
...
@@ -39,10 +39,10 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit
"userBaseId"
:
cmd
.
Operator
.
UserBaseId
,
}
if
cmd
.
BeginTime
>
0
{
queryOptions
[
"
b
eginTime"
]
=
beginTime
queryOptions
[
"
paymentB
eginTime"
]
=
beginTime
}
if
cmd
.
EndTime
>
0
{
queryOptions
[
"
e
ndTime"
]
=
endTime
queryOptions
[
"
paymentE
ndTime"
]
=
endTime
}
// 2.分红统计
dividendStatisticsResult
,
err
:=
gateway
.
CooperationStatistics
(
allied_creation_cooperation
.
CreditAccountStatistics
,
queryOptions
)
...
...
@@ -85,10 +85,10 @@ func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.Cred
"sortByActuallyPaidAmount"
:
2
,
}
if
cmd
.
BeginTime
>
0
{
queryOptions
[
"
b
eginTime"
]
=
time
.
Unix
(
cmd
.
BeginTime
/
1000
,
0
)
queryOptions
[
"
paymentB
eginTime"
]
=
time
.
Unix
(
cmd
.
BeginTime
/
1000
,
0
)
}
if
cmd
.
EndTime
>
0
{
queryOptions
[
"
e
ndTime"
]
=
time
.
Unix
(
cmd
.
EndTime
/
1000
,
0
)
queryOptions
[
"
paymentE
ndTime"
]
=
time
.
Unix
(
cmd
.
EndTime
/
1000
,
0
)
}
cooperationUsersStatistics
,
err
:=
gateway
.
CooperationStatistics
(
allied_creation_cooperation
.
PersonCompanyPaymentHistoryStatistics
,
queryOptions
)
if
err
!=
nil
{
...
...
pkg/application/web/excelData/service/service.go
查看文件 @
0138eab
...
...
@@ -227,7 +227,7 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD
func
(
srv
ExcelDataService
)
ImportOrganization
(
importDataCommand
*
command
.
ImportDataCommand
)
(
interface
{},
error
)
{
excelImport
:=
excel
.
NewExcelImport
()
excelImport
.
RowBegin
=
2
//第二行开始读取
excelImport
.
RowBegin
=
3
//第二行开始读取
excelImport
.
DataFields
=
[]
excel
.
DataField
{
{
EnName
:
"OrgCode"
,
CnName
:
"*部门编码"
},
{
EnName
:
"OrgName"
,
CnName
:
"*部门名称"
},
...
...
@@ -286,9 +286,10 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
var
mapTemplate
=
map
[
string
]
string
{
domain
.
TemplateCompanyUser
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
// 模板待更新
domain
.
TemplateOrganization
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
TemplateCooperationUser
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
TemplateDividendsOrders
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
TemplateOrganization
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
TemplateCooperationUser
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
TemplateDividendsOrders
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
domain
.
ImportDividendsReturnOrders
:
"https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210909/object/1631171021_baB6y5zdpwC2WnsHFQhKC3dkQEaAYMNZ.xlsx"
,
}
var
url
string
var
ok
bool
...
...
pkg/domain/enums.go
查看文件 @
0138eab
...
...
@@ -51,25 +51,29 @@ const (
const
(
// 导入公司用户
ImportCompanyUser
=
"
ImportCompanyUser
"
ImportCompanyUser
=
"
ADMIN_SYSTEM-MANAGE_BASE_USER
"
// 导入公司组织
ImportOrganization
=
"ImportOrganization"
// 导入共创用户
ImportCooperationUser
=
"
ImportCooperationUser
"
ImportCooperationUser
=
"
ADMIN_SYSTEM-MANAGE_BASE_ALLIED-USER
"
// 导入分红订单
ImportDividendsOrders
=
"ImportDividendsOrders"
ImportDividendsOrders
=
"BUSINESS_ALLIED-CREATION_BONUS_ORDER"
// 导入退货订单
ImportDividendsReturnOrders
=
"BUSINESS_ALLIED-CREATION_BONUS_RETURN"
)
//excel 导入模板
const
(
// 导入公司用户
TemplateCompanyUser
=
"
TemplateCompanyUser
"
TemplateCompanyUser
=
"
ADMIN_SYSTEM-MANAGE_BASE_USER
"
// 导入公司组织
TemplateOrganization
=
"TemplateOrganization"
// 导入共创用户
TemplateCooperationUser
=
"
TemplateCooperationUser
"
TemplateCooperationUser
=
"
ADMIN_SYSTEM-MANAGE_BASE_ALLIED-USER
"
// 分红订单模板
TemplateDividendsOrders
=
"TemplateDividendsOrders"
TemplateDividendsOrders
=
"BUSINESS_ALLIED-CREATION_BONUS_ORDER"
// 导入退货订单
TemplateDividendsReturnOrders
=
"BUSINESS_ALLIED-CREATION_BONUS_RETURN"
)
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_credit_account.go
查看文件 @
0138eab
...
...
@@ -90,6 +90,10 @@ type (
UserBaseId
int64
`cname:"用户基础数据ID" json:"userBaseId"`
BeginTime
time
.
Time
`json:"beginTime"`
EndTime
time
.
Time
`json:"endTime"`
// 支付开始时间
PaymentBeginTime
time
.
Time
`json:"paymentBeginTime"`
// 支付结束时间
PaymentEndTime
time
.
Time
`json:"paymentEndTime"`
// 合约编号列表
CooperationContractNumbers
[]
string
`json:"cooperationContractNumbers"`
}
...
...
pkg/port/beego/controllers/web_client/excel_data_controller.go
查看文件 @
0138eab
...
...
@@ -44,7 +44,7 @@ func (controller *ExcelDataController) fieldValueAllEmpty(param map[string]strin
}
//导出公司用户
func
(
controller
*
ExcelDataController
)
ExportCompanyUser
()
{
func
(
controller
ExcelDataController
)
ExportCompanyUser
()
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
companyUserListQuery
:=
&
query
.
CompanyUserListQuery
{}
err
:=
controller
.
Unmarshal
(
companyUserListQuery
)
...
...
@@ -71,7 +71,7 @@ func (controller *ExcelDataController) ExportCompanyUser() {
}
//导出共创用户
func
(
controller
*
ExcelDataController
)
ExportCooperationUser
()
{
func
(
controller
ExcelDataController
)
ExportCooperationUser
()
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
companyUserListQuery
:=
&
query
.
CompanyUserListQuery
{}
err
:=
controller
.
Unmarshal
(
companyUserListQuery
)
...
...
@@ -98,11 +98,11 @@ func (controller *ExcelDataController) ExportCooperationUser() {
}
// ImportDividendsOrder TODO 导入分红订单
func
(
controller
*
ExcelDataController
)
ImportDividendsOrder
()
{
func
(
controller
ExcelDataController
)
ImportDividendsOrder
()
{
importDividendsOrder
(
controller
)
}
func
importDividendsOrder
(
controller
*
ExcelDataController
)
{
func
importDividendsOrder
(
controller
ExcelDataController
)
{
fileReader
,
err
:=
controller
.
GetExcelFile
()
if
err
!=
nil
{
...
...
@@ -110,7 +110,7 @@ func importDividendsOrder(controller *ExcelDataController) {
return
}
excelImport
:=
excel
.
NewExcelImport
()
excelImport
.
RowBegin
=
2
//第2行开始读取
excelImport
.
RowBegin
=
3
//第2行开始读取
excelImport
.
DataFields
=
[]
excel
.
DataField
{
{
EnName
:
"OriginalOrderNum"
,
CnName
:
"*来源单号"
},
{
EnName
:
"DividendsCustomerName"
,
CnName
:
"*客户名称"
},
...
...
@@ -161,11 +161,11 @@ func importDividendsOrder(controller *ExcelDataController) {
}
// ImportDividendsReturnedOrder 导入分红退货单
func
(
controller
*
ExcelDataController
)
ImportDividendsReturnedOrder
()
{
func
(
controller
ExcelDataController
)
ImportDividendsReturnedOrder
()
{
importDividendsReturnedOrder
(
controller
)
}
func
importDividendsReturnedOrder
(
controller
*
ExcelDataController
)
{
func
importDividendsReturnedOrder
(
controller
ExcelDataController
)
{
fileReader
,
err
:=
controller
.
GetExcelFile
()
if
err
!=
nil
{
...
...
@@ -173,7 +173,7 @@ func importDividendsReturnedOrder(controller *ExcelDataController) {
return
}
excelImport
:=
excel
.
NewExcelImport
()
excelImport
.
RowBegin
=
2
//第2行表头开始读取
excelImport
.
RowBegin
=
3
//第2行表头开始读取
excelImport
.
DataFields
=
[]
excel
.
DataField
{
{
EnName
:
"OriginalOrderNum"
,
CnName
:
"*来源单号"
},
{
EnName
:
"DividendsReturnedCustomerName"
,
CnName
:
"*客户名称"
},
...
...
@@ -223,10 +223,10 @@ func importDividendsReturnedOrder(controller *ExcelDataController) {
controller
.
Response
(
result
,
nil
)
}
func
(
controller
*
ExcelDataController
)
ImportCompanyUser
()
{
func
(
controller
ExcelDataController
)
ImportCompanyUser
()
{
importCompanyUser
(
controller
)
}
func
importCompanyUser
(
controller
*
ExcelDataController
)
{
func
importCompanyUser
(
controller
ExcelDataController
)
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
r
,
err
:=
controller
.
GetExcelFile
()
if
err
!=
nil
{
...
...
@@ -240,10 +240,10 @@ func importCompanyUser(controller *ExcelDataController) {
controller
.
Response
(
data
,
err
)
}
func
(
controller
*
ExcelDataController
)
ImportCooperationUser
()
{
func
(
controller
ExcelDataController
)
ImportCooperationUser
()
{
importCooperationUser
(
controller
)
}
func
importCooperationUser
(
controller
*
ExcelDataController
)
{
func
importCooperationUser
(
controller
ExcelDataController
)
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
r
,
err
:=
controller
.
GetExcelFile
()
if
err
!=
nil
{
...
...
@@ -257,7 +257,7 @@ func importCooperationUser(controller *ExcelDataController) {
controller
.
Response
(
data
,
err
)
}
func
(
controller
*
ExcelDataController
)
ImportOrganization
(
)
{
func
importOrganization
(
controller
ExcelDataController
)
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
r
,
err
:=
controller
.
GetExcelFile
()
if
err
!=
nil
{
...
...
@@ -271,7 +271,11 @@ func (controller *ExcelDataController) ImportOrganization() {
controller
.
Response
(
data
,
err
)
}
func
(
controller
*
ExcelDataController
)
FileImport
()
{
func
(
controller
ExcelDataController
)
ImportOrganization
()
{
importOrganization
(
controller
)
}
func
(
controller
ExcelDataController
)
FileImport
()
{
// excelService := service.NewExcelDataService(nil)
// r, err := controller.GetExcelFile()
// if err != nil {
...
...
@@ -295,13 +299,15 @@ func (controller *ExcelDataController) FileImport() {
importCooperationUser
(
controller
)
case
domain
.
ImportDividendsOrders
:
importDividendsOrder
(
controller
)
case
domain
.
Import
Organization
:
case
domain
.
Import
DividendsReturnOrders
:
importDividendsReturnedOrder
(
controller
)
case
domain
.
ImportOrganization
:
importOrganization
(
controller
)
}
// controller.Response(data, err)
}
func
(
controller
*
ExcelDataController
)
FileImportTemplate
()
{
func
(
controller
ExcelDataController
)
FileImportTemplate
()
{
excelService
:=
service
.
NewExcelDataService
(
nil
)
cmd
:=
&
command
.
ImportDataCommand
{}
...
...
请
注册
或
登录
后发表评论