From fb04e7c01d119c60632b4298d18fd93f3ccb3d79 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期三, 06 四月 2022 10:32:05 +0800 Subject: [PATCH] 20220405DeployProduction --- force-app/main/default/classes/NFM503InfoFileBatch.cls | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/force-app/main/default/classes/NFM503InfoFileBatch.cls b/force-app/main/default/classes/NFM503InfoFileBatch.cls index 4703d3f..25c2b6b 100644 --- a/force-app/main/default/classes/NFM503InfoFileBatch.cls +++ b/force-app/main/default/classes/NFM503InfoFileBatch.cls @@ -6,7 +6,7 @@ public static String transId; public static String token; public static integer isSuccess=0; - public static List<String> sfRecordIds; + public static List<String> sfRecordIds =new List<String>(); //add staic sushanhu 20220302 end Boolean IsNeedExecute = false; //2021-06-28 mzy WLIG-BYHD79 SFDC鐜batch鍚堝苟璋冩煡 鏄惁绗﹀悎鎵ц鏉′欢 //add nfm 503 aws response start sushanhu 20220301 @@ -70,14 +70,15 @@ timeslot = newTime.getTime() - oldTime.getTime(); } // System.debug('++++1++++' + token + ' : ' + timeslot); + PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503'); if (string.isblank(token) || timeslot > 1800000) { //UP TO AWAS TOKEN 20220225 SUSHANHU START - NFMUtil.response response = NFMUtil.getAWSToken(); - //UP TO AWAS TOKEN 20220225 SUSHANHU END - if (String.isBlank(response.responseBody)) { - bidInfoFile.ErrorMessage__c = '503token:' + response.status; - } - token = response.responseBody; + // NFMUtil.response response = NFMUtil.getAWSToken(); + // //UP TO AWAS TOKEN 20220225 SUSHANHU END + // if (String.isBlank(response.responseBody)) { + // bidInfoFile.ErrorMessage__c = '503token:' + response.status; + // } + token = pi.token; oldTime = Datetime.now(); token503.NFM501_Token__c = token; oldTime503.NFM501_Gain_End_Time__c = oldTime; @@ -93,7 +94,6 @@ //UP TO NEW AWS method sushanhu start 20220301 // List< Tender_information__c> updateTenderList = new List< Tender_information__c>(); List<FileAddress__c> fileList = new List<FileAddress__c>(); - PIHelper.piIntegration pi =PIHelper.getPIIntegrationInfo('NFM503'); transUrl =pi.searchUrl; NFMUtil.response response = NFMUtil.getAWSQLMData(pi.newUrl ,JSON.serialize(queryfileList), token); system.debug('aws result'+response.responseBody); @@ -192,17 +192,17 @@ update bidInfoFileList; // add 纭浜嬪姟 sushanhu 20220302 start - isSuccess =1; + if (fileList.size() > 0 ) { for (FileAddress__c fileAddress : fileList) { + system.debug('fileAddress.Id---'+json.serialize(fileAddress)); sfRecordIds.add(fileAddress.Id); system.debug('fileAddress.Id---'+fileAddress.Id); } } system.debug('鎴愬姛鐨則oken'+token); - - // PIHelper.confirmFileTrans('NFM503',1,JSON.serialize(sfRecordIds),transId,token,transUrl); - + isSuccess =1; + // if (!confirm) { // //鍥炴粴 // if (sp != null) { @@ -213,7 +213,7 @@ if (System.Test.isRunningTest()) { throw new ControllerUtil.myException('aaa'); } - return; + // return; } catch (Exception ex) { if (sp != null) { Database.rollback(sp); @@ -230,8 +230,8 @@ global void finish(Database.BatchableContext BC) { // add confirm transaction for pipl sushanhu 20220314 start - if (sfRecordIds==null) { - PIHelper.confirmFileTrans('NFM503',0,'',transId,token,transUrl); + if (isSuccess==0) { + PIHelper.confirmFileTrans('NFM503',isSuccess,'',transId,token,transUrl); }else { PIHelper.confirmFileTrans('NFM503',isSuccess,JSON.serialize(sfRecordIds),transId,token,transUrl); } -- Gitblit v1.9.1