From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/classes/SBG001TriggerHandler.cls | 50 +++++++++++++++++++++++++++-----------------------
1 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/force-app/main/default/classes/SBG001TriggerHandler.cls b/force-app/main/default/classes/SBG001TriggerHandler.cls
index 9bc649a..3ebc381 100644
--- a/force-app/main/default/classes/SBG001TriggerHandler.cls
+++ b/force-app/main/default/classes/SBG001TriggerHandler.cls
@@ -742,11 +742,14 @@
} else {
logstr = iflog.Log__c;
}
+ // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220419
+ Boolean piOn =AWSServiceTool.getAWSServiceStatus();
try{
-
- //update to aws 2022/3/9 dennis
+ if (piOn) {
+ //update to aws 2022/3/9 dennis
PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG001');
- NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
+ // NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
+ AWSServiceTool.response result = AWSServiceTool.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
system.debug('aws result---'+result);
status = result.status;
system.debug('aws status---'+status);
@@ -771,26 +774,27 @@
}
//update to aws 2022/3/9 dennis
logstr += '\nend';
- // rowData.retry_cnt__c=0;
-
- // status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG001_ENDPOINT);
- // system.debug('status--->'+status);
- // if (status == 'OK') {
- // logstr += '\nstatus='+status;
- // rowData.retry_cnt__c = 0;
- // } else {
- // if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
- // if (rowData.retry_cnt__c < batch_retry_max_cnt) {
- // rowData.retry_cnt__c++;
- // LogAutoSendSchedule.assignOneMinute();
- // }
- // if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
- // rowData.ErrorLog__c = 'status:' + status +
- // '\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- // }
- // }
- // logstr += '\nend';
- // // rowData.retry_cnt__c=0;
+ }else {
+ status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG001_ENDPOINT);
+ system.debug('status--->'+status);
+ if (status == 'OK') {
+ logstr += '\nstatus='+status;
+ rowData.retry_cnt__c = 0;
+ } else {
+ if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
+ if (rowData.retry_cnt__c < batch_retry_max_cnt) {
+ rowData.retry_cnt__c++;
+ LogAutoSendSchedule.assignOneMinute();
+ }
+ if (rowData.retry_cnt__c >= batch_retry_max_cnt) {
+ rowData.ErrorLog__c = 'status:' + status +
+ '\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
+ }
+ }
+ logstr += '\nend';
+ // rowData.retry_cnt__c=0;
+ }
+
}catch(Exception ex) {
// TODO IOException
// 銈ㄣ儵銉笺亴鐧虹敓銇椼仧鍫村悎
--
Gitblit v1.9.1