...
|
...
|
@@ -312,7 +312,7 @@ func (creditAccountService *CreditAccountService) ListCreditAccount(listCreditAc |
|
|
}
|
|
|
}
|
|
|
|
|
|
// PayCreditAccount 支付账期结算(支付分红)
|
|
|
// PayCreditAccount 支付分红
|
|
|
func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAccountCommand *command.PayCreditAccountCommand) (interface{}, error) {
|
|
|
if err := payCreditAccountCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
...
|
...
|
@@ -342,7 +342,9 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco |
|
|
}
|
|
|
|
|
|
// 获取待支付的账期结算单
|
|
|
creditAccount, err := creditAccountRepository.FindOne(map[string]interface{}{"creditAccountId": creditAccountId})
|
|
|
creditAccount, err := creditAccountRepository.FindOne(map[string]interface{}{
|
|
|
"creditAccountId": creditAccountId,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -360,7 +362,6 @@ func (creditAccountService *CreditAccountService) PayCreditAccount(payCreditAcco |
|
|
if creditAccountSaved, err4 := creditAccountRepository.Save(creditAccount); err4 != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err4.Error())
|
|
|
} else {
|
|
|
// TODO 更新分红预算单结算状态(已支付)
|
|
|
if err3 := transactionContext.CommitTransaction(); err3 != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err3.Error())
|
|
|
}
|
...
|
...
|
|