From 02ddc35714cbd1688b7cb057f770f1410de79dab Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 11 三月 2022 12:19:33 +0800
Subject: [PATCH] PIPL Updated Code 20220311

---
 force-app/main/default/classes/SimpleEventRegisterController.cls |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/force-app/main/default/classes/SimpleEventRegisterController.cls b/force-app/main/default/classes/SimpleEventRegisterController.cls
index 71263a9..dff5a34 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) {
@@ -1030,7 +1057,7 @@
                     }
                 }
                 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; // 瀛︽湳浼氳璺熻繘浠诲姟
@@ -1149,7 +1176,7 @@
                 taskAccType = '鐢ㄦ埛鎷滆';
             }
             if (this.targetEvent.Activity_Type2__c == '璨╁2搴�') {
-                taskAccType = '缁忛攢鍟嗘嫓璁�';
+                taskAccType = '缁忛攢鍟嗘敮鎸�';
             }
             if (this.targetEvent.Activity_Type2__c == '绀惧銈ゃ儥銉炽儓') {
                 taskAccType = '瀛︽湳浼氳';
@@ -1182,7 +1209,7 @@
                     taskAccType = '鐢ㄦ埛鎷滆';
                 }
                 if (this.targetEvent.Activity_Type2__c == '璨╁2搴�') {
-                    taskAccType = '缁忛攢鍟嗘嫓璁�';
+                    taskAccType = '缁忛攢鍟嗘敮鎸�';
                 }
                 if (this.targetEvent.Activity_Type2__c == '绀惧銈ゃ儥銉炽儓') {
                     taskAccType = '瀛︽湳浼氳';

--
Gitblit v1.9.1