From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/classes/NFM624RestAboutTest.cls |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/classes/NFM624RestAboutTest.cls b/force-app/main/default/classes/NFM624RestAboutTest.cls
index ae37fbb..9faeffe 100644
--- a/force-app/main/default/classes/NFM624RestAboutTest.cls
+++ b/force-app/main/default/classes/NFM624RestAboutTest.cls
@@ -21,9 +21,26 @@
 
         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();
 

--
Gitblit v1.9.1