@isTest
public class TestDataUtility {
    public static void CreatePIPolicyConfiguration(){
        CreatePIPolicyConfigurations(null);
    }

    public static void CreatePIPolicyConfiguration(string sobject_name){
        CreatePIPolicyConfigurations(new string []{sobject_name});
    }

    public static void CreatePIPolicyConfigurations(List<String> sobjectTypes){
        //system.debug(Json.serialize([select Delete_URL__c, Enable_Encrypt__c, New_URL__c, Read_URL__c, Search_URL__c, Sobject_Type__c, Undelete_URL__c, New_Encrypt_URL__c, Update_Encrypt_URL__c, Update_URL__c, View_Unified_Contact_URL__c, Whether_Enable_Migration__c from PI_Policy_Configuration__c]));
        system.debug('Enter CreatePIPolicyConfigurations');
        String piJson = '[{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068RvEAI"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/103","Sobject_Type__c":"NFM103","Whether_Enable_Migration__c":false,"Id":"a5E1m00000068RvEAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068T3EAI"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/624","Sobject_Type__c":"NFM624","Whether_Enable_Migration__c":false,"Id":"a5E1m00000068T3EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LdEAI"},"Delete_URL__c":"/api/task/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/task/insert","Sobject_Type__c":"Event","Undelete_URL__c":"/api/task/undelete","Update_URL__c":"/api/task/update","Whether_Enable_Migration__c":false,"Id":"a5E1m00000068LdEAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L4EAI"},"Delete_URL__c":"/api/inspectionreport/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/inspectionreport/insert","Read_URL__c":"/api/inspectionreport/query","Sobject_Type__c":"Inspection_Report__c","Undelete_URL__c":"/api/inspectionreport/undelete","Update_URL__c":"/api/inspectionreport/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L4EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L5EAI"},"Delete_URL__c":"/api/campaignMember/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/campaignMember/insert","Read_URL__c":"/api/campaignMember/query","Search_URL__c":"/api/report/search","Sobject_Type__c":"CampaignMember","Undelete_URL__c":"/api/campaignMember/undelete","Update_URL__c":"/api/campaignMember/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L5EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L6EAI"},"Delete_URL__c":"/api/tenderinfo/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/tenderinfo/insert","Read_URL__c":"/api/tenderinfo/query","Sobject_Type__c":"Tender_information__c","Undelete_URL__c":"/api/tenderinfo/undelete","Update_URL__c":"/api/tenderinfo/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L6EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L7EAI"},"Delete_URL__c":"/api/repairsuborder/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/repairsuborder/insert","Read_URL__c":"/api/repairsuborder/query","Sobject_Type__c":"RepairSubOrder__c","Undelete_URL__c":"/api/repairsuborder/undelete","Update_URL__c":"/api/repairsuborder/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L7EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L8EAI"},"Delete_URL__c":"/api/address/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/address/insert","Read_URL__c":"/api/address/query","Search_URL__c":"/api/address/search","Sobject_Type__c":"Address__c","Undelete_URL__c":"/api/address/undelete","Update_URL__c":"/api/address/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L8EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L9EAI"},"Delete_URL__c":"/api/qisreport/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/qisreport/insert","Read_URL__c":"/api/qisreport/query","Search_URL__c":"/api/qisreport/search","Sobject_Type__c":"QIS_Report__c","Undelete_URL__c":"/api/qisreport/undelete","Update_URL__c":"/api/qisreport/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L9EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LAEAY"},"Delete_URL__c":"/api/consumsetdetail/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/consumsetdetail/insert","Read_URL__c":"/api/consumsetdetail/query","Search_URL__c":"/api/consumsetdetail/search","Sobject_Type__c":"Consum_Apply_Equipment_Set_Detail__c","Undelete_URL__c":"/api/consumsetdetail/undelete","Update_URL__c":"/api/consumsetdetail/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LAEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LBEAY"},"Delete_URL__c":"/api/repair/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/repair/insert","Read_URL__c":"/api/repair/query","Sobject_Type__c":"Repair__c","Undelete_URL__c":"/api/repair/undelete","New_Encrypt_URL__c":"/api/repair/decryptinsert","Update_Encrypt_URL__c":"/api/repair/decryptupdate","Update_URL__c":"/api/repair/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LBEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LCEAY"},"Delete_URL__c":"/api/oncall/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/oncall/insert","Read_URL__c":"/api/oncall/query","Sobject_Type__c":"On_Call__c","Undelete_URL__c":"/api/oncall/undelete","Update_URL__c":"/api/oncall/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LCEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LDEAY"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/501?","Sobject_Type__c":"QLMNFM501","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LDEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LEEAY"},"Delete_URL__c":"/api/report/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/report/insert","Read_URL__c":"/api/report/query","Sobject_Type__c":"Report__c","Undelete_URL__c":"/api/report/undelete","Update_URL__c":"/api/report/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LEEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LFEAY"},"Enable_Encrypt__c":true,"New_URL__c":"/api/nfm/115","Sobject_Type__c":"Sample_order_list__c","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LFEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LGEAY"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/503?","Read_URL__c":"/api/file/preview?key=","Search_URL__c":"/api/tx/confirmfile","Sobject_Type__c":"NFM503","Undelete_URL__c":"/api/file/download?key=","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LGEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LHEAY"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/606","Sobject_Type__c":"NFM606","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LHEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LIEAY"},"Delete_URL__c":"/api/contact/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/contact/insert","Read_URL__c":"/api/contact/query","Search_URL__c":"/api/contact/search","Sobject_Type__c":"Contact","Undelete_URL__c":"/api/contact/undelete","Update_URL__c":"/api/contact/update","View_Unified_Contact_URL__c":"/api/viewContact/query","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LIEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LJEAY"},"Delete_URL__c":"/api/consumapply/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/consumapply/insert","Read_URL__c":"/api/consumapply/query","Sobject_Type__c":"Consum_Apply__c","Undelete_URL__c":"/api/consumapply/undelete","Update_URL__c":"/api/consumapply/update","View_Unified_Contact_URL__c":"/api/consumapply/decryptinsert","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LJEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LKEAY"},"Delete_URL__c":"/api/inquiryform/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/inquiryform/insert","Read_URL__c":"/api/inquiryform/query","Sobject_Type__c":"Inquiry_form__c","Undelete_URL__c":"/api/inquiryform/undelete","Update_URL__c":"/api/inquiryform/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LKEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LLEAY"},"Delete_URL__c":"/api/rentalapply/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/rentalapply/insert","Read_URL__c":"/api/rentalapply/query","Sobject_Type__c":"Rental_Apply__c","Undelete_URL__c":"/api/rentalapply/undelete","New_Encrypt_URL__c":"/api/rentalapply/decryptinsert","Update_URL__c":"/api/rentalapply/update","View_Unified_Contact_URL__c":"/api/rentalapply/decryptinsert","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LLEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LMEAY"},"Delete_URL__c":"/api/file/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/file/upload","Read_URL__c":"/api/file/preview?key=","Sobject_Type__c":"Document","Undelete_URL__c":"/api/file/download?key=","Update_URL__c":"/api/tx/confirmfile","View_Unified_Contact_URL__c":"/api/file/convert","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LMEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LNEAY"},"Delete_URL__c":"/api/lead/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/lead/insert","Read_URL__c":"/api/lead/query","Search_URL__c":"/api/lead/search","Sobject_Type__c":"Lead","Undelete_URL__c":"/api/lead/undelete","Update_URL__c":"/api/lead/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LNEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LOEAY"},"Delete_URL__c":"/api/aseactivity/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/aseactivity/insert","Read_URL__c":"/api/aseactivity/query","Sobject_Type__c":"ASEActivity__c","Undelete_URL__c":"/api/aseactivity/undelete","Update_URL__c":"/api/aseactivity/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LOEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LPEAY"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/502?","Read_URL__c":"/api/file/preview?key=","Search_URL__c":"/api/tx/confirmfile","Sobject_Type__c":"NFM502","Undelete_URL__c":"/api/file/download?key=","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LPEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LQEAY"},"Enable_Encrypt__c":false,"New_URL__c":"/api/nfm/702","Sobject_Type__c":"NFM702","Whether_Enable_Migration__c":false,"Id":"a5E1m00000068LQEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LREAY"},"Delete_URL__c":"/api/agencycontact/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/agencycontact/insert","Read_URL__c":"/api/agencycontact/query","Search_URL__c":"/api/agencycontact/search","Sobject_Type__c":"Agency_Contact__c","Undelete_URL__c":"/api/agencycontact/undelete","New_Encrypt_URL__c":"/api/agencycontact/decryptinsert","Update_Encrypt_URL__c":"/api/agencycontact/decryptupdate","Update_URL__c":"/api/agencycontact/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LREAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LSEAY"},"Delete_URL__c":"/api/case/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/case/insert","Read_URL__c":"/api/case/query","Sobject_Type__c":"Case","Undelete_URL__c":"/api/case/undelete","Update_URL__c":"/api/case/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LSEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LZEAY"},"Delete_URL__c":"/api/contact/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/contact/insertV2","Read_URL__c":"/api/contact/query","Search_URL__c":"/api/contact/search","Sobject_Type__c":"contactV2","Undelete_URL__c":"/api/contact/undelete","Update_URL__c":"/api/contact/updateV2","View_Unified_Contact_URL__c":"/api/viewContact/query","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LZEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LJEAY"},"Delete_URL__c":"/api/consumapply/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/consumapply/insertV2","Read_URL__c":"/api/consumapply/query","Sobject_Type__c":"Consum_Apply__cV2","Undelete_URL__c":"/api/consumapply/undelete","Update_URL__c":"/api/consumapply/updateV2","View_Unified_Contact_URL__c":"/api/consumapply/decryptinsert","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LJEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LNEAY"},"Delete_URL__c":"/api/lead/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/lead/insertV2","Read_URL__c":"/api/lead/query","Search_URL__c":"/api/lead/search","Sobject_Type__c":"LeadV2","Undelete_URL__c":"/api/lead/undelete","Update_URL__c":"/api/lead/updateV2","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LNEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LAEAY"},"Delete_URL__c":"/api/consumsetdetail/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/consumsetdetail/insertV2","Read_URL__c":"/api/consumsetdetail/query","Search_URL__c":"/api/consumsetdetail/search","Sobject_Type__c":"Consum_Apply_Equipment_Set_Detail__cV2","Undelete_URL__c":"/api/consumsetdetail/undelete","Update_URL__c":"/api/consumsetdetail/updateV2","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LAEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LBEAX"},"Delete_URL__c":"/api/repair/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/repair/insertV2","Read_URL__c":"/api/repair/query","Sobject_Type__c":"Repair__cV2","Undelete_URL__c":"/api/repair/undelete","New_Encrypt_URL__c":"/api/repair/decryptinsert","Update_Encrypt_URL__c":"/api/repair/decryptupdate","Update_URL__c":"/api/repair/updateV2","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LBEAX","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LREAY"},"Delete_URL__c":"/api/agencycontact/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/agencycontact/insertV2","Read_URL__c":"/api/agencycontact/query","Search_URL__c":"/api/agencycontact/search","Sobject_Type__c":"Agency_Contact__cV2","Undelete_URL__c":"/api/agencycontact/undelete","New_Encrypt_URL__c":"/api/agencycontact/decryptinsert","Update_Encrypt_URL__c":"/api/agencycontact/decryptupdate","Update_URL__c":"/api/agencycontact/updateV2","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LREAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000168LREAY"},"Delete_URL__c":"/api/rentalapply/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/rentalapply/insertV2","Read_URL__c":"/api/rentalapply/query","Search_URL__c":"/api/rentalapply/search","Sobject_Type__c":"Rental_Apply__cV2","Undelete_URL__c":"/api/rentalapply/undelete","New_Encrypt_URL__c":"/api/rentalapply/decryptinsert","Update_Encrypt_URL__c":"/api/rentalapply/decryptupdate","Update_URL__c":"/api/rentalapply/updateV2","Whether_Enable_Migration__c":true,"Id":"a5E1m00006168LREAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00006168LREAY"},"Delete_URL__c":"/api/report/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/report/insert","Read_URL__c":"/api/report/query","Sobject_Type__c":"Report__cV2","Undelete_URL__c":"/api/report/undelete","Update_URL__c":"/api/report/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00006168LREAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m03000068L6EAI"},"Delete_URL__c":"/api/tenderinfo/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/tenderinfo/insert","Read_URL__c":"/api/tenderinfo/query","Sobject_Type__c":"Tender_information__cV2","Undelete_URL__c":"/api/tenderinfo/undelete","Update_URL__c":"/api/tenderinfo/update","Whether_Enable_Migration__c":true,"Id":"a5E1m03000068L6EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m23000068LOEAY"},"Delete_URL__c":"/api/aseactivity/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/aseactivity/insert","Read_URL__c":"/api/aseactivity/query","Sobject_Type__c":"ASEActivity__cV2","Undelete_URL__c":"/api/aseactivity/undelete","Update_URL__c":"/api/aseactivity/update","Whether_Enable_Migration__c":true,"Id":"a5E1m23000068LOEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m34000068L9EAI"},"Delete_URL__c":"/api/qisreport/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/qisreport/insert","Read_URL__c":"/api/qisreport/query","Search_URL__c":"/api/qisreport/search","Sobject_Type__c":"QIS_Report__cV2","Undelete_URL__c":"/api/qisreport/undelete","Update_URL__c":"/api/qisreport/update","Whether_Enable_Migration__c":true,"Id":"a5E1m34000068L9EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m47000068L8EAI"},"Delete_URL__c":"/api/address/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/address/insert","Read_URL__c":"/api/address/query","Search_URL__c":"/api/address/search","Sobject_Type__c":"Address__cV2","Undelete_URL__c":"/api/address/undelete","Update_URL__c":"/api/address/update","Whether_Enable_Migration__c":true,"Id":"a5E1m47000068L8EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LSEAY"},"Delete_URL__c":"/api/CaseV2/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/CaseV2/insert","Read_URL__c":"/api/CaseV2/query","Sobject_Type__c":"CaseV2","Undelete_URL__c":"/api/CaseV2/undelete","Update_URL__c":"/api/CaseV2/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LSEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068LKEAY"},"Delete_URL__c":"/api/inquiryform/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/inquiryform/insert","Read_URL__c":"/api/inquiryform/query","Sobject_Type__c":"Inquiry_form__cV2","Undelete_URL__c":"/api/inquiryform/undelete","Update_URL__c":"/api/inquiryform/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068LKEAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L4EAI"},"Delete_URL__c":"/api/inspectionreport/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/inspectionreport/insert","Read_URL__c":"/api/inspectionreport/query","Sobject_Type__c":"Inspection_Report__cV2","Undelete_URL__c":"/api/inspectionreport/undelete","Update_URL__c":"/api/inspectionreport/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L4EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00000068L7EAI"},"Delete_URL__c":"/api/repairsuborder/delete","Enable_Encrypt__c":false,"New_URL__c":"/api/repairsuborder/insert","Read_URL__c":"/api/repairsuborder/query","Sobject_Type__c":"RepairSubOrder__cV2","Undelete_URL__c":"/api/repairsuborder/undelete","Update_URL__c":"/api/repairsuborder/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00000068L7EAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Policy_Configuration__c","url":"/services/data/v54.0/sobjects/PI_Policy_Configuration__c/a5E1m00001168LCEAY"},"Delete_URL__c":"/api/oncall/delete","Enable_Encrypt__c":true,"New_URL__c":"/api/oncall/insert","Read_URL__c":"/api/oncall/query","Sobject_Type__c":"On_Call__cV2","Undelete_URL__c":"/api/oncall/undelete","Update_URL__c":"/api/oncall/update","Whether_Enable_Migration__c":true,"Id":"a5E1m00001168LCEAY","CurrencyIsoCode":"CNY"}]';
        List<PI_Policy_Configuration__c> piList = (List<PI_Policy_Configuration__c>)JSON.deserialize(piJson,List<PI_Policy_Configuration__c>.class); 
        List<PI_Policy_Configuration__c> insertPiList = new List<PI_Policy_Configuration__c>();

        for(PI_Policy_Configuration__c pi : piList){
            
            PI_Policy_Configuration__c ipi = new PI_Policy_Configuration__c();
            ipi.Delete_URL__c = pi.Delete_URL__c;
            ipi.Enable_Encrypt__c = pi.Enable_Encrypt__c;
            ipi.New_URL__c = pi.New_URL__c;
            ipi.Read_URL__c = pi.Read_URL__c;
            ipi.Search_URL__c = pi.Search_URL__c;
            ipi.Sobject_Type__c = pi.Sobject_Type__c;
            ipi.Undelete_URL__c = pi.Undelete_URL__c;
            ipi.New_Encrypt_URL__c = pi.New_Encrypt_URL__c;
            ipi.Update_Encrypt_URL__c = pi.Update_Encrypt_URL__c;
            ipi.Update_URL__c = pi.Update_URL__c;
            ipi.View_Unified_Contact_URL__c = pi.View_Unified_Contact_URL__c;
            ipi.Whether_Enable_Migration__c = pi.Whether_Enable_Migration__c;

            if(sobjectTypes==null || sobjectTypes.contains(pi.Sobject_Type__c)){
                system.debug(ipi);
                if(ipi.Sobject_Type__c == 'contactV2'){
                    system.debug('zhj contactV2');
                }
                insertPiList.add(ipi);
            }
        }

        for(PI_Policy_Configuration__c ppc : insertPiList){
            system.debug('ppc.Sobject_Type__c = ' + ppc.Sobject_Type__c);
        }
        insert insertPiList;
        Map<String,String> typeIdMap = new Map<String,String>();//key: type value: id
        for(PI_Policy_Configuration__c pi:insertPiList){
            typeIdMap.put(pi.Sobject_Type__c,pi.Id);
        }
        String pidJson = '[{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979PAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Practitioner5_Part__c","AWS_Field_API__c":"Practitioner5_Part__c","Id":"a4l0l000000979PAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097HAAAY"},"PI_Policy_Configuration_Name__c":"ASEActivity__c","PI_Policy_Configuration__c":"a4n0l0000008pWKAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"CustomerTel__c","AWS_Field_API__c":"customerTel","SF_Field_Encrypted_API__c":"CustomerTel_Encrypted__c","AWS_Encrypted_Field_API__c":"customerTelEncrypt","Id":"a4l0l00000097HAAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097NhAAI"},"PI_Policy_Configuration_Name__c":"Rental_Apply__c","PI_Policy_Configuration__c":"a4n0l0000008phIAAQ","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Phone_number__c","AWS_Field_API__c":"phoneNumber","SF_Field_Encrypted_API__c":"Phone_Number_Encrypt__c","AWS_Encrypted_Field_API__c":"phoneNumberEncrypt","Id":"a4l0l00000097NhAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097O1AAI"},"PI_Policy_Configuration_Name__c":"On_Call__c","PI_Policy_Configuration__c":"a4n0l0000008phXAAQ","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Responsible_Person_HP__c","AWS_Field_API__c":"responsiblePersonHP","SF_Field_Encrypted_API__c":"Responsible_PersonHP_Encrypt__c","AWS_Encrypted_Field_API__c":"responsiblePersonHPEncrypt","Id":"a4l0l00000097O1AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097HFAAY"},"PI_Policy_Configuration_Name__c":"ASEActivity__c","PI_Policy_Configuration__c":"a4n0l0000008pWKAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"WorkPlace__c","AWS_Field_API__c":"workPlace","SF_Field_Encrypted_API__c":"WorkPlace_Encrypted__c","AWS_Encrypted_Field_API__c":"workPlaceEncrypt","Id":"a4l0l00000097HFAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097DwAAI"},"PI_Policy_Configuration_Name__c":"RepairSubOrder__c","PI_Policy_Configuration__c":"a4n0l0000008pWZAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"RepairApplicantTel__c","AWS_Field_API__c":"repairApplicantTel","SF_Field_Encrypted_API__c":"RepairApplicantTel_Encrypted__c","AWS_Encrypted_Field_API__c":"repairApplicantTelEncrypt","Id":"a4l0l00000097DwAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097DrAAI"},"PI_Policy_Configuration_Name__c":"RepairSubOrder__c","PI_Policy_Configuration__c":"a4n0l0000008pWZAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"RepairApplicantName__c","AWS_Field_API__c":"repairApplicantName","SF_Field_Encrypted_API__c":"RepairApplicantName_Encrypted__c","AWS_Encrypted_Field_API__c":"repairApplicantNameEncrypt","Id":"a4l0l00000097DrAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097D8AAI"},"PI_Policy_Configuration_Name__c":"CampaignMember","PI_Policy_Configuration__c":"a4n0l0000008pWPAAY","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Contact__c","AWS_Field_API__c":"contact","SF_Field_Encrypted_API__c":"Contact_Encrypted__c","AWS_Encrypted_Field_API__c":"contactEncrypt","Id":"a4l0l00000097D8AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097RAAAY"},"PI_Policy_Configuration_Name__c":"Event","PI_Policy_Configuration__c":"a4n0l0000008piuAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Visitor2__c","AWS_Field_API__c":"visitor2","SF_Field_Encrypted_API__c":"Visitor2_Encrypted__c","AWS_Encrypted_Field_API__c":"visitor2Encrypt","Id":"a4l0l00000097RAAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097R5AAI"},"PI_Policy_Configuration_Name__c":"Event","PI_Policy_Configuration__c":"a4n0l0000008piuAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Visitor1__c","AWS_Field_API__c":"visitor1","SF_Field_Encrypted_API__c":"Visitor1_Encrypted__c","AWS_Encrypted_Field_API__c":"visitor1Encrypt","Id":"a4l0l00000097R5AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979UAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"age__c","AWS_Field_API__c":"age__c","Id":"a4l0l000000979UAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097DIAAY"},"PI_Policy_Configuration_Name__c":"Inquiry_form__c","PI_Policy_Configuration__c":"a4n0l0000008pWUAAY","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Email__c","AWS_Field_API__c":"email","SF_Field_Encrypted_API__c":"Email_Encrypted__c","AWS_Encrypted_Field_API__c":"emailEncrypted","Order_Number__c":2,"Id":"a4l0l00000097DIAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l0000009787AAA"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Caller_phone_c__c","AWS_Field_API__c":"Caller_phone_c__c","Id":"a4l0l0000009787AAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097HeAAI"},"PI_Policy_Configuration_Name__c":"Agency_Contact__c","PI_Policy_Configuration__c":"a4n0l0000008pgtAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Doctor_Division1__c","AWS_Field_API__c":"doctorDivision1","SF_Field_Encrypted_API__c":"Doctor_Division1_Encrypted__c","AWS_Encrypted_Field_API__c":"doctorDivision1Encrypt","Id":"a4l0l00000097HeAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097RKAAY"},"PI_Policy_Configuration_Name__c":"Event","PI_Policy_Configuration__c":"a4n0l0000008piuAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Visitor4__c","AWS_Field_API__c":"visitor4","SF_Field_Encrypted_API__c":"Visitor4_Encrypted__c","AWS_Encrypted_Field_API__c":"visitor4Encrypt","Id":"a4l0l00000097RKAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097DDAAY"},"PI_Policy_Configuration_Name__c":"Inquiry_form__c","PI_Policy_Configuration__c":"a4n0l0000008pWUAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Phone__c","AWS_Field_API__c":"phone","SF_Field_Encrypted_API__c":"Phone_Encrypted__c","AWS_Encrypted_Field_API__c":"PhoneEncrypted","Order_Number__c":1,"Id":"a4l0l00000097DDAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978HAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Person_In_Charge_Text__c","AWS_Field_API__c":"Person_In_Charge_Text__c","Id":"a4l0l000000978HAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000096uUAAQ"},"PI_Policy_Configuration_Name__c":"Lead","PI_Policy_Configuration__c":"a4n0l0000008o8JAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Email","AWS_Field_API__c":"Email","Id":"a4l0l00000096uUAAQ","CurrencyIsoCode":"USD"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977xAAA"},"PI_Policy_Configuration_Name__c":"Consum_Apply__c","PI_Policy_Configuration__c":"a4n0l0000008odYAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"direct_shippment_address__c","AWS_Field_API__c":"address","Id":"a4l0l000000977xAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l0000009782AAA"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"VOC_Informer_Name__c","AWS_Field_API__c":"VOC_Informer_Name__c","Id":"a4l0l0000009782AAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978CAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"VOC_Informer_Contact__c","AWS_Field_API__c":"VOC_Informer_Contact__c","Id":"a4l0l000000978CAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979AAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Practitioner2_Part__c","AWS_Field_API__c":"Practitioner2_Part__c","Id":"a4l0l000000979AAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097CFAAY"},"PI_Policy_Configuration_Name__c":"Inspection_Report__c","PI_Policy_Configuration__c":"a4n0l0000008pWFAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Responsible_Person__c","AWS_Field_API__c":"responsiblePerson","SF_Field_Encrypted_API__c":"Responsible_Person_Encrypted__c","AWS_Encrypted_Field_API__c":"responsiblePersonEncrypt","Id":"a4l0l00000097CFAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097CPAAY"},"PI_Policy_Configuration_Name__c":"Inspection_Report__c","PI_Policy_Configuration__c":"a4n0l0000008pWFAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"phone__c","AWS_Field_API__c":"phone","SF_Field_Encrypted_API__c":"phone_Encrypted__c","AWS_Encrypted_Field_API__c":"phoneEncrypt","Id":"a4l0l00000097CPAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097EQAAY"},"PI_Policy_Configuration_Name__c":"Consum_Apply_Equipment_Set_Detail__c","PI_Policy_Configuration__c":"a4n0l0000008pWeAAI","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Trial_User__c","AWS_Field_API__c":"trialUser","SF_Field_Encrypted_API__c":"Trial_User_Encrypt__c","AWS_Encrypted_Field_API__c":"trialUserEncrypt","Id":"a4l0l00000097EQAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097CjAAI"},"PI_Policy_Configuration_Name__c":"ASEActivity__c","PI_Policy_Configuration__c":"a4n0l0000008pWKAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"VisitStaff__c","AWS_Field_API__c":"visitStaff","SF_Field_Encrypted_API__c":"VisitStaffEncrypt__c","AWS_Encrypted_Field_API__c":"visitStaffEncrypt","Id":"a4l0l00000097CjAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977YAAQ"},"PI_Policy_Configuration_Name__c":"Case","PI_Policy_Configuration__c":"a4n0l0000008odTAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"cic_telephone__c","AWS_Field_API__c":"cicTelephone","SF_Field_Encrypted_API__c":"cic_telephone_Encrypted__c","AWS_Encrypted_Field_API__c":"cicTelephoneEncrypted","Id":"a4l0l000000977YAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979yAAA"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Phone","AWS_Field_API__c":"phone","SF_Field_Encrypted_API__c":"Phone_Encrypted__c","AWS_Encrypted_Field_API__c":"phoneEncrypt","Id":"a4l0l000000979yAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979zAAA"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"MobilePhone","AWS_Field_API__c":"mobilePhone","SF_Field_Encrypted_API__c":"MobilePhone_Encrypted__c","AWS_Encrypted_Field_API__c":"mobilePhoneEncrypt","Id":"a4l0l000000979zAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A0AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Title","AWS_Field_API__c":"title","SF_Field_Encrypted_API__c":"Title_Encrypted__c","AWS_Encrypted_Field_API__c":"titleEncrypt","Id":"a4l0l00000097A0AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A1AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"OLY_Assistant_Type__c","AWS_Field_API__c":"olyAssistantType","SF_Field_Encrypted_API__c":"OLY_Assistant_Type_Encrypted__c","AWS_Encrypted_Field_API__c":"olyAssistantTypeEncrypt","Id":"a4l0l00000097A1AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A2AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Job_Category_picklist__c","AWS_Field_API__c":"jobCategoryPicklist","SF_Field_Encrypted_API__c":"Job_Category_picklist_Encrypted__c","AWS_Encrypted_Field_API__c":"jobCategoryPicklistEncrypt","Id":"a4l0l00000097A2AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A3AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Contact_address__c","AWS_Field_API__c":"contactAddress","SF_Field_Encrypted_API__c":"Contact_address_Encrypted__c","AWS_Encrypted_Field_API__c":"contactAddressEncrypt","Id":"a4l0l00000097A3AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A4AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Type__c","AWS_Field_API__c":"type","SF_Field_Encrypted_API__c":"Type_Encrypted__c","AWS_Encrypted_Field_API__c":"typeEncrypt","Id":"a4l0l00000097A4AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A5AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Doctor_Division1__c","AWS_Field_API__c":"doctorDivision1","SF_Field_Encrypted_API__c":"Doctor_Division1_Encrypted__c","AWS_Encrypted_Field_API__c":"doctorDivision1Encrypt","Id":"a4l0l00000097A5AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A6AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"UniqueNumber__c","AWS_Field_API__c":"uniqueNumber","SF_Field_Encrypted_API__c":"UniqueNumber_Encrypted__c","AWS_Encrypted_Field_API__c":"uniqueNumberEncrypt","Id":"a4l0l00000097A6AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A7AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Email","AWS_Field_API__c":"email","SF_Field_Encrypted_API__c":"Email_Encrypted__c","AWS_Encrypted_Field_API__c":"emailEncrypt","Id":"a4l0l00000097A7AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097A8AAI"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"MedicalStaff_Full_name__c","AWS_Field_API__c":"medicalStaffFullName","SF_Field_Encrypted_API__c":"MedicalStaff_Full_name_Encrypted__c","AWS_Encrypted_Field_API__c":"medicalStaffFullNameEncrypt","Id":"a4l0l00000097A8AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979oAAA"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"Multi PickList","SF_Field_API_Name__c":"ContactType__c","AWS_Field_API__c":"contactType","SF_Field_Encrypted_API__c":"ContactType_Encrypted__c","AWS_Encrypted_Field_API__c":"contactTypeEncrypt","Id":"a4l0l000000979oAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097ImAAI"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"address_Contacts__c","AWS_Field_API__c":"addressContacts","SF_Field_Encrypted_API__c":"Address_Contacts_Encrypt__c","AWS_Encrypted_Field_API__c":"addressContactsEncrypt","Id":"a4l0l00000097ImAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097IcAAI"},"PI_Policy_Configuration_Name__c":"QIS_Report__c","PI_Policy_Configuration__c":"a4n0l0000008pdiAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Responsible_Person_HP__c","AWS_Field_API__c":"responsiblePersonHP","SF_Field_Encrypted_API__c":"Responsible_Person_HP_Encrypted__c","AWS_Encrypted_Field_API__c":"responsiblePersonHPEncrypt","Id":"a4l0l00000097IcAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GqAAI"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"AgentRelationWay__c","AWS_Field_API__c":"agentRelationWay","SF_Field_Encrypted_API__c":"AgentRelationWay_Encrypted__c","AWS_Encrypted_Field_API__c":"agentRelationWayEncrypt","Id":"a4l0l00000097GqAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GMAAY"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"ZhaoRelationName__c","AWS_Field_API__c":"zhaoRelationName","SF_Field_Encrypted_API__c":"ZhaoRelationName_Encrypted__c","AWS_Encrypted_Field_API__c":"zhaoRelationNameEncrypt","Id":"a4l0l00000097GMAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097J6AAI"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"address_Contacts_Name__c","AWS_Field_API__c":"addressContactsName","SF_Field_Encrypted_API__c":"Address_Contacts_Name_Encrypt__c","AWS_Encrypted_Field_API__c":"addressContactsNameEncrypt","Id":"a4l0l00000097J6AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097JBAAY"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"RepairApplicant__c","AWS_Field_API__c":"repairApplicant","SF_Field_Encrypted_API__c":"Repair_Applicant_Encrypt__c","AWS_Encrypted_Field_API__c":"repairApplicantEncrypt","Id":"a4l0l00000097JBAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097OuAAI"},"PI_Policy_Configuration_Name__c":"Inquiry_form__c","PI_Policy_Configuration__c":"a4n0l0000008pWUAAY","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Last_Name__c","AWS_Field_API__c":"lastName","SF_Field_Encrypted_API__c":"Last_Name_Encrypted__c","AWS_Encrypted_Field_API__c":"lastNameEncrypt","Order_Number__c":3,"Id":"a4l0l00000097OuAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097NcAAI"},"PI_Policy_Configuration_Name__c":"Rental_Apply__c","PI_Policy_Configuration__c":"a4n0l0000008phIAAQ","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"direct_shippment_address__c","AWS_Field_API__c":"directShippmentAddress","SF_Field_Encrypted_API__c":"Direct_Shippment_Address_Encrypt__c","AWS_Encrypted_Field_API__c":"directShippmentAddressEncrypt","Id":"a4l0l00000097NcAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097NwAAI"},"PI_Policy_Configuration_Name__c":"On_Call__c","PI_Policy_Configuration__c":"a4n0l0000008phXAAQ","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Caller_phone__c","AWS_Field_API__c":"callerPhone","SF_Field_Encrypted_API__c":"Caller_Phone_Encrypt__c","AWS_Encrypted_Field_API__c":"callerPhoneEncrypt","Id":"a4l0l00000097NwAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097RPAAY"},"PI_Policy_Configuration_Name__c":"Event","PI_Policy_Configuration__c":"a4n0l0000008piuAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Visitor5__c","AWS_Field_API__c":"visitor5","SF_Field_Encrypted_API__c":"Visitor5_Encrypted__c","AWS_Encrypted_Field_API__c":"visitor5Encrypt","Id":"a4l0l00000097RPAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097HUAAY"},"PI_Policy_Configuration_Name__c":"Agency_Contact__c","PI_Policy_Configuration__c":"a4n0l0000008pgtAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Type__c","AWS_Field_API__c":"type","SF_Field_Encrypted_API__c":"Type_Encrypted__c","AWS_Encrypted_Field_API__c":"typeEncrypt","Id":"a4l0l00000097HUAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000096uFAAQ"},"PI_Policy_Configuration_Name__c":"Lead","PI_Policy_Configuration__c":"a4n0l0000008o8JAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Phone","AWS_Field_API__c":"phone","Id":"a4l0l00000096uFAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977dAAA"},"PI_Policy_Configuration_Name__c":"Case","PI_Policy_Configuration__c":"a4n0l0000008odTAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"CASE_CUSTOMER__c","AWS_Field_API__c":"caseCustomer","SF_Field_Encrypted_API__c":"CASE_CUSTOMER_Encrypted__c","AWS_Encrypted_Field_API__c":"caseCustomerEncrypted","Id":"a4l0l000000977dAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978RAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Staff_Info_Manual_c__c","AWS_Field_API__c":"Staff_Info_Manual_c__c","Id":"a4l0l000000978RAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977sAAA"},"PI_Policy_Configuration_Name__c":"Consum_Apply__c","PI_Policy_Configuration__c":"a4n0l0000008odYAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Phone_number__c","AWS_Field_API__c":"phone","Id":"a4l0l000000977sAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097AxAAI"},"PI_Policy_Configuration_Name__c":"Address__c","PI_Policy_Configuration__c":"a4n0l0000008pWAAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Telephone__c","AWS_Field_API__c":"telephone","Id":"a4l0l00000097AxAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097B7AAI"},"PI_Policy_Configuration_Name__c":"Address__c","PI_Policy_Configuration__c":"a4n0l0000008pWAAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Detailed_Address__c","AWS_Field_API__c":"detailedAddress","Id":"a4l0l00000097B7AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097RFAAY"},"PI_Policy_Configuration_Name__c":"Event","PI_Policy_Configuration__c":"a4n0l0000008piuAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Visitor3__c","AWS_Field_API__c":"visitor3","SF_Field_Encrypted_API__c":"Visitor3_Encrypted__c","AWS_Encrypted_Field_API__c":"visitor3Encrypt","Id":"a4l0l00000097RFAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977TAAQ"},"PI_Policy_Configuration_Name__c":"Lead","PI_Policy_Configuration__c":"a4n0l0000008o8JAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"LastName","AWS_Field_API__c":"LastName","Id":"a4l0l000000977TAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097B2AAI"},"PI_Policy_Configuration_Name__c":"Address__c","PI_Policy_Configuration__c":"a4n0l0000008pWAAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"ZipCode__c","AWS_Field_API__c":"zipCode","Id":"a4l0l00000097B2AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097HZAAY"},"PI_Policy_Configuration_Name__c":"Agency_Contact__c","PI_Policy_Configuration__c":"a4n0l0000008pgtAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Name","AWS_Field_API__c":"name","SF_Field_Encrypted_API__c":"Name_Encrypted__c","AWS_Encrypted_Field_API__c":"nameEncrypt","Id":"a4l0l00000097HZAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l0000009795AAA"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Practitioner1_Part__c","AWS_Field_API__c":"Practitioner1_Part__c","Id":"a4l0l0000009795AAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979ZAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"sex__c","AWS_Field_API__c":"sex__c","Id":"a4l0l000000979ZAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978MAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Professor_sigh_text__c","AWS_Field_API__c":"Professor_sigh_text__c","Id":"a4l0l000000978MAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979FAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Practitioner3_Part__c","AWS_Field_API__c":"Practitioner3_Part__c","Id":"a4l0l000000979FAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000977iAAA"},"PI_Policy_Configuration_Name__c":"Case","PI_Policy_Configuration__c":"a4n0l0000008odTAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Customer_manual__c","AWS_Field_API__c":"customerManual","SF_Field_Encrypted_API__c":"Customer_manual_Encrypted__c","AWS_Encrypted_Field_API__c":"customerManualEncrypted","Id":"a4l0l000000977iAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979KAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"PickList","SF_Field_API_Name__c":"Practitioner4_Part__c","AWS_Field_API__c":"Practitioner4_Part__c","Id":"a4l0l000000979KAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978WAAQ"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Responsible_Person_HP_c__c","AWS_Field_API__c":"Responsible_Person_HP_c__c","Id":"a4l0l000000978WAAQ","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000978hAAA"},"PI_Policy_Configuration_Name__c":"Report__c","PI_Policy_Configuration__c":"a4n0l0000008oddAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Medical_History__c","AWS_Field_API__c":"Medical_History__c","Id":"a4l0l000000978hAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l000000979uAAA"},"PI_Policy_Configuration_Name__c":"Contact","PI_Policy_Configuration__c":"a4n0l0000008odOAAQ","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"LastName","AWS_Field_API__c":"lastName","SF_Field_Encrypted_API__c":"LastName_Encrypted__c","AWS_Encrypted_Field_API__c":"lastNameEncrypt","Id":"a4l0l000000979uAAA","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097J1AAI"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"Detailed_Address__c","AWS_Field_API__c":"detailedAddress","SF_Field_Encrypted_API__c":"Detailed_Address_Encrypt__c","AWS_Encrypted_Field_API__c":"detailedAddressEncrypt","Id":"a4l0l00000097J1AAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097DXAAY"},"PI_Policy_Configuration_Name__c":"Inspection_Report__c","PI_Policy_Configuration__c":"a4n0l0000008pWFAAY","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Technician_HP__c","AWS_Field_API__c":"technicianHP","SF_Field_Encrypted_API__c":"Technician_HP_Encrypted__c","AWS_Encrypted_Field_API__c":"technicianHPEncrypt","Id":"a4l0l00000097DXAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GgAAI"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"ZhongRelationWay__c","AWS_Field_API__c":"zhongRelationWay","SF_Field_Encrypted_API__c":"ZhongRelationWay_Encrypted__c","AWS_Encrypted_Field_API__c":"zhongRelationWayEncrypt","Id":"a4l0l00000097GgAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GWAAY"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"ZhaoRelationWay__c","AWS_Field_API__c":"zhaoRelationWay","SF_Field_Encrypted_API__c":"ZhaoRelationWay_Encrypted__c","AWS_Encrypted_Field_API__c":"zhaoRelationWayEncrypt","Id":"a4l0l00000097GWAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097IrAAI"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"address_Telephone__c","AWS_Field_API__c":"addressTelephone","SF_Field_Encrypted_API__c":"Address_Telephone_Encrypt__c","AWS_Encrypted_Field_API__c":"addressTelephoneEncrypt","Id":"a4l0l00000097IrAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097JGAAY"},"PI_Policy_Configuration_Name__c":"Repair__c","PI_Policy_Configuration__c":"a4n0l0000008pgyAAA","Enable_Encrypt__c":true,"SF_Field_API_Name__c":"address_ZipCode__c","AWS_Field_API__c":"addressZipCode","SF_Field_Encrypted_API__c":"Address_ZipCode_Encrypt__c","AWS_Encrypted_Field_API__c":"addressZipCodeEncrypt","Id":"a4l0l00000097JGAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097IXAAY"},"PI_Policy_Configuration_Name__c":"QIS_Report__c","PI_Policy_Configuration__c":"a4n0l0000008pdiAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"Caller_phone__c","AWS_Field_API__c":"callerPhone","SF_Field_Encrypted_API__c":"Caller_phone_Encrypted__c","AWS_Encrypted_Field_API__c":"callerPhoneEncrypt","Id":"a4l0l00000097IXAAY","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GlAAI"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"AgentRelationName__c","AWS_Field_API__c":"agentRelationName","SF_Field_Encrypted_API__c":"AgentRelationName_Encrypted__c","AWS_Encrypted_Field_API__c":"agentRelationNameEncrypt","Id":"a4l0l00000097GlAAI","CurrencyIsoCode":"CNY"},{"attributes":{"type":"PI_Field_Policy_Detail__c","url":"/services/data/v54.0/sobjects/PI_Field_Policy_Detail__c/a4l0l00000097GbAAI"},"PI_Policy_Configuration_Name__c":"Tender_information__c","PI_Policy_Configuration__c":"a4n0l0000008pgjAAA","Enable_Encrypt__c":true,"Field_Type__c":"String","SF_Field_API_Name__c":"ZhongRelationName__c","AWS_Field_API__c":"zhongRelationName","SF_Field_Encrypted_API__c":"ZhongRelationName_Encrypted__c","AWS_Encrypted_Field_API__c":"zhongRelationNameEncrypt","Id":"a4l0l00000097GbAAI","CurrencyIsoCode":"CNY"}]';
        List<PI_Field_Policy_Detail__c> pidList = (List<PI_Field_Policy_Detail__c>)JSON.deserialize(pidJson,List<PI_Field_Policy_Detail__c>.class);
        List<PI_Field_Policy_Detail__c> insertPidList = new List<PI_Field_Policy_Detail__c>();
        for(PI_Field_Policy_Detail__c pid:pidList){
            if (!typeIdMap.containsKey((pid.PI_Policy_Configuration_Name__c))){
                continue;
            }

            PI_Field_Policy_Detail__c ipid = new PI_Field_Policy_Detail__c();
            ipid.Enable_Encrypt__c = pid.Enable_Encrypt__c;
            ipid.Field_Type__c = pid.Field_Type__c;
            ipid.Order_Number__c = pid.Order_Number__c;
            ipid.PI_Policy_Configuration__c = typeIdMap.get(pid.PI_Policy_Configuration_Name__c);
            ipid.SF_Field_API_Name__c = pid.SF_Field_API_Name__c;
            ipid.AWS_Field_API__c = pid.AWS_Field_API__c;
            ipid.SF_Field_Encrypted_API__c = pid.SF_Field_Encrypted_API__c;
            ipid.AWS_Encrypted_Field_API__c = pid.AWS_Encrypted_Field_API__c;
            insertPidList.add(ipid);
        }
        insert insertPidList;
    }
    //create sample user
    public static List<User> CreateUsers(Integer num){
        Map<Id,Profile> profileList = new Map<Id, Profile>([SELECT Id, Name FROM Profile]) ;
        Map<String, Profile> profileMap = new Map<String, Profile>();
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        for(Profile profileTemp : profileList.values()){
            profileMap.put(profileTemp.Name, profileTemp);
        }
        
        List<User> userList=new List<User>();
         for(Integer i = 0 ;i<num;i++){
         	User u = new User( Alias = 'test',
			                     Email = 'testuser'+i+'@olympus.com',
			                     Emailencodingkey = 'UTF-8', 
			                     Lastname = 'TestUser'+i, 
			                     Languagelocalekey = 'zh_CN',
			        			 Localesidkey = 'zh_CN', 
			        			 Profileid = p.id, 
			        			 Country = 'China',
			        			 IsActive = true,
			        			 Timezonesidkey = 'America/Sao_Paulo', 
			                     Username = 'testuser'+i+'@olympus.com',
                                 Job_Category__c = '销售服务'
			);
            userList.add(u);
         }
        insert userList;
        //根据简档名取对应userList  Map<String,List<User>>
        // Map<String, List<User>> sampleUserMap = new Map<String, List<User>>();
        // for(User userTemp : userList){
        //     String profileName = profileList.get(userTemp.Profileid).Name ;
        //     if(sampleUserMap.containsKey(profileName)) {
        //         sampleUserMap.get(profileName).add(userTemp);
        //     }else{
        //         List<User> userTempList = new List<User>();
        //         userTempList.add(userTemp);
        //         sampleUserMap.put(profileName, userTempList);
        //     }
        // }
        // return sampleUserMap;
        //直接返回userlist
        return userList;
    }
    public static List<Account> CreateSimpleAccounts(Integer num){
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        User hpOwner = new User();
        hpOwner = [SELECT Test_staff__c,LastName,FirstName,Alias,CommunityNickname,Email,Username,IsActive,EmailEncodingKey,ProfileId FROM User Limit 1];
        if(hpOwner==null){
            hpOwner = new User(Test_staff__c = true, LastName = 'TestUserA', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id,Job_Category__c = '销售服务');
            insert hpOwner;
        }
        List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHp.size() == 0) {
            return null;
        }
        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 呼吸科' order by Name desc];
        if (rectDpt.size() == 0) {
            return null;
        }
        Account hp1 = new Account(RecordTypeId = rectHp[0].Id,Is_Active__c = '有効' ,Name = 'testHp1', OCM_Category__c = 'H0', OwnerId = hpOwner.Id);
        insert hp1;
        Account dc1s = [Select Id, Name, Department_Class_Label__c,ParentId from Account where Parent.Id = :hp1.Id and Department_Class_Label__c  = '呼吸科' order by Department_Class_Label__c limit 1];
        List<Account> accList = new List<Account>();
        for(Integer i = 0;i < num; i++){
            Account acc = new Account();
            acc.Name = 'simpleTest'+i;
            acc.ParentId = dc1s.Id;
            acc.Hospital__c = dc1s.ParentId;//战略科室的医院要和科室的医院一致 Parent.Parent.RecordType.Name = '病院'  and Hospital__c == Parent.ParentId
            acc.Department_Class__c = dc1s.Id;//战略科室分类要和母公司一样 Department_Class__c = ParentId
            acc.RecordTypeId = rectDpt[0].Id;// 战略科室分类的类型要和科室的客户记录类型一致。RecordType.Name == Parent.Department_Class_Label__c
            accList.add(acc);
        }
        insert accList;
        return accList;
    }
    public static List<Account> CreateAccounts(Integer num){
    	Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        User hpOwner = new User();
        hpOwner = [SELECT Test_staff__c,LastName,FirstName,Alias,CommunityNickname,Email,Username,IsActive,EmailEncodingKey,ProfileId FROM User Limit 1];
        if(hpOwner==null){
            hpOwner = new User(Test_staff__c = true, LastName = 'TestUserA', FirstName = 'owner', Alias = 'hp', 
                               CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', 
                               IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', 
                               LanguageLocaleKey = 'ja', ProfileId = p.id,Job_Category__c = '销售服务');
            insert hpOwner;
        }
        List<RecordType> rectHp = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHp.size() == 0) {
            return null;
        }
        List<RecordType> rectDp = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科' order by Name desc];
        if (rectDp.size() == 0) {
            return null;
        }

        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 呼吸科' order by Name desc];
        if (rectDpt.size() == 0) {
            return null;
        }
        Account hp1 = new Account(RecordTypeId = rectHp[0].Id,Is_Active__c = '有効' ,Name = 'testHp1', OCM_Category__c = 'H0', OwnerId = hpOwner.Id);
        insert hp1;

        Account dp1 = new Account(RecordTypeId = rectDp[0].Id, Is_Active__c = '有効' , Department_Class_Label__c = '呼吸科',
            ParentId  = hp1.id, Name = 'testdp1', OCM_Category__c = 'H0', OwnerId = hpOwner.Id);
        insert dp1;

        List<Account> dc1s = [Select Id, Name, Department_Class_Label__c from Account where Parent.Id = :hp1.Id and Department_Class_Label__c  = '呼吸科' order by Department_Class_Label__c];
        List<Account> accList = new List<Account>();
        for(Integer i=0;i<num;i++){
        	Account acc = new Account();
	        acc.RecordTypeId = rectDpt[0].Id;
	        acc.Name         = 'test'+i;
	        acc.Department_Name__c  = '診療科'+i;
	        acc.ParentId            = dc1s[0].Id;
	        acc.Department_Class__c = dc1s[0].Id;
	        acc.Hospital__c         = hp1.Id;
	        acc.Is_Active__c        = '有効';
	        accList.add(acc);
        }
        insert accList;
        return accList;
    }
    public static List<Contact> CreateContacts(Integer num){
    	List<Account> accList = CreateAccounts(1);
    	List<Contact> conList = new List<Contact>();
    	for(Integer i=0;i<num;i++){
    		Contact con = new Contact();
    		con.AccountId = accList[0].Id;
	        con.FirstName = '責任者';
	        con.LastName = 'test'+i+'医院';
	        con.Strategic_dept_Class__c = accList[0].Id;
	        conList.add(con);
    	}
    	insert conList;
    	return conList;
    }
    public static List<Opportunity> CreateOpportunitys(Integer num){
    	List<Opportunity> oppList = new List<Opportunity>();
    	List<Account> accList = CreateAccounts(3);
    	List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
            return null;
        }
        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科'];
        if (rectSct.size() == 0) {
            return null;
        }
        List<RecordType> rectDpt = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '診療科 消化科'];
        if (rectDpt.size() == 0) {
            return null;
        }
        Account company = accList[0];
        company.RecordTypeId = rectCo[0].Id;
        company.Name         = 'NFM007TestCompany';
        upsert company;
        Account section = accList[1];
        section.RecordTypeId = rectSct[0].Id;
        section.Name         = '*';
        section.Department_Class_Label__c = '消化科';
        section.ParentId                  = company.Id;
        section.Hospital_Department_Class__c = company.Id;
        upsert section;
        Account depart = accList[2];
        depart.RecordTypeId = rectDpt[0].Id;
        depart.Name         = '*';
        depart.Department_Name__c  = 'NFM007TestDepart';
        depart.ParentId            = section.Id;
        depart.Department_Class__c = section.Id;
        depart.Hospital__c         = company.Id;
        upsert depart;
    	for(Integer i=0;i<num;i++){
    		Opportunity opp = new Opportunity();
    		opp.AccountId           	= depart.Id;
	        opp.Department_Class__c 	= section.Id;
	        opp.Hospital__c         	= company.Id;
	        opp.SAP_Send_OK__c      	= false;
	        opp.Name                	= 'GZ-SP-NFM007_'+i;
	        opp.Trade__c            	= '内貿';
	        opp.StageName           	= '引合';
	        opp.CloseDate           	= Date.newinstance(2022, 11, 30);
	        opp.Stock_apply_status__c 	= '申请中';
    		oppList.add(opp);
    	}
    	insert oppList;
    	return oppList;
    }
    public static List<Task> CreateTasks(Integer num){
    	List<Task> taList = new List<Task>();
    	Account acc = CreateAccounts(1)[0];
    	Opportunity opp = CreateOpportunitys(1)[0];
    	for(Integer i=0;i<num;i++){
    		Task ta = new Task();
   //  		ta.account__c = acc.id;
			// ta.name = 'testTask'+i;
			// ta.taskStatus__c = '01 分配';
			// ta.assignee__c = UserInfo.getUserId();
	  //       ta.recordtypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId();
	  //       ta.distributionCount__c = 1;
	  //       ta.taskDifferent__c = '被动任务';
	  //       ta.OpportunityId__c = opp.Id;
   //  		taList.add(ta);
    	}
    	insert taList;
    	return taList;
    }
    public static List<Asset> CreateAssets(Integer num){
    	// 省
        Address_Level__c al = new Address_Level__c();
        al.Name = '東京';
        al.Level1_Code__c = 'CN-99';
        al.Level1_Sys_No__c = '999999';
        insert al;
        // 市
        Address_Level2__c al2 = new Address_Level2__c();
        al2.Level1_Code__c = 'CN-99';
        al2.Level1_Sys_No__c = '999999';
        al2.Level1_Name__c = '東京';
        al2.Name = '渋谷区';
        al2.Level2_Code__c = 'CN-9999';
        al2.Level2_Sys_No__c = '9999999';
        al2.Address_Level__c = al.id;
        insert al2;

        // 病院を作る
        ControllerUtil.EscapeNFM001Trigger = true;
        StaticParameter.EscapeNFM001Trigger = true;
        StaticParameter.EscapeAccountTrigger = true;
        StaticParameter.EscapeNFM001AgencyContractTrigger = true;

        Account hospital = new Account();
        hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id;
        System.debug('病院完了!');
        hospital.Name = 'test hospital';
        hospital.Is_Active__c = '有効';
        hospital.Attribute_Type__c = '卫生部';
        hospital.Speciality_Type__c = '综合医院';
        hospital.Grade__c = '一级';
        hospital.OCM_Category__c = 'SLTV';
        hospital.Is_Medical__c = '医疗机构';
        hospital.State_Master__c = al.id;
        hospital.City_Master__c = al2.id;
        hospital.Town__c = '东京';
        insert hospital;
        System.debug('病院 insert 完了!');

        // 戦略科室を得る
        Account strategicDep = new Account();
        strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id;
        strategicDep.Name = 'Olympus社内 其他';
        strategicDep.Department_Class_Label__c = '其他';
        strategicDep.Hospital__c = hospital.Id;
        strategicDep.ParentId = hospital.Id;
        insert strategicDep;

        // 診療科を作る
        Account dep = new Account();
        dep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_OTH'].id;
        dep.Name = 'test dep';
        dep.AgentCode_Ext__c = '99998';
        dep.ParentId = strategicDep.Id;
        dep.Department_Class__c = strategicDep.Id;
        dep.Hospital__c = hospital.Id;
        insert dep;
        
        System.debug('診療科 insert 完了!');

        // 产品
        Product2 pro1 = new Product2(Name='name01',IsActive=true,Family='GI',
                Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',
                Fixture_Model_No_T__c = 'n01',
                ProductCode_Ext__c='pc01',Manual_Entry__c=false);

        insert new Product2[] {pro1};

        List<Asset> asList = new List<Asset>();
    	for(Integer i=0;i<num;i++){
    		Asset assetA1 = new Asset(Asset_Owner__c = 'Olympus');
            assetA1.RecordTypeId = System.Label.Asset_RecordType;
            assetA1.SerialNumber = 'ass'+i;
            assetA1.Name = 'ass'+i;
            assetA1.AccountId = dep.Id;
            assetA1.Department_Class__c = strategicDep.Id;
            assetA1.Hospital__c = hospital.Id;
            assetA1.Product2Id = pro1.Id;
            assetA1.Quantity = 1;
            assetA1.Status = '有库存';
            assetA1.Manage_type__c = '个体管理';
            assetA1.Loaner_accsessary__c = false;
            assetA1.Out_of_wh__c = 0;
            assetA1.Salesdepartment__c = '1.华北营业本部';
            assetA1.Internal_asset_location__c = '北京 备品中心';
            assetA1.Product_category__c = 'GI';
            assetA1.Equipment_Type__c = '产品试用';
            assetA1.SalesProvince__c = '北京';
    		asList.add(assetA1);
    	}
    	insert asList;
    	return asList;
    }
    public static List<Repair__c> CreateRepairs(Integer num){
    	List<Repair__c> rpList = new List<Repair__c>();

        Asset ast = CreateAssets(1)[0];
        Account strategicDep = new Account();
        strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id;
        strategicDep.Name = 'Olympus社内 其他';
        strategicDep.Department_Class_Label__c = '其他';
        strategicDep.Hospital__c = ast.Hospital__c;
        strategicDep.ParentId = ast.Hospital__c;
        insert strategicDep;
        // List<Account> strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hospital.Id AND recordType.DeveloperName = 'Department_Class_OTH'];

        String strategicDepId = strategicDep.Id;
        Account dep = new Account();
        dep.recordtypeId = [SELECT Id FROM RecordType WHERE IsActive = true AND SobjectType = 'Account' AND DeveloperName = 'Department_OTH'].id;

        dep.Name = 'test depp';
        dep.AgentCode_Ext__c = '99999988';
        dep.ParentId = strategicDepId;
        dep.Department_Class__c = strategicDepId;
        dep.Hospital__c = ast.Hospital__c;
        insert dep;
        String depId = dep.Id;

        
    	for(Integer i=0;i<num;i++){
    		Repair__c repairObj1 = new Repair__c();

            repairObj1.Delivered_Product__c = ast.Id;
            repairObj1.Hospital__c = ast.Hospital__c;
            // repairObj1.Hospital__c = hospitalId;
            repairObj1.Department_Class__c = strategicDepId;
            repairObj1.Account__c = depId;
            repairObj1.SalesOfficeCode_selection__c = '北京石景山';
            repairObj1.On_site_repair__c = 'RC修理';
            repairObj1.Failure_Occurrence_Date__c = Date.today();
    		rpList.add(repairObj1);
    	}
    	insert rpList;
    	return rpList;
    }
    public static List<Address__c> CreateAddresses(Integer num){
    	List<Address__c> addList = new List<Address__c>();
    	Repair__c rp = CreateRepairs(1)[0];
    	Contact contact2 = new Contact();
        contact2.AccountId = rp.Account__c;
        contact2.FirstName = '小明';
        contact2.LastName = 'test1经销商';
        insert contact2;
    	for(Integer i=0;i<num;i++){
    		Address__c add = new Address__c();
    		add.Address_Classification__c = '医院';
	        add.Customer__c = rp.Account__c;
	        // add.Customer__c = depart.Id;
	        add.Contacts__c = contact2.id;
	        add.Telephone__c = '123123'+i;
	        add.Province__c = rp.Account__r.State_Master__c;
	        add.City__c = rp.Account__r.City_Master__c;
	        // add.Province__c = alc1.id;
	        // add.City__c = alc11.id;
	        add.Detailed_Address__c = '北京市顺义区西海洪村'+i;
    		addList.add(add);
    	}
    	// insert addList;
    	return addList;
    }
    public static List<Agency_Contact__c> CreateAgencyContacts(Integer num){
    	String recordTypeId1 = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
    	String recordTypeId2 = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
    	List<Agency_Contact__c> acList = new List<Agency_Contact__c>();
    	Account account1 = new Account();
    	Account account2 = new Account();
    	account1.Name = 'test1医院';
        account1.RecordTypeId = recordTypeId1;
        insert account1;
    	account2.Name = 'test1经销商';
        account2.RecordTypeId = recordTypeId2;
        insert account2;
    	Agency_Hospital_Link__c aHosLink = new Agency_Hospital_Link__c();
    	aHosLink.Name = 'test1经销商医院';
        aHosLink.Hospital__c = account1.Id;
        aHosLink.Agency__c = account2.Id;
        insert aHosLink;
    	for(Integer i=0;i<num;i++){
    		Agency_Contact__c ac = new Agency_Contact__c();
    		ac.Agency_Hospital__c = aHosLink.Id;
        	ac.Type__c = '医生';
        	ac.Name = 'testAgencyUser'+i;
    		acList.add(ac);
    	}
    	insert acList;
    	return acList;
    }
    public static List<Rental_Apply__c> CreateRentalApplys(Integer num){
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
            return null;
        }
        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '戦略科室分類 呼吸科'];
        if (rectSct.size() == 0) {
            return null;
        }
        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('診療科 消化科', '診療科 呼吸科') order by Name desc];
        if (rectDpt.size() == 0) {
            return null;
        }
        Account company1 = new Account();
        Account company2 = new Account();
        company1.RecordTypeId = rectCo[0].Id;
        company1.Name = '病院テスト1';
        company2.RecordTypeId = rectCo[0].Id;
        company2.Name = '病院テスト2';
        List<Account> hps = new Account[] {company1, company2};
        insert hps;

        Account dc1 = new Account(Name = '呼吸科1',Department_Class_Label__c ='消化科',ParentId = company1.Id,RecordTypeId = rectSct[0].Id);
        Account dc2 = new Account(Name = '呼吸科2',Department_Class_Label__c ='呼吸科',ParentId = company2.Id,RecordTypeId = rectSct[0].Id);
        insert dc1;
        insert dc2;

        Account depart1 = new Account();
        depart1.RecordTypeId = rectDpt[0].Id;
        depart1.Name         = '*';
        depart1.Department_Name__c  = '診療科1';
        depart1.ParentId            = dc1.Id;
        depart1.Department_Class__c = dc1.Id;//值不存在或与筛选条件不匹配。 客户记录类型等于戦略科室分類 その他, 戦略科室分類 不明, 戦略科室分類 呼吸科, 戦略科室分類 婦人科, 戦略科室分類 普外科, 戦略科室分類 泌尿科, 戦略科室分類 消化科, 戦略科室分類 耳鼻喉科, 戦略科室分類ET
        depart1.Hospital__c         = company1.Id;

        Account depart2 = new Account();
        depart2.RecordTypeId = rectDpt[1].Id;
        depart2.Name         = '*';
        depart2.Department_Name__c  = '診療科2';
        depart2.ParentId            = dc2.Id;
        depart2.Department_Class__c = dc2.Id;//值不存在或与筛选条件不匹配。 客户记录类型等于戦略科室分類 その他, 戦略科室分類 不明, 戦略科室分類 呼吸科, 戦略科室分類 婦人科, 戦略科室分類 普外科, 戦略科室分類 泌尿科, 戦略科室分類 消化科, 戦略科室分類 耳鼻喉科, 戦略科室分類ET
        depart2.Hospital__c         = company2.Id;

        insert new Account[] {depart1, depart2};

        Contact core = new Contact(email = 'jplumber@salesforce.com',
                                   firstname = 'Joe',
                                   lastname = 'Plumber',
                                   accountid = company1.id);
        insert core;

        List<Rental_Apply__c> raList = new List<Rental_Apply__c>();

        for(Integer i=0;i<num;i++){
            Rental_Apply__c ra = new Rental_Apply__c();
            ra.Name = 'test'+i;
            // ra.Person_In_Charge__c = user.Id;
            // ra.applyUser__c = user.Id;
            ra.Status__c = FixtureUtil.raStatusMap.get(FixtureUtil.RaStatus.Cao_An_Zhong.ordinal());
            ra.Asset_loaner_start_day__c = Date.today();
            ra.Asset_loaner_closed_day__c = Date.today().addDays(10);
            ra.direct_send__c = '经销商';
            ra.direct_shippment_address__c = 'testaddress'+i;
            ra.Request_return_day__c = Date.today() + 30;
            ra.Demo_purpose1__c = '产品试用';
            ra.Demo_purpose2__c = FixtureUtil.raDemo_purpose2MAP.get('shiyongwuxunjia');
            ra.Demo_purpose_text__c = '申请理由Test'+i;
            ra.Request_demo_detail__c = 'IT测试'+i;
            ra.Accsessary__c = '水气按钮';
            ra.Loaner_received_staff__c = 'test'+i;
            ra.Loaner_received_staff_phone__c = 'test'+i;
            ra.Request_shipping_day__c = Date.today();
            ra.Hope_Lonaer_date_Num__c = 1;
            ra.Account__c = depart1.Id;
            ra.Strategic_dept__c = dc1.Id;
            ra.Hospital__c = company1.Id;
            ra.Loaner_medical_Staff__c = core.Id;
            ra.Request_return_day__c = Date.today() + 5;
            ra.Phone_number__c = '12222222222';
            ra.AWS_Data_Id__c = '123456'+String.valueof(Datetime.now().hour())+String.valueof(Datetime.now().minute())+String.valueof(Datetime.now().second())+i;
            raList.add(ra);
        }
        try{
           insert raList; 
        }catch(Exception e){
            System.debug('e.getMessage()-------'+e.getMessage());
        }
        
        return raList;
    }
    public static List<OPDPlan__c> CreateOPDPlans(Integer num){
        Rental_Apply__c ra = CreateRentalApplys(1)[0];
        List<OPDPlan__c> OPDList = new List<OPDPlan__c>();
        for(Integer i = 0;i < num;i++){
            OPDPlan__c opd = new OPDPlan__c();
            opd.Name = 'TestOPD'+i;
            opd.Rental_Apply2__c = ra.Id;
            OPDList.add(opd);
        }
        insert OPDList;
        return OPDList;
    }
/*****************************/
    public static List<ASEActivity__c> CreateASEActivity(Integer num){
    	List<ASEActivity__c> addList = new List<ASEActivity__c>();
    	Repair__c rp = CreateRepairs(1)[0];
    	Contact contact3= new Contact();
        contact3.AccountId = rp.Account__c;
        contact3.FirstName = '小明明';
        contact3.LastName = 'test2经销商';
        insert contact3;
    	for(Integer i=0;i<num;i++){
    		ASEActivity__c add = new ASEActivity__c();
            
			add.ReporterASE__c = contact3.id;//客户人员， Contact
			add.CustomerTel__c = '123123'+i;
			
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<CampaignMember> CreateCampaignMember(Integer num){
    	List<CampaignMember> addList = new List<CampaignMember>();
    	Repair__c rp = CreateRepairs(1)[0];
        Campaign Cam= new Campaign();
        Cam.Name = '学会 培训名称';
        Cam.Live_Demo_report__c = '学会 培训-测试用';
        Cam.HostName__c = '小明明明';//会议主办方
        Cam.cooperatorCompany__c = '会议承办方';//会议承办方
        insert Cam;
    	Contact contact4= new Contact();
        contact4.AccountId = rp.Account__c;
        contact4.FirstName = '小明明明';
        contact4.LastName = 'test4经销商';
        insert contact4;
    	for(Integer i=0;i<num;i++){
    		CampaignMember add = new CampaignMember();
            
			add.ContactId = contact4.id;//客户人员， Contact
			add.MobilePhone__c = '123123666'+i;
            add.CampaignId = Cam.Id;
			
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<case> CreateCase(Integer num){
    	List<case> addList = new List<case>();
    	Repair__c rp = CreateRepairs(1)[0];
        Account aC = CreateAccounts(1)[0];
    	Contact contact5= new Contact();
        contact5.AccountId = rp.Account__c;
        contact5.FirstName = '小明明明明';
        contact5.LastName = 'test4经销商';
        insert contact5;
    	for(Integer i=0;i<num;i++){
    		case add = new case();
            
			add.ContactId = contact5.id;//客户人员姓名， Contact
            add.Account__c = aC.Id;//客户名称， Account
			add.Subject = 'Test For Case'+i;
			
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Event> CreateEvent(Integer num){
    	List<Event> addList = new List<Event>();
    	for(Integer i=0;i<num;i++){
    		Event add = new Event();
            
			add.Type = '電話';
			add.Description = 'Test for Event'+i;
            add.DurationInMinutes = 1;//持续时间
			add.ActivityDateTime = Datetime.valueOf('2022-03-17 00:00:00');
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Inquiry_form__c> CreateInquiryform(Integer num){
    	List<Inquiry_form__c> addList = new List<Inquiry_form__c>();
    	for(Integer i=0;i<num;i++){
    		Inquiry_form__c add = new Inquiry_form__c();
            
			add.Name = '测试用'+i;//产品咨询单名称	
			add.Request1__c = 'OPD';//委托事项
			add.Opportunity_Division__c = '询价';//意向区分
			add.Product1__c = '治疗附件';
    		addList.add(add);
    	}
    	insert addList;//AND(NOT(ISBLANK(Hospital_Name__c)),Hospital_Name__r.Department_Class__c != Department_Class__c)
    	return addList;
    }
    
    public static List<Inspection_Report__c> CreateInspectionReport(Integer num){
    	List<Inspection_Report__c> addList = new List<Inspection_Report__c>();
		Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        User hpOwner = new User();
        hpOwner = [SELECT Test_staff__c,LastName,FirstName,Alias,CommunityNickname,Email,Username,IsActive,EmailEncodingKey,ProfileId,Job_Category__c FROM User WHERE Job_Category__c='销售服务' Limit 1];
        if(hpOwner==null){
            hpOwner = new User(Test_staff__c = true, LastName = 'TestUserA', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@olympus.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id,Job_Category__c = '销售服务');
            insert hpOwner;
        }

		Account aC = CreateAccounts(1)[0];
        Account acTest = [Select Id,Is_Active_Formula__c From Account Where RecordType.Name = '病院' limit 1];
        
    	for(Integer i=0;i<num;i++){
    		Inspection_Report__c add = new Inspection_Report__c();
            
			add.Name = '点检报告书——测试用'+i;//点检报告书单号
			add.Hospital__c = acTest.Id;//医院
            System.debug('hpOwner.Job_Category__c----------------------'+hpOwner.Job_Category__c);
			add.Reporter__c = hpOwner.Id;//报告者
			
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Lead> CreateLead(Integer num){
    	List<Lead> addList = new List<Lead>();
		Repair__c rp = CreateRepairs(1)[0];
        
        /*Asset ast = CreateAssets(1)[0];
        Account strategicDep = new Account();
        strategicDep.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_OTH'].id;
        strategicDep.Name = 'Olympus社内 其他';
        strategicDep.Department_Class_Label__c = '其他';
        strategicDep.Hospital__c = ast.Hospital__c;
        strategicDep.ParentId = ast.Hospital__c;
        insert strategicDep;
       战略科室分类要和母公司一样     描述	Not(IsBlank(Hospital__c)) 
                                            && Parent.Parent.RecordTypeId = '01210000000QemG' 
                                            && Department_Class__c <> ParentId

        不能更改战略科室的客户名              RecordTypeId != '01210000000QemG' && ISBLANK(Parent.ParentId) 
                                      && Parent.RecordTypeId = '01210000000QemG' && ISCHANGED(Name) && !Sys_Dept_Name_Change_Chk__c
        战略科室的医院要和科室的医院一致        IF(Parent.Parent.RecordTypeId = '01210000000QemG',IF(Hospital__c <> Parent.ParentId,TRUE,FALSE),FALSE)
	                                        
*/
        
        Account aC = CreateAccounts(1)[0];
        //Contact contactTest = CreateContacts(1)[0];
        //aC.Department_Class__c = '0010l00001PQF0SAAX';
        //aC.ParentId = '0010l00001PQF0SAAX';
        //update aC;
    	Contact contact12= new Contact();
        contact12.AccountId = aC.Id;
        contact12.FirstName = '小明明明明';
        contact12.LastName = 'test12经销商';
        insert contact12;
        Account acc = [SELECT Id,Name,parentId,Department_Class__c,Parent.Parent.RecordTypeId FROM Account WHERE Id =:contact12.AccountId ];
        acc.Department_Class__c = acc.parentId;
        System.debug('acc-----------'+acc);
        System.debug('acc.parentId-----------'+acc.parentId);
        System.debug('acc.Parent.Parent.RecordTypeId-----------'+acc.Parent.Parent.RecordTypeId);
        update acc;
        //战略科室分类要和母公司一样: []
        //Not(IsBlank(Hospital__c)) && Parent.Parent.RecordTypeId = '01210000000QemG' && Department_Class__c <> ParentId
        System.debug('contact12-------------'+contact12);
        System.debug('contact12.AccountId-------------'+contact12.AccountId);
        System.debug('contact12.Account.Department_Class__c-------------'+contact12.Account.Department_Class__c);
    	for(Integer i=0;i<num;i++){
    		Lead add = new Lead();
            
			add.Phone = '123123666'+i;//电话
			add.Hospital_Name__c = acc.Id;//客户
			add.Contact_Name__c = contact12.Id;//客户姓名
            add.Department_Class__c = acc.Department_Class__c;
            System.debug('Hospital_Name__r.Department_Class__c----------'+add.Hospital_Name__r.Department_Class__c);
            System.debug('Department_Class__c-----------------------------'+add.Department_Class__c);
            //Hospital_Name__c = Contact_Name__r.AccountId   潜在客户: 医院名 ID等于客户姓名: 客户名 ID   
			//Hospital_Name__r.Department_Class__c != Department_Class__c
			//LastName, Company
			add.LastName = 'TestLName';
            add.Company = 'TestCompany';
    		addList.add(add);
    	}
    	insert addList;
        //	与医院名的战略科室分类不一致
        //  AND(NOT(ISBLANK(Hospital_Name__c)),Hospital_Name__r.Department_Class__c != Department_Class__c, $User.Batch_User__c ==FALSE)
        //Hospital_Name__c 不为空 时 需要让 Hospital_Name__r.Department_Class__c == Department_Class__c
    	return addList;
    }
    
    public static List<QIS_Report__c> CreateQISReport(Integer num){
    	List<QIS_Report__c> addList = new List<QIS_Report__c>();
    	for(Integer i=0;i<num;i++){
    		QIS_Report__c add = new QIS_Report__c();
			add.ETQ_UPLOAD_MESSAGE__c = 'QIS测试用'+i;//ETQ同步信息
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<RepairSubOrder__c> CreateRepairSubOrder(Integer num){
    	List<RepairSubOrder__c> addList = new List<RepairSubOrder__c>();
    	for(Integer i=0;i<num;i++){
    		RepairSubOrder__c add = new RepairSubOrder__c();
			add.Name = '报修子单测试用';
			add.FaultDescriptionFirst__c = '报修子单测试用'+i;//故障描述
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Report__c> CreateReport(Integer num){
    	List<Report__c> addList = new List<Report__c>();
		Account aC = CreateAccounts(1)[0];
    	for(Integer i=0;i<num;i++){
    		Report__c add = new Report__c();
			add.Activity_Plan__c = '报告书测试用'+i;//今后活动计划
			add.Hospital_Department__c = aC.Id;//科室
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Tender_information__c> CreateTenderInformation(Integer num){
    	List<Tender_information__c> addList = new List<Tender_information__c>();
    	for(Integer i=0;i<num;i++){
    		Tender_information__c add = new Tender_information__c();
			add.Name = '招标项目测试用'+i;//招标项目名称
            add.InfoTitle__c = '招标项目测试用'+i;//招标项目名称
            add.AWS_Data_Id__c = '123456'+String.valueof(Datetime.now().hour())+String.valueof(Datetime.now().minute())+String.valueof(Datetime.now().second())+i;
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Consum_Apply__c> CreateConsumApply(Integer num){
    	List<Consum_Apply__c> addList = new List<Consum_Apply__c>();
		User u = CreateUsers(1)[0];
    	for(Integer i=0;i<num;i++){
    		Consum_Apply__c add = new Consum_Apply__c();
			add.Name = '耗材备品申请——测试用'+i;//申请No.
			add.Person_In_Charge__c = u.Id;//备品出借担当
            add.Status__c = '草案中';
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    
    public static List<Consum_Apply_Equipment_Set_Detail__c> CreateConsumApplyEquipmentSetDetail(Integer num){
    	List<Consum_Apply_Equipment_Set_Detail__c> addList = new List<Consum_Apply_Equipment_Set_Detail__c>();
        Asset asse = CreateAssets(1)[0];
        Consum_Apply__c con = CreateConsumApply(1)[0];
        Consum_Apply_Equipment_Set__c conA= new Consum_Apply_Equipment_Set__c();
        conA.Name = '耗材备品配套一览---测试用';
        conA.Consum_Apply__c = con.Id;
        conA.Consum_Start_Date__c = System.today();
        //conA.FirstName = '小明明明明';
        //conA.LastName = 'test4经销商';
        insert conA;
    	for(Integer i=0;i<num;i++){
    		Consum_Apply_Equipment_Set_Detail__c add = new Consum_Apply_Equipment_Set_Detail__c();
			add.Name = '耗材备品配套一览明细——测试用'+i;//No.
            add.Asset__c = asse.Id;
            add.Consum_Start_Date__c = Date.valueOf('2022-03-24 00:00:00');
            add.UniqueKey__c = '666666';
            add.IndexFromUniqueKey__c = 777777;
            add.DataMigration_Flag__c = True;
            add.Consum_Apply__c = con.Id;
            //Consum_Apply_Equipment_Set__c,耗材备品配套一览 Consum_Apply__c备品耗材申请
            add.Consum_Apply_Equipment_Set__c = conA.Id;
    		addList.add(add);
    	}
    	insert addList;
    	return addList;
    }
    

/*****************************/    
    public class CreatePIHelperHttpMock implements HttpCalloutMock {
        public HTTPResponse respond(HTTPRequest req) {
            Map<String, Object> testMap = new Map<String, Object>();
            testMap.put('Account',CreateAccounts(1)[0]);
            testMap.put('success',true);
            String mapJson = JSON.serialize(testMap);
            HttpResponse res = new HttpResponse();
            res.setHeader('Content-Type', 'text/html');
            res.setBody(mapJson); 
            res.setStatusCode(200);
            return res;
        }
    }

    public class CreateMetaDataUtilityHttpMock implements HttpCalloutMock {
        public HTTPResponse respond(HTTPRequest req) {
            HttpResponse res = new HttpResponse();
            res.setHeader('Content-Type', 'text/html');
            res.setBody('{"size":2,"totalSize":2,"done":true,"queryLocator":null,"entityTypeName":"ProfileLayout","records":[{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G1000000hlD1YEAU"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h10000009iAb5AAE"},"Name":".客户人员レイアウト","TableEnumOrId":"01I10000000er3hEAA"},"ProfileId":"00e10000000NawVAAS","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e10000000NawVAAS"},"Name":"901_经销商社区普通权限"},"RecordTypeId":null},{"attributes":{"type":"ProfileLayout","url":"/services/data/v41.0/tooling/sobjects/ProfileLayout/01G1000000hlD7CEAU"},"Layout":{"attributes":{"type":"Layout","url":"/services/data/v41.0/tooling/sobjects/Layout/00h10000009iAb5AAE"},"Name":".客户人员レイアウト","TableEnumOrId":"01I10000000er3hEAA"},"ProfileId":"00e10000000NawVAAS","Profile":{"attributes":{"type":"Profile","url":"/services/data/v41.0/tooling/sobjects/Profile/00e10000000NawVAAS"},"Name":"901_经销商社区普通权限"},"RecordTypeId":"012100000006KW5AAM"}]}'); 
            res.setStatusCode(200);
            res.setStatus('OK');
            return res;
        }
    }

    public class BaseHttpMock implements HttpCalloutMock {

        String body ='';
        String status = '';
        String statusCode = '';
        public BaseHttpMock(String body,String status,String statusCode){
            this.body = body;
            this.status = status;
            this.statusCode = statusCode;
        }

        public HTTPResponse respond(HTTPRequest req) {
            HttpResponse res = new HttpResponse();
            res.setHeader('Content-Type', 'application/json');
            res.setBody(body); 
            res.setStatusCode(200);
            res.setStatus('OK');
            return res;
        }
    }

}