From 2f4492ee18f90274582fcc2bb06f5e9bf64136e8 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 13 五月 2022 17:32:14 +0800
Subject: [PATCH] ProdBackup0513

---
 force-app/main/default/classes/SBG007TriggerHandler.cls |   78 ++++++++------------------------------
 1 files changed, 17 insertions(+), 61 deletions(-)

diff --git a/force-app/main/default/classes/SBG007TriggerHandler.cls b/force-app/main/default/classes/SBG007TriggerHandler.cls
index 9c6355a..ed41915 100644
--- a/force-app/main/default/classes/SBG007TriggerHandler.cls
+++ b/force-app/main/default/classes/SBG007TriggerHandler.cls
@@ -4,7 +4,6 @@
     public static Set<Id> SBG007_Ids = new Set<Id>();
     //007淇敼Rest gwy start 2021-04-06
     public static String status;
-    public static String responseBody;//dennis 2022/3/3
     public class SBG007 {
         public GeDatas_element GeDatas;
     }
@@ -30,8 +29,6 @@
         public String Other2;
         public String Other3;
         public GeDataDetails_element[] GeDataDetails;
-        //dennis start for pi 2022/3/3
-        public String DataId;
         
     }
     public class GeDataDetails_element {
@@ -75,10 +72,8 @@
      * @param oppIds             閫佷俊瀵捐薄鍟嗚珖(璜栫悊涓�1浠躲伄銇裤仹銇�)
      * @param purposeOfAdviceMap 1:Delete 2:Add(Insert) 3:Change(Update)
      */
-    
     @future (callout=true)
     public static void callout(String iflog_Id, List<String> oppIds, Map<String, String> purposeOfAdviceMap) {
-        System.debug('杩涘叆callout');
         if (oppIds == null || oppIds.size() == 0) {
             return;
         }
@@ -130,8 +125,7 @@
                                                 EndUser__c, Machine_Parts__c,
                                                 SalesChannel__c, ExpectedDeliveryDate__c, DealerId__c,Dealer__r.ManagementCode_F__c,Dealer__r.ManagementCode_Ext__c,DealerSalesStaffName__c,
                                                 ForeignTradeCompany__c, SpecialDeliveryAddress__c,
-                                                SyncedQuoteId,
-                                                AWS_Data_Id__c //dennis start for pi 2022/3/3
+                                                SyncedQuoteId
                                            from Opportunity where Id IN :oppIds];
 System.debug('11111 oppList='+oppList);
             
@@ -209,7 +203,6 @@
                 quotation.DealerSalesStaffName         = opp.DealerSalesStaffName__c;
                 quotation.ForeignTradeCompany                   = opp.ForeignTradeCompany__c;
                 quotation.SpecialDeliveryAddress                   = opp.SpecialDeliveryAddress__c;
-                quotation.DataId                   = opp.AWS_Data_Id__c;//dennis start for pi 2022/3/3
                 
                 //007淇敼Rest gwy start 2021-04-06
                 quotation.GeDataDetails = new List<GeDataDetails_element>();
@@ -325,57 +318,7 @@
         } else {
             logstr = iflog.Log__c;
         }
-        // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220419
-        Boolean piOn =AWSServiceTool.getAWSServiceStatus();
         try{
-            //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);
-            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;
-            system.debug('aws status--'+status);
-            if ('200'.equals(status)) {
-                logstr += status + '\n';
-                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 +responseBody// update 鍔犲叆閿欒鐨勮繑鍥炰綋 sushanhu20220406
-                                            +'\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
             /*Sbg007Sync.HTTPS_Port stub = new Sbg007Sync.HTTPS_Port();
             stub.timeout_x = 100000; // timeout in milliseconds
@@ -385,12 +328,25 @@
             if (NFMUtil.CLIENT_CERT_NAME != null) {
                 stub.clientCertName_x = NFMUtil.CLIENT_CERT_NAME;
             }*/
-            
-            //comment by dennis 2022/3/3 end
+            //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閿欒娆℃暟宸茬粡瓒呰繃鑷姩閫佷俊璁惧畾鐨勬渶澶ф鏁帮紝璇锋墜鍔ㄩ�佷俊';
+                }
+            }
             //007淇敼Rest gwy end 2021-04-12
             //Sbg007Sync.GeDatas_element[] pQuotations = new Sbg007Sync.GeDatas_element[] { quotations };
             //OlympusCoJpCommonMessage.LOG_element[] logs = stub.SBG007_Sync_BC2GPI(pQuotations);
-            //comment by dennis 2022/3/3
             rowData.retry_cnt__c=0;
         }catch(Exception ex) {
             // TODO IOException

--
Gitblit v1.9.1