From f127c76b19f5316032d4bed127a1dde710c48d74 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 24 三月 2022 10:10:36 +0800
Subject: [PATCH] PIPLFunctionFixBug0324

---
 force-app/main/default/classes/AWSServiceTool.cls |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/AWSServiceTool.cls b/force-app/main/default/classes/AWSServiceTool.cls
index 0c2e0ba..df4e19e 100644
--- a/force-app/main/default/classes/AWSServiceTool.cls
+++ b/force-app/main/default/classes/AWSServiceTool.cls
@@ -8,6 +8,21 @@
  * 
  * */
 public without sharing class AWSServiceTool {
+    public static List<Contact>  getNoPIContact(String searchContactName,String accountId){
+        if(searchContactName!='' || accountId!=''){
+            String noPISQL = 'select Id,Name,Email,Phone,Account.Name from Contact where Account_Record_Type_DeveloperName__c in('+'\'Agency\''+','+'\'Office\''+',\'AgencyContact\''+')';
+            if(String.isNotEmpty(accountId)){
+                noPISQL += ' and AccountId=\''+accountId+'\'';
+            }
+            if(String.isNotEmpty(searchContactName)){
+                noPISQL += ' and Name like \'%'+searchContactName+'%\'';
+            }
+            system.debug('noPISQL = ' + noPISQL);
+            List<Contact> partnerContactList = Database.query(noPISQL);
+            return partnerContactList;
+        }
+        return new List<Contact>();
+    }
     public static String getAWSToken(){
         AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt  WHERE DeveloperName = 'AWS_Default_Configuration'];
         if (awsConfiguration == null) {

--
Gitblit v1.9.1