global class NewAndEditInspectionReportController extends NewAndEditBaseController
|
{
|
//zhj MEBG新方案改造 2022-11-29 start
|
public String staticResourceV2 {get; set;}
|
//zhj MEBG新方案改造 2022-11-29 end
|
|
//deloitte-zhj 20231104 解密院方负责人 start
|
public String staticResourceContact {get; set;}
|
public String contactAWSDataId{set;get;}
|
//deloitte-zhj 20231104 解密院方负责人 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
|
|
//deloitte-zhj 20231104 解密院方负责人 start
|
staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
|
if(String.isNotBlank(controller.getRecord().Id)){
|
List<Inspection_Report__c> repairList = [select id,Responsible_Person_F__r.AWS_Data_Id__c from Inspection_Report__c where id = :controller.getRecord().Id];
|
if(repairList.size() > 0){
|
contactAWSDataId = repairList[0].Responsible_Person_F__r.AWS_Data_Id__c;
|
}
|
}
|
//deloitte-zhj 20231104 解密院方负责人 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);
|
}
|
}
|