作者 yangfu

共创项目列表 全量

... ... @@ -11,9 +11,9 @@ type CreditAccountSearchCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 查询偏离量
PageNumber int `json:"pageNumber"`
PageNumber int64 `json:"pageNumber"`
// 查询限制
PageSize int `json:"pageSize" valid:"Required"`
PageSize int64 `json:"pageSize" valid:"Required"`
// 账期结算支付状态,1待支付,2已支付 0全部
PaymentStatus int32 `json:"paymentStatus"`
}
... ...
... ... @@ -3,6 +3,7 @@ package service
import (
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
)
... ... @@ -11,18 +12,18 @@ type CompanyCreditAccountService struct {
}
// IndexStatistics TODO:企业的账期结算列表(分红信息按合约划分)
func (srv CompanyCreditAccountService) CreditAccountSearch(userMenusCommand *command.CreditAccountSearchCommand) (interface{}, error) {
creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
userMenusCommand.Operator)
resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{
UserId: int(userMenusCommand.Operator.UserId),
func (srv CompanyCreditAccountService) CreditAccountSearch(cmd *command.CreditAccountSearchCommand) (interface{}, error) {
gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
cmd.Operator)
resultMenu, err := gateway.CreditAccountsSearch(allied_creation_cooperation.ReqCreditAccountsSearch{
PageNumber: cmd.PageNumber,
PageSize: cmd.PageSize,
PaymentStatus: cmd.PaymentStatus,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
return map[string]interface{}{
"accessMenus": resultMenu.Menus,
}, nil
return resultMenu, nil
}
// IndexStatistics TODO:企业的账期结算明细
... ...
... ... @@ -179,16 +179,16 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje
if err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
var items []interface{}
for i := range result.List {
item := result.List[i]
items = append(items, map[string]interface{}{
"cooperationProjectId": item.CooperationProjectID,
"cooperationProjectNumber": item.CooperationProjectNumber,
"cooperationProjectName": item.CooperationProjectName,
})
}
return int64(result.Total), items, nil
//var items []interface{}
//for i := range result.List {
// item := result.List[i]
// items = append(items, map[string]interface{}{
// "cooperationProjectId": item.CooperationProjectID,
// "cooperationProjectNumber": item.CooperationProjectNumber,
// "cooperationProjectName": item.CooperationProjectName,
// })
//}
return int64(result.Total), result.List, nil
}
func NewCooperationProjectService(options map[string]interface{}) *CooperationProjectService {
... ...
package allied_creation_cooperation
import "time"
//创建账期结算单
type (
ReqCreditAccountCreate struct {
... ... @@ -30,6 +32,26 @@ type (
//查询账期结算单
type (
ReqCreditAccountsSearch struct {
// 页面大小
PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 账期结算单号
CreditAccountOrderNum string `cname:"账期结算单号" json:"creditAccountOrderNum" valid:"Required"`
// 参与人姓名
ParticipatorName string `cname:"参与人姓名" json:"participatorName,omitempty"`
// 公司ID,通过集成REST上下文获取
// CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
// OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
// UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
// UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单
PaymentStatus int32 `cname:"账期结算支付状态" json:"paymentStatus" valid:"Required"`
// 结算周期,按年“2021”或者按月结算”2021-07“
Period time.Time `cname:"结算周期" json:"period,omitempty"`
}
DataCreditAccountsSearch struct {
... ...