global class NewAndEditInspectionReportController extends NewAndEditBaseController 
{
    //zhj MEBG新方案改造 2022-11-29 start
    public String staticResourceV2 {get; set;}
    //zhj MEBG新方案改造 2022-11-29 end
    public NewAndEditInspectionReportController(ApexPages.StandardController controller) {
        
        List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Inspection_Report__c').getDescribe().fields.getMap().keyset());  
        // Add fields to controller. This is to avoid the SOQL error in visualforce page
        if (!Test.isRunningTest()) { 
            controller.addFields(fieldList);
        }
        Init(controller.getRecord());

        //zhj MEBG新方案改造 2022-11-29 start
        staticResourceV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('Inspection_Report__cV2'));
        //zhj MEBG新方案改造 2022-11-29 end
        //AWSToSobjectNonEncryptedMap.put('responsiblePersonHP', 'Responsible_Person__c');
        //AWSToSobjectNonEncryptedMap.put('technicianHP', 'Technician_HP__c');
        //AWSToSobjectNonEncryptedMap.put('callerPhone', 'phone__c');

        //AWSToSobjectEncryptedMap.put('responsiblePersonHPEncrypt', 'Responsible_Person_Encrypted__c');
        //AWSToSobjectEncryptedMap.put('technicianHPEncrypt', 'Technician_HP_Encrypted__c');
        //AWSToSobjectEncryptedMap.put('callerPhoneEncrypt', 'phone_Encrypted__c');
        //system.debug('layoutEncryptedAPIList');
    }

    
    @RemoteAction
    global static Response saveInspectionReport(String leadJson,String transId,Boolean isNew) {
        return save(new Inspection_Report__c(),leadJson,transId,isNew);
    }
}