| | |
| | | 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 |
| | | } |
| | | |
| | | } |
| | |
| | | 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]); |
| | | } |
| | |
| | | public static Response searchContactsNoPI(String contactName) { |
| | | Response resp = new Response(); |
| | | resp.status = 'fail'; |
| | | List<Contact> conListTemp = new List<Contact>([select Id,Name,Account.Name,Phone,Email from Contact where Name like :contactName]); |
| | | List<Contact> conListTemp = new List<Contact>([select Id,Name,Account.Name,Phone,Email,MobilePhone from Contact where Name like :contactName]); |
| | | if(conListTemp.size() > 0){ |
| | | resp.status = 'success'; |
| | | resp.message = JSON.serialize(conListTemp); |