作者 yangfu
... ... @@ -30,7 +30,7 @@ type CreditAccountItem struct {
} `json:"userInfo"`
} `json:"participator"` // 参与人
ParticipateType string `json:"participateType"` // 参与类型
PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件,复数
Org domain.Org `json:"org"` // 数据所属组织机构
Company domain.CompanyData `json:"company"` // 公司
CreatedAt int64 `json:"createdAt"` // 创建时间
... ... @@ -55,7 +55,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred
SettlementTime: param.SettlementTime.Unix() * 1000,
CooperationContractNumber: param.CooperationContractNumber,
ParticipateType: param.ParticipateType, // 参与类型
PaymentDocumentAttachment: param.PaymentDocumentAttachment, // 支付凭证附件
PaymentDocumentAttachment: param.PaymentDocumentAttachments, // 支付凭证附件
Org: domain.Org{
OrgID: param.Org.OrgID,
OrgName: param.Org.OrgName,
... ...
package service
import (
"time"
"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/application/mobile/cooperation/dto"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
"time"
)
// CompanyCreditAccountService 企业端账期结算
... ... @@ -70,7 +71,7 @@ func (srv CompanyCreditAccountService) CreditAccountPay(cmd *command.CreditAccou
CreditAccountId: cmd.CreditAccountId,
ActuallyPaidAmount: cmd.ActuallyPaidAmount,
Remarks: cmd.Remarks,
Attachment: cmd.Attachment,
PaymentDocumentAttachment: cmd.Attachment,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -145,6 +145,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
DividendsIncentivesStage: v.DividendsStage,
DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsStageEnd/1e3), 0),
DividendsIncentivesStageStart: time.Unix(int64(v.DividendsStageStart/1e3), 0),
Remarks: v.Remarks,
}
rules1 = append(rules1, r)
}
... ... @@ -158,6 +159,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime/1e3), 0),
ReferrerPercentage: v.ReferrerPercentage,
SalesmanPercentage: v.SalesmanPercentage,
Remarks: v.Remarks,
}
rules2 = append(rules2, r)
}
... ...
... ... @@ -21,7 +21,7 @@ type CreditAccountItem struct {
UserType int `json:"userType"` // 用户类型,1员工,2共创用户,3公开
} `json:"participator"` // 参与人
ParticipateType string `json:"participateType"` // 参与类型
PaymentDocumentAttachment *domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
Org struct {
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
... ... @@ -59,7 +59,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera
SettlementTime: 0,
CooperationContractNumber: param.CooperationContractNumber,
ParticipateType: param.ParticipateType, // 参与类型
PaymentDocumentAttachment: nil, // 支付凭证附件
PaymentDocumentAttachment: []domain.Attachment{}, // 支付凭证附件
Company: param.Company, // 公司
CreatedAt: param.CreatedAt.UnixNano() / 1e6, // 创建时间
UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间
... ... @@ -73,8 +73,8 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount, opera
if !param.SettlementTime.IsZero() {
data.SettlementTime = param.SettlementTime.Unix() * 1e3
}
if len(param.PaymentDocumentAttachment.Url) > 0 {
data.PaymentDocumentAttachment = &param.PaymentDocumentAttachment
if len(param.PaymentDocumentAttachments) > 0 {
data.PaymentDocumentAttachment = param.PaymentDocumentAttachments
}
data.Org.OrgID = param.Org.OrgID
data.Org.OrgName = param.Org.OrgName
... ...
... ... @@ -54,7 +54,7 @@ func (srv *CreditAccountService) PayCreditAccount(payCommand *command.PayCreditA
CreditAccountId: payCommand.CreditAccountId,
ActuallyPaidAmount: payCommand.ActuallyPaidAmount,
Remarks: payCommand.Remarks,
Attachment: payCommand.Attachment,
PaymentDocumentAttachment: payCommand.Attachment,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -33,7 +33,7 @@ type CreditAccount struct {
UserInfo domain.UserInfo `json:"userInfo"` //
} `json:"operator"`
ParticipateType string `json:"participateType"` // 参与类型
PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
PaymentDocumentAttachments []domain.Attachment `json:"paymentDocumentAttachments"` // 支付凭证附件
Org struct {
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
... ... @@ -56,7 +56,7 @@ type (
CreditAccountId int `json:"creditAccountId,string"`
ActuallyPaidAmount float64 `json:"actuallyPaidAmount"` //实际支付金额
Remarks string `json:"remarks"`
Attachment []domain.Attachment `json:"paymentDocumentAttachment"` //附件
PaymentDocumentAttachment []domain.Attachment `json:"paymentDocumentAttachment"` //附件
}
DataCreditAccountsPay struct {
... ...