...
|
...
|
@@ -392,6 +392,7 @@ func (dividendsEstimateService *DividendsEstimateService) ListDividendsEstimate( |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
// 分红预算仓储初始化
|
|
|
var dividendsEstimateRepository domain.DividendsEstimateRepository
|
|
|
if value, err := factory.CreateDividendsEstimateRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
@@ -470,10 +471,28 @@ func (dividendsEstimateService *DividendsEstimateService) SearchDividendsEstimat |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
// 分红预算仓储初始化
|
|
|
var dividendsEstimateRepository domain.DividendsEstimateRepository
|
|
|
if value, err := factory.CreateDividendsEstimateRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
}); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
dividendsEstimateRepository = value
|
|
|
}
|
|
|
if count, dividendsEstimates, err := dividendsEstimateRepository.Find(tool_funs.SimpleStructToMap(searchDividendsEstimateQuery)); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"grid": map[string]interface{}{
|
|
|
"total": count,
|
|
|
"list": dividendsEstimates,
|
|
|
},
|
|
|
}, nil
|
|
|
}
|
|
|
return nil, nil
|
|
|
}
|
|
|
|
|
|
// SearchDividendsIncentivesEstimate 查询业绩激励分红预算
|
...
|
...
|
|