正在显示
10 个修改的文件
包含
349 行增加
和
75 行删除
@@ -10,6 +10,7 @@ import ( | @@ -10,6 +10,7 @@ import ( | ||
10 | type CreditAccountGetCommand struct { | 10 | type CreditAccountGetCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + CreditAccountId int | ||
13 | } | 14 | } |
14 | 15 | ||
15 | func (cmd *CreditAccountGetCommand) Valid(validation *validation.Validation) { | 16 | func (cmd *CreditAccountGetCommand) Valid(validation *validation.Validation) { |
@@ -10,6 +10,11 @@ import ( | @@ -10,6 +10,11 @@ import ( | ||
10 | type CreditAccountPayCommand struct { | 10 | type CreditAccountPayCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + CreditAccountId int | ||
14 | + // 账期结算实付金额 | ||
15 | + ActuallyPaidAmount float64 `cname:"账期结算实付金额" json:"actuallyPaidAmount" valid:"Required"` | ||
16 | + // 备注 | ||
17 | + Remarks string `cname:"备注" json:"remarks" valid:"Required"` | ||
13 | } | 18 | } |
14 | 19 | ||
15 | func (cmd *CreditAccountPayCommand) Valid(validation *validation.Validation) { | 20 | func (cmd *CreditAccountPayCommand) Valid(validation *validation.Validation) { |
@@ -10,6 +10,12 @@ import ( | @@ -10,6 +10,12 @@ import ( | ||
10 | type CreditAccountPaySearchCommand struct { | 10 | type CreditAccountPaySearchCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + // 查询偏离量 | ||
14 | + PageNumber int64 `json:"pageNumber"` | ||
15 | + // 查询限制 | ||
16 | + PageSize int64 `json:"pageSize" valid:"Required"` | ||
17 | + // 账期结算支付状态,1待支付,2已支付 0全部 | ||
18 | + PaymentStatus int32 `json:"paymentStatus"` | ||
13 | } | 19 | } |
14 | 20 | ||
15 | func (cmd *CreditAccountPaySearchCommand) Valid(validation *validation.Validation) { | 21 | func (cmd *CreditAccountPaySearchCommand) Valid(validation *validation.Validation) { |
1 | -package service | ||
2 | - | ||
3 | -import ( | ||
4 | - "github.com/linmadan/egglib-go/core/application" | ||
5 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | ||
6 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | ||
7 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
8 | -) | ||
9 | - | ||
10 | -// CompanyCreditAccountService 企业端账期结算 | ||
11 | -type CompanyCreditAccountService struct { | ||
12 | -} | ||
13 | - | ||
14 | -// IndexStatistics TODO:企业的账期结算列表(分红信息按合约划分) | ||
15 | -func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (interface{}, error) { | ||
16 | - gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
17 | - cmd.Operator) | ||
18 | - resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
19 | - PageNumber: cmd.PageNumber, | ||
20 | - PageSize: cmd.PageSize, | ||
21 | - PaymentStatus: cmd.PaymentStatus, | ||
22 | - }) | ||
23 | - if err != nil { | ||
24 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
25 | - } | ||
26 | - return resultMenu, nil | ||
27 | -} | ||
28 | - | ||
29 | -// IndexStatistics TODO:企业的账期结算明细 | ||
30 | -func (srv CompanyCreditAccountService) CreditAccountGet(userMenusCommand *command.CreditAccountGetCommand) (interface{}, error) { | ||
31 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
32 | - userMenusCommand.Operator) | ||
33 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
34 | - UserId: int(userMenusCommand.Operator.UserId), | ||
35 | - }) | ||
36 | - if err != nil { | ||
37 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
38 | - } | ||
39 | - return map[string]interface{}{ | ||
40 | - "accessMenus": resultMenu.Menus, | ||
41 | - }, nil | ||
42 | -} | ||
43 | - | ||
44 | -// IndexStatistics TODO:企业的账期结算支付 | ||
45 | -func (srv CompanyCreditAccountService) CreditAccountPay(userMenusCommand *command.CreditAccountPayCommand) (interface{}, error) { | ||
46 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
47 | - userMenusCommand.Operator) | ||
48 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
49 | - UserId: int(userMenusCommand.Operator.UserId), | ||
50 | - }) | ||
51 | - if err != nil { | ||
52 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
53 | - } | ||
54 | - return map[string]interface{}{ | ||
55 | - "accessMenus": resultMenu.Menus, | ||
56 | - }, nil | ||
57 | -} | ||
58 | - | ||
59 | -// IndexStatistics TODO:企业分红结算支付记录 | ||
60 | -func (srv CompanyCreditAccountService) CreditAccountPaySearch(userMenusCommand *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
61 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
62 | - userMenusCommand.Operator) | ||
63 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
64 | - UserId: int(userMenusCommand.Operator.UserId), | ||
65 | - }) | ||
66 | - if err != nil { | ||
67 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
68 | - } | ||
69 | - return map[string]interface{}{ | ||
70 | - "accessMenus": resultMenu.Menus, | ||
71 | - }, nil | ||
72 | -} |
@@ -9,7 +9,7 @@ import ( | @@ -9,7 +9,7 @@ import ( | ||
9 | type CompanyDividendsService struct { | 9 | type CompanyDividendsService struct { |
10 | } | 10 | } |
11 | 11 | ||
12 | -// IndexStatistics TODO:企业的合约列表(分红信息按合约划分) | 12 | +// GetDividendContracts 企业的合约列表(分红信息按合约划分) |
13 | func (srv CompanyStatisticsService) GetDividendContracts(userMenusCommand *command.GetDividendContractsCommand) (interface{}, error) { | 13 | func (srv CompanyStatisticsService) GetDividendContracts(userMenusCommand *command.GetDividendContractsCommand) (interface{}, error) { |
14 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | 14 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( |
15 | // userMenusCommand.Operator) | 15 | // userMenusCommand.Operator) |
@@ -30,7 +30,7 @@ func (srv CompanyStatisticsService) GetDividendContracts(userMenusCommand *comma | @@ -30,7 +30,7 @@ func (srv CompanyStatisticsService) GetDividendContracts(userMenusCommand *comma | ||
30 | }, nil | 30 | }, nil |
31 | } | 31 | } |
32 | 32 | ||
33 | -// IndexStatistics TODO:企业的合约统计(分红统计) | 33 | +// DividendsStatistics TODO:企业的合约统计(分红统计) |
34 | func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *command.DividendsStatisticsCommand) (interface{}, error) { | 34 | func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *command.DividendsStatisticsCommand) (interface{}, error) { |
35 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | 35 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( |
36 | // userMenusCommand.Operator) | 36 | // userMenusCommand.Operator) |
@@ -48,7 +48,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman | @@ -48,7 +48,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman | ||
48 | }, nil | 48 | }, nil |
49 | } | 49 | } |
50 | 50 | ||
51 | -// IndexStatistics 企业的合约明细列表(分红预算信息) | 51 | +// SearchDividendsEstimates 企业的合约明细列表(分红预算信息) |
52 | func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) { | 52 | func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) { |
53 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | 53 | //creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( |
54 | // userMenusCommand.Operator) | 54 | // userMenusCommand.Operator) |
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | ||
7 | +) | ||
8 | + | ||
9 | +// CompanyCreditAccountService 企业端账期结算 | ||
10 | +type CompanyCreditAccountService struct { | ||
11 | +} | ||
12 | + | ||
13 | +// CreditAccountSearch 企业的账期结算列表 | ||
14 | +func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (interface{}, error) { | ||
15 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
16 | + cmd.Operator) | ||
17 | + resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
18 | + PageNumber: cmd.PageNumber, | ||
19 | + PageSize: cmd.PageSize, | ||
20 | + PaymentStatus: cmd.PaymentStatus, | ||
21 | + }) | ||
22 | + if err != nil { | ||
23 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
24 | + } | ||
25 | + return resultMenu, nil | ||
26 | +} | ||
27 | + | ||
28 | +// CreditAccountGet 企业的账期结算明细 | ||
29 | +func (srv CompanyCreditAccountService) CreditAccountGet(cmd *command.CreditAccountGetCommand) (interface{}, error) { | ||
30 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
31 | + cmd.Operator) | ||
32 | + resultMenu, err := gateway.CreditAccountGet(allied_creation_cooperation.ReqCreditAccountGet{ | ||
33 | + CreditAccountId: cmd.CreditAccountId, | ||
34 | + }) | ||
35 | + if err != nil { | ||
36 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
37 | + } | ||
38 | + return resultMenu, nil | ||
39 | +} | ||
40 | + | ||
41 | +// CreditAccountDelete 企业的账期结算删除 | ||
42 | +func (srv CompanyCreditAccountService) CreditAccountDelete(cmd *command.CreditAccountGetCommand) (interface{}, error) { | ||
43 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
44 | + cmd.Operator) | ||
45 | + resultMenu, err := gateway.CreditAccountRemove(allied_creation_cooperation.ReqCreditAccountRemove{ | ||
46 | + CreditAccountId: cmd.CreditAccountId, | ||
47 | + }) | ||
48 | + if err != nil { | ||
49 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
50 | + } | ||
51 | + return resultMenu, nil | ||
52 | +} | ||
53 | + | ||
54 | +// CreditAccountPay 企业的账期结算支付 | ||
55 | +func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccountPayCommand) (interface{}, error) { | ||
56 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
57 | + cmd.Operator) | ||
58 | + resultMenu, err := gateway.CreditAccountsPay(allied_creation_cooperation.ReqCreditAccountsPay{ | ||
59 | + CreditAccountId: cmd.CreditAccountId, | ||
60 | + }) | ||
61 | + if err != nil { | ||
62 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
63 | + } | ||
64 | + return resultMenu, nil | ||
65 | +} | ||
66 | + | ||
67 | +// CreditAccountPaySearch 企业分红结算支付记录 | ||
68 | +func (srv CompanyCreditAccountService) CreditAccountPaySearch(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
69 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
70 | + cmd.Operator) | ||
71 | + resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
72 | + PageNumber: cmd.PageNumber, | ||
73 | + PageSize: cmd.PageSize, | ||
74 | + PaymentStatus: 2, | ||
75 | + }) | ||
76 | + if err != nil { | ||
77 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
78 | + } | ||
79 | + return map[string]interface{}{ | ||
80 | + "list": resultMenu, | ||
81 | + "sum": 6000, | ||
82 | + }, nil | ||
83 | +} | ||
84 | + | ||
85 | +// PaymentHistoryStatistics 支付历史统计 | ||
86 | +func (srv CompanyCreditAccountService) PaymentHistoryStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
87 | + //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
88 | + // cmd.Operator) | ||
89 | + //resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
90 | + // PageNumber: cmd.PageNumber, | ||
91 | + // PageSize: cmd.PageSize, | ||
92 | + // PaymentStatus: 2, | ||
93 | + //}) | ||
94 | + //if err != nil { | ||
95 | + // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
96 | + //} | ||
97 | + return map[string]interface{}{ | ||
98 | + "rankItems": []struct{}{}, | ||
99 | + "totalPaymentAmount": 6000, | ||
100 | + }, nil | ||
101 | +} | ||
102 | + | ||
103 | +// PaymentHistoryHistogramStatistics 支付历史统计-直方图 | ||
104 | +func (srv CompanyCreditAccountService) PaymentHistoryHistogramStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
105 | + //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
106 | + // cmd.Operator) | ||
107 | + //resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
108 | + // PageNumber: cmd.PageNumber, | ||
109 | + // PageSize: cmd.PageSize, | ||
110 | + // PaymentStatus: 2, | ||
111 | + //}) | ||
112 | + //if err != nil { | ||
113 | + // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
114 | + //} | ||
115 | + return map[string]interface{}{ | ||
116 | + "xAxis": map[string]interface{}{ | ||
117 | + "data": []string{"7-5", "7-15", "7-25"}, | ||
118 | + }, | ||
119 | + "yAxis": struct{}{}, | ||
120 | + "source": map[string]interface{}{ | ||
121 | + "value": []float64{60, 80, 90}, | ||
122 | + }, | ||
123 | + }, nil | ||
124 | +} |
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | ||
7 | +) | ||
8 | + | ||
9 | +// PersonCreditAccountService 企业端账期结算 | ||
10 | +type PersonCreditAccountService struct { | ||
11 | +} | ||
12 | + | ||
13 | +//// CreditAccountSearch 企业的账期结算列表 | ||
14 | +//func (srv PersonCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (interface{}, error) { | ||
15 | +// gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
16 | +// cmd.Operator) | ||
17 | +// resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
18 | +// PageNumber: cmd.PageNumber, | ||
19 | +// PageSize: cmd.PageSize, | ||
20 | +// PaymentStatus: cmd.PaymentStatus, | ||
21 | +// }) | ||
22 | +// if err != nil { | ||
23 | +// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
24 | +// } | ||
25 | +// return resultMenu, nil | ||
26 | +//} | ||
27 | + | ||
28 | +// CreditAccountGet 企业的账期结算明细 | ||
29 | +func (srv PersonCreditAccountService) CreditAccountGet(cmd *command.CreditAccountGetCommand) (interface{}, error) { | ||
30 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
31 | + cmd.Operator) | ||
32 | + resultMenu, err := gateway.CreditAccountGet(allied_creation_cooperation.ReqCreditAccountGet{ | ||
33 | + CreditAccountId: cmd.CreditAccountId, | ||
34 | + }) | ||
35 | + if err != nil { | ||
36 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
37 | + } | ||
38 | + return resultMenu, nil | ||
39 | +} | ||
40 | + | ||
41 | +//// CreditAccountDelete 企业的账期结算删除 | ||
42 | +//func (srv PersonCreditAccountService) CreditAccountDelete(cmd *command.CreditAccountGetCommand) (interface{}, error) { | ||
43 | +// gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
44 | +// cmd.Operator) | ||
45 | +// resultMenu, err := gateway.CreditAccountRemove(allied_creation_cooperation.ReqCreditAccountRemove{ | ||
46 | +// CreditAccountId: cmd.CreditAccountId, | ||
47 | +// }) | ||
48 | +// if err != nil { | ||
49 | +// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
50 | +// } | ||
51 | +// return resultMenu, nil | ||
52 | +//} | ||
53 | +// | ||
54 | +//// CreditAccountPay 企业的账期结算支付 | ||
55 | +//func (srv PersonCreditAccountService) CreditAccountPay(cmd *command.CreditAccountPayCommand) (interface{}, error) { | ||
56 | +// gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
57 | +// cmd.Operator) | ||
58 | +// resultMenu, err := gateway.CreditAccountsPay(allied_creation_cooperation.ReqCreditAccountsPay{ | ||
59 | +// CreditAccountId: cmd.CreditAccountId, | ||
60 | +// }) | ||
61 | +// if err != nil { | ||
62 | +// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
63 | +// } | ||
64 | +// return resultMenu, nil | ||
65 | +//} | ||
66 | + | ||
67 | +// CreditAccountPaySearch 企业分红结算支付记录 | ||
68 | +func (srv PersonCreditAccountService) CreditAccountPaySearch(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
69 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
70 | + cmd.Operator) | ||
71 | + resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
72 | + PageNumber: cmd.PageNumber, | ||
73 | + PageSize: cmd.PageSize, | ||
74 | + PaymentStatus: 2, | ||
75 | + }) | ||
76 | + if err != nil { | ||
77 | + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
78 | + } | ||
79 | + return map[string]interface{}{ | ||
80 | + "list": resultMenu, | ||
81 | + "sum": 6000, | ||
82 | + }, nil | ||
83 | +} | ||
84 | + | ||
85 | +// PaymentHistoryStatistics 支付历史统计 | ||
86 | +func (srv PersonCreditAccountService) PaymentHistoryStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
87 | + //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
88 | + // cmd.Operator) | ||
89 | + //resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
90 | + // PageNumber: cmd.PageNumber, | ||
91 | + // PageSize: cmd.PageSize, | ||
92 | + // PaymentStatus: 2, | ||
93 | + //}) | ||
94 | + //if err != nil { | ||
95 | + // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
96 | + //} | ||
97 | + return map[string]interface{}{ | ||
98 | + "rankItems": []struct{}{}, | ||
99 | + "totalPaymentAmount": 6000, | ||
100 | + }, nil | ||
101 | +} | ||
102 | + | ||
103 | +// PaymentHistoryHistogramStatistics 支付历史统计-直方图 | ||
104 | +func (srv PersonCreditAccountService) PaymentHistoryHistogramStatistics(cmd *command.CreditAccountPaySearchCommand) (interface{}, error) { | ||
105 | + //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
106 | + // cmd.Operator) | ||
107 | + //resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{ | ||
108 | + // PageNumber: cmd.PageNumber, | ||
109 | + // PageSize: cmd.PageSize, | ||
110 | + // PaymentStatus: 2, | ||
111 | + //}) | ||
112 | + //if err != nil { | ||
113 | + // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
114 | + //} | ||
115 | + return map[string]interface{}{ | ||
116 | + "xAxis": map[string]interface{}{ | ||
117 | + "data": []string{"7-5", "7-15", "7-25"}, | ||
118 | + }, | ||
119 | + "yAxis": struct{}{}, | ||
120 | + "source": map[string]interface{}{ | ||
121 | + "value": []float64{60, 80, 90}, | ||
122 | + }, | ||
123 | + }, nil | ||
124 | +} |
@@ -14,6 +14,11 @@ type ( | @@ -14,6 +14,11 @@ type ( | ||
14 | //支付账期结算 | 14 | //支付账期结算 |
15 | type ( | 15 | type ( |
16 | ReqCreditAccountsPay struct { | 16 | ReqCreditAccountsPay struct { |
17 | + // 账期结算实付金额 | ||
18 | + ActuallyPaidAmount float64 `cname:"账期结算实付金额" json:"actuallyPaidAmount" valid:"Required"` | ||
19 | + // 备注 | ||
20 | + Remarks string `cname:"备注" json:"remarks" valid:"Required"` | ||
21 | + CreditAccountId int | ||
17 | } | 22 | } |
18 | 23 | ||
19 | DataCreditAccountsPay struct { | 24 | DataCreditAccountsPay struct { |
@@ -247,6 +247,7 @@ func (controller *CooperationController) CreditAccountGet() { | @@ -247,6 +247,7 @@ func (controller *CooperationController) CreditAccountGet() { | ||
247 | if err != nil { | 247 | if err != nil { |
248 | log.Logger.Error(err.Error()) | 248 | log.Logger.Error(err.Error()) |
249 | } | 249 | } |
250 | + cmd.CreditAccountId, _ = controller.GetInt(":creditAccountId") | ||
250 | cmd.Operator = controller.GetOperator() | 251 | cmd.Operator = controller.GetOperator() |
251 | data, err := svr.CreditAccountGet(cmd) | 252 | data, err := svr.CreditAccountGet(cmd) |
252 | controller.Response(data, err) | 253 | controller.Response(data, err) |
@@ -276,6 +277,79 @@ func (controller *CooperationController) CreditAccountPaySearch() { | @@ -276,6 +277,79 @@ func (controller *CooperationController) CreditAccountPaySearch() { | ||
276 | controller.Response(data, err) | 277 | controller.Response(data, err) |
277 | } | 278 | } |
278 | 279 | ||
280 | +func (controller *CooperationController) DeleteAccountPaySearch() { | ||
281 | + svr := service.CompanyCreditAccountService{} | ||
282 | + cmd := &command.CreditAccountGetCommand{} | ||
283 | + err := controller.Unmarshal(cmd) | ||
284 | + if err != nil { | ||
285 | + log.Logger.Error(err.Error()) | ||
286 | + } | ||
287 | + cmd.CreditAccountId, _ = controller.GetInt(":creditAccountId") | ||
288 | + cmd.Operator = controller.GetOperator() | ||
289 | + data, err := svr.CreditAccountDelete(cmd) | ||
290 | + controller.Response(data, err) | ||
291 | +} | ||
292 | + | ||
293 | +func (controller *CooperationController) PaymentHistoryStatistics() { | ||
294 | + svr := service.CompanyCreditAccountService{} | ||
295 | + cmd := &command.CreditAccountPaySearchCommand{} | ||
296 | + err := controller.Unmarshal(cmd) | ||
297 | + if err != nil { | ||
298 | + log.Logger.Error(err.Error()) | ||
299 | + } | ||
300 | + cmd.Operator = controller.GetOperator() | ||
301 | + data, err := svr.PaymentHistoryStatistics(cmd) | ||
302 | + controller.Response(data, err) | ||
303 | +} | ||
304 | + | ||
305 | +func (controller *CooperationController) PaymentHistoryHistogramStatistics() { | ||
306 | + svr := service.CompanyCreditAccountService{} | ||
307 | + cmd := &command.CreditAccountPaySearchCommand{} | ||
308 | + err := controller.Unmarshal(cmd) | ||
309 | + if err != nil { | ||
310 | + log.Logger.Error(err.Error()) | ||
311 | + } | ||
312 | + cmd.Operator = controller.GetOperator() | ||
313 | + data, err := svr.PaymentHistoryHistogramStatistics(cmd) | ||
314 | + controller.Response(data, err) | ||
315 | +} | ||
316 | + | ||
317 | +func (controller *CooperationController) PersonCreditAccountPaySearch() { | ||
318 | + svr := service.PersonCreditAccountService{} | ||
319 | + cmd := &command.CreditAccountPaySearchCommand{} | ||
320 | + err := controller.Unmarshal(cmd) | ||
321 | + if err != nil { | ||
322 | + log.Logger.Error(err.Error()) | ||
323 | + } | ||
324 | + cmd.Operator = controller.GetOperator() | ||
325 | + data, err := svr.CreditAccountPaySearch(cmd) | ||
326 | + controller.Response(data, err) | ||
327 | +} | ||
328 | + | ||
329 | +func (controller *CooperationController) PersonPaymentHistoryStatistics() { | ||
330 | + svr := service.PersonCreditAccountService{} | ||
331 | + cmd := &command.CreditAccountPaySearchCommand{} | ||
332 | + err := controller.Unmarshal(cmd) | ||
333 | + if err != nil { | ||
334 | + log.Logger.Error(err.Error()) | ||
335 | + } | ||
336 | + cmd.Operator = controller.GetOperator() | ||
337 | + data, err := svr.PaymentHistoryStatistics(cmd) | ||
338 | + controller.Response(data, err) | ||
339 | +} | ||
340 | + | ||
341 | +func (controller *CooperationController) PersonPaymentHistoryHistogramStatistics() { | ||
342 | + svr := service.PersonCreditAccountService{} | ||
343 | + cmd := &command.CreditAccountPaySearchCommand{} | ||
344 | + err := controller.Unmarshal(cmd) | ||
345 | + if err != nil { | ||
346 | + log.Logger.Error(err.Error()) | ||
347 | + } | ||
348 | + cmd.Operator = controller.GetOperator() | ||
349 | + data, err := svr.PaymentHistoryHistogramStatistics(cmd) | ||
350 | + controller.Response(data, err) | ||
351 | +} | ||
352 | + | ||
279 | /***** CompanyDividends 企业端分红 *****/ | 353 | /***** CompanyDividends 企业端分红 *****/ |
280 | func (controller *CooperationController) GetDividendContracts() { | 354 | func (controller *CooperationController) GetDividendContracts() { |
281 | svr := service.CompanyStatisticsService{} | 355 | svr := service.CompanyStatisticsService{} |
@@ -38,10 +38,17 @@ func init() { | @@ -38,10 +38,17 @@ func init() { | ||
38 | web.Router("/v1/app/cooperation-projects/person/search", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationProject") | 38 | web.Router("/v1/app/cooperation-projects/person/search", &mobile_client.CooperationController{}, "Post:PersonSearchCooperationProject") |
39 | 39 | ||
40 | /***** CompanyDividends 账期结算 *****/ | 40 | /***** CompanyDividends 账期结算 *****/ |
41 | + /***** CompanyDividends 账期结算 *****/ | ||
41 | web.Router("/v1/app/company/credit-accounts/search", &mobile_client.CooperationController{}, "Post:CreditAccountSearch") | 42 | web.Router("/v1/app/company/credit-accounts/search", &mobile_client.CooperationController{}, "Post:CreditAccountSearch") |
42 | web.Router("/v1/app/company/credit-accounts/:creditId", &mobile_client.CooperationController{}, "Get:CreditAccountGet") | 43 | web.Router("/v1/app/company/credit-accounts/:creditId", &mobile_client.CooperationController{}, "Get:CreditAccountGet") |
43 | web.Router("/v1/app/company/credit-accounts/pay", &mobile_client.CooperationController{}, "Post:CreditAccountPay") | 44 | web.Router("/v1/app/company/credit-accounts/pay", &mobile_client.CooperationController{}, "Post:CreditAccountPay") |
44 | web.Router("/v1/app/company/credit-accounts/pay/search", &mobile_client.CooperationController{}, "Post:CreditAccountPaySearch") | 45 | web.Router("/v1/app/company/credit-accounts/pay/search", &mobile_client.CooperationController{}, "Post:CreditAccountPaySearch") |
46 | + web.Router("/v1/app/company/credit-accounts/payment-history/statistics", &mobile_client.CooperationController{}, "Post:PaymentHistoryStatistics") | ||
47 | + web.Router("/v1/app/company/credit-accounts/payment-history/histogram-statistics", &mobile_client.CooperationController{}, "Post:PaymentHistoryHistogramStatistics") | ||
48 | + | ||
49 | + web.Router("/v1/app/company/credit-accounts/pay/search/person", &mobile_client.CooperationController{}, "Post:PersonCreditAccountPaySearch") | ||
50 | + web.Router("/v1/app/credit-accounts/payment-history/statistics", &mobile_client.CooperationController{}, "Post:PersonPaymentHistoryStatistics") | ||
51 | + web.Router("/v1/app/credit-accounts/payment-history/histogram-statistics", &mobile_client.CooperationController{}, "Post:PersonPaymentHistoryHistogramStatistics") | ||
45 | 52 | ||
46 | /***** CompanyDividends 企业端分红 *****/ | 53 | /***** CompanyDividends 企业端分红 *****/ |
47 | web.Router("/v1/app/cooperation/company/dividends/contracts", &mobile_client.CooperationController{}, "Post:GetDividendContracts") | 54 | web.Router("/v1/app/cooperation/company/dividends/contracts", &mobile_client.CooperationController{}, "Post:GetDividendContracts") |
-
请 注册 或 登录 后发表评论