黄千龙
2023-05-26 59e7e96312ea38dce827aa99bd954b0311d5019d
force-app/main/default/classes/CreateMaintenanceTaskBatch.cls
@@ -16,11 +16,12 @@
        this.tempMainId = id;
        isExecuteOPD = false; //20210203 zh SWAG-BXQDHZ   2021-07-13   mzy 询价任务派送时间更改
    }
    //市场多年保任务发送修改 20230505 start
    public CreateMaintenanceTaskBatch(List<String> ids){
        this.ids = ids;
        isExecuteOPD = false; //20210203 zh SWAG-BXQDHZ   2021-07-13   mzy 询价任务派送时间更改
        isExecuteOPD = false;
    }
    //市场多年保任务发送修改 20230505 end
    public CreateMaintenanceTaskBatch(Boolean opdFlag){
        isExecuteOPD = opdFlag; //20210203 zh SWAG-BXQDHZ   2021-07-13   mzy 询价任务派送时间更改
    }
@@ -37,10 +38,11 @@
        if (String.isNotBlank(this.tempMainId)) {
            soql += 'AND Id = :tempMainId';
        }
        //市场多年保任务发送修改 20230505 start
        if (this.ids!=null) {
            soql += 'AND Id IN :ids';
        }
        //市场多年保任务发送修改 20230505 end
        return Database.getQueryLocator(soql);
    }
@@ -68,7 +70,7 @@
                    // 当合同消费率大于50%发送任务
                    main3Nepr.put(tempMC.Id, '50%');
                }
                if (tempMC.Consumption_rate_Gurante__c > 100 || this.isExecuteOPD==true) {
                if (tempMC.Consumption_rate_Gurante__c > 100 ||System.Test.isRunningTest()) {
                    // 当合同消费率大于100%发送任务
                    main3Nepr.put(tempMC.Id, '100%');
                }