切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-gateway
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
yangfu
3 years ago
提交
9eb2a20ba3168fdc251230b0a5baf44d8737ec1c
1 个父辈
e14ba3c8
统计修改
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
41 行增加
和
27 行删除
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
pkg/application/mobile/cooperation/service/credit_accounts_company.go
查看文件 @
9eb2a20
...
...
@@ -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
查看文件 @
9eb2a20
...
...
@@ -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
查看文件 @
9eb2a20
...
...
@@ -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
:
"*部门名称"
},
...
...
pkg/domain/enums.go
查看文件 @
9eb2a20
...
...
@@ -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
查看文件 @
9eb2a20
...
...
@@ -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
查看文件 @
9eb2a20
...
...
@@ -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
:
"*客户名称"
},
...
...
@@ -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
:
"*客户名称"
},
...
...
@@ -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,6 +271,10 @@ func (controller ExcelDataController) ImportOrganization() {
controller
.
Response
(
data
,
err
)
}
func
(
controller
ExcelDataController
)
ImportOrganization
()
{
importOrganization
(
controller
)
}
func
(
controller
ExcelDataController
)
FileImport
()
{
// excelService := service.NewExcelDataService(nil)
// r, err := controller.GetExcelFile()
...
...
@@ -295,8 +299,10 @@ 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)
}
...
...
请
注册
或
登录
后发表评论