From 1fb0d62c569a30bc0b4c30f48212c5582233184b Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期三, 11 五月 2022 19:01:36 +0800
Subject: [PATCH] 更改逻辑,无影响。
---
force-app/main/default/classes/OrderTriggerHandler.cls | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/OrderTriggerHandler.cls b/force-app/main/default/classes/OrderTriggerHandler.cls
index a337dea..8f35120 100644
--- a/force-app/main/default/classes/OrderTriggerHandler.cls
+++ b/force-app/main/default/classes/OrderTriggerHandler.cls
@@ -2090,15 +2090,14 @@
newOrder.BS_AsistBGenManger_BS__c = u.BS_AsistBGenManger__c == null ? u.Id : u.BS_AsistBGenManger__c;
newOrder.BS_AsistGenManger_BS__c = u.BS_AsistGenManger__c == null ? u.Id : u.BS_AsistGenManger__c;
- newOrder.BS_MandAGM__c = u.BS_Manager__c == u.BS_AsistGenManger__c ? true : false;
- newOrder.BS_AGMandD__c = u.BS_AsistGenManger__c == u.BS_Department__c ? true : false;
- newOrder.BS_DandAB__c = u.BS_Department__c == u.BS_AsistBGenManger__c ? true : false;
+ newOrder.BS_MandAGM__c = u.BS_Manager__c == u.BS_AsistBGenManger__c ? true : false;
+ //newOrder.BS_AGMandD__c = u.BS_AsistGenManger__c == u.BS_Department__c ? true : false;
+ //newOrder.BS_DandAB__c = u.BS_Department__c == u.BS_AsistBGenManger__c ? true : false;
newOrder.BS_ABGandBD__c = u.BS_AsistBGenManger__c == u.BS_BDepartment__c ? true : false;
newOrder.BS_BDandIND__c = u.BS_BDepartment__c == u.BS_INDepartment__c ? true : false;
newOrder.BS_INDandGM__c = u.BS_INDepartment__c == u.BS_GeneralManager__c ? true : false;
}
}
-
if (newOrder.ProductSegment__c != 'BS') {
newOrder.SalesOwner_BS__c = newOrder.OpportunityOwnerId__c;
@@ -2119,6 +2118,14 @@
}
//}
}
+
+ for (Order newOrder : newList) {
+ if (newOrder.ProductSegment__c == 'BS') {
+ newOrder.BS_AGMandD__c = newOrder.BS_Manager_BS__c == newOrder.SalesOwner_BS__c ? true : false;
+ newOrder.BS_DandAB__c = newOrder.BS_Department_BS__c == newOrder.SalesOwner_BS__c ? true : false;
+ }
+ }
+
}
--
Gitblit v1.9.1