高章伟
2022-02-24 2aa8da8af66aa8ae00f25831aed6bb0364176e7b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
global class NFM602Batch implements Database.Batchable<sObject> {
    public String query;
 
    // global NFM602Batch(Datetime startTime,Datetime endTime) {
        
    //     String querySql = 'select Inspection_Report__c.Hospital__r.Parent_Management_Code__c,Inspection_Report__c.Department__r.Parent_Management_Code__c,Inspection_Report__c.Contract__r.Maintenance_Contract_No_F__c,Inspection_Report__c.Contract__r.Contract_Start_Date__c,Inspection_Report__c.Contract__r.Contract_End_Date__c, Inspection_Report__c.Contract__r.New_equipment_quantity1__c,Inspection_Report__c.spotCheckBatch__c,Inspection_Report__c.Inspection_Date__c,Inspection_Report__c.Inspection_StartTime__c,Inspection_Report__c.Inspection_EndTime__c,Inspection_Report__c.Reporter__c,Inspection_Report__c.Inspection_asset_number__c,Inspection_Report__c.Failourassetnumber__c from Inspection_Report__c where id != null ';
        
    //     if(startTime != null){
    //         querySql += '';
    //     }
    //     if(endTime != null){
    //         querySql += '';
    //     }
    //     this.query = querySql;
    // }
 
    global Database.QueryLocator start(Database.BatchableContext bc) {
        
        return Database.getQueryLocator(query);
    }
 
    global void execute(Database.BatchableContext BC, list<Inspection_Report__c> scope) {
        // BatchIF_Log__c iflog = new BatchIF_Log__c();
        // iflog.Log__c = 'execute NFM_602 batch \n';
        // NFM602Controller.executeNotFuture(iflog, null,scope);
    }
 
    global void finish(Database.BatchableContext BC) {
 
    }
}