From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新

---
 force-app/main/default/classes/SearchContactController.cls |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/classes/SearchContactController.cls b/force-app/main/default/classes/SearchContactController.cls
index d6d46b2..d979e1a 100644
--- a/force-app/main/default/classes/SearchContactController.cls
+++ b/force-app/main/default/classes/SearchContactController.cls
@@ -34,7 +34,10 @@
             if(checkNullString(accountId)){
                 conList = new List<Contact>(); 
             }else {
-                conList = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact  where AccountId=:accountId and AWS_Data_Id__c!='']); 
+                //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 statt
+                Account act = [select id,Hospital__c from Account where id = :accountId];
+                conList = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact  where 	Account.Hospital__c=:act.Hospital__c and AWS_Data_Id__c!='']); 
+                //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 end
             }
             
         }    
@@ -60,7 +63,10 @@
             List<String> awsDataIds = (List<String>) JSON.deserialize(awsContactIds, List<String>.class);
             List<Contact> conListTemp = new List<Contact>();
             if(!checkNullString(accountId)){
-                conListTemp = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact where AccountId=:accountId and AWS_Data_Id__c in:awsDataIds]);
+                //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 statt
+                Account act = [select id,Hospital__c from Account where id = :accountId];
+                conListTemp = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact where Account.Hospital__c=:act.Hospital__c and AWS_Data_Id__c in:awsDataIds]);
+                //2022-5-12 yjk 灏嗙瀹ゅ尮閰嶆敼涓哄尰闄㈠尮閰嶆煡璇㈣仈绯讳汉 end
             }else {
                 conListTemp = new List<Contact>([select Id,AWS_Data_Id__c,Account.Name from Contact where AWS_Data_Id__c in:awsDataIds]);
             }

--
Gitblit v1.9.1