...
|
...
|
@@ -17,6 +17,48 @@ import ( |
|
|
type DividendsEstimateService struct {
|
|
|
}
|
|
|
|
|
|
// ListDividendsIncentivesEstimate 返回业绩激励分红预算信息列表
|
|
|
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentivesEstimate(listDividendsIncentivesEstimateQuery *query.ListDividendsIncentivesEstimateQuery) (interface{}, error) {
|
|
|
if err := listDividendsIncentivesEstimateQuery.ValidateQuery(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// ListMoneyIncentivesEstimate 返回金额激励分红预算信息列表
|
|
|
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentivesEstimate(listMoneyIncentivesEstimateQuery *query.ListMoneyIncentivesEstimateQuery) (interface{}, error) {
|
|
|
if err := listMoneyIncentivesEstimateQuery.ValidateQuery(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// CancelDividendsEstimate 取消分红预算单
|
|
|
func (dividendsEstimateService *DividendsEstimateService) CancelDividendsEstimate(cancelDividendsEstimateCommand *command.CancelDividendsEstimateCommand) (interface{}, error) {
|
|
|
if err := cancelDividendsEstimateCommand.ValidateCommand(); err != nil {
|
...
|
...
|
@@ -278,48 +320,6 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate( |
|
|
}
|
|
|
}
|
|
|
|
|
|
// ListDividendsIncentivesEstimate 返回业绩激励分红预算列表
|
|
|
func (dividendsEstimateService *DividendsEstimateService) ListDividendsIncentivesEstimate(listDividendsIncentivesEstimateQuery *query.ListDividendsIncentivesEstimateQuery) (interface{}, error) {
|
|
|
if err := listDividendsIncentivesEstimateQuery.ValidateQuery(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// ListMoneyIncentivesEstimate 返回金额激励分红预算列表
|
|
|
func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentivesEstimate(listMoneyIncentivesEstimateQuery *query.ListMoneyIncentivesEstimateQuery) (interface{}, error) {
|
|
|
if err := listMoneyIncentivesEstimateQuery.ValidateQuery(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// RemoveDividendsEstimate 移除分红预算单(预留)
|
|
|
func (dividendsEstimateService *DividendsEstimateService) RemoveDividendsEstimate(removeDividendsEstimateCommand *command.RemoveDividendsEstimateCommand) (interface{}, error) {
|
|
|
if err := removeDividendsEstimateCommand.ValidateCommand(); err != nil {
|
...
|
...
|
|