作者 yangfu

统计修改

... ... @@ -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["beginTime"] = beginTime
queryOptions["paymentBeginTime"] = beginTime
}
if cmd.EndTime > 0 {
queryOptions["endTime"] = endTime
queryOptions["paymentEndTime"] = 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["beginTime"] = time.Unix(cmd.BeginTime/1000, 0)
queryOptions["paymentBeginTime"] = time.Unix(cmd.BeginTime/1000, 0)
}
if cmd.EndTime > 0 {
queryOptions["endTime"] = time.Unix(cmd.EndTime/1000, 0)
queryOptions["paymentEndTime"] = time.Unix(cmd.EndTime/1000, 0)
}
cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.CompanyPaymentHistoryStatistics, queryOptions)
if err != nil {
... ...
... ... @@ -29,8 +29,8 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit
PageSize: cmd.PageSize,
PaymentStatus: 2,
UserBaseId: cmd.Operator.UserBaseId,
BeginTime: beginTime,
EndTime: endTime,
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["beginTime"] = beginTime
queryOptions["paymentBeginTime"] = beginTime
}
if cmd.EndTime > 0 {
queryOptions["endTime"] = endTime
queryOptions["paymentEndTime"] = 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["beginTime"] = time.Unix(cmd.BeginTime/1000, 0)
queryOptions["paymentBeginTime"] = time.Unix(cmd.BeginTime/1000, 0)
}
if cmd.EndTime > 0 {
queryOptions["endTime"] = time.Unix(cmd.EndTime/1000, 0)
queryOptions["paymentEndTime"] = time.Unix(cmd.EndTime/1000, 0)
}
cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PersonCompanyPaymentHistoryStatistics, queryOptions)
if err != nil {
... ...
... ... @@ -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: "*部门名称"},
... ...
... ... @@ -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"
)
... ...
... ... @@ -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"`
}
... ...
... ... @@ -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.ImportOrganization:
case domain.ImportDividendsReturnOrders:
importDividendsReturnedOrder(controller)
case domain.ImportOrganization:
importOrganization(controller)
}
// controller.Response(data, err)
}
... ...