From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/classes/OpportunityTriggerHandler.cls | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/OpportunityTriggerHandler.cls b/force-app/main/default/classes/OpportunityTriggerHandler.cls
index be66aac..6a2b27c 100644
--- a/force-app/main/default/classes/OpportunityTriggerHandler.cls
+++ b/force-app/main/default/classes/OpportunityTriggerHandler.cls
@@ -135,6 +135,10 @@
newOpp.Competitor_Product_Code8_D__c = newOpp.CompetitorProductCode8__c;
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
+ newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
newOpp.Expected_Order_Date_D__c = newOpp.ExpectedOrderDate__c;
newOpp.Inquiry_Result_D__c = newOpp.InquiryResult__c;
@@ -411,9 +415,15 @@
}
if (newOpp.DealerSalesStaffName__c != oldOpp.DealerSalesStaffName__c) {
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
}
if (newOpp.DealerService__c != oldOpp.DealerService__c) {
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
}
if (newOpp.ExpectedDeliveryDate__c != oldOpp.ExpectedDeliveryDate__c) {
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
@@ -538,6 +548,10 @@
newOpp.CompetitorProductCode8__c = newOpp.Competitor_Product_Code8_D__c;
newOpp.DealerSalesStaffName__c = newOpp.Dealer_Sales_Staff_Name_D__c;
newOpp.DealerService__c = newOpp.Dealer_Service_D__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOpp.DealerSalesStaffName_Encrypted__c = newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c;
+ newOpp.DealerService_Encrypted__c = newOpp.Dealer_Service_D_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOpp.ExpectedDeliveryDate__c = newOpp.Expected_delivery_date_D__c;
newOpp.ExpectedOrderDate__c = newOpp.Expected_Order_Date_D__c;
newOpp.InquiryResult__c = newOpp.Inquiry_result_D__c;
@@ -611,6 +625,10 @@
newOpp.Competitor_Product_Code8_D__c = newOpp.CompetitorProductCode8__c;
newOpp.Dealer_Sales_Staff_Name_D__c = newOpp.DealerSalesStaffName__c;
newOpp.Dealer_Service_D__c = newOpp.DealerService__c;
+ // PIPL Update 20220420 By Chen Yanan Start
+ newOpp.Dealer_Sales_Staff_Name_D_Encrypted__c = newOpp.DealerSalesStaffName_Encrypted__c;
+ newOpp.Dealer_Service_D_Encrypted__c = newOpp.DealerService_Encrypted__c;
+ // PIPL Update 20220420 By Chen Yanan End
newOpp.Expected_Delivery_Date_D__c = newOpp.ExpectedDeliveryDate__c;
newOpp.Expected_Order_Date_D__c = newOpp.ExpectedOrderDate__c;
newOpp.Inquiry_Result_D__c = newOpp.InquiryResult__c;
@@ -1124,7 +1142,7 @@
}
if (targetList.size() > 0) {
- List<Order> odrList = [select id, OpportunityId from Order where OpportunityId = :targetList and Status__c = 'Active'];
+ List<Order> odrList = [select id, OpportunityId,ForeignTradeCompany_D__c,TradeType__c,ProductSegment__c from Order where OpportunityId = :targetList and Status__c = 'Active'];
for (Order odr : odrList) {
Opportunity opp = newMap.get(odr.OpportunityId);
@@ -1149,7 +1167,8 @@
odr.Status__c = 'Inactive';
}
}
-
+
+ System.debug('odrList------'+odrList);
if (odrList.size() > 0) update odrList;
}
if (targetList2.size() > 0) {
--
Gitblit v1.9.1