高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/PaymentMaintenanceContractTriggerHTest.cls
@@ -17,35 +17,35 @@
        contact2.LastName = 'test2医院';
        insert contact2;
        // ユーザー
        Profile p = [select Id from Profile where Name = '901_经销商活动系统'];
        User user = new User();
        user.ProfileId = p.Id;
        user.ContactId = contact2.Id;
        user.FirstName = 'ユーザー';
        user.LastName = 'テスト';
        user.Email = 'test_user@example.com';
        user.emailencodingkey='UTF-8';
        user.languagelocalekey='zh_CN';
        user.localesidkey='ja_JP';
        user.timezonesidkey='Asia/Shanghai';
        user.Username = 'test_user@example.com';
        user.Alias = 'テユ';
        user.CommunityNickname = 'テストユーザー';
        insert user;
        // Profile p = [select Id from Profile where Name = '901_经销商活动系统'];
        // User user = new User();
        // user.ProfileId = p.Id;
        // user.ContactId = contact2.Id;
        // user.FirstName = 'ユーザー';
        // user.LastName = 'テスト';
        // user.Email = 'test_user@example.com';
        // user.emailencodingkey='UTF-8';
        // user.languagelocalekey='zh_CN';
        // user.localesidkey='ja_JP';
        // user.timezonesidkey='Asia/Shanghai';
        // user.Username = 'test_user@example.com';
        // user.Alias = 'テユ';
        // user.CommunityNickname = 'テストユーザー';
        // insert user;
        // 代理店医院
        Agency_Hospital_Link__c agency_hospital_link = new Agency_Hospital_Link__c();
        agency_hospital_link.Name = 'test1代理店医院';
        agency_hospital_link.Hospital__c = account1.Id;
        agency_hospital_link.Agency__c = account2.Id;
        agency_hospital_link.OwnerId = user.Id;
        insert agency_hospital_link;
        // // 代理店医院
        // Agency_Hospital_Link__c agency_hospital_link = new Agency_Hospital_Link__c();
        // agency_hospital_link.Name = 'test1代理店医院';
        // agency_hospital_link.Hospital__c = account1.Id;
        // agency_hospital_link.Agency__c = account2.Id;
        // agency_hospital_link.OwnerId = user.Id;
        // insert agency_hospital_link;
        Agency_Contact__c ac1 = new Agency_Contact__c();
        ac1.Name = 'test1のび太';
        ac1.Agency_Hospital__c = agency_hospital_link.Id;
        insert ac1;
        // Agency_Contact__c ac1 = new Agency_Contact__c();
        // ac1.Name = 'test1のび太';
        // ac1.Agency_Hospital__c = agency_hospital_link.Id;
        // insert ac1;
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
@@ -81,7 +81,7 @@
        test.Department__c = depart1.Id;
        test.Management_Code__c =  'BJ-RS-BJ0062233';
        test.Status__c = '询价中';
        test.Service_Contract_Staff__c = user.Id;
        test.Service_Contract_Staff__c = UserInfo.getUserId();
        insert test;
@@ -89,7 +89,7 @@
        pmc.Find_Dealers__c = account1.id;
        pmc.Find_Contact__c = test.id;
        pmc.Amount__c = 123.23;
        pmc.Employees__c = ac1.Id;
        //pmc.Employees__c = ac1.Id;
        pmc.ReceiveNo__c = '134';
        pmc.ReceiveNoKey__c = '3245';
        insert pmc;
@@ -101,7 +101,7 @@
        pmc1.Find_Dealers__c = account1.id;
        pmc1.Find_Contact__c = test.id;
        pmc1.Amount__c = 123.23;
        pmc1.Employees__c = ac1.Id;
        //pmc1.Employees__c = ac1.Id;
        pmc1.ReceiveNo__c = '134';
        pmc1.ReceiveNoKey__c = '3245';
        pmc1.DeleteFlag__c = 'X';