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 | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/OpportunityTriggerHandler.cls b/force-app/main/default/classes/OpportunityTriggerHandler.cls
index e00eca2..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;
@@ -800,7 +818,7 @@
opportunityToOwner.put(opp.Id, opp.DealerSelectOwner__c);
}
- Map<Id, User> copyUserMap = new Map<Id, User>([SELECT Id, Name,BS_AsistGenManger__c,AsistGenManger__c, BusinessDepOwner_Tax__c,BusinessDepOwner_WithoutTax__c,SalesWindow__c,Department__c,SalesManager__c FROM User
+ Map<Id, User> copyUserMap = new Map<Id, User>([SELECT Id, Name,BS_AsistGenManger__c, BusinessDepOwner_Tax__c,BusinessDepOwner_WithoutTax__c,SalesWindow__c,Department__c,SalesManager__c FROM User
WHERE Id IN :ownerIdList ]);
for (Opportunity opp: newList)
@@ -815,7 +833,6 @@
opp.IESalesManage__c = u.SalesManager__c != null ? u.SalesManager__c : u.Id;
opp.IESalesManageWindow__c = u.SalesWindow__c != null ? u.SalesWindow__c : u.Id;
opp.DepartmentPrincipal__c = u.Department__c != null ? u.Department__c : u.Id;
- opp.AsistGenMangerIE__c = u.AsistGenManger__c != null ? u.AsistGenManger__c : u.Id;
}
//缁撴潫
//璺ㄥ尯閿�鍞坊鍔犲壇閮ㄩ暱
@@ -1125,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);
@@ -1150,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