作者 yangfu

登录修改

... ... @@ -56,14 +56,12 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman
}
// SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) {
func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
var items []*dto.DividendsEstimatesDto
for i := 0; i < 2; i++ {
item := dto.NewDividendsEstimatesDto()
item.LoadDto()
items = append(items, item)
}
return map[string]interface{}{
"list": items,
}, nil
return 2, items, nil
}
... ...
... ... @@ -56,14 +56,12 @@ func (srv PersonDividendsService) DividendsStatistics(userMenusCommand *command.
}
// SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
func (srv PersonDividendsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) {
func (srv PersonDividendsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
var items []*dto.DividendsEstimatesDto
for i := 0; i < 2; i++ {
item := dto.NewDividendsEstimatesDto()
item.LoadDto()
items = append(items, item)
}
return map[string]interface{}{
"list": items,
}, nil
return 2, items, nil
}
... ...
... ... @@ -34,10 +34,33 @@ func (srv PersonStatisticsService) IndexStatistics(userMenusCommand *command.Ind
// CompanyStatistics 共创用户-共创企业统计
func (srv PersonStatisticsService) CompanyStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
return map[string]interface{}{}, nil
var values []interface{}
values = append(values, map[string]interface{}{
"company": map[string]interface{}{
"companyId": 5,
"companyName": "机会平台",
},
"cooperationProjectCount": 10,
"cooperationContractCount": 5,
"dividendsRatio": 50,
"dividendsIncome": 10009965,
})
values = append(values, map[string]interface{}{
"company": map[string]interface{}{
"companyId": 6,
"companyName": "机会平台2",
},
"cooperationProjectCount": 10,
"cooperationContractCount": 5,
"dividendsRatio": 50,
"dividendsIncome": 10009965,
})
return map[string]interface{}{
"list": values,
}, nil
}
// CompanyDividendStatistics 共创用户-共创企业分红统计
// CompanyDividendStatistics (废弃)共创用户-共创企业分红统计
func (srv PersonStatisticsService) CompanyDividendStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
return map[string]interface{}{}, nil
}
... ...
package dto
type CompanyItem struct {
CompanyId int `json:"companyId,string"`
CompanyId int `json:"companyId"`
CompanyName string `json:"companyName"`
}
type OrgItem struct {
OrganizationId int `json:"organizationId,string"`
OrganizationId int `json:"organizationId"`
OrganizationName string `json:"organizationName"`
CompanyId int `json:"companyId"`
}
... ...
... ... @@ -400,8 +400,8 @@ func (controller *CooperationController) SearchDividendsEstimates() {
return
}
cmd.Operator = controller.GetOperator()
data, err := svr.SearchDividendsEstimates(cmd)
controller.Response(data, err)
total, data, err := svr.SearchDividendsEstimates(cmd)
controller.ReturnPageListData(total, data, err, cmd.PageNumber)
}
/***** PersonDividends 个人端分红 *****/
... ... @@ -454,8 +454,8 @@ func (controller *CooperationController) SearchDividendsEstimatesPerson() {
return
}
cmd.Operator = controller.GetOperator()
data, err := svr.SearchDividendsEstimates(cmd)
controller.Response(data, err)
total, data, err := svr.SearchDividendsEstimates(cmd)
controller.ReturnPageListData(total, data, err, cmd.PageNumber)
}
/***** CompanyStatistics 企业端统计 *****/
... ...