From e9e1806b0f4b5bae1fc36204ccc5d6fdad52d66f Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 05 六月 2023 11:22:08 +0800
Subject: [PATCH] Merge branch 'master' into LightningUpgradeProject

---
 force-app/main/default/classes/NFM103Controller.cls |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/force-app/main/default/classes/NFM103Controller.cls b/force-app/main/default/classes/NFM103Controller.cls
index 88fe8e6..6d8cc69 100644
--- a/force-app/main/default/classes/NFM103Controller.cls
+++ b/force-app/main/default/classes/NFM103Controller.cls
@@ -247,11 +247,12 @@
             // NFM103Controller.callout(iflog.Id, rprIds);
             String uid = UserInfo.getUserId();
             String BUid = System.Label.Batch_User_Id;
+            String OLYid = System.Label.OlympusSystem_ID;
             System.debug('zheli');
-            if (uid.substring(0,15) == BUid.substring(0,15)) {
-                NFM103Controller.calloutNotfuture(iflog.Id, rprIds, null);
+            if (uid.substring(0,15) == BUid.substring(0,15) || uid.substring(0,15) == OLYid.substring(0,15)) {
+                NFM103Controller.calloutNotfuture(iflog.Id, rprIds);
             }else{
-                NFM103Controller.callout(iflog.Id, rprIds, null);
+                NFM103Controller.callout(iflog.Id, rprIds);
             }
             // 20220902 ljh XLIU-CHSD8G update end
         }
@@ -265,11 +266,11 @@
      * @param repairIds          閫佷俊瀵捐薄淇悊
      */
     @future (callout = true)
-    public static void callout(String iflog_Id, List<Id> repairIds, String flag) {
-       calloutNotfuture(iflog_Id, repairIds, flag);
+    public static void callout(String iflog_Id, List<Id> repairIds) {
+       calloutNotfuture(iflog_Id, repairIds);
     }
     //20220902 ljh 鏂板锛堝鍒讹級鏂规硶  XLIU-CHSD8G 
-    public static void calloutNotfuture(String iflog_Id, List<Id> repairIds,String flag) {
+    public static void calloutNotfuture(String iflog_Id, List<Id> repairIds) {
 
         if (repairIds == null || repairIds.size() == 0) {
             return;
@@ -623,11 +624,7 @@
                  rprId = rpr.Id;   //2022-07-14  zyh  add
 
                  //鍐嶆敞鍐屽垎鏋� 闇�姹� 鏂板瀛楁 20220811 sx start
-                 element.Reanalysis                = flag;
-
-                 if(flag != null){
-                    element.UpdateStatus = 'X';
-                 }
+                 element.Reanalysis                = null;
                  //鍐嶆敞鍐屽垎鏋� 闇�姹� 鏂板瀛楁 20220811 sx end
             }
 
@@ -848,11 +845,18 @@
             // 銈ㄣ儵銉笺亴鐧虹敓銇椼仧鍫村悎
             System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getMessage());
             System.debug(Logginglevel.ERROR, 'NFM103_' + iflog.Name + ':' + ex.getStackTraceString());
-            logstr += ex.getMessage();
-            iflog.ErrorLog__c += ex.getMessage() + '\n';
-            iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
+            //NFM105瑙﹀彂103鎺ュ彛 20230303 LY start
+            // Callout from triggers are currently not supported.
+            System.debug('NFM201jiekou'+ex.getMessage());
+            if (!String.valueOf(ex.getMessage()).contains('Callout from triggers')) {
 
+                logstr += ex.getMessage();
+                iflog.ErrorLog__c += ex.getMessage() + '\n';
+                iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
+            }
                 System.debug('鏍囪0--------------------1:' + rowData.retry_cnt__c);
+
+            //NFM105瑙﹀彂103鎺ュ彛 20230303 LY end
             //---Gaozw---add
             if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
             if (rowData.retry_cnt__c < batch_retry_max_cnt) {

--
Gitblit v1.9.1