From bc1ded4de6761128cff0df6503ca2c0b316b43e4 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期四, 05 五月 2022 17:59:04 +0800
Subject: [PATCH] AP6更改
---
force-app/main/default/classes/OrderTriggerHandler.cls | 43 +++++++++++++++++++++++++++++++++++++++----
1 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/OrderTriggerHandler.cls b/force-app/main/default/classes/OrderTriggerHandler.cls
index cc066e7..a337dea 100644
--- a/force-app/main/default/classes/OrderTriggerHandler.cls
+++ b/force-app/main/default/classes/OrderTriggerHandler.cls
@@ -360,6 +360,11 @@
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
+ newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
+ newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
newOrd.SpecialWarranty_D__c = newOrd.SpecialWarranty__c;
newOrd.DealerProfit_D__c = newOrd.DealerProfit__c;
@@ -425,7 +430,7 @@
}
public static void setPriceBook(List<Order> newList, Map<Id, Order> newMap, List<Order> oldList, Map<Id, Order> oldMap) {
-
+
List<String> oppidList = new List<String>();
for (Order o : newList) {
oppidList.add(o.OpportunityId);
@@ -1316,12 +1321,21 @@
}
if (newOrd.SpecialDeliveryContact__c != oldOrd.SpecialDeliveryContact__c) {
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialDeliveryPhone__c != oldOrd.SpecialDeliveryPhone__c) {
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialDeliveryAddress__c != oldOrd.SpecialDeliveryAddress__c) {
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
}
if (newOrd.SpecialParkage__c != oldOrd.SpecialParkage__c) {
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
@@ -1637,6 +1651,11 @@
newOrd.SpecialDeliveryContact__c = newOrd.SpecialDeliveryContact_D__c;
newOrd.SpecialDeliveryPhone__c = newOrd.SpecialDeliveryPhone_D__c;
newOrd.SpecialDeliveryAddress__c = newOrd.SpecialDeliveryAddress_D__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryContact_Encrypted__c = newOrd.SpecialDeliveryContact_D_Encrypted__c;
+ newOrd.SpecialDeliveryPhone_Encrypted__c = newOrd.SpecialDeliveryPhone_D_Encrypted__c;
+ newOrd.SpecialDeliveryAddress_Encrypted__c = newOrd.SpecialDeliveryAddress_D_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage__c = newOrd.SpecialParkage_D__c;
newOrd.SpecialWarranty__c = newOrd.SpecialWarranty_D__c;
newOrd.DealerProfit__c = newOrd.DealerProfit_D__c;
@@ -1765,6 +1784,11 @@
newOrd.SpecialDeliveryContact_D__c = newOrd.SpecialDeliveryContact__c;
newOrd.SpecialDeliveryPhone_D__c = newOrd.SpecialDeliveryPhone__c;
newOrd.SpecialDeliveryAddress_D__c = newOrd.SpecialDeliveryAddress__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryContact_D_Encrypted__c = newOrd.SpecialDeliveryContact_Encrypted__c;
+ newOrd.SpecialDeliveryPhone_D_Encrypted__c = newOrd.SpecialDeliveryPhone_Encrypted__c;
+ newOrd.SpecialDeliveryAddress_D_Encrypted__c = newOrd.SpecialDeliveryAddress_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOrd.SpecialParkage_D__c = newOrd.SpecialParkage__c;
newOrd.SpecialWarranty_D__c = newOrd.SpecialWarranty__c;
newOrd.DealerProfit_D__c = newOrd.DealerProfit__c;
@@ -1806,6 +1830,9 @@
newOrd.Contract_StatusD__c = newOrd.Contract_Status__c;
newOrd.ProductConfig_D__c = newOrd.ProductConfig__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOrd.SpecialDeliveryPhone_Encrypted__c = newOrd.SpecialDeliveryPhone_D_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
if (newOrd.Upload_IsChanged__c == true) {
newOrd.Upload_IsChanged__c = false;
@@ -2824,6 +2851,8 @@
for(OpportunityContactRole oppor:role_list){
roleMap.put(oppor.OpportunityId,oppor.ContactId);
}
+ System.debug('oppidList: ' + oppidList);//Nancy 2022-04-25
+ System.debug('role_list: ' + role_list);//Nancy 2022-04-25
// 鑾峰彇绯荤粺绠$悊鍛業d
String getUserId = System.label.SystemAdmin1_2_GPI;
String errMessage = '瀹㈡埛鍚嶆垨鏈�缁堢敤鎴蜂笌璇环涓嶄竴鑷达紒';
@@ -2832,8 +2861,14 @@
System.debug(oppAccountMap.get(orOne.OpportunityId) != orOne.AccountId);
System.debug( !roleMap.containsKey(orOne.OpportunityId));
System.debug(orOne.EndUserD__c + '++'+ roleMap.get(orOne.OpportunityId));
-
- /*if(oppAccountMap.get(orOne.OpportunityId) != orOne.AccountId || !roleMap.containsKey(orOne.OpportunityId) || orOne.EndUserD__c != roleMap.get(orOne.OpportunityId)){
+ //zhj 2022-04-22 start
+ System.debug('oppAccountMap.get(orOne.OpportunityId) = ' + oppAccountMap.get(orOne.OpportunityId));
+ System.debug('orOne.AccountId = ' + orOne.AccountId);
+ System.debug('roleMap.containsKey(orOne.OpportunityId) = ' + roleMap.containsKey(orOne.OpportunityId));
+ System.debug('orOne.EndUserD__c = ' + orOne.EndUserD__c);
+ System.debug('roleMap.get(orOne.OpportunityId) = ' + roleMap.get(orOne.OpportunityId));
+ //zhj 2022-04-22 end
+ if(oppAccountMap.get(orOne.OpportunityId) != orOne.AccountId || !roleMap.containsKey(orOne.OpportunityId) || orOne.EndUserD__c != roleMap.get(orOne.OpportunityId)){
// 鑾峰彇鐢ㄦ埛Id
String userId = UserInfo.getUserId().subString(0,15);
if (String.isNotBlank(getUserId)) {
@@ -2855,7 +2890,7 @@
}
- }*/
+ }
}
}
}
--
Gitblit v1.9.1