From 2d4a8d2dcad5a17127d2c73c48ddc4b67ec79448 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期三, 06 四月 2022 11:51:58 +0800 Subject: [PATCH] PIPLDeploy0405 --- force-app/main/default/classes/SimpleEventRegisterController.cls | 39 ++++++++++++++++++++++++++++++++++----- 1 files changed, 34 insertions(+), 5 deletions(-) diff --git a/force-app/main/default/classes/SimpleEventRegisterController.cls b/force-app/main/default/classes/SimpleEventRegisterController.cls index 71263a9..4c547c7 100644 --- a/force-app/main/default/classes/SimpleEventRegisterController.cls +++ b/force-app/main/default/classes/SimpleEventRegisterController.cls @@ -88,6 +88,12 @@ //2021-10-20 mzy 浠诲姟绠$悊鏀瑰杽 start private Boolean IsGeneratePlan; //鏄惁鐢熸垚璁″垝 //2021-10-20 mzy 浠诲姟绠$悊鏀瑰杽 end + //Add By Li Jun 20220224 for PIPL start + public String idVisitor1PI{set;get;} + public String idVisitor2PI{set;get;} + public String staticResource {get; set;} + public String contactAWSIds{set;get;} + //Add By Li Jun 20220224 for PIPL end public SimpleEventRegisterController(ApexPages.StandardController controller) { this.isHospital = true; this.isAgent = false; @@ -153,6 +159,11 @@ System.debug('-----:inputDatetime=' + inputDatetime); this.targetEvent.StartDateTime = inputDatetime; } + //Add by Li Jun 20220303 for PIPL Start + PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Contact'); + staticResource = JSON.serialize(piIntegration); + system.debug('static resource:'+JSON.serialize(staticResource)); + //Add by Li Jun 20220303 for PIPL End } public void init() { @@ -212,6 +223,22 @@ //2021-07-28 mzy SWAG-C4YB9J 浜嬩欢椤甸潰浼樺寲 浠婂ぉ鐨勪簨浠� 濡傛灉宸茬粡鐢熸垚鎶ュ憡涓�瑙�,鍒欎笉鍏佽杩涜鍙栨秷鍜屽欢鏈熸搷浣� end allDisable = true; } + //Add By Li Jun for PIPL 20220303 Start + List<String> conAWSIds = new List<String>(); + Set<String> contactIdsForReport = new Set<String>(); + List<String> visitorList = new List<String>{'Visitor1_ID__c','Visitor2_ID__c','Visitor3_ID__c','Visitor4_ID__c','Visitor5_ID__c'}; + for(String visitorValue:visitorList){ + if(String.isNotEmpty((String)targetEvent.get(visitorValue))&&String.isNotBlank((String)targetEvent.get(visitorValue))){ + contactIdsForReport.add((String)targetEvent.get(visitorValue)); + } + } + List<Contact> conListForReport = new List<Contact>([select id,AWS_Data_Id__c from Contact where id in:contactIdsForReport and AWS_Data_Id__c!='']); + for(Contact con:conListForReport){ + conAWSIds.add(con.AWS_Data_Id__c); + } + contactAWSIds = JSON.serialize(conAWSIds); + system.debug('Contact AWSIDs:'+contactAWSIds); + //Add By Li Jun for PIPL 20220303 End } //20210324 zh WLIG-BX3DQ5 銆愬鎵樸�慜utlook鏃ュ巻鍜孲FDC鏃ュ巻鍚屾 end if (targetEvent.OPDPlan_Flag__c) { @@ -1011,9 +1038,11 @@ } } + //20201123 zh 鍒涘缓涓诲姩浠诲姟涓庣淮淇悎鍚屽叧鑱� end if (LoginUser.Job_Category__c.equals('閿�鍞帹骞�')) { if (this.targetEvent.Activity_Type2__c == '鐥呴櫌') { + // 2021-06-11 mzy sla 娉ㄩ噴鎺変簡璇环3 鍥犱负鐜板湪鐨勯〉闈㈡病鏈夌粰璇环3璧嬪��,鎵�浠ヤ細鏄剧ず 璇环3涓嶇瓑浜庣┖瀛楃涓茶�屾槸绛変簬null ,瀵艰嚧鍚庨潰鐨勫垽鏂繘涓嶅幓 // if (this.targetEvent.Related_Opportunity1__c != '' || this.targetEvent.Related_Opportunity2__c != '' || this.targetEvent.Related_Opportunity3__c != '') { System.debug('娴嬭瘯璇环浠诲姟:' +'璇环1:' +this.targetEvent.Related_Opportunity1__c +'---璇环2:'+this.targetEvent.Related_Opportunity2__c); @@ -1021,16 +1050,16 @@ taskType = System.Label.OpportunityFollow; // 璇环璺熻繘浠诲姟 } else if (this.targetEvent.OPDPlan_Flag__c) { taskType = System.Label.OPD; // OPD浠诲姟 - } else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1) { - taskType = System.Label.TargetAccountVisit; // 鐩爣瀹㈡埛鎷滆浠诲姟 - } else if (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0') { - taskType = System.Label.visitHLevel; // H灞傛嫓璁夸换鍔� + } else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account_Energy__c == 1 || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).Is_Target_Account__c == 1)) { + taskType = System.Label.TargetAccountVisit; // 鐩爣瀹㈡埛鎷滆浠诲姟 + } else if (!accToNumTarget.isEmpty() && !accToDepMap.isEmpty() && (accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H1' || accToNumTarget.get(accToDepMap.get(this.targetEvent.whatid__c)).OCM_Category__c == 'H0')) { + taskType = System.Label.visitHLevel; // H灞傛嫓璁夸换鍔� } else { taskType = System.Label.DailyVisit;// 鏃ョ▼鎷滆浠诲姟 } } if (this.targetEvent.Activity_Type2__c == '璨╁2搴�') { - taskType = System.Label.AgencyVisit; // 缁忛攢鍟嗘嫓璁夸换鍔� + taskType = System.Label.AgencyVisit; // 缁忛攢鍟嗘敮鎸佷换鍔� } if (this.targetEvent.Activity_Type2__c == '绀惧銈ゃ儥銉炽儓') { taskType = System.Label.campaignFollow; // 瀛︽湳浼氳璺熻繘浠诲姟 -- Gitblit v1.9.1