| | |
| | | List<Agency_Hospital_Link__c> ahlList; |
| | | Contact conStrList = [select AccountId from contact where id in (select ContactId from User where id =: SignInId)]; |
| | | String strAgencyId =conStrList.AccountId; |
| | | System.debug('UserProTypec.UserPro_Type__c = ' + UserProTypec.UserPro_Type__c); |
| | | if(UserProTypec.UserPro_Type__c == 'ENG'){ |
| | | ahlList = [select id,name,Hospital__c,MaxActivityDate__c from Agency_Hospital_Link__c where Agency__c =: strAgencyId and name = :ahlNameList and AgencyHos_ENG__c = true and Agency_Campaign_Obj__c = true]; |
| | | }else { |
| | |
| | | // nameConMap.put(con.Id, con.Name); |
| | | // } |
| | | // return testuse; |
| | | System.debug('ahlList = ' + ahlList); |
| | | for(Agency_Hospital_Link__c ahl : ahlList){ |
| | | ahlMap.put(ahl.Name, ahl); |
| | | ahlOcsmIdList.add(ahl.Hospital__c); |
| | |
| | | if(lineList[0] != null && lineList[0] != ''){ |
| | | agencyReport.Report_Date__c = Date.valueOf(lineList[0].replace('/','-')); |
| | | } |
| | | System.debug('ahlMap = ' + ahlMap); |
| | | System.debug('lineList[1] = ' + lineList[1]); |
| | | if(ahlMap.containsKey(lineList[1])){ |
| | | agencyReport.Agency_Hospital__c = ahlMap.get(lineList[1]).Id; |
| | | ahlMap.get(lineList[1]).MaxActivityDate__c = week; |