| | |
| | | |
| | | Account hptemp = [select Id,PlatformCode__c,AgentCode_Ext__c,Is_Active_Formula__c from Account where Id = :hp.Id]; |
| | | |
| | | //战略科室 |
| | | Account dc = [select Id, Name,Parent_PlatformCode__c,Parent_Management_Code__c, RecordType_DeveloperName__c, Account2__c from Account where ParentId = :hp.Id and RecordType_DeveloperName__c = 'Department_Class_BF']; |
| | | |
| | | // 戦略科室を得る |
| | | Account[] strategicDep = [SELECT ID, Name FROM Account WHERE parentId = :hp.Id AND recordType.DeveloperName = 'Department_Class_OTH']; |
| | | // 診療科を作る |
| | | 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 = '9999998'; |
| | | dep.ParentId = strategicDep[0].Id; |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hp.Id; |
| | | insert dep; |
| | | |
| | | //联系人 |
| | | Contact contact2 = new Contact(); |
| | | contact2.AccountId = dep.Id; |
| | | contact2.FirstName = '責任者'; |
| | | contact2.LastName = 'test1经销商'; |
| | | contact2.LastName_Encrypted__c ='24616254c7c7b65d985567f475b667d7'; |
| | | insert contact2; |
| | | |
| | | NFM624Rest.GeData GeData1 = new NFM624Rest.GeData(); |
| | | NFM624Rest.GeDatas GaDatas = new NFM624Rest.GeDatas(); |
| | | |