正在显示
5 个修改的文件
包含
12 行增加
和
11 行删除
| @@ -30,7 +30,7 @@ type CreditAccountItem struct { | @@ -30,7 +30,7 @@ type CreditAccountItem struct { | ||
| 30 | } `json:"userInfo"` | 30 | } `json:"userInfo"` |
| 31 | } `json:"participator"` // 参与人 | 31 | } `json:"participator"` // 参与人 |
| 32 | ParticipateType string `json:"participateType"` // 参与类型 | 32 | ParticipateType string `json:"participateType"` // 参与类型 |
| 33 | - PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件 | 33 | + PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件,复数 |
| 34 | Org domain.Org `json:"org"` // 数据所属组织机构 | 34 | Org domain.Org `json:"org"` // 数据所属组织机构 |
| 35 | Company domain.CompanyData `json:"company"` // 公司 | 35 | Company domain.CompanyData `json:"company"` // 公司 |
| 36 | CreatedAt int64 `json:"createdAt"` // 创建时间 | 36 | CreatedAt int64 `json:"createdAt"` // 创建时间 |
| @@ -55,7 +55,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred | @@ -55,7 +55,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred | ||
| 55 | SettlementTime: param.SettlementTime.Unix() * 1000, | 55 | SettlementTime: param.SettlementTime.Unix() * 1000, |
| 56 | CooperationContractNumber: param.CooperationContractNumber, | 56 | CooperationContractNumber: param.CooperationContractNumber, |
| 57 | ParticipateType: param.ParticipateType, // 参与类型 | 57 | ParticipateType: param.ParticipateType, // 参与类型 |
| 58 | - PaymentDocumentAttachment: param.PaymentDocumentAttachment, // 支付凭证附件 | 58 | + PaymentDocumentAttachment: param.PaymentDocumentAttachments, // 支付凭证附件 |
| 59 | Org: domain.Org{ | 59 | Org: domain.Org{ |
| 60 | OrgID: param.Org.OrgID, | 60 | OrgID: param.Org.OrgID, |
| 61 | OrgName: param.Org.OrgName, | 61 | OrgName: param.Org.OrgName, |
| 1 | package service | 1 | package service |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | + "time" | ||
| 5 | + | ||
| 4 | "github.com/linmadan/egglib-go/core/application" | 6 | "github.com/linmadan/egglib-go/core/application" |
| 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 7 | "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" | 8 | "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" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
| 8 | - "time" | ||
| 9 | ) | 10 | ) |
| 10 | 11 | ||
| 11 | // CompanyCreditAccountService 企业端账期结算 | 12 | // CompanyCreditAccountService 企业端账期结算 |
| @@ -70,7 +71,7 @@ func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccou | @@ -70,7 +71,7 @@ func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccou | ||
| 70 | CreditAccountId: cmd.CreditAccountId, | 71 | CreditAccountId: cmd.CreditAccountId, |
| 71 | ActuallyPaidAmount: cmd.ActuallyPaidAmount, | 72 | ActuallyPaidAmount: cmd.ActuallyPaidAmount, |
| 72 | Remarks: cmd.Remarks, | 73 | Remarks: cmd.Remarks, |
| 73 | - Attachment: cmd.Attachment, | 74 | + PaymentDocumentAttachment: cmd.Attachment, |
| 74 | }) | 75 | }) |
| 75 | if err != nil { | 76 | if err != nil { |
| 76 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 77 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
| @@ -21,7 +21,7 @@ type CreditAccountItem struct { | @@ -21,7 +21,7 @@ type CreditAccountItem struct { | ||
| 21 | UserType int `json:"userType"` // 用户类型,1员工,2共创用户,3公开 | 21 | UserType int `json:"userType"` // 用户类型,1员工,2共创用户,3公开 |
| 22 | } `json:"participator"` // 参与人 | 22 | } `json:"participator"` // 参与人 |
| 23 | ParticipateType string `json:"participateType"` // 参与类型 | 23 | ParticipateType string `json:"participateType"` // 参与类型 |
| 24 | - PaymentDocumentAttachment *domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件 | 24 | + PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件 |
| 25 | Org struct { | 25 | Org struct { |
| 26 | OrgID int `json:"orgId,string"` | 26 | OrgID int `json:"orgId,string"` |
| 27 | OrgName string `json:"orgName"` | 27 | OrgName string `json:"orgName"` |
| @@ -59,7 +59,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera | @@ -59,7 +59,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera | ||
| 59 | SettlementTime: 0, | 59 | SettlementTime: 0, |
| 60 | CooperationContractNumber: param.CooperationContractNumber, | 60 | CooperationContractNumber: param.CooperationContractNumber, |
| 61 | ParticipateType: param.ParticipateType, // 参与类型 | 61 | ParticipateType: param.ParticipateType, // 参与类型 |
| 62 | - PaymentDocumentAttachment: nil, // 支付凭证附件 | 62 | + PaymentDocumentAttachment: []domain.Attachment{}, // 支付凭证附件 |
| 63 | Company: param.Company, // 公司 | 63 | Company: param.Company, // 公司 |
| 64 | CreatedAt: param.CreatedAt.UnixNano() / 1e6, // 创建时间 | 64 | CreatedAt: param.CreatedAt.UnixNano() / 1e6, // 创建时间 |
| 65 | UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间 | 65 | UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间 |
| @@ -73,8 +73,8 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera | @@ -73,8 +73,8 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera | ||
| 73 | if !param.SettlementTime.IsZero() { | 73 | if !param.SettlementTime.IsZero() { |
| 74 | data.SettlementTime = param.SettlementTime.Unix() * 1e3 | 74 | data.SettlementTime = param.SettlementTime.Unix() * 1e3 |
| 75 | } | 75 | } |
| 76 | - if len(param.PaymentDocumentAttachment.Url) > 0 { | ||
| 77 | - data.PaymentDocumentAttachment = ¶m.PaymentDocumentAttachment | 76 | + if len(param.PaymentDocumentAttachments) > 0 { |
| 77 | + data.PaymentDocumentAttachment = param.PaymentDocumentAttachments | ||
| 78 | } | 78 | } |
| 79 | data.Org.OrgID = param.Org.OrgID | 79 | data.Org.OrgID = param.Org.OrgID |
| 80 | data.Org.OrgName = param.Org.OrgName | 80 | data.Org.OrgName = param.Org.OrgName |
| @@ -54,7 +54,7 @@ func (srv *CreditAccountService) PayCreditAccount(payCommand *command.PayCreditA | @@ -54,7 +54,7 @@ func (srv *CreditAccountService) PayCreditAccount(payCommand *command.PayCreditA | ||
| 54 | CreditAccountId: payCommand.CreditAccountId, | 54 | CreditAccountId: payCommand.CreditAccountId, |
| 55 | ActuallyPaidAmount: payCommand.ActuallyPaidAmount, | 55 | ActuallyPaidAmount: payCommand.ActuallyPaidAmount, |
| 56 | Remarks: payCommand.Remarks, | 56 | Remarks: payCommand.Remarks, |
| 57 | - Attachment: payCommand.Attachment, | 57 | + PaymentDocumentAttachment: payCommand.Attachment, |
| 58 | }) | 58 | }) |
| 59 | if err != nil { | 59 | if err != nil { |
| 60 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 60 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -33,7 +33,7 @@ type CreditAccount struct { | @@ -33,7 +33,7 @@ type CreditAccount struct { | ||
| 33 | UserInfo domain.UserInfo `json:"userInfo"` // | 33 | UserInfo domain.UserInfo `json:"userInfo"` // |
| 34 | } `json:"operator"` | 34 | } `json:"operator"` |
| 35 | ParticipateType string `json:"participateType"` // 参与类型 | 35 | ParticipateType string `json:"participateType"` // 参与类型 |
| 36 | - PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件 | 36 | + PaymentDocumentAttachments []domain.Attachment `json:"paymentDocumentAttachments"` // 支付凭证附件 |
| 37 | Org struct { | 37 | Org struct { |
| 38 | OrgID int `json:"orgId,string"` | 38 | OrgID int `json:"orgId,string"` |
| 39 | OrgName string `json:"orgName"` | 39 | OrgName string `json:"orgName"` |
| @@ -56,7 +56,7 @@ type ( | @@ -56,7 +56,7 @@ type ( | ||
| 56 | CreditAccountId int `json:"creditAccountId,string"` | 56 | CreditAccountId int `json:"creditAccountId,string"` |
| 57 | ActuallyPaidAmount float64 `json:"actuallyPaidAmount"` //实际支付金额 | 57 | ActuallyPaidAmount float64 `json:"actuallyPaidAmount"` //实际支付金额 |
| 58 | Remarks string `json:"remarks"` | 58 | Remarks string `json:"remarks"` |
| 59 | - Attachment []domain.Attachment `json:"paymentDocumentAttachment"` //附件 | 59 | + PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` //附件 |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | DataCreditAccountsPay struct { | 62 | DataCreditAccountsPay struct { |
-
请 注册 或 登录 后发表评论