From 56cab641be7c6c0aaab0ae2ca7eeaee9be6d5a69 Mon Sep 17 00:00:00 2001
From: LiJinHuan <lijinhuan@prec-tech.com>
Date: 星期五, 11 三月 2022 18:52:54 +0800
Subject: [PATCH] 【委托】【phase5上线课题132】-紧急-耗材ET展箱借用目的没有锁定已过期库存

---
 force-app/main/default/classes/ConsumAutoSelectBatch.cls |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/classes/ConsumAutoSelectBatch.cls b/force-app/main/default/classes/ConsumAutoSelectBatch.cls
index 57bf532..8e37ca3 100644
--- a/force-app/main/default/classes/ConsumAutoSelectBatch.cls
+++ b/force-app/main/default/classes/ConsumAutoSelectBatch.cls
@@ -10,9 +10,11 @@
     // 2021-03-05  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡  start
     global ConsumAutoSelectBatch( ) {
     }
-    global ConsumAutoSelectBatch(Boolean NeedExecute) {
-        this.IsNeedExecute = NeedExecute;
-    }
+    // 20220309 ljh  SFDC-CC73U5 132 鍔ㄧ墿瀹為獙&ET灞曠 閿佸畾宸茶繃鏈熷簱瀛� start
+    // global ConsumAutoSelectBatch(Boolean NeedExecute) {
+    //     this.IsNeedExecute = NeedExecute;
+    // }
+    // 20220309 ljh  SFDC-CC73U5 132 鍔ㄧ墿瀹為獙&ET灞曠 閿佸畾宸茶繃鏈熷簱瀛� end
     // 2021-03-05  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡  end
 
     /**
@@ -24,6 +26,7 @@
                 + ', demo_purpose2__c'
             + ' from Consum_Apply__c'
             + ' where (Status__c = \'宸叉壒鍑哱' OR Status__c = \'宸插嚭搴撴寚绀篭')'
+            // + ' and demo_purpose2__c !=\'鍔ㄧ墿瀹為獙\' and demo_purpose2__c !=\'ET灞曠\''
             + ' and Wei_Shipment_request__c > 0'
             + ' and Yi_loaner_arranged__c = 0'
             + ' order by Id';
@@ -47,7 +50,7 @@
                       AND Cancel_Select__c = false
                       AND Shipment_request_time2__c = null];
             List<Consum_Apply_Equipment_Set_Detail__c> caesdList = new List<Consum_Apply_Equipment_Set_Detail__c>();
-
+            
             Boolean haveChangeAss = ConsumDefaultSelectController.reSetAsset(selectedData, caesdList, csmApyList[0], false, true);
             if (caesdList.size() > 0) {
                 update caesdList;
@@ -99,10 +102,10 @@
         }
 
         //2021-03-05  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡  start
-        if(!Test.isRunningTest() &&IsNeedExecute==true){
-            //batch閲岃皟鐢ㄤ笅涓�涓猙atch鏃讹紝甯屾湜璺熷師鏈夌殑Schedule閲岄潰浼犵殑鏉℃暟淇濇寔涓�鑷�
-            Id execBTId = Database.executebatch(new SetOlympusCalendarWorkDayBatch(true),200);
-        }
+        // if(!Test.isRunningTest() &&IsNeedExecute==true){
+        //     //batch閲岃皟鐢ㄤ笅涓�涓猙atch鏃讹紝甯屾湜璺熷師鏈夌殑Schedule閲岄潰浼犵殑鏉℃暟淇濇寔涓�鑷�
+        //     Id execBTId = Database.executebatch(new SetOlympusCalendarWorkDayBatch(true),200);
+        // }
         //2021-03-05  mzy  WLIG-BYHD79  SFDC鐜batch鍚堝苟璋冩煡 end
     }
 

--
Gitblit v1.9.1