作者 陈志颖

合并分支 'dev' 到 'test'

feat:账期结算单数据冗余



查看合并请求 !21
... ... @@ -147,13 +147,19 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred
// 预算明细
var accountDetail []*domain.AccountDetail
var settlementAmount float64
var goodAmountCount float64
for _, dividendsEstimate := range dividendsEstimates {
accountDetail = append(accountDetail, &domain.AccountDetail{
DividendsEstimateOrderNumber: dividendsEstimate.DividendsEstimateOrderNumber,
DividendsType: dividendsEstimate.DividendsType,
DividendsAmount: dividendsEstimate.DividendsAmount,
OrderGoodId: dividendsEstimate.OrderGoodId,
OrderGoodAmount: dividendsEstimate.OrderGoodAmount,
CooperationContractNumber: dividendsEstimate.CooperationContractNumber,
})
settlementAmount = settlementAmount + dividendsEstimate.DividendsAmount
goodAmountCount = goodAmountCount + dividendsEstimate.OrderGoodAmount
}
// 生成账期结算单号
... ... @@ -195,6 +201,8 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred
CreatedAt: time.Now(),
DeletedAt: time.Time{},
UpdatedAt: time.Time{},
GoodAmountCount: goodAmountCount,
CooperationContractNumber: "", // TODO 弃用
}
if creditAccount, err13 := creditAccountRepository.Save(newCreditAccount); err13 != nil {
... ...
... ... @@ -11,4 +11,6 @@ type AccountDetail struct {
OrderGoodId int64 `json:"orderGoodId"`
// 订单产品金额
OrderGoodAmount float64 `json:"orderGoodAmount"`
// 关联共创合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
}
... ...