正在显示
6 个修改的文件
包含
37 行增加
和
23 行删除
@@ -124,8 +124,8 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | @@ -124,8 +124,8 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | ||
124 | PageSize: cmd.PageSize, | 124 | PageSize: cmd.PageSize, |
125 | PaymentStatus: 2, | 125 | PaymentStatus: 2, |
126 | OrgId: cmd.Operator.OrgId, | 126 | OrgId: cmd.Operator.OrgId, |
127 | - BeginTime: beginTime, | ||
128 | - EndTime: endTime, | 127 | + PaymentBeginTime: beginTime, |
128 | + PaymentEndTime: endTime, | ||
129 | CooperationContractNumbers: cooperationContractNumbers, | 129 | CooperationContractNumbers: cooperationContractNumbers, |
130 | } | 130 | } |
131 | resultMenu, err := gateway.CreditAccountsSearch(req) | 131 | resultMenu, err := gateway.CreditAccountsSearch(req) |
@@ -137,10 +137,10 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | @@ -137,10 +137,10 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | ||
137 | "cooperationContractNumbers": cooperationContractNumbers, | 137 | "cooperationContractNumbers": cooperationContractNumbers, |
138 | } | 138 | } |
139 | if cmd.BeginTime > 0 { | 139 | if cmd.BeginTime > 0 { |
140 | - queryOptions["beginTime"] = beginTime | 140 | + queryOptions["paymentBeginTime"] = beginTime |
141 | } | 141 | } |
142 | if cmd.EndTime > 0 { | 142 | if cmd.EndTime > 0 { |
143 | - queryOptions["endTime"] = endTime | 143 | + queryOptions["paymentEndTime"] = endTime |
144 | } | 144 | } |
145 | // 2.分红统计 | 145 | // 2.分红统计 |
146 | dividendStatisticsResult, err := gateway.CooperationStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) | 146 | dividendStatisticsResult, err := gateway.CooperationStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) |
@@ -200,10 +200,10 @@ func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.Cre | @@ -200,10 +200,10 @@ func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.Cre | ||
200 | "sortByActuallyPaidAmount": 2, | 200 | "sortByActuallyPaidAmount": 2, |
201 | } | 201 | } |
202 | if cmd.BeginTime > 0 { | 202 | if cmd.BeginTime > 0 { |
203 | - queryOptions["beginTime"] = time.Unix(cmd.BeginTime/1000, 0) | 203 | + queryOptions["paymentBeginTime"] = time.Unix(cmd.BeginTime/1000, 0) |
204 | } | 204 | } |
205 | if cmd.EndTime > 0 { | 205 | if cmd.EndTime > 0 { |
206 | - queryOptions["endTime"] = time.Unix(cmd.EndTime/1000, 0) | 206 | + queryOptions["paymentEndTime"] = time.Unix(cmd.EndTime/1000, 0) |
207 | } | 207 | } |
208 | cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.CompanyPaymentHistoryStatistics, queryOptions) | 208 | cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.CompanyPaymentHistoryStatistics, queryOptions) |
209 | if err != nil { | 209 | if err != nil { |
@@ -29,8 +29,8 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit | @@ -29,8 +29,8 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit | ||
29 | PageSize: cmd.PageSize, | 29 | PageSize: cmd.PageSize, |
30 | PaymentStatus: 2, | 30 | PaymentStatus: 2, |
31 | UserBaseId: cmd.Operator.UserBaseId, | 31 | UserBaseId: cmd.Operator.UserBaseId, |
32 | - BeginTime: beginTime, | ||
33 | - EndTime: endTime, | 32 | + PaymentBeginTime: beginTime, |
33 | + PaymentEndTime: endTime, | ||
34 | }) | 34 | }) |
35 | if err != nil { | 35 | if err != nil { |
36 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 36 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -39,10 +39,10 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit | @@ -39,10 +39,10 @@ func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.Credit | ||
39 | "userBaseId": cmd.Operator.UserBaseId, | 39 | "userBaseId": cmd.Operator.UserBaseId, |
40 | } | 40 | } |
41 | if cmd.BeginTime > 0 { | 41 | if cmd.BeginTime > 0 { |
42 | - queryOptions["beginTime"] = beginTime | 42 | + queryOptions["paymentBeginTime"] = beginTime |
43 | } | 43 | } |
44 | if cmd.EndTime > 0 { | 44 | if cmd.EndTime > 0 { |
45 | - queryOptions["endTime"] = endTime | 45 | + queryOptions["paymentEndTime"] = endTime |
46 | } | 46 | } |
47 | // 2.分红统计 | 47 | // 2.分红统计 |
48 | dividendStatisticsResult, err := gateway.CooperationStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) | 48 | dividendStatisticsResult, err := gateway.CooperationStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) |
@@ -85,10 +85,10 @@ func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.Cred | @@ -85,10 +85,10 @@ func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.Cred | ||
85 | "sortByActuallyPaidAmount": 2, | 85 | "sortByActuallyPaidAmount": 2, |
86 | } | 86 | } |
87 | if cmd.BeginTime > 0 { | 87 | if cmd.BeginTime > 0 { |
88 | - queryOptions["beginTime"] = time.Unix(cmd.BeginTime/1000, 0) | 88 | + queryOptions["paymentBeginTime"] = time.Unix(cmd.BeginTime/1000, 0) |
89 | } | 89 | } |
90 | if cmd.EndTime > 0 { | 90 | if cmd.EndTime > 0 { |
91 | - queryOptions["endTime"] = time.Unix(cmd.EndTime/1000, 0) | 91 | + queryOptions["paymentEndTime"] = time.Unix(cmd.EndTime/1000, 0) |
92 | } | 92 | } |
93 | cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PersonCompanyPaymentHistoryStatistics, queryOptions) | 93 | cooperationUsersStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PersonCompanyPaymentHistoryStatistics, queryOptions) |
94 | if err != nil { | 94 | if err != nil { |
@@ -227,7 +227,7 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD | @@ -227,7 +227,7 @@ func (srv ExcelDataService) ImportCompanyUser(importDataCommand *command.ImportD | ||
227 | 227 | ||
228 | func (srv ExcelDataService) ImportOrganization(importDataCommand *command.ImportDataCommand) (interface{}, error) { | 228 | func (srv ExcelDataService) ImportOrganization(importDataCommand *command.ImportDataCommand) (interface{}, error) { |
229 | excelImport := excel.NewExcelImport() | 229 | excelImport := excel.NewExcelImport() |
230 | - excelImport.RowBegin = 2 //第二行开始读取 | 230 | + excelImport.RowBegin = 3 //第二行开始读取 |
231 | excelImport.DataFields = []excel.DataField{ | 231 | excelImport.DataFields = []excel.DataField{ |
232 | {EnName: "OrgCode", CnName: "*部门编码"}, | 232 | {EnName: "OrgCode", CnName: "*部门编码"}, |
233 | {EnName: "OrgName", CnName: "*部门名称"}, | 233 | {EnName: "OrgName", CnName: "*部门名称"}, |
@@ -51,25 +51,29 @@ const ( | @@ -51,25 +51,29 @@ const ( | ||
51 | 51 | ||
52 | const ( | 52 | const ( |
53 | // 导入公司用户 | 53 | // 导入公司用户 |
54 | - ImportCompanyUser = "ImportCompanyUser" | 54 | + ImportCompanyUser = "ADMIN_SYSTEM-MANAGE_BASE_USER" |
55 | // 导入公司组织 | 55 | // 导入公司组织 |
56 | ImportOrganization = "ImportOrganization" | 56 | ImportOrganization = "ImportOrganization" |
57 | // 导入共创用户 | 57 | // 导入共创用户 |
58 | - ImportCooperationUser = "ImportCooperationUser" | 58 | + ImportCooperationUser = "ADMIN_SYSTEM-MANAGE_BASE_ALLIED-USER" |
59 | 59 | ||
60 | // 导入分红订单 | 60 | // 导入分红订单 |
61 | - ImportDividendsOrders = "ImportDividendsOrders" | 61 | + ImportDividendsOrders = "BUSINESS_ALLIED-CREATION_BONUS_ORDER" |
62 | + // 导入退货订单 | ||
63 | + ImportDividendsReturnOrders = "BUSINESS_ALLIED-CREATION_BONUS_RETURN" | ||
62 | ) | 64 | ) |
63 | 65 | ||
64 | //excel 导入模板 | 66 | //excel 导入模板 |
65 | const ( | 67 | const ( |
66 | // 导入公司用户 | 68 | // 导入公司用户 |
67 | - TemplateCompanyUser = "TemplateCompanyUser" | 69 | + TemplateCompanyUser = "ADMIN_SYSTEM-MANAGE_BASE_USER" |
68 | // 导入公司组织 | 70 | // 导入公司组织 |
69 | TemplateOrganization = "TemplateOrganization" | 71 | TemplateOrganization = "TemplateOrganization" |
70 | // 导入共创用户 | 72 | // 导入共创用户 |
71 | - TemplateCooperationUser = "TemplateCooperationUser" | 73 | + TemplateCooperationUser = "ADMIN_SYSTEM-MANAGE_BASE_ALLIED-USER" |
72 | 74 | ||
73 | // 分红订单模板 | 75 | // 分红订单模板 |
74 | - TemplateDividendsOrders = "TemplateDividendsOrders" | 76 | + TemplateDividendsOrders = "BUSINESS_ALLIED-CREATION_BONUS_ORDER" |
77 | + // 导入退货订单 | ||
78 | + TemplateDividendsReturnOrders = "BUSINESS_ALLIED-CREATION_BONUS_RETURN" | ||
75 | ) | 79 | ) |
@@ -90,6 +90,10 @@ type ( | @@ -90,6 +90,10 @@ type ( | ||
90 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` | 90 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` |
91 | BeginTime time.Time `json:"beginTime"` | 91 | BeginTime time.Time `json:"beginTime"` |
92 | EndTime time.Time `json:"endTime"` | 92 | EndTime time.Time `json:"endTime"` |
93 | + // 支付开始时间 | ||
94 | + PaymentBeginTime time.Time `json:"paymentBeginTime"` | ||
95 | + // 支付结束时间 | ||
96 | + PaymentEndTime time.Time `json:"paymentEndTime"` | ||
93 | // 合约编号列表 | 97 | // 合约编号列表 |
94 | CooperationContractNumbers []string `json:"cooperationContractNumbers"` | 98 | CooperationContractNumbers []string `json:"cooperationContractNumbers"` |
95 | } | 99 | } |
@@ -110,7 +110,7 @@ func importDividendsOrder(controller ExcelDataController) { | @@ -110,7 +110,7 @@ func importDividendsOrder(controller ExcelDataController) { | ||
110 | return | 110 | return |
111 | } | 111 | } |
112 | excelImport := excel.NewExcelImport() | 112 | excelImport := excel.NewExcelImport() |
113 | - excelImport.RowBegin = 2 //第2行开始读取 | 113 | + excelImport.RowBegin = 3 //第2行开始读取 |
114 | excelImport.DataFields = []excel.DataField{ | 114 | excelImport.DataFields = []excel.DataField{ |
115 | {EnName: "OriginalOrderNum", CnName: "*来源单号"}, | 115 | {EnName: "OriginalOrderNum", CnName: "*来源单号"}, |
116 | {EnName: "DividendsCustomerName", CnName: "*客户名称"}, | 116 | {EnName: "DividendsCustomerName", CnName: "*客户名称"}, |
@@ -173,7 +173,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) { | @@ -173,7 +173,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) { | ||
173 | return | 173 | return |
174 | } | 174 | } |
175 | excelImport := excel.NewExcelImport() | 175 | excelImport := excel.NewExcelImport() |
176 | - excelImport.RowBegin = 2 //第2行表头开始读取 | 176 | + excelImport.RowBegin = 3 //第2行表头开始读取 |
177 | excelImport.DataFields = []excel.DataField{ | 177 | excelImport.DataFields = []excel.DataField{ |
178 | {EnName: "OriginalOrderNum", CnName: "*来源单号"}, | 178 | {EnName: "OriginalOrderNum", CnName: "*来源单号"}, |
179 | {EnName: "DividendsReturnedCustomerName", CnName: "*客户名称"}, | 179 | {EnName: "DividendsReturnedCustomerName", CnName: "*客户名称"}, |
@@ -257,7 +257,7 @@ func importCooperationUser(controller ExcelDataController) { | @@ -257,7 +257,7 @@ func importCooperationUser(controller ExcelDataController) { | ||
257 | controller.Response(data, err) | 257 | controller.Response(data, err) |
258 | } | 258 | } |
259 | 259 | ||
260 | -func (controller ExcelDataController) ImportOrganization() { | 260 | +func importOrganization(controller ExcelDataController) { |
261 | excelService := service.NewExcelDataService(nil) | 261 | excelService := service.NewExcelDataService(nil) |
262 | r, err := controller.GetExcelFile() | 262 | r, err := controller.GetExcelFile() |
263 | if err != nil { | 263 | if err != nil { |
@@ -271,6 +271,10 @@ func (controller ExcelDataController) ImportOrganization() { | @@ -271,6 +271,10 @@ func (controller ExcelDataController) ImportOrganization() { | ||
271 | controller.Response(data, err) | 271 | controller.Response(data, err) |
272 | } | 272 | } |
273 | 273 | ||
274 | +func (controller ExcelDataController) ImportOrganization() { | ||
275 | + importOrganization(controller) | ||
276 | +} | ||
277 | + | ||
274 | func (controller ExcelDataController) FileImport() { | 278 | func (controller ExcelDataController) FileImport() { |
275 | // excelService := service.NewExcelDataService(nil) | 279 | // excelService := service.NewExcelDataService(nil) |
276 | // r, err := controller.GetExcelFile() | 280 | // r, err := controller.GetExcelFile() |
@@ -295,8 +299,10 @@ func (controller ExcelDataController) FileImport() { | @@ -295,8 +299,10 @@ func (controller ExcelDataController) FileImport() { | ||
295 | importCooperationUser(controller) | 299 | importCooperationUser(controller) |
296 | case domain.ImportDividendsOrders: | 300 | case domain.ImportDividendsOrders: |
297 | importDividendsOrder(controller) | 301 | importDividendsOrder(controller) |
298 | - case domain.ImportOrganization: | 302 | + case domain.ImportDividendsReturnOrders: |
299 | importDividendsReturnedOrder(controller) | 303 | importDividendsReturnedOrder(controller) |
304 | + case domain.ImportOrganization: | ||
305 | + importOrganization(controller) | ||
300 | } | 306 | } |
301 | // controller.Response(data, err) | 307 | // controller.Response(data, err) |
302 | } | 308 | } |
-
请 注册 或 登录 后发表评论