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