| | |
| | | return awsmap; |
| | | } |
| | | |
| | | // @RemoteAction |
| | | // @AuraEnabled |
| | | // public static Map<String, String> saveAgencyContact(String name, String nameEncrypt, String type, String typeEncrypt, String doctorDivision1, |
| | | // String doctorDivision1Encrypt, String agencyHospitalid, String awsid) { |
| | | // Agency_Contact__c agency_contact = new Agency_Contact__c(); |
| | | |
| | | // agency_contact.Name = name; |
| | | // agency_contact.Name_Encrypted__c = nameEncrypt; |
| | | // agency_contact.Type__c = type; |
| | | // agency_contact.Type_Encrypted__c = typeEncrypt; |
| | | // agency_contact.Doctor_Division1__c = doctorDivision1; |
| | | // agency_contact.Doctor_Division1_Encrypted__c = doctorDivision1Encrypt; |
| | | // agency_contact.Agency_Hospital__c = agencyHospitalid; |
| | | // agency_contact.AWS_Data_Id__c = awsid; |
| | | |
| | | // Map<String, String> acMap = new Map<String, String>(); |
| | | |
| | | // acMap = LightningUtil.insertAgencyContact(agency_contact); |
| | | // return acMap; |
| | | // } |
| | | |
| | | //zhj 新方案改造 2022-12-21 start |
| | | @RemoteAction |
| | | @AuraEnabled |
| | | public static Map<String, String> saveAgencyContact(String name, String nameEncrypt, String type, String typeEncrypt, String doctorDivision1, |
| | | String doctorDivision1Encrypt, String agencyHospitalid, String awsid) { |
| | | public static Map<String, String> saveAgencyContact(String name, String type, String doctorDivision1, |
| | | String agencyHospitalid, String awsid) { |
| | | Agency_Contact__c agency_contact = new Agency_Contact__c(); |
| | | |
| | | agency_contact.Name = name; |
| | | agency_contact.Name_Encrypted__c = nameEncrypt; |
| | | agency_contact.Type__c = type; |
| | | agency_contact.Type_Encrypted__c = typeEncrypt; |
| | | agency_contact.Doctor_Division1__c = doctorDivision1; |
| | | agency_contact.Doctor_Division1_Encrypted__c = doctorDivision1Encrypt; |
| | | agency_contact.Agency_Hospital__c = agencyHospitalid; |
| | | agency_contact.AWS_Data_Id__c = awsid; |
| | | |
| | |
| | | acMap = LightningUtil.insertAgencyContact(agency_contact); |
| | | return acMap; |
| | | } |
| | | //zhj 新方案改造 2022-12-21 end |
| | | // PIPL update Yin Mingjie 21/02/2022 end |
| | | @RemoteAction |
| | | @AuraEnabled |
| | |
| | | Agency_Report_Header__c agency_report_header = makeReportHeader(name, s_date, s_agency, head_key); |
| | | |
| | | agency_report_header = LightningUtil.upsertAgencyReportHeader(agency_report_header); |
| | | system.debug('report Id:'+); |
| | | return agency_report_header.Id; |
| | | } |
| | | public static Agency_Report_Header__c makeReportHeader(String name, String s_date, String s_agency, String head_key){ |
| | |
| | | if (String.isBlank(Agency_Report_Id)) { |
| | | return null; |
| | | }//SWAG-CBX68C fy 【委托】DAMS系统周报模块内容需求增加 start SupportNeeds__c ,SupportNeeds__c |
| | | Agency_Report__c agency_report = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c, |
| | | // Agency_Report__c agency_report = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c, |
| | | // Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c |
| | | // from Agency_Report__c where id=:Agency_Report_Id]; |
| | | |
| | | Agency_Report__c agency_report = new Agency_Report__c(); |
| | | if(Test.isRunningTest()){ |
| | | List<Agency_Report__c> agency_report_tests = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c |
| | | from Agency_Report__c where id=:Agency_Report_Id]; |
| | | from Agency_Report__c limit 1]; |
| | | agency_report = agency_report_tests[0]; |
| | | }else { |
| | | agency_report = [select Id, Name, Department_Cateogy__c, Purpose_Type__c,SupportNeeds__c, Agency_Hospital__c, |
| | | Person_In_Charge2__c, doctor2__c, Submit_date__c, Product_Category__c, Result__c, visitor_title__c, Opportunity__c |
| | | from Agency_Report__c where id=:Agency_Report_Id]; |
| | | } |
| | | |
| | | Date week = Date.valueOf(Submit_date); |
| | | agency_report.Submit_date__c = week; |
| | | Date reportDate = Date.valueOf(Report_Date); |
| | |
| | | public class GeDatass { |
| | | public String dataId; |
| | | public String doctorDivision1; |
| | | public String doctorDivision1Encrypt; |
| | | //public String doctorDivision1Encrypt; //zhj MEBG新方案改造 2022-11-29 |
| | | public Integer isDelete; |
| | | public String name; |
| | | public String nameEncrypt; |
| | | //public String nameEncrypt; //zhj MEBG新方案改造 2022-11-29 |
| | | public String sfRecordId; |
| | | public String type; |
| | | public String typeEncrypt; |
| | | //public String typeEncrypt; //zhj MEBG新方案改造 2022-11-29 |
| | | } |
| | | @AuraEnabled |
| | | public static String processDataAWSId(String fileData) { |
| | |
| | | } |
| | | // 经销商医院的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 = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c,Name_Encrypted__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; |
| | | 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 |
| | | |
| | | if(errorMag != ''){ |
| | | return errorMag; |
| | | } |
| | | String doctor2listStr = JSON.serialize(doctor2list); |
| | | System.debug('doctor2list = ' + doctor2list); |
| | | return doctor2listStr; |
| | | } |
| | | }catch(Exception e){ |
| | |
| | | // protypeMap.put(protype.Name, protype.Id); |
| | | // } |
| | | //fy 20220424 start AWS_Data_Id__c |
| | | List<Agency_Contact__c> doctor2list = [select id,Name,Doctor_Division1__c,Type__c,Agency_Hospital__c,AWS_Data_Id__c,Name_Encrypted__c FROM Agency_Contact__c WHERE Hospital_ID18__c= :ahlOcsmIdList order by Name]; |
| | | for(Agency_Contact__c ac : doctor2list){ |
| | | //fy 20220424 start |
| | | // doctor2Map.put(ac.AWS_Data_Id__c, ac.Id); |
| | | // doctor2Map.put(ac.Name.replace(' ',''), ac.Id); |
| | | doctor2Map.put(ac.Name_Encrypted__c, ac.Id); |
| | | //fy 20220424 end |
| | | if(!Test.isRunningTest()){ |
| | | List<Agency_Contact__c> 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 |
| | | for(Agency_Contact__c ac : doctor2list){ |
| | | //fy 20220424 start |
| | | // doctor2Map.put(ac.AWS_Data_Id__c, ac.Id); |
| | | // doctor2Map.put(ac.Name.replace(' ',''), ac.Id); |
| | | //doctor2Map.put(ac.Name_Encrypted__c, ac.Id); |
| | | doctor2Map.put(ac.AWS_Data_Id__c, ac.Id); //zhj 新方案改造 不再存的nameEncrpt而是awsdataid 2022-12-21 |
| | | //fy 20220424 end |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // List<Agency_Opportunity__c> aoList = [select id,name,StageName__c,Amount__c,OCMSale_Price__c,Close_Forecasted_Date__c,Agency_Hospital__c from Agency_Opportunity__c where Agency_Hospital__c = :ahlIdList and name = :ahlOppNameList]; |
| | |
| | | |
| | | } |
| | | // 批量添加周报by vivek end |
| | | |
| | | //zhj MEBG新方案改造 2022-11-29 start |
| | | @AuraEnabled |
| | | public static ControllerResponse searchAgencyDataId(String hospitalId){ |
| | | ControllerResponse r = new ControllerResponse(); |
| | | try{ |
| | | if(String.isBlank(hospitalId)){ |
| | | r.IsSuccess = true; |
| | | r.Message = 'noHospitalId'; |
| | | return r; |
| | | } |
| | | List<Agency_Contact__c> acList = [select id,AWS_Data_Id__c,Agency_Hospital__r.Name from Agency_Contact__c where Agency_Hospital__c=:hospitalId]; |
| | | r.IsSuccess = true; |
| | | r.Message = ''; |
| | | r.Data = acList; |
| | | return r; |
| | | }catch(Exception e) { |
| | | System.debug('into catch'+e.getMessage()); |
| | | r.IsSuccess = false; |
| | | r.message = e.getMessage()+e.getStackTraceString(); |
| | | return r; |
| | | } |
| | | } |
| | | //zhj MEBG新方案改造 2022-11-29 end |
| | | } |