作者 tangxvhui

添加 新的统计方法

@@ -2,12 +2,13 @@ package dividend @@ -2,12 +2,13 @@ package dividend
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
  5 + "time"
  6 +
5 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory" 7 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory"
6 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain" 8 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
7 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils" 9 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
8 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log" 10 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
9 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol" 11 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
10 - "time"  
11 ) 12 )
12 13
13 // 分红统计 14 // 分红统计
@@ -25,7 +26,13 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DividendStatis @@ -25,7 +26,13 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DividendStatis
25 }() 26 }()
26 27
27 // 事业分红统计-查询订单 28 // 事业分红统计-查询订单
28 - _, orderAll, e := OrderBaseResponsitory.Find(utils.ObjectJsonToMap(domain.OrderQueryOption{PartnerId: request.PartnerId, EndTime: utils.GetDayEnd(), SortBySalesTime: domain.DESC, OrderTypes: domain.UserOrderTypes(domain.Career)})) 29 + _, orderAll, e := OrderBaseResponsitory.Find(utils.ObjectJsonToMap(
  30 + domain.OrderQueryOption{
  31 + PartnerId: request.PartnerId,
  32 + EndTime: utils.GetDayEnd(),
  33 + SortBySalesTime: domain.DESC,
  34 + OrderTypes: domain.UserOrderTypes(domain.Career),
  35 + }))
29 if e != nil { 36 if e != nil {
30 log.Error(e) 37 log.Error(e)
31 } 38 }
@@ -122,8 +129,8 @@ func AllBonusStatics(orders []*domain.OrderBase, action int) (bonus protocol.Bon @@ -122,8 +129,8 @@ func AllBonusStatics(orders []*domain.OrderBase, action int) (bonus protocol.Bon
122 } 129 }
123 130
124 // 订单-季度分红统计 131 // 订单-季度分红统计
125 -func QuartersBonusStatics(orders []*domain.OrderBase, action int) (bonus []protocol.Bonus) {  
126 - bonus = make([]protocol.Bonus, 4) 132 +func QuartersBonusStatics(orders []*domain.OrderBase, action int) (bonus [4]protocol.Bonus) {
  133 + bonus = [4]protocol.Bonus{}
127 for i := range orders { 134 for i := range orders {
128 o := orders[i] 135 o := orders[i]
129 quarter := quarter(o.SaleDate) 136 quarter := quarter(o.SaleDate)
  1 +package dividend
  2 +
  3 +import (
  4 + "fmt"
  5 + "time"
  6 +
  7 + "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory"
  8 + "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
  9 + "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
  10 + "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
  11 + "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
  12 +)
  13 +
  14 +// 分红统计
  15 +func StatisticsV2(header *protocol.RequestHeader, request *protocol.DividendStatisticsRequest) (rsp *protocol.DividendStatisticsV2Response, err error) {
  16 + var (
  17 + transactionContext, _ = factory.CreateTransactionContext(nil)
  18 + OrderBaseResponsitory, _ = factory.CreateOrderBaseRepository(transactionContext)
  19 + )
  20 + if err = transactionContext.StartTransaction(); err != nil {
  21 + return nil, err
  22 + }
  23 + defer func() {
  24 + transactionContext.RollbackTransaction()
  25 + }()
  26 +
  27 + // 事业分红统计-查询订单
  28 + _, orderAll, e := OrderBaseResponsitory.Find(utils.ObjectJsonToMap(
  29 + domain.OrderQueryOption{
  30 + PartnerId: request.PartnerId,
  31 + EndTime: utils.GetDayEnd(),
  32 + SortBySalesTime: domain.DESC,
  33 + OrderTypes: domain.UserOrderTypes(domain.Career),
  34 + }))
  35 + if e != nil {
  36 + log.Error(e)
  37 + }
  38 + err = transactionContext.CommitTransaction()
  39 + if e != nil {
  40 + return nil, err
  41 + }
  42 + //获取营销年
  43 + t := time.Now()
  44 + var last time.Time
  45 + var first time.Time
  46 + boundDate := time.Date(t.Year(), time.March, 31, 23, 59, 59, 0, time.Local) // 营销年界限
  47 + fmt.Println("营销年界限:", boundDate)
  48 + if t.Before(boundDate) || t.Equal(boundDate) {
  49 + first = time.Date(t.Year()-1, time.April, 1, 0, 0, 0, 0, time.Local)
  50 + last = time.Date(t.Year(), time.March, 31, 23, 59, 59, 0, time.Local)
  51 + } else if t.After(boundDate) {
  52 + first = time.Date(t.Year(), time.April, 1, 0, 0, 0, 0, time.Local)
  53 + last = time.Date(t.Year()+1, time.March, 31, 23, 59, 59, 0, time.Local)
  54 + }
  55 + fmt.Println("当前营销年起始:", first, last)
  56 + // 请求开始时间和结束时间都为0时,默认从营销年开始统计
  57 + if request.StartTime == 0 && request.EndTime == 0 {
  58 + request.StartTime = first.Unix() * 1000
  59 + request.EndTime = last.Unix() * 1000
  60 + } else if request.StartTime > 0 && request.EndTime > 0 { // 判断结束时间是否超过今天,超过今天的结束时间到今天为止
  61 + currentDayEnd := utils.GetDayEnd().Unix() * 1000
  62 + if request.EndTime >= currentDayEnd {
  63 + request.EndTime = currentDayEnd
  64 + }
  65 + }
  66 +
  67 + fmt.Println("StartTime: ", request.StartTime)
  68 + fmt.Println("EndTime: ", request.EndTime)
  69 +
  70 + var orderBetween []*domain.OrderBase
  71 + for i := range orderAll {
  72 + if orderAll[i].SaleDate.Unix() >= (request.StartTime/1000) && orderAll[i].SaleDate.Unix() < (request.EndTime/1000) {
  73 + orderBetween = append(orderBetween, orderAll[i])
  74 + }
  75 + }
  76 + //0:全部分类,
  77 + //Career int = 1 //事业
  78 + //Business int = 2 //业务
  79 + //Develop int = 3 //研发
  80 + //App int = 4 //业务产品-应用
  81 + //累计分红
  82 + var (
  83 + bonusAll protocol.Bonus
  84 + bonusAllCareer protocol.Bonus
  85 + bonusAllBusiness protocol.Bonus
  86 + bonusAllDevelop protocol.Bonus
  87 + bonusAllApp protocol.Bonus
  88 + )
  89 + for _, val := range orderAll {
  90 + static := val.OrderBonusStatic()
  91 + bonusAll.Received = utils.Decimal(bonusAll.Received + static.OrderBonusReceive())
  92 + bonusAll.Outstanding = utils.Decimal(bonusAll.Outstanding + static.OrderBonusWait())
  93 + bonusAll.Receivable = utils.Decimal(bonusAll.Receivable + static.OrderTotalReceivable())
  94 + if val.PartnerCategory == nil {
  95 + continue
  96 + }
  97 + switch val.PartnerCategory.Id {
  98 + case int64(domain.Career):
  99 + bonusAllCareer.Received = utils.Decimal(bonusAllCareer.Received + static.OrderBonusReceive())
  100 + bonusAllCareer.Outstanding = utils.Decimal(bonusAllCareer.Outstanding + static.OrderBonusWait())
  101 + bonusAllCareer.Receivable = utils.Decimal(bonusAllCareer.Receivable + static.OrderTotalReceivable())
  102 + case int64(domain.Business):
  103 + bonusAllBusiness.Received = utils.Decimal(bonusAllBusiness.Received + static.OrderBonusReceive())
  104 + bonusAllBusiness.Outstanding = utils.Decimal(bonusAllBusiness.Outstanding + static.OrderBonusWait())
  105 + bonusAllBusiness.Receivable = utils.Decimal(bonusAllBusiness.Receivable + static.OrderTotalReceivable())
  106 + case int64(domain.App):
  107 + bonusAllApp.Received = utils.Decimal(bonusAllApp.Received + static.OrderBonusReceive())
  108 + bonusAllApp.Outstanding = utils.Decimal(bonusAllApp.Outstanding + static.OrderBonusWait())
  109 + bonusAllApp.Receivable = utils.Decimal(bonusAllApp.Receivable + static.OrderTotalReceivable())
  110 + case int64(domain.Develop):
  111 + bonusAllDevelop.Received = utils.Decimal(bonusAllDevelop.Received + static.OrderBonusReceive())
  112 + bonusAllDevelop.Outstanding = utils.Decimal(bonusAllDevelop.Outstanding + static.OrderBonusWait())
  113 + bonusAllDevelop.Receivable = utils.Decimal(bonusAllDevelop.Receivable + static.OrderTotalReceivable())
  114 + }
  115 + }
  116 + //0:全部分类,
  117 + //Career int = 1 //事业
  118 + //Business int = 2 //业务
  119 + //Develop int = 3 //研发
  120 + //App int = 4 //业务产品-应用
  121 + //季度分红
  122 + var (
  123 + bonusQuarters = [4]protocol.Bonus{}
  124 + bonusQuartersCareer = [4]protocol.Bonus{}
  125 + bonusQuartersBusiness = [4]protocol.Bonus{}
  126 + bonusQuartersDevelop = [4]protocol.Bonus{}
  127 + bonusQuartersApp = [4]protocol.Bonus{}
  128 + )
  129 + //月度分红
  130 + var (
  131 + bonusMonths = [12]protocol.Bonus{}
  132 + bonusMonthsCareer = [12]protocol.Bonus{}
  133 + bonusMonthsBusiness = [12]protocol.Bonus{}
  134 + bonusMonthsDevelop = [12]protocol.Bonus{}
  135 + bonusMonthsApp = [12]protocol.Bonus{}
  136 + )
  137 + var (
  138 + quarterNum int // 对应季度在数组中的位置
  139 + monthNum int //对应月份在数组中的位置
  140 + )
  141 + for _, val := range orderBetween {
  142 + quarterNum = quarter(val.SaleDate)
  143 + monthNum = int(val.SaleDate.Month()) - 1
  144 + static := val.OrderBonusStatic()
  145 + bonusQuarters[quarterNum].Receivable = utils.Decimal(bonusQuarters[quarterNum].Receivable + static.OrderTotalReceivable())
  146 + bonusQuarters[quarterNum].Received = utils.Decimal(bonusQuarters[quarterNum].Received + static.OrderBonusReceive())
  147 + bonusQuarters[quarterNum].Outstanding = utils.Decimal(bonusQuarters[quarterNum].Outstanding + static.OrderBonusWait())
  148 +
  149 + bonusMonths[monthNum].Receivable = utils.Decimal(bonusMonths[monthNum].Receivable + static.OrderTotalReceivable())
  150 + bonusMonths[monthNum].Received = utils.Decimal(bonusMonths[monthNum].Received + static.OrderBonusReceive())
  151 + bonusMonths[monthNum].Outstanding = utils.Decimal(bonusMonths[monthNum].Outstanding + static.OrderBonusWait())
  152 + if val.PartnerCategory == nil {
  153 + continue
  154 + }
  155 + // 分类合并计数
  156 + switch val.PartnerCategory.Id {
  157 + case int64(domain.Career):
  158 + bonusQuartersCareer[quarterNum].Receivable = utils.Decimal(bonusQuartersCareer[quarterNum].Receivable + static.OrderTotalReceivable())
  159 + bonusQuartersCareer[quarterNum].Received = utils.Decimal(bonusQuartersCareer[quarterNum].Received + static.OrderBonusReceive())
  160 + bonusQuartersCareer[quarterNum].Outstanding = utils.Decimal(bonusQuartersCareer[quarterNum].Outstanding + static.OrderBonusWait())
  161 +
  162 + bonusMonthsCareer[monthNum].Receivable = utils.Decimal(bonusMonthsCareer[monthNum].Receivable + static.OrderTotalReceivable())
  163 + bonusMonthsCareer[monthNum].Received = utils.Decimal(bonusMonthsCareer[monthNum].Received + static.OrderBonusReceive())
  164 + bonusMonthsCareer[monthNum].Outstanding = utils.Decimal(bonusMonthsCareer[monthNum].Outstanding + static.OrderBonusWait())
  165 + case int64(domain.Business):
  166 + bonusQuartersBusiness[quarterNum].Receivable = utils.Decimal(bonusQuartersBusiness[quarterNum].Receivable + static.OrderTotalReceivable())
  167 + bonusQuartersBusiness[quarterNum].Received = utils.Decimal(bonusQuartersBusiness[quarterNum].Received + static.OrderBonusReceive())
  168 + bonusQuartersBusiness[quarterNum].Outstanding = utils.Decimal(bonusQuartersBusiness[quarterNum].Outstanding + static.OrderBonusWait())
  169 +
  170 + bonusMonthsBusiness[monthNum].Receivable = utils.Decimal(bonusMonthsBusiness[monthNum].Receivable + static.OrderTotalReceivable())
  171 + bonusMonthsBusiness[monthNum].Received = utils.Decimal(bonusMonthsBusiness[monthNum].Received + static.OrderBonusReceive())
  172 + bonusMonthsBusiness[monthNum].Outstanding = utils.Decimal(bonusMonthsBusiness[monthNum].Outstanding + static.OrderBonusWait())
  173 + case int64(domain.App):
  174 + bonusQuartersApp[quarterNum].Receivable = utils.Decimal(bonusQuartersApp[quarterNum].Receivable + static.OrderTotalReceivable())
  175 + bonusQuartersApp[quarterNum].Received = utils.Decimal(bonusQuartersApp[quarterNum].Received + static.OrderBonusReceive())
  176 + bonusQuartersApp[quarterNum].Outstanding = utils.Decimal(bonusQuartersApp[quarterNum].Outstanding + static.OrderBonusWait())
  177 +
  178 + bonusMonthsApp[monthNum].Receivable = utils.Decimal(bonusMonthsApp[monthNum].Receivable + static.OrderTotalReceivable())
  179 + bonusMonthsApp[monthNum].Received = utils.Decimal(bonusMonthsApp[monthNum].Received + static.OrderBonusReceive())
  180 + bonusMonthsApp[monthNum].Outstanding = utils.Decimal(bonusMonthsApp[monthNum].Outstanding + static.OrderBonusWait())
  181 + case int64(domain.Develop):
  182 + bonusQuartersDevelop[quarterNum].Receivable = utils.Decimal(bonusQuartersDevelop[quarterNum].Receivable + static.OrderTotalReceivable())
  183 + bonusQuartersDevelop[quarterNum].Received = utils.Decimal(bonusQuartersDevelop[quarterNum].Received + static.OrderBonusReceive())
  184 + bonusQuartersDevelop[quarterNum].Outstanding = utils.Decimal(bonusQuartersDevelop[quarterNum].Outstanding + static.OrderBonusWait())
  185 +
  186 + bonusMonthsDevelop[monthNum].Receivable = utils.Decimal(bonusMonthsDevelop[monthNum].Receivable + static.OrderTotalReceivable())
  187 + bonusMonthsDevelop[monthNum].Received = utils.Decimal(bonusMonthsDevelop[monthNum].Received + static.OrderBonusReceive())
  188 + bonusMonthsDevelop[monthNum].Outstanding = utils.Decimal(bonusMonthsDevelop[monthNum].Outstanding + static.OrderBonusWait())
  189 + }
  190 + }
  191 + // 整理输出数据
  192 + rsp = &protocol.DividendStatisticsV2Response{
  193 + Statistics: protocol.DividendStatistics{
  194 + Received: bonusAll.Received,
  195 + Outstanding: bonusAll.Outstanding,
  196 + Receivable: bonusAll.Receivable,
  197 + Quarters: bonusQuarters,
  198 + Months: bonusMonths,
  199 + },
  200 + StatisticsCareer: protocol.DividendStatistics{
  201 + Received: bonusAllCareer.Receivable,
  202 + Outstanding: bonusAllCareer.Outstanding,
  203 + Receivable: bonusAllCareer.Receivable,
  204 + Quarters: bonusQuartersCareer,
  205 + Months: bonusMonthsCareer,
  206 + },
  207 + StatisticsBusiness: protocol.DividendStatistics{
  208 + Received: bonusAllBusiness.Receivable,
  209 + Outstanding: bonusAllBusiness.Outstanding,
  210 + Receivable: bonusAllBusiness.Receivable,
  211 + Quarters: bonusQuartersBusiness,
  212 + Months: bonusMonthsBusiness,
  213 + },
  214 + StatisticsDevelop: protocol.DividendStatistics{
  215 + Received: bonusAllDevelop.Received,
  216 + Outstanding: bonusAllDevelop.Outstanding,
  217 + Receivable: bonusAllDevelop.Receivable,
  218 + Quarters: bonusQuartersDevelop,
  219 + Months: bonusMonthsDevelop,
  220 + },
  221 + StatisticsApp: protocol.DividendStatistics{
  222 + Received: bonusAllApp.Received,
  223 + Outstanding: bonusAllApp.Outstanding,
  224 + Receivable: bonusAllApp.Receivable,
  225 + Quarters: bonusQuartersApp,
  226 + Months: bonusMonthsApp,
  227 + },
  228 + Timestamp: 0,
  229 + }
  230 + rsp.Timestamp = time.Now().Unix() * 1000
  231 +
  232 + return
  233 +}
@@ -25,8 +25,8 @@ func (m *PartnerCategoryInfo) Identify() interface{} { @@ -25,8 +25,8 @@ func (m *PartnerCategoryInfo) Identify() interface{} {
25 } 25 }
26 26
27 const ( 27 const (
28 - Career = iota + 1  
29 - Business  
30 - Develop  
31 - App 28 + Career int = 1 //事业
  29 + Business int = 2 //业务
  30 + Develop int = 3 //研发
  31 + App int = 4 //业务产品-应用
32 ) 32 )
1 package controllers 1 package controllers
2 2
3 import ( 3 import (
  4 + "time"
  5 +
4 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/order" 6 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/order"
5 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain" 7 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
6 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol" 8 "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
7 - "time"  
8 ) 9 )
9 10
10 type OrderController struct { 11 type OrderController struct {
11 BaseController 12 BaseController
12 } 13 }
13 14
14 -//OrderStatistics 订单统计 15 +// OrderStatistics 订单统计
15 // @router /statistics [post] 16 // @router /statistics [post]
16 func (this *OrderController) Statistics() { 17 func (this *OrderController) Statistics() {
17 var msg *protocol.ResponseMessage 18 var msg *protocol.ResponseMessage
@@ -31,7 +32,7 @@ func (this *OrderController) Statistics() { @@ -31,7 +32,7 @@ func (this *OrderController) Statistics() {
31 msg = protocol.NewReturnResponse(order.Statistics(header, request)) 32 msg = protocol.NewReturnResponse(order.Statistics(header, request))
32 } 33 }
33 34
34 -//OrderStatistics 订单统计 35 +// OrderStatistics 订单统计
35 // @router /statistics [post] 36 // @router /statistics [post]
36 func (this *OrderController) StatisticsV2() { 37 func (this *OrderController) StatisticsV2() {
37 var msg *protocol.ResponseMessage 38 var msg *protocol.ResponseMessage
@@ -54,7 +55,7 @@ func (this *OrderController) StatisticsV2() { @@ -54,7 +55,7 @@ func (this *OrderController) StatisticsV2() {
54 msg = protocol.NewReturnResponse(order.StatisticsV2(header, request)) 55 msg = protocol.NewReturnResponse(order.StatisticsV2(header, request))
55 } 56 }
56 57
57 -//OrderDetail 订单详情 58 +// OrderDetail 订单详情
58 // @router /orderDetail [post] 59 // @router /orderDetail [post]
59 func (this *OrderController) OrderDetail() { 60 func (this *OrderController) OrderDetail() {
60 var msg *protocol.ResponseMessage 61 var msg *protocol.ResponseMessage
@@ -74,7 +75,7 @@ func (this *OrderController) OrderDetail() { @@ -74,7 +75,7 @@ func (this *OrderController) OrderDetail() {
74 msg = protocol.NewReturnResponse(order.Detail(header, request)) 75 msg = protocol.NewReturnResponse(order.Detail(header, request))
75 } 76 }
76 77
77 -//OrderList 78 +// OrderList
78 func (this *OrderController) OrderList() { 79 func (this *OrderController) OrderList() {
79 var msg *protocol.ResponseMessage 80 var msg *protocol.ResponseMessage
80 defer func() { 81 defer func() {
@@ -97,7 +98,7 @@ func (this *OrderController) OrderList() { @@ -97,7 +98,7 @@ func (this *OrderController) OrderList() {
97 msg = protocol.NewReturnResponse(order.List(header, request)) 98 msg = protocol.NewReturnResponse(order.List(header, request))
98 } 99 }
99 100
100 -//OrderList 101 +// OrderList
101 func (this *OrderController) Intentions() { 102 func (this *OrderController) Intentions() {
102 var msg *protocol.ResponseMessage 103 var msg *protocol.ResponseMessage
103 defer func() { 104 defer func() {
@@ -9,8 +9,8 @@ const ( @@ -9,8 +9,8 @@ const (
9 9
10 /*DividendStatistics 分红统计*/ 10 /*DividendStatistics 分红统计*/
11 type DividendStatisticsRequest struct { 11 type DividendStatisticsRequest struct {
12 - StartTime int64 `json:"startTime"`  
13 - EndTime int64 `json:"endTime"` 12 + StartTime int64 `json:"startTime"` // 单位毫秒
  13 + EndTime int64 `json:"endTime"` // 单位毫秒
14 //分红类型(0累计分红、1分红支出) 14 //分红类型(0累计分红、1分红支出)
15 //DividendAction int `json:"dividendAction"` 15 //DividendAction int `json:"dividendAction"`
16 PartnerId int64 `json:"partnerId"` 16 PartnerId int64 `json:"partnerId"`
@@ -20,11 +20,25 @@ type DividendStatisticsResponse struct { @@ -20,11 +20,25 @@ type DividendStatisticsResponse struct {
20 Timestamp int64 `json:"timestamp"` 20 Timestamp int64 `json:"timestamp"`
21 } 21 }
22 22
  23 +// Career int = 1 //事业
  24 +// Business int = 2 //业务
  25 +// Develop int = 3 //研发
  26 +// App int = 4 //业务产品-应用
  27 +type DividendStatisticsV2Response struct {
  28 + Statistics DividendStatistics `json:"statistics"` // 全部
  29 + StatisticsCareer DividendStatistics `json:"statisticsCareer"` // 事业分类
  30 + StatisticsBusiness DividendStatistics `json:"statisticsBusiness"` // 业务分类
  31 + StatisticsDevelop DividendStatistics `json:"statisticsDevelop"` // 研发a分类
  32 + StatisticsApp DividendStatistics `json:"statisticsApp"` // 业务产品-应用
  33 + Timestamp int64 `json:"timestamp"`
  34 +}
  35 +
23 type DividendStatistics struct { 36 type DividendStatistics struct {
24 - Received float64 `json:"received"` //总已收分红  
25 - Outstanding float64 `json:"outstanding"` //总未收分红/分红支出  
26 - Receivable float64 `json:"receivable"` //总应收分红  
27 - Quarters []Bonus `json:"quarters"` 37 + Received float64 `json:"received"` //总已收分红
  38 + Outstanding float64 `json:"outstanding"` //总未收分红/分红支出
  39 + Receivable float64 `json:"receivable"` //总应收分红
  40 + Quarters [4]Bonus `json:"quarters"` //4个季度分红
  41 + Months [12]Bonus `json:"months"` //12个月度分红
28 } 42 }
29 43
30 type Bonus struct { 44 type Bonus struct {