高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public with sharing class MaintenanceCommissionPDFController {
    public Repair__c ra { get; private set; }
    public List<Repair__c> repList { get; private set; }
    public Integer repSize {  
        get { return repList == null ? 0 : repList.size(); } 
    }
 
    public MaintenanceCommissionPDFController() {
        ra = new Repair__c();
    }
 
    public void init(){
        String id = ApexPages.currentPage().getParameters().get('id');
        List<String> IdList = new List<String>();
        IdList = id.split('=');
        List<Repair__c> RaList= [select id, Name, HP_Name__c, SAP_Service_Repair_No__c, Dealer__r.Name, Failure_Occurrence_Date__c, Delivered_Product__r.Name,
                                    FSE_ApplyForRepair_Day__c, SerialNumber__c, SAP_Transfer_day__c, Incharge_Staff__r.Name
                                    from Repair__c where Id =: IdList];
        if(RaList.size() > 0){
            repList = RaList;
        }
    }
}