|
@@ -3,7 +3,6 @@ package service |
|
@@ -3,7 +3,6 @@ package service |
3
|
import (
|
3
|
import (
|
4
|
"github.com/linmadan/egglib-go/core/application"
|
4
|
"github.com/linmadan/egglib-go/core/application"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
|
5
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
|
6
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto"
|
|
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
6
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
8
|
)
|
7
|
)
|
9
|
|
8
|
|
|
@@ -36,58 +35,31 @@ func (srv PersonDividendsService) SearchDividendContracts(cmd *command.SearchDiv |
|
@@ -36,58 +35,31 @@ func (srv PersonDividendsService) SearchDividendContracts(cmd *command.SearchDiv |
36
|
|
35
|
|
37
|
// DividendsStatistics 企业的合约统计(分红统计)
|
36
|
// DividendsStatistics 企业的合约统计(分红统计)
|
38
|
func (srv PersonDividendsService) DividendsStatistics(cmd *command.DividendsStatisticsCommand) (interface{}, error) {
|
37
|
func (srv PersonDividendsService) DividendsStatistics(cmd *command.DividendsStatisticsCommand) (interface{}, error) {
|
39
|
- //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
40
|
- // cmd.Operator)
|
|
|
41
|
- //result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{
|
|
|
42
|
- // "userBaseId":cmd.Operator.UserBaseId,
|
|
|
43
|
- //})
|
|
|
44
|
- //if err != nil {
|
|
|
45
|
- // return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
46
|
- //}
|
|
|
47
|
- //return result, nil
|
|
|
48
|
- return map[string]interface{}{
|
|
|
49
|
- "allDividends": map[string]interface{}{
|
|
|
50
|
- "sumTotal": 9000,
|
|
|
51
|
- "accounting": 6000,
|
|
|
52
|
- "accounted": 3000,
|
|
|
53
|
- "paid": 2000,
|
|
|
54
|
- },
|
|
|
55
|
- "annualDividends": map[string]interface{}{
|
|
|
56
|
- "sumTotal": 9000,
|
|
|
57
|
- "accounting": 6000,
|
|
|
58
|
- "accounted": 3000,
|
|
|
59
|
- "paid": 2000,
|
|
|
60
|
- },
|
|
|
61
|
- "quarterDividends": map[string]interface{}{
|
|
|
62
|
- "sumTotal": 9000,
|
|
|
63
|
- "accounting": 6000,
|
|
|
64
|
- "accounted": 3000,
|
|
|
65
|
- "paid": 2000,
|
|
|
66
|
- },
|
|
|
67
|
- }, nil
|
38
|
+ gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
39
|
+ cmd.Operator)
|
|
|
40
|
+ result, err := gateway.CooperationStatistics(allied_creation_cooperation.DividendsStatistics, map[string]interface{}{
|
|
|
41
|
+ "userBaseId": cmd.Operator.UserBaseId,
|
|
|
42
|
+ })
|
|
|
43
|
+ if err != nil {
|
|
|
44
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
45
|
+ }
|
|
|
46
|
+ return result, nil
|
68
|
}
|
47
|
}
|
69
|
|
48
|
|
70
|
// SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
|
49
|
// SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
|
71
|
func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
|
50
|
func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
|
72
|
- //gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
73
|
- // cmd.Operator)
|
|
|
74
|
- //result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{
|
|
|
75
|
- // "companyId":cmd.Operator.CompanyId,
|
|
|
76
|
- // //"orgId":cmd.Operator.OrgId,
|
|
|
77
|
- // "userBaseId":cmd.Operator.UserBaseId,
|
|
|
78
|
- // "dividendsAccountStatus":cmd.Status,
|
|
|
79
|
- // "offset":(cmd.PageNumber-1)*cmd.PageSize,
|
|
|
80
|
- // "limit":cmd.PageSize,
|
|
|
81
|
- //})
|
|
|
82
|
- //if err != nil {
|
|
|
83
|
- // return 0,nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
|
|
84
|
- //}
|
|
|
85
|
- //return 0,result, nil
|
|
|
86
|
- var items []*dto.DividendsEstimatesDto
|
|
|
87
|
- for i := 0; i < 2; i++ {
|
|
|
88
|
- item := dto.NewDividendsEstimatesDto()
|
|
|
89
|
- item.LoadDto()
|
|
|
90
|
- items = append(items, item)
|
51
|
+ gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
|
|
|
52
|
+ cmd.Operator)
|
|
|
53
|
+ result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{
|
|
|
54
|
+ "companyId": cmd.Operator.CompanyId,
|
|
|
55
|
+ //"orgId":cmd.Operator.OrgId,
|
|
|
56
|
+ "userBaseId": cmd.Operator.UserBaseId,
|
|
|
57
|
+ "dividendsAccountStatus": cmd.Status,
|
|
|
58
|
+ "offset": (cmd.PageNumber - 1) * cmd.PageSize,
|
|
|
59
|
+ "limit": cmd.PageSize,
|
|
|
60
|
+ })
|
|
|
61
|
+ if err != nil {
|
|
|
62
|
+ return 0, nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
|
91
|
}
|
63
|
}
|
92
|
- return 2, items, nil
|
64
|
+ return 0, result, nil
|
93
|
} |
65
|
} |