From 84b24801b8e0e071589ea57b29e64f73e13b1c0c Mon Sep 17 00:00:00 2001
From: 付煜 <fuyu3103346691@163.com>
Date: 星期一, 21 三月 2022 14:54:15 +0800
Subject: [PATCH] SWAG-CCEB67【委托】【重要】保有设备所属变更审批报错

---
 force-app/main/default/classes/LogAutoSendBatch.cls |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/force-app/main/default/classes/LogAutoSendBatch.cls b/force-app/main/default/classes/LogAutoSendBatch.cls
index d51e626..7104f78 100644
--- a/force-app/main/default/classes/LogAutoSendBatch.cls
+++ b/force-app/main/default/classes/LogAutoSendBatch.cls
@@ -29,8 +29,21 @@
     global Database.QueryLocator start(Database.BatchableContext BC) {
 
         String profileId = UserInfo.getProfileId();
+        // 20220318 ljh SWAG-CC54R2 add start
+        if(String.isNotBlank(typeNFM) && typeNFM == 'NFM010' && String.isBlank(messageGroupNumber)){
+            return Database.getQueryLocator(
+                [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c,
+                 Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, Type__c,
+                 retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c
+                 FROM BatchIF_Log__c
+                 WHERE RowDataFlg__c = true
+                 AND (retry_cnt__c = null OR (retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt))
+                 AND Type__c = : typeNFM ]
+                );
+        } else if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) {
+        // 20220318 ljh SWAG-CC54R2 add end
         //20191224 HWAG-BK65E8 add start
-        if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) {
+        // if (String.isNotBlank(typeNFM) && String.isNotBlank(messageGroupNumber) && times != null) {
             return Database.getQueryLocator(
                 [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c,
                  Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, Type__c,
@@ -54,18 +67,6 @@
                                             OR(NFM501_Web_Annex_Count__c != null
                                                AND NFM501_Web_Annex_Count__c > 0 AND NFM501_Web_Annex_Count__c < : max_cnt))]
                 );
-        // 20220318 ljh SWAG-CC54R2 add start
-        } else if(String.isNotBlank(typeNFM) && typeNFM == 'NFM010'){
-            return Database.getQueryLocator(
-                [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c,
-                 Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, Type__c,
-                 retry_cnt__c, NFM501Future_Count__c, NFM501_Web_Annex_Count__c
-                 FROM BatchIF_Log__c
-                 WHERE RowDataFlg__c = true
-                 AND (retry_cnt__c = null OR (retry_cnt__c != null AND retry_cnt__c > 0 AND retry_cnt__c < : max_cnt))
-                 AND Type__c = : typeNFM ]
-                );
-        // 20220318 ljh SWAG-CC54R2 add end
         } else {
             return Database.getQueryLocator(
                 [SELECT Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c,

--
Gitblit v1.9.1