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/SBG007TriggerHandler.cls | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/force-app/main/default/classes/SBG007TriggerHandler.cls b/force-app/main/default/classes/SBG007TriggerHandler.cls
index 673b338..9c6355a 100644
--- a/force-app/main/default/classes/SBG007TriggerHandler.cls
+++ b/force-app/main/default/classes/SBG007TriggerHandler.cls
@@ -325,10 +325,16 @@
} else {
logstr = iflog.Log__c;
}
+ // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220419
+ Boolean piOn =AWSServiceTool.getAWSServiceStatus();
try{
- //update to aws 2022/3/3 dennis
+ //add by sushanhu for test 20220421
+ //piOn=false;
+ if (piOn) {
+ //update to aws 2022/3/3 dennis
PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG007');
- 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);//202204 25 update by sushanhu for pipl
system.debug('aws result---'+result);
status = result.status;
responseBody=result.responseBody;
@@ -349,6 +355,25 @@
+'\n閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
}
}
+ }else {
+ // 007淇敼Rest gwy start 2021-04-12
+ status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG007_ENDPOINT);
+ if (status == 'OK') {
+ logstr += '\n' + 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閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
+ }
+ }
+ }
+
//gaozw
@@ -360,23 +385,7 @@
if (NFMUtil.CLIENT_CERT_NAME != null) {
stub.clientCertName_x = NFMUtil.CLIENT_CERT_NAME;
}*/
- //007淇敼Rest gwy start 2021-04-12
- //comment by dennis 2022/3/3 start
- // status = NFMUtil.sendToSapRet(rowDataStr, NFMUtil.SBG007_ENDPOINT);
- // if (status == 'OK') {
- // logstr += '\n' + 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閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
- // }
- // }
+
//comment by dennis 2022/3/3 end
//007淇敼Rest gwy end 2021-04-12
//Sbg007Sync.GeDatas_element[] pQuotations = new Sbg007Sync.GeDatas_element[] { quotations };
--
Gitblit v1.9.1