Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
13 个修改的文件
包含
129 行增加
和
25 行删除
@@ -318,6 +318,7 @@ func (svr AuthService) GetUserMenus(userMenusCommand *command.UserMenusCommand) | @@ -318,6 +318,7 @@ func (svr AuthService) GetUserMenus(userMenusCommand *command.UserMenusCommand) | ||
318 | UserId: int(userMenusCommand.Operator.UserId), | 318 | UserId: int(userMenusCommand.Operator.UserId), |
319 | MenuCategory: userMenusCommand.MenuCategory, | 319 | MenuCategory: userMenusCommand.MenuCategory, |
320 | ALLDisableMenu: userMenusCommand.ALLDisableMenu, | 320 | ALLDisableMenu: userMenusCommand.ALLDisableMenu, |
321 | + OrgId: userMenusCommand.Operator.OrgId, | ||
321 | }) | 322 | }) |
322 | if err != nil { | 323 | if err != nil { |
323 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 324 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -10,6 +10,8 @@ import ( | @@ -10,6 +10,8 @@ import ( | ||
10 | type DividendsStatisticsCommand struct { | 10 | type DividendsStatisticsCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + // 组织Id | ||
14 | + OrgId int64 `json:"companyId" valid:"Required"` | ||
13 | } | 15 | } |
14 | 16 | ||
15 | func (cmd *DividendsStatisticsCommand) Valid(validation *validation.Validation) { | 17 | func (cmd *DividendsStatisticsCommand) Valid(validation *validation.Validation) { |
@@ -11,7 +11,7 @@ type SearchDividendsEstimatesCommand struct { | @@ -11,7 +11,7 @@ type SearchDividendsEstimatesCommand struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | // 查询偏离量 | 13 | // 查询偏离量 |
14 | - PageNumber int `json:"pageIndex" valid:"Required"` | 14 | + PageNumber int `json:"pageNumber" valid:"Required"` |
15 | // 查询限制 | 15 | // 查询限制 |
16 | PageSize int `json:"pageSize" valid:"Required"` | 16 | PageSize int `json:"pageSize" valid:"Required"` |
17 | //状态 | 17 | //状态 |
@@ -30,6 +30,7 @@ func (srv CompanyStatisticsService) SearchDividendContracts(cmd *command.SearchD | @@ -30,6 +30,7 @@ func (srv CompanyStatisticsService) SearchDividendContracts(cmd *command.SearchD | ||
30 | "offset": cmd.PageNumber * cmd.PageSize, | 30 | "offset": cmd.PageNumber * cmd.PageSize, |
31 | "limit": cmd.PageSize, | 31 | "limit": cmd.PageSize, |
32 | "orgId": cmd.Operator.OrgId, | 32 | "orgId": cmd.Operator.OrgId, |
33 | + "userId": cmd.Operator.UserId, | ||
33 | }) | 34 | }) |
34 | if err != nil { | 35 | if err != nil { |
35 | return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 36 | return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -44,6 +45,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(cmd *command.DividendsSt | @@ -44,6 +45,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(cmd *command.DividendsSt | ||
44 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{ | 45 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{ |
45 | "companyId": cmd.Operator.CompanyId, | 46 | "companyId": cmd.Operator.CompanyId, |
46 | "orgId": cmd.Operator.OrgId, | 47 | "orgId": cmd.Operator.OrgId, |
48 | + "userId": cmd.Operator.UserId, | ||
47 | }) | 49 | }) |
48 | if err != nil { | 50 | if err != nil { |
49 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 51 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -58,8 +60,9 @@ func (srv CompanyStatisticsService) SearchDividendsEstimates(cmd *command.Search | @@ -58,8 +60,9 @@ func (srv CompanyStatisticsService) SearchDividendsEstimates(cmd *command.Search | ||
58 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{ | 60 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{ |
59 | "companyId": cmd.Operator.CompanyId, | 61 | "companyId": cmd.Operator.CompanyId, |
60 | "orgId": cmd.Operator.OrgId, | 62 | "orgId": cmd.Operator.OrgId, |
63 | + "userId": cmd.Operator.UserId, | ||
61 | "dividendsAccountStatus": cmd.Status, | 64 | "dividendsAccountStatus": cmd.Status, |
62 | - "offset": (cmd.PageNumber - 1) * cmd.PageSize, | 65 | + "offset": cmd.PageNumber * cmd.PageSize, |
63 | "limit": cmd.PageSize, | 66 | "limit": cmd.PageSize, |
64 | }) | 67 | }) |
65 | if err != nil { | 68 | if err != nil { |
@@ -40,12 +40,13 @@ func (srv PersonDividendsService) SearchDividendContracts(cmd *command.SearchDiv | @@ -40,12 +40,13 @@ func (srv PersonDividendsService) SearchDividendContracts(cmd *command.SearchDiv | ||
40 | return 0, result, nil | 40 | return 0, result, nil |
41 | } | 41 | } |
42 | 42 | ||
43 | -// DividendsStatistics 企业的合约统计(分红统计) | 43 | +// DividendsStatistics 个人合约统计(分红统计) |
44 | func (srv PersonDividendsService) DividendsStatistics(cmd *command.DividendsStatisticsCommand) (interface{}, error) { | 44 | func (srv PersonDividendsService) DividendsStatistics(cmd *command.DividendsStatisticsCommand) (interface{}, error) { |
45 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 45 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
46 | cmd.Operator) | 46 | cmd.Operator) |
47 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{ | 47 | result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{ |
48 | "userBaseId": cmd.Operator.UserBaseId, | 48 | "userBaseId": cmd.Operator.UserBaseId, |
49 | + "orgId": cmd.OrgId, | ||
49 | }) | 50 | }) |
50 | if err != nil { | 51 | if err != nil { |
51 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 52 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -62,7 +63,7 @@ func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDi | @@ -62,7 +63,7 @@ func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDi | ||
62 | "orgId": cmd.OrgId, | 63 | "orgId": cmd.OrgId, |
63 | "userBaseId": cmd.Operator.UserBaseId, | 64 | "userBaseId": cmd.Operator.UserBaseId, |
64 | "dividendsAccountStatus": cmd.Status, | 65 | "dividendsAccountStatus": cmd.Status, |
65 | - "offset": (cmd.PageNumber - 1) * cmd.PageSize, | 66 | + "offset": cmd.PageNumber * cmd.PageSize, |
66 | "limit": cmd.PageSize, | 67 | "limit": cmd.PageSize, |
67 | }) | 68 | }) |
68 | if err != nil { | 69 | if err != nil { |
@@ -73,9 +73,9 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | @@ -73,9 +73,9 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | ||
73 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 73 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
74 | applicationQuery.Operator) | 74 | applicationQuery.Operator) |
75 | resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ | 75 | resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ |
76 | - PageNumber: applicationQuery.PageNumber + 1, //手机序号从0开始的 | ||
77 | - PageSize: applicationQuery.PageSize, | ||
78 | - //CompanyId: int(applicationQuery.Operator.CompanyId), | 76 | + PageNumber: applicationQuery.PageNumber + 1, //手机序号从0开始的 |
77 | + PageSize: applicationQuery.PageSize, | ||
78 | + CompanyId: int(applicationQuery.Operator.CompanyId), | ||
79 | OrgId: applicationQuery.Operator.OrgId, | 79 | OrgId: applicationQuery.Operator.OrgId, |
80 | CooperationApplicationStatus: applicationQuery.Status, | 80 | CooperationApplicationStatus: applicationQuery.Status, |
81 | }) | 81 | }) |
@@ -18,16 +18,30 @@ type CompanyCreditAccountService struct { | @@ -18,16 +18,30 @@ type CompanyCreditAccountService struct { | ||
18 | func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (int64, interface{}, error) { | 18 | func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (int64, interface{}, error) { |
19 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 19 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
20 | cmd.Operator) | 20 | cmd.Operator) |
21 | + | ||
22 | + cooperationContractNumbers, err := gateway.RelevantCooperationContractNumbers(allied_creation_cooperation.RelevantCooperationContractNumbers, map[string]interface{}{ | ||
23 | + "companyId": cmd.Operator.CompanyId, | ||
24 | + "orgId": cmd.Operator.OrgId, | ||
25 | + "userId": cmd.Operator.UserId, | ||
26 | + }) | ||
27 | + if err != nil { | ||
28 | + return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
29 | + } | ||
30 | + var items = make([]*dto.CreditAccountItem, 0) | ||
31 | + if len(cooperationContractNumbers) == 0 { | ||
32 | + return 0, items, nil | ||
33 | + } | ||
21 | resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | 34 | resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ |
22 | - PageNumber: cmd.PageNumber + 1, //手机序号从0开始的 | ||
23 | - PageSize: cmd.PageSize, | ||
24 | - PaymentStatus: cmd.PaymentStatus, | ||
25 | - OrgId: cmd.Operator.OrgId, | 35 | + PageNumber: cmd.PageNumber + 1, //手机序号从0开始的 |
36 | + PageSize: cmd.PageSize, | ||
37 | + PaymentStatus: cmd.PaymentStatus, | ||
38 | + OrgId: cmd.Operator.OrgId, | ||
39 | + CooperationContractNumbers: cooperationContractNumbers, | ||
26 | }) | 40 | }) |
27 | if err != nil { | 41 | if err != nil { |
28 | return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 42 | return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
29 | } | 43 | } |
30 | - var items []*dto.CreditAccountItem | 44 | + |
31 | for i := 0; i < len(resultMenu.Grid.List); i++ { | 45 | for i := 0; i < len(resultMenu.Grid.List); i++ { |
32 | items = append(items, dto.ToCreditAccountItem(&resultMenu.Grid.List[i])) | 46 | items = append(items, dto.ToCreditAccountItem(&resultMenu.Grid.List[i])) |
33 | } | 47 | } |
@@ -84,6 +98,20 @@ func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccou | @@ -84,6 +98,20 @@ func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccou | ||
84 | func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | 98 | func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { |
85 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 99 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
86 | cmd.Operator) | 100 | cmd.Operator) |
101 | + | ||
102 | + cooperationContractNumbers, err := gateway.RelevantCooperationContractNumbers(allied_creation_cooperation.RelevantCooperationContractNumbers, map[string]interface{}{ | ||
103 | + "companyId": cmd.Operator.CompanyId, | ||
104 | + "orgId": cmd.Operator.OrgId, | ||
105 | + "userId": cmd.Operator.UserId, | ||
106 | + }) | ||
107 | + if err != nil { | ||
108 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
109 | + } | ||
110 | + var items = make([]*dto.CreditAccountItem, 0) | ||
111 | + if len(cooperationContractNumbers) == 0 { | ||
112 | + return items, nil | ||
113 | + } | ||
114 | + | ||
87 | var beginTime, endTime time.Time | 115 | var beginTime, endTime time.Time |
88 | if cmd.BeginTime > 0 { | 116 | if cmd.BeginTime > 0 { |
89 | beginTime = time.Unix(cmd.BeginTime/1000, 0) | 117 | beginTime = time.Unix(cmd.BeginTime/1000, 0) |
@@ -92,19 +120,21 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | @@ -92,19 +120,21 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | ||
92 | endTime = time.Unix(cmd.EndTime/1000, 0) | 120 | endTime = time.Unix(cmd.EndTime/1000, 0) |
93 | } | 121 | } |
94 | req := allied_creation_cooperation.ReqCreditAccountsSearch{ | 122 | req := allied_creation_cooperation.ReqCreditAccountsSearch{ |
95 | - PageNumber: cmd.PageNumber + 1, //手机序号从0开始的 | ||
96 | - PageSize: cmd.PageSize, | ||
97 | - PaymentStatus: 2, | ||
98 | - OrgId: cmd.Operator.OrgId, | ||
99 | - BeginTime: beginTime, | ||
100 | - EndTime: endTime, | 123 | + PageNumber: cmd.PageNumber + 1, //手机序号从0开始的 |
124 | + PageSize: cmd.PageSize, | ||
125 | + PaymentStatus: 2, | ||
126 | + OrgId: cmd.Operator.OrgId, | ||
127 | + BeginTime: beginTime, | ||
128 | + EndTime: endTime, | ||
129 | + CooperationContractNumbers: cooperationContractNumbers, | ||
101 | } | 130 | } |
102 | resultMenu, err := gateway.CreditAccountsSearch(req) | 131 | resultMenu, err := gateway.CreditAccountsSearch(req) |
103 | if err != nil { | 132 | if err != nil { |
104 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 133 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
105 | } | 134 | } |
106 | queryOptions := map[string]interface{}{ | 135 | queryOptions := map[string]interface{}{ |
107 | - "orgId": cmd.Operator.OrgId, | 136 | + "orgId": cmd.Operator.OrgId, |
137 | + "cooperationContractNumbers": cooperationContractNumbers, | ||
108 | } | 138 | } |
109 | if cmd.BeginTime > 0 { | 139 | if cmd.BeginTime > 0 { |
110 | queryOptions["beginTime"] = beginTime | 140 | queryOptions["beginTime"] = beginTime |
@@ -129,7 +159,7 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | @@ -129,7 +159,7 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | ||
129 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 159 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
130 | } | 160 | } |
131 | 161 | ||
132 | - var items = make([]*dto.CreditAccountItem, 0) | 162 | + //var items = make([]*dto.CreditAccountItem, 0) |
133 | for i := 0; i < len(resultMenu.Grid.List); i++ { | 163 | for i := 0; i < len(resultMenu.Grid.List); i++ { |
134 | items = append(items, dto.ToCreditAccountItem(&resultMenu.Grid.List[i])) | 164 | items = append(items, dto.ToCreditAccountItem(&resultMenu.Grid.List[i])) |
135 | } | 165 | } |
@@ -145,7 +175,25 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | @@ -145,7 +175,25 @@ func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.Credi | ||
145 | func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | 175 | func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { |
146 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 176 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
147 | cmd.Operator) | 177 | cmd.Operator) |
178 | + | ||
179 | + var response = struct { | ||
180 | + rankItems interface{} `json:"rankItems"` | ||
181 | + TotalPaymentAmount interface{} `json:"totalPaymentAmount"` | ||
182 | + }{} | ||
183 | + cooperationContractNumbers, err := gateway.RelevantCooperationContractNumbers(allied_creation_cooperation.RelevantCooperationContractNumbers, map[string]interface{}{ | ||
184 | + "companyId": cmd.Operator.CompanyId, | ||
185 | + "orgId": cmd.Operator.OrgId, | ||
186 | + "userId": cmd.Operator.UserId, | ||
187 | + }) | ||
188 | + if err != nil { | ||
189 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
190 | + } | ||
191 | + if len(cooperationContractNumbers) == 0 { | ||
192 | + return response, nil | ||
193 | + } | ||
194 | + | ||
148 | queryOptions := map[string]interface{}{ | 195 | queryOptions := map[string]interface{}{ |
196 | + "userId": cmd.Operator.UserId, | ||
149 | "orgId": cmd.Operator.OrgId, | 197 | "orgId": cmd.Operator.OrgId, |
150 | "offset": cmd.PageNumber * cmd.PageSize, | 198 | "offset": cmd.PageNumber * cmd.PageSize, |
151 | "limit": cmd.PageSize, | 199 | "limit": cmd.PageSize, |
@@ -162,15 +210,15 @@ func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.Cre | @@ -162,15 +210,15 @@ func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.Cre | ||
162 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 210 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
163 | } | 211 | } |
164 | 212 | ||
213 | + queryOptions["cooperationContractNumbers"] = cooperationContractNumbers | ||
165 | creditAccountStatistics, err := gateway.CreditAccountStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) | 214 | creditAccountStatistics, err := gateway.CreditAccountStatistics(allied_creation_cooperation.CreditAccountStatistics, queryOptions) |
166 | if err != nil { | 215 | if err != nil { |
167 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 216 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
168 | } | 217 | } |
218 | + response.rankItems = cooperationUsersStatistics | ||
219 | + response.TotalPaymentAmount = creditAccountStatistics.Paid | ||
169 | 220 | ||
170 | - return map[string]interface{}{ | ||
171 | - "rankItems": cooperationUsersStatistics, | ||
172 | - "totalPaymentAmount": creditAccountStatistics.Paid, | ||
173 | - }, nil | 221 | + return response, nil |
174 | } | 222 | } |
175 | 223 | ||
176 | // PaymentHistoryHistogramStatistics 支付历史统计-直方图 | 224 | // PaymentHistoryHistogramStatistics 支付历史统计-直方图 |
@@ -178,7 +226,10 @@ func (srv CompanyCreditAccountService) PaymentHistoryHistogramStatistics(cmd *co | @@ -178,7 +226,10 @@ func (srv CompanyCreditAccountService) PaymentHistoryHistogramStatistics(cmd *co | ||
178 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 226 | gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
179 | cmd.Operator) | 227 | cmd.Operator) |
180 | paymentHistoryHistogramStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PaymentHistoryHistogramStatistics, map[string]interface{}{ | 228 | paymentHistoryHistogramStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PaymentHistoryHistogramStatistics, map[string]interface{}{ |
181 | - "orgId": cmd.Operator.OrgId, | 229 | + "orgId": cmd.Operator.OrgId, |
230 | + "userId": cmd.Operator.UserId, | ||
231 | + "beginTime": time.Unix(cmd.BeginTime/1000, 0), | ||
232 | + "endTime": time.Unix(cmd.EndTime/1000, 0), | ||
182 | }) | 233 | }) |
183 | if err != nil { | 234 | if err != nil { |
184 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 235 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -112,6 +112,8 @@ func (srv PersonCreditAccountService) PaymentHistoryHistogramStatistics(cmd *com | @@ -112,6 +112,8 @@ func (srv PersonCreditAccountService) PaymentHistoryHistogramStatistics(cmd *com | ||
112 | cmd.Operator) | 112 | cmd.Operator) |
113 | paymentHistoryHistogramStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PaymentHistoryHistogramStatistics, map[string]interface{}{ | 113 | paymentHistoryHistogramStatistics, err := gateway.CooperationStatistics(allied_creation_cooperation.PaymentHistoryHistogramStatistics, map[string]interface{}{ |
114 | "userBaseId": cmd.Operator.UserBaseId, | 114 | "userBaseId": cmd.Operator.UserBaseId, |
115 | + "beginTime": time.Unix(cmd.BeginTime/1000, 0), | ||
116 | + "endTime": time.Unix(cmd.EndTime/1000, 0), | ||
115 | }) | 117 | }) |
116 | if err != nil { | 118 | if err != nil { |
117 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 119 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
@@ -155,6 +155,7 @@ func (cooperationModeService *CooperationModeService) CooperationModeSelector(li | @@ -155,6 +155,7 @@ func (cooperationModeService *CooperationModeService) CooperationModeSelector(li | ||
155 | OrgIds: nil, | 155 | OrgIds: nil, |
156 | OrgId: listCooperationModeQuery.Operator.OrgId, | 156 | OrgId: listCooperationModeQuery.Operator.OrgId, |
157 | UserBaseId: 0, | 157 | UserBaseId: 0, |
158 | + Status: 1, | ||
158 | }) | 159 | }) |
159 | if err != nil { | 160 | if err != nil { |
160 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 161 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -42,6 +42,8 @@ const ( | @@ -42,6 +42,8 @@ const ( | ||
42 | CreditAccountStatistics = "CreditAccountStatistics" | 42 | CreditAccountStatistics = "CreditAccountStatistics" |
43 | // 公司/个人 - 支付历史统计直方图 | 43 | // 公司/个人 - 支付历史统计直方图 |
44 | PaymentHistoryHistogramStatistics = "PaymentHistoryHistogramStatistics" | 44 | PaymentHistoryHistogramStatistics = "PaymentHistoryHistogramStatistics" |
45 | + // 用户相关的项目合约编号列表查询 | ||
46 | + RelevantCooperationContractNumbers = "RelevantCooperationContractNumbers" | ||
45 | ) | 47 | ) |
46 | 48 | ||
47 | // CooperationStatistics 共创统计 | 49 | // CooperationStatistics 共创统计 |
@@ -113,3 +115,38 @@ func (gateway HttplibAlliedCreationCooperation) CreditAccountStatistics(action s | @@ -113,3 +115,38 @@ func (gateway HttplibAlliedCreationCooperation) CreditAccountStatistics(action s | ||
113 | err = gateway.GetResponseData(result, &data) | 115 | err = gateway.GetResponseData(result, &data) |
114 | return &data, err | 116 | return &data, err |
115 | } | 117 | } |
118 | + | ||
119 | +// CreditAccountStatistics 账期结算单统计 | ||
120 | +func (gateway HttplibAlliedCreationCooperation) RelevantCooperationContractNumbers(action string, queryOptions interface{}) ([]string, error) { | ||
121 | + url := gateway.baseUrL + "/cooperation-statistics" | ||
122 | + method := "post" | ||
123 | + req := gateway.CreateRequest(url, method) | ||
124 | + log.Logger.Debug("向业务模块请求数据:共创统计。", map[string]interface{}{ | ||
125 | + "api": method + ":" + url, | ||
126 | + "param": queryOptions, | ||
127 | + }) | ||
128 | + param := map[string]interface{}{ | ||
129 | + "action": action, | ||
130 | + "queryOptions": queryOptions, | ||
131 | + } | ||
132 | + req, err := req.JSONBody(param) | ||
133 | + if err != nil { | ||
134 | + return nil, fmt.Errorf("请求共创统计失败:%w", err) | ||
135 | + } | ||
136 | + | ||
137 | + byteResult, err := req.Bytes() | ||
138 | + if err != nil { | ||
139 | + return nil, fmt.Errorf("获取共创统计失败:%w", err) | ||
140 | + } | ||
141 | + log.Logger.Debug("获取业务模块请求数据:共创统计。", map[string]interface{}{ | ||
142 | + "result": string(byteResult), | ||
143 | + }) | ||
144 | + var result service_gateway.GatewayResponse | ||
145 | + err = json.Unmarshal(byteResult, &result) | ||
146 | + if err != nil { | ||
147 | + return nil, fmt.Errorf("解析共创统计:%w", err) | ||
148 | + } | ||
149 | + var data []string | ||
150 | + err = gateway.GetResponseData(result, &data) | ||
151 | + return data, err | ||
152 | +} |
@@ -166,6 +166,8 @@ type ( | @@ -166,6 +166,8 @@ type ( | ||
166 | UserId int64 `json:"userId"` | 166 | UserId int64 `json:"userId"` |
167 | UserBaseId int64 `json:"userBaseId"` | 167 | UserBaseId int64 `json:"userBaseId"` |
168 | OrgIds []int64 `json:"orgIds"` | 168 | OrgIds []int64 `json:"orgIds"` |
169 | + // 共创模式状态,1启用,2禁用 | ||
170 | + Status int32 `json:"status"` | ||
169 | //模式编码列表 | 171 | //模式编码列表 |
170 | CooperationModeNumbers []string `cname:"模式编码列表" json:"cooperationModeNumbers,omitempty"` | 172 | CooperationModeNumbers []string `cname:"模式编码列表" json:"cooperationModeNumbers,omitempty"` |
171 | } | 173 | } |
@@ -90,6 +90,8 @@ type ( | @@ -90,6 +90,8 @@ 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 | + CooperationContractNumbers []string `json:"cooperationContractNumbers"` | ||
93 | } | 95 | } |
94 | 96 | ||
95 | DataCreditAccountsSearch struct { | 97 | DataCreditAccountsSearch struct { |
@@ -317,6 +317,8 @@ type ( | @@ -317,6 +317,8 @@ type ( | ||
317 | type ( | 317 | type ( |
318 | ReqUserAccessMenus struct { | 318 | ReqUserAccessMenus struct { |
319 | UserId int `json:"userId"` | 319 | UserId int `json:"userId"` |
320 | + // 当前登录组织orgId | ||
321 | + OrgId int64 `cname:"当前登录组织Id" json:"orgId"` | ||
320 | // 菜单类别 web app | 322 | // 菜单类别 web app |
321 | MenuCategory string `cname:"菜单类别 web app" json:"menuCategory,omitempty"` | 323 | MenuCategory string `cname:"菜单类别 web app" json:"menuCategory,omitempty"` |
322 | // 返回所有不可以用的菜单 | 324 | // 返回所有不可以用的菜单 |
-
请 注册 或 登录 后发表评论