| | |
| | | } |
| | | // 经销商医院的ocsm医院id的list |
| | | List<String> ahlOcsmIdList = new List<String>(); |
| | | System.debug('ahlNameList = ' + ahlNameList); |
| | | List<Agency_Hospital_Link__c> ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where name = :ahlNameList and Agency_Campaign_Obj__c = true]; |
| | | |
| | | |
| | | System.debug('ahlList.size() = ' + ahlList.size()); |
| | | for(Agency_Hospital_Link__c ahl : ahlList){ |
| | | ahlOcsmIdList.add(ahl.Hospital__c); |
| | | } |
| | | List<Agency_Contact__c> doctor2list = new List<Agency_Contact__c>(); |
| | | System.debug('ahlOcsmIdList = ' + ahlOcsmIdList); |
| | | if(!Test.isRunningTest()) |
| | | doctor2list = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; //zhj 新方案改造 2022-12-21 去掉Name_Encrypted__c |
| | | |
| | |
| | | return errorMag; |
| | | } |
| | | String doctor2listStr = JSON.serialize(doctor2list); |
| | | System.debug('doctor2list = ' + doctor2list); |
| | | return doctor2listStr; |
| | | } |
| | | }catch(Exception e){ |