public with sharing class RepairAgainAnPDFController {
    public RepairAgainAn__c ra { get; private set; }
    public Integer status  { get; private set; }
    public Boolean isFirst { get; private set; }

    public RepairAgainAnPDFController() {
        ra = new RepairAgainAn__c();
    }

    public void init(){
        String id = ApexPages.currentPage().getParameters().get('id');
        this.status=Integer.valueOf(Apexpages.currentPage().getParameters().get('status'));
        List<RepairAgainAn__c> RaList= [select id, Asset_Model_No__c, SerialNumber__c, Hospital__c, PhenomenonName__c, Usage_Frequence__c,InspectionComment__c,
                                            Cleanning__c, Disinfect__c, Sterilization__c, AcceptDate__c, LastDateCnt__c, Repair_Rank__c, AnalysisOSH__c,
                                            AnalysisReasonOSH__c, Reporter__c, Report_Date__c, RC_Confirmer__c, Dectect_Picture1_URL__c, Dectect_Picture2_URL__c,Dectect_Picture3_URL__c,Dectect_Picture4_URL__c,
                                            SAP_Service_Repair_No__c, AcceptDateLast__c, Repair_Returned_Last__c, Repair_Rank_Last__c,
                                            RepairLast__c, InspectionFailureCause_Last__c, JudgementOSH__c, ActionOSH__c, OSH_Confirmer__c, OSH_Detector__c, 
                                            OSH_Confirmation_Date__c, OSH_Dectect_Picture1_URL__c, OSH_Dectect_Picture2_URL__c, OSH_Dectect_Picture3_URL__c,
                                            OSH_Dectect_Picture4_URL__c, OSH_Dectect_Picture5_URL__c, OSH_Dectect_Picture6_URL__c, OSH_Dectect_Picture7_URL__c, OSH_Dectect_Picture8_URL__c, AnalysisOCM__c, ActionOCM__c, Technical_Responsibility__c, SAP_Service_Repair_No_Last__c,
                                            OCM_Confirmer__c, OCM_Confirmation_Date__c, Reporter__r.Name, RC_Confirmer__r.Name, OSH_Detector__r.Name, 
                                            OSH_Confirmer__r.Name, OCM_Confirmer__r.Name, Technical_Responsibility__r.Name,Complaint_otherFault__c,Complaint_confirm__c,Countermeasures__c,
                                            OSH_Auditor__r.Name,RepairAgainAn_Approve_Confirm__c,RepairAgainAn_Approve_status2__c,JudgementOSH2__c,ActionOSH2__c,OSH_Confirmer2__r.Name,OSH_Confirmation_Date2__c,OSH_Auditor2__r.Name,RepairAgainAn_Approve_Confirm2__c,AnalysisReasonOSH2__c,AnalysisOSH2__c,OSH_Detector2__r.Name,Complaint_confirm2__c,Countermeasures2__c,Complaint_otherFault2__c,
                                            Repair__r.Name
                                            from RepairAgainAn__c where Id =: id];
        if(RaList.size() > 0){
            ra = RaList[0];
            if (String.isBlank(ra.RepairAgainAn_Approve_status2__c)) {
                isFirst = true;
            } else {
                isFirst = false;
            }
        }

    }
}