From 9a717144ef086a92a34adfc0763dfa9f6cb4b0ba Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期六, 12 三月 2022 16:54:21 +0800
Subject: [PATCH] Merge PIPL Function code 20220311

---
 force-app/main/default/classes/NFM501FutureController.cls |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/classes/NFM501FutureController.cls b/force-app/main/default/classes/NFM501FutureController.cls
index cd34a5f..eef5e5c 100644
--- a/force-app/main/default/classes/NFM501FutureController.cls
+++ b/force-app/main/default/classes/NFM501FutureController.cls
@@ -4,13 +4,19 @@
     // 	鎶曟爣鎴鏃堕棿
     // 2021/01/04 18:00
     //add by sushanhu for pi 20220310 start
-    public static String txId;
+    public  String txId;
     
     //add by sushanhu for pi 20220310 end
     public String rowData_id;
     public NFM501FutureController(String rowData_id) {
         this.rowData_id = rowData_id;
     }
+     //add by sushanhu for pi 20220310 start
+    //  public NFM501FutureController(String rowData_id,String txId) {
+    //      this.rowData_id = rowData_id;
+    //     this.txId = txId;
+    //  }
+     //add by sushanhu for pi 20220310 end
     public static Integer batch_retry_max_cnt = Integer.valueOf(System.Label.batch_retry_max_cnt);
     public void execute(QueueableContext context /*, String iflog_Id*/ ) {
         //闇�鍔犱竴鏁板瓧鍙橀噺锛堝鏋滆幏鍙栧埌 html闄勪欢锛屽叾浠栭檮浠讹紝鍦ㄦ棩蹇椾腑鏄剧ず鏁伴噺锛�
@@ -22,7 +28,14 @@
             from BatchIF_Log__c where RowDataFlg__c = true and Id = : rowData_id
         ];
         //瀛樻斁鎶ラ敊淇℃伅
-        txId =rowData.AWS_Transaction_Id__c; //add by sushanhu for pipl 20220310
+        //add by sushanhu for pipl 20220311 start
+        system.debug('txId from log'+rowData.AWS_Transaction_Id__c);
+        if (!String.isEmpty(rowData.AWS_Transaction_Id__c)) {
+            txId =rowData.AWS_Transaction_Id__c; //add by sushanhu for pipl 20220310
+        }else {
+            system.debug('txId from NF501'+txId);
+        }
+         //add by sushanhu for pipl 20220311 end
         system.debug('nfm501future awsid'+txId);
         BatchIF_Log__c iflog501Future = new BatchIF_Log__c();
         iflog501Future.Type__c = 'NFM501';
@@ -32,11 +45,14 @@
         iflog501Future.RowDataFlg__c = false;
         iflog501Future.AWS_Transaction_Id__c=rowData.AWS_Transaction_Id__c;
         insert iflog501Future;
-        NFM501FutureController.main(rowData.Id, iflog501Future.Id, false);
+        NFM501FutureController.main(rowData.Id, iflog501Future.Id, false,txId);
     }
+    
     @future(callout = true)
     //閲嶅彂锛堟妸浠庢帴鍙h幏鍙栧埌鐨勬暟鎹瓨鍏ユ棩蹇椾腑锛屽啀鎶婃棩蹇椾腑瀛樺叆鐨勬暟鎹噸鏂癑OSN瑙f瀽涓�閬嶏級
-    public static void main(String rowData_id, String iflog_id, boolean Manual_execution501future) {
+    public static void main(String rowData_id, String iflog_id, boolean Manual_execution501future,
+                                String txId //澧炲姞浜嬪姟id forpipl 20220310 
+            ) {
         BatchIF_Log__c rowData = [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, retry_cnt__c, NFM501Future_Count__c,
@@ -106,7 +122,8 @@
             SumUnit__c, AreaCity__c, AreaCountry__c, AgentUnit1__c,
             AgentUnit2__c, AgentUnit3__c, AgentUnit4__c, AgentUnit5__c,
             ZhaoRelationName__c, ZhongRelationName__c,
-            publicDate__c, noticeDate__c, ResultDate__c
+            publicDate__c, noticeDate__c, ResultDate__c,
+            AWS_Data_Id__c //ADD FOR pi SUSHANHU 20220311
             FROM Tender_information__c Where ProjectId__c in : projectIdList
         ];
         Map < String, Tender_information__c > TenMap = new Map < String, Tender_information__c > ();

--
Gitblit v1.9.1