From 2e38b5c0b5e2ce302aed60be311f1c56986b1c06 Mon Sep 17 00:00:00 2001 From: 高章伟 <gaozhangwei@prec-tech.com> Date: 星期一, 16 五月 2022 14:55:55 +0800 Subject: [PATCH] 【预测】预测问题 --- force-app/main/default/classes/BeforeSSOpportunityBatch.cls | 3 + force-app/main/default/triggers/SyncOpportunity.trigger | 5 ++ force-app/main/default/triggers/NFM007.trigger | 5 ++ force-app/main/default/triggers/OpportunityHpDeptUpd.trigger | 5 ++ force-app/main/default/triggers/OpportunityTrigger.trigger | 5 ++ force-app/main/default/triggers/OpportunityBefUpd.trigger | 6 ++ force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger | 5 ++ force-app/main/default/triggers/NFM202Opp.trigger | 6 ++ force-app/main/default/triggers/SyncMBOpportunity.trigger | 5 ++ force-app/main/default/triggers/AgencyOppUpd.trigger | 5 ++ force-app/main/default/classes/SSBackorderBatch.cls | 3 + force-app/main/default/classes/SSOpportunityBatch.cls | 6 +++ force-app/main/default/classes/StaticParameter.cls | 6 +++ 13 files changed, 63 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/BeforeSSOpportunityBatch.cls b/force-app/main/default/classes/BeforeSSOpportunityBatch.cls index e9286ba..1447969 100644 --- a/force-app/main/default/classes/BeforeSSOpportunityBatch.cls +++ b/force-app/main/default/classes/BeforeSSOpportunityBatch.cls @@ -41,6 +41,9 @@ } global void execute(Database.BatchableContext BC, List<sObject> scope) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + StaticParameter.EscapeOppandStaTrigger = true; + // SWAG-CE55BX 棰勬祴浼樺寲 end List<Opportunity> oppUpdateList = new List<Opportunity>(); List<Opportunity> updateList = [select id,Inquiry_forcast_date_formular__c,Inquiry_forcast_date_copy__c ,OCM_man_province_cus__c,OCM_man_province_cus_txt__c diff --git a/force-app/main/default/classes/SSBackorderBatch.cls b/force-app/main/default/classes/SSBackorderBatch.cls index 3218a6f..c82a536 100644 --- a/force-app/main/default/classes/SSBackorderBatch.cls +++ b/force-app/main/default/classes/SSBackorderBatch.cls @@ -53,6 +53,9 @@ } public void execute(Database.BatchableContext BC, List<Statu_Achievements__c> staList) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + StaticParameter.EscapeOppandStaTrigger = true; + // SWAG-CE55BX 棰勬祴浼樺寲 end System.debug('鏄惁璧版柟娉�-----'); Map<Id, Statu_Achievements__c> updSelfMap = new Map<Id, Statu_Achievements__c>(); List<SObject> insSSStaList = new List<SObject>(); diff --git a/force-app/main/default/classes/SSOpportunityBatch.cls b/force-app/main/default/classes/SSOpportunityBatch.cls index 9044e7f..d28104c 100644 --- a/force-app/main/default/classes/SSOpportunityBatch.cls +++ b/force-app/main/default/classes/SSOpportunityBatch.cls @@ -173,6 +173,9 @@ // 銈ㄣ儵銉笺倰log銇浉銇嶅嚭銇� if (updSelfList.size() > 0) { System.debug('updSelfList:' + updSelfList); + // SWAG-CE55BX 棰勬祴浼樺寲 start + StaticParameter.EscapeOppandStaTrigger = true; + // SWAG-CE55BX 棰勬祴浼樺寲 end Database.SaveResult[] lsr = Database.update(updSelfList, false); List<Opportunity> reuseUpdateList = new List<Opportunity>(); for (Integer tIdx = 0; tIdx < lsr.size(); tIdx++) { @@ -246,6 +249,9 @@ //鍙傛暟锛歶pdSelfList 瑕侀噸鏂版彃鍏ョ殑鏁版嵁 indexUpdate 绗嚑娆℃彃鍏� public void reuseUpdate(List<Opportunity> updSelfList,Integer indexUpdate){ System.debug('杩欐槸姝ゆ柟娉曡蛋鐨勭锛�'+indexUpdate+' 娆′簡銆�'); + // SWAG-CE55BX 棰勬祴浼樺寲 start + StaticParameter.EscapeOppandStaTrigger = true; + // SWAG-CE55BX 棰勬祴浼樺寲 end Database.SaveResult[] lsr = Database.update(updSelfList, false); List<Opportunity> reuseUpdateList = new List<Opportunity>(); for (Integer tIdx = 0; tIdx < lsr.size(); tIdx++) { diff --git a/force-app/main/default/classes/StaticParameter.cls b/force-app/main/default/classes/StaticParameter.cls index c13c666..fef4b69 100644 --- a/force-app/main/default/classes/StaticParameter.cls +++ b/force-app/main/default/classes/StaticParameter.cls @@ -61,6 +61,12 @@ // 璺宠繃NFM701鎺ュ彛 public static Boolean EscapeNFM701Trigger = true; + // 璺宠繃NFM106鎺ュ彛 + public static Boolean EscapeNFM106Trigger = false; + + // 棰勬祴璺宠繃璇环鍜屾敞娈� + public static Boolean EscapeOppandStaTrigger = false; + public StaticParameter(){ } diff --git a/force-app/main/default/triggers/AgencyOppUpd.trigger b/force-app/main/default/triggers/AgencyOppUpd.trigger index 682ddeb..d3af5c3 100644 --- a/force-app/main/default/triggers/AgencyOppUpd.trigger +++ b/force-app/main/default/triggers/AgencyOppUpd.trigger @@ -1,4 +1,9 @@ trigger AgencyOppUpd on Opportunity (before insert, after insert, after update) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end AgencyOppUpdHandler handler = new AgencyOppUpdHandler(); handler.run(); } \ No newline at end of file diff --git a/force-app/main/default/triggers/NFM007.trigger b/force-app/main/default/triggers/NFM007.trigger index 7959c43..59202cb 100644 --- a/force-app/main/default/triggers/NFM007.trigger +++ b/force-app/main/default/triggers/NFM007.trigger @@ -1,4 +1,9 @@ trigger NFM007 on Opportunity (before update, after update) { // after insert 銈掕�冩叜銇椼仾銇� + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end if (StaticParameter.EscapeNFM007Trigger) { System.debug('Escape銆丒scapeNFM007Trigger:::::' + StaticParameter.EscapeNFM007Trigger); return; diff --git a/force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger b/force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger index 452007f..9942654 100644 --- a/force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger +++ b/force-app/main/default/triggers/NFM010UpsertStatuAchievements.trigger @@ -2,6 +2,11 @@ * 娉ㄦ畫鍑虹磵琛ㄣ倰upsert */ trigger NFM010UpsertStatuAchievements on Statu_Achievements__c (after insert, after update) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end // CHAN-AZM8SE 2018/8/27 start if (Label.update_Statu_Achievements_Journal.equals('true')) { return; diff --git a/force-app/main/default/triggers/NFM202Opp.trigger b/force-app/main/default/triggers/NFM202Opp.trigger index ca68116..c1334e8 100644 --- a/force-app/main/default/triggers/NFM202Opp.trigger +++ b/force-app/main/default/triggers/NFM202Opp.trigger @@ -1,5 +1,9 @@ trigger NFM202Opp on Opportunity (before update,before insert) { - + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end if (NFM202Controller.isRunning) return; NFM202OppHandler handler = new NFM202OppHandler(); diff --git a/force-app/main/default/triggers/OpportunityBefUpd.trigger b/force-app/main/default/triggers/OpportunityBefUpd.trigger index 61b4720..8949f40 100644 --- a/force-app/main/default/triggers/OpportunityBefUpd.trigger +++ b/force-app/main/default/triggers/OpportunityBefUpd.trigger @@ -5,7 +5,11 @@ * OpportunityBefInsUpdTriggerTest */ trigger OpportunityBefUpd on Opportunity (before insert, before update) { - + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end List<String> idlist = new List<String>(); if(Trigger.isInsert){ //璇环鎷呭綋浜哄拰鎴樼暐绉戝鎷呭綋浜轰笉涓�鑷�,鍦ㄨ繖閲屽悓姝� 20170512 XFUU-ALB9JK diff --git a/force-app/main/default/triggers/OpportunityHpDeptUpd.trigger b/force-app/main/default/triggers/OpportunityHpDeptUpd.trigger index 2d19384..6c61e04 100644 --- a/force-app/main/default/triggers/OpportunityHpDeptUpd.trigger +++ b/force-app/main/default/triggers/OpportunityHpDeptUpd.trigger @@ -1,4 +1,9 @@ trigger OpportunityHpDeptUpd on Opportunity (before insert, before update) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end /* if (StaticParameter.EscapeOpportunityHpDeptUpdTrigger) { System.debug('Escape銆丒scapeOpportunityHpDeptUpdTrigger:::::' + StaticParameter.EscapeOpportunityHpDeptUpdTrigger); diff --git a/force-app/main/default/triggers/OpportunityTrigger.trigger b/force-app/main/default/triggers/OpportunityTrigger.trigger index b9400d4..0413739 100644 --- a/force-app/main/default/triggers/OpportunityTrigger.trigger +++ b/force-app/main/default/triggers/OpportunityTrigger.trigger @@ -1,4 +1,9 @@ trigger OpportunityTrigger on Opportunity (before update, after update,before insert, after insert) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end if (Trigger.isAfter && Trigger.isUpdate) { OpportunityTrigger.lockOpportunityFile(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap); // CHAN-AYTCE6 璇环椤甸潰涓殑缁忛攢鍟�1鍙樻洿鍚庢洿鏂版姤浠蜂腑缁忛攢鍟�1 2018/5/25 start diff --git a/force-app/main/default/triggers/SyncMBOpportunity.trigger b/force-app/main/default/triggers/SyncMBOpportunity.trigger index 8267949..3515f03 100644 --- a/force-app/main/default/triggers/SyncMBOpportunity.trigger +++ b/force-app/main/default/triggers/SyncMBOpportunity.trigger @@ -2,6 +2,11 @@ * 鍚屾湡MB_Opportunity__c銆佸悓鏈烳B_Target__c銆丱pportunity_sub_owner__c => OpportunityTeamMember銆丱pportunity_stms_owner__c => OpportunityTeamMember */ trigger SyncMBOpportunity on Opportunity (after insert, after update, before delete) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end if (StaticParameter.EscapeSyncOpportunityTrigger) { System.debug('Escape銆丒scapeSyncOpportunityTrigger:::::' + StaticParameter.EscapeSyncOpportunityTrigger); return; diff --git a/force-app/main/default/triggers/SyncOpportunity.trigger b/force-app/main/default/triggers/SyncOpportunity.trigger index 1282cf3..a2b41e2 100644 --- a/force-app/main/default/triggers/SyncOpportunity.trigger +++ b/force-app/main/default/triggers/SyncOpportunity.trigger @@ -1,4 +1,9 @@ trigger SyncOpportunity on Opportunity (after delete, after insert, after update) { + // SWAG-CE55BX 棰勬祴浼樺寲 start + if (StaticParameter.EscapeOppandStaTrigger) { + return; + } + // SWAG-CE55BX 棰勬祴浼樺寲 end if (StaticParameter.EscapeSyncOpportunityTrigger) { System.debug('Escape銆丒scapeSyncOpportunityTrigger:::::' + StaticParameter.EscapeSyncOpportunityTrigger); return; -- Gitblit v1.9.1