正在显示
4 个修改的文件
包含
43 行增加
和
20 行删除
| @@ -11,9 +11,9 @@ type CreditAccountSearchCommand struct { | @@ -11,9 +11,9 @@ type CreditAccountSearchCommand struct { | ||
| 11 | //操作人 | 11 | //操作人 |
| 12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
| 13 | // 查询偏离量 | 13 | // 查询偏离量 |
| 14 | - PageNumber int `json:"pageNumber"` | 14 | + PageNumber int64 `json:"pageNumber"` |
| 15 | // 查询限制 | 15 | // 查询限制 |
| 16 | - PageSize int `json:"pageSize" valid:"Required"` | 16 | + PageSize int64 `json:"pageSize" valid:"Required"` |
| 17 | // 账期结算支付状态,1待支付,2已支付 0全部 | 17 | // 账期结算支付状态,1待支付,2已支付 0全部 |
| 18 | PaymentStatus int32 `json:"paymentStatus"` | 18 | PaymentStatus int32 `json:"paymentStatus"` |
| 19 | } | 19 | } |
| @@ -3,6 +3,7 @@ package service | @@ -3,6 +3,7 @@ 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/infrastructure/service_gateway/allied_creation_cooperation" | ||
| 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" |
| 7 | ) | 8 | ) |
| 8 | 9 | ||
| @@ -11,18 +12,18 @@ type CompanyCreditAccountService struct { | @@ -11,18 +12,18 @@ type CompanyCreditAccountService struct { | ||
| 11 | } | 12 | } |
| 12 | 13 | ||
| 13 | // IndexStatistics TODO:企业的账期结算列表(分红信息按合约划分) | 14 | // IndexStatistics TODO:企业的账期结算列表(分红信息按合约划分) |
| 14 | -func (srv CompanyCreditAccountService) CreditAccountSearch(userMenusCommand *command.CreditAccountSearchCommand) (interface{}, error) { | ||
| 15 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
| 16 | - userMenusCommand.Operator) | ||
| 17 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
| 18 | - UserId: int(userMenusCommand.Operator.UserId), | 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, | ||
| 19 | }) | 22 | }) |
| 20 | if err != nil { | 23 | if err != nil { |
| 21 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 24 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
| 22 | } | 25 | } |
| 23 | - return map[string]interface{}{ | ||
| 24 | - "accessMenus": resultMenu.Menus, | ||
| 25 | - }, nil | 26 | + return resultMenu, nil |
| 26 | } | 27 | } |
| 27 | 28 | ||
| 28 | // IndexStatistics TODO:企业的账期结算明细 | 29 | // IndexStatistics TODO:企业的账期结算明细 |
| @@ -179,16 +179,16 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | @@ -179,16 +179,16 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | ||
| 179 | if err != nil { | 179 | if err != nil { |
| 180 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 180 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 181 | } | 181 | } |
| 182 | - var items []interface{} | ||
| 183 | - for i := range result.List { | ||
| 184 | - item := result.List[i] | ||
| 185 | - items = append(items, map[string]interface{}{ | ||
| 186 | - "cooperationProjectId": item.CooperationProjectID, | ||
| 187 | - "cooperationProjectNumber": item.CooperationProjectNumber, | ||
| 188 | - "cooperationProjectName": item.CooperationProjectName, | ||
| 189 | - }) | ||
| 190 | - } | ||
| 191 | - return int64(result.Total), items, nil | 182 | + //var items []interface{} |
| 183 | + //for i := range result.List { | ||
| 184 | + // item := result.List[i] | ||
| 185 | + // items = append(items, map[string]interface{}{ | ||
| 186 | + // "cooperationProjectId": item.CooperationProjectID, | ||
| 187 | + // "cooperationProjectNumber": item.CooperationProjectNumber, | ||
| 188 | + // "cooperationProjectName": item.CooperationProjectName, | ||
| 189 | + // }) | ||
| 190 | + //} | ||
| 191 | + return int64(result.Total), result.List, nil | ||
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | func NewCooperationProjectService(options map[string]interface{}) *CooperationProjectService { | 194 | func NewCooperationProjectService(options map[string]interface{}) *CooperationProjectService { |
| 1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
| 2 | 2 | ||
| 3 | +import "time" | ||
| 4 | + | ||
| 3 | //创建账期结算单 | 5 | //创建账期结算单 |
| 4 | type ( | 6 | type ( |
| 5 | ReqCreditAccountCreate struct { | 7 | ReqCreditAccountCreate struct { |
| @@ -30,6 +32,26 @@ type ( | @@ -30,6 +32,26 @@ type ( | ||
| 30 | //查询账期结算单 | 32 | //查询账期结算单 |
| 31 | type ( | 33 | type ( |
| 32 | ReqCreditAccountsSearch struct { | 34 | ReqCreditAccountsSearch struct { |
| 35 | + // 页面大小 | ||
| 36 | + PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` | ||
| 37 | + // 页面大小 | ||
| 38 | + PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | ||
| 39 | + // 账期结算单号 | ||
| 40 | + CreditAccountOrderNum string `cname:"账期结算单号" json:"creditAccountOrderNum" valid:"Required"` | ||
| 41 | + // 参与人姓名 | ||
| 42 | + ParticipatorName string `cname:"参与人姓名" json:"participatorName,omitempty"` | ||
| 43 | + // 公司ID,通过集成REST上下文获取 | ||
| 44 | + // CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` | ||
| 45 | + // 组织机构ID | ||
| 46 | + // OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | ||
| 47 | + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | ||
| 48 | + // UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` | ||
| 49 | + // 用户基础数据id | ||
| 50 | + // UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` | ||
| 51 | + // 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单 | ||
| 52 | + PaymentStatus int32 `cname:"账期结算支付状态" json:"paymentStatus" valid:"Required"` | ||
| 53 | + // 结算周期,按年“2021”或者按月结算”2021-07“ | ||
| 54 | + Period time.Time `cname:"结算周期" json:"period,omitempty"` | ||
| 33 | } | 55 | } |
| 34 | 56 | ||
| 35 | DataCreditAccountsSearch struct { | 57 | DataCreditAccountsSearch struct { |
-
请 注册 或 登录 后发表评论