...
|
...
|
@@ -521,7 +521,6 @@ func (dividendsEstimateService *DividendsEstimateService) CreateDividendsEstimat |
|
|
|
|
|
// ConfirmDividendsIncentivesEstimate 确定业绩激励分红预算
|
|
|
func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncentivesEstimate(confirmDividendsIncentivesEstimateCommand *command.ConfirmDividendsIncentivesEstimateCommand) (interface{}, error) {
|
|
|
start := time.Now() // 获取当前时间
|
|
|
if err := confirmDividendsIncentivesEstimateCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -715,10 +714,12 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
|
cooperationContractNumbers = append(cooperationContractNumbers, orderGood.CooperationContractNumber)
|
|
|
}
|
|
|
|
|
|
newCooperationContractNumbers := utils.RemoveDuplicationString(cooperationContractNumbers)
|
|
|
|
|
|
// 查询共创合约
|
|
|
cooperationContractsMap := make(map[string]*domain.CooperationContract, 0)
|
|
|
if count, cooperationContractsFound, err := cooperationContractRepository.Find(map[string]interface{}{
|
|
|
"cooperationContractNumbers": cooperationContractNumbers,
|
|
|
"cooperationContractNumbers": newCooperationContractNumbers,
|
|
|
"companyId": confirmDividendsIncentivesEstimateCommand.CompanyId,
|
|
|
"orgId": confirmDividendsIncentivesEstimateCommand.OrgId,
|
|
|
"offsetLimit": false,
|
...
|
...
|
@@ -1028,9 +1029,6 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent |
|
|
failedReasonStr = "无"
|
|
|
}
|
|
|
|
|
|
elapsed := time.Since(start)
|
|
|
fmt.Println("该函数执行完成耗时:", elapsed)
|
|
|
|
|
|
return map[string]interface{}{
|
|
|
"report": fmt.Sprintf("已完成%d单订单分红预算,生成%d单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr),
|
|
|
}, nil
|
...
|
...
|
|