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/SBG027Controller.cls |   59 ++++-------------------------------------------------------
 1 files changed, 4 insertions(+), 55 deletions(-)

diff --git a/force-app/main/default/classes/SBG027Controller.cls b/force-app/main/default/classes/SBG027Controller.cls
index 4631772..ce9df07 100644
--- a/force-app/main/default/classes/SBG027Controller.cls
+++ b/force-app/main/default/classes/SBG027Controller.cls
@@ -1,13 +1,5 @@
-/**
- * @description       : 
- * @author            : ChangeMeIn@UserSettingsUnder.SFDoc
- * @group             : 
- * @last modified on  : 03-09-2022
- * @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc
-**/
 public without sharing class SBG027Controller {
-    public static String responseBody;//dennis 2022/3/9
-    public static String status;//dennis 2022/3/9
+    
     public class SBG027 {
         public GeDatas_element GeDatas;
     }
@@ -31,7 +23,6 @@
         public String SalesChannel;
         public String DealerCode;
         public String DealerSalesStaffName;
-        public String DataId; //dennis update for pi 2022/3/9
         public String DeliveryDate;
         public String PaymentCondition;
         public String SpecialWarranty;
@@ -116,8 +107,7 @@
                                                 Opportunity.SalesChannel__c, Opportunity.ExpectedDeliveryDate__c, Opportunity.DealerId__c,Opportunity.DealerSalesStaffName__c,OlympusContractPricesD__c,SpecialDeliveryContact_D__c,Opportunity.SpecialDeliveryContact_D__r.ManagementCode_F__c,
                                                 Opportunity.ForeignTradeCompany__c, Opportunity.SpecialDeliveryAddress__c,PaymentTerms__c,SpecialDeliveryContact__c,PDF_Sp_Shipment_Term__c,PDF_Sp_ShippingTerms__c,
                                                 ForeignTradeCompany_D__r.ManagementCode_F__c, SpecialDeliveryAccount_D__r.ManagementCode_F__c, SpecialDeliveryContact2_D__r.ManagementCode_F__c,Opportunity.Dealer__r.DummyDealer__c,ContractPriceTotal__c,
-                                                If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c,
-                                                Opportunity.AWS_Data_Id__c //dennis start for pi 2022/3/3  
+                                                If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c 
                                              from order where Id IN :ordIds ];
             //List<order> ordList = [select Id,Name,Opportunity.Name, Opportunity.CurrencyIsoCode,OrderNumber,Opportunity.ForeignTradeCompany__r.ManagementCode_F__c,CustomerContractPriceD__c,SpecialCondition_text__c,SalesChannel__c,
             //                                    Owner.Name,Opportunity.AccountId__c,Opportunity.InquiryNumber__c,Opportunity.SpecialDeliveryAddress__r.ManagementCode_F__c, ServiceFee_D__c,Opportunity.SpecialDeliveryAddress_D__c,Opportunity.SpecialDeliveryAddress_D__r.ManagementCode_F__c,
@@ -228,7 +218,6 @@
                 quotation.EndUser            =  ord.EndUserD__r.ManagementCode_F__c;
                 quotation.DeliveryDate = NFMUtil.formatDate2Str(ord.ExpDelDate__c);
                 quotation.ServiceFee      =  ord.ServiceFee_D__c;
-                quotation.DataId                   = ord.Opportunity.AWS_Data_Id__c;//dennis start for pi 2022/3/9 update to oppotuinity dataid
                 //2017/01/15杩藉姞
                 if(ord.Opportunity.SalesChannel__c == 'direct' && ord.Opportunity.Machine_Parts__c == 'Parts'){
                      quotation.Discount         = 0;
@@ -254,19 +243,6 @@
                 quotation.Other2            = other2;//ord.SpecialCondition_text__c;
                 quotation.Other3            = ord.Shipment_Term_D__c + ',' + ord.Shipment_Term2_D__c;
                 // 璺ㄥ尯鍩熼攢鍞� XHL 20210831 Start
-                /*quotation.CoopAgent = '';
-                quotation.CoopAgentPCT = '';
-                if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
-                    quotation.CoopAgent = ord.Dealer_B__r.ManagementCode_F__c;//鍚堜綔鍖哄煙浠g悊鍟咰ode
-                    quotation.DealerCode         = ord.Dealer_A__r.ManagementCode_Ext__c;
-                    quotation.DealerSalesStaffName = ord.DealerSalesStaffNameA__c;
-                    String splitRatio = ord.SplitRatio__c;
-                    if (String.isNotBlank(splitRatio) && splitRatio.indexof(':') > 0) {
-                        Integer pct = Integer.valueOf(splitRatio.split(':')[1].trim())*10;
-                        quotation.CoopAgentPCT = String.valueof(pct);//涓氱哗鎷嗗垎姣斾緥(鍙�:鍚庤竟鐨勫��*10)
-                    } 
-                } */
-
                 quotation.CoopAgent = '';
                 quotation.CoopAgentPCT = '';
                 if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
@@ -402,37 +378,10 @@
         } else {
             logstr = iflog.Log__c;
         } 
-          // 娣诲姞aws涓婄嚎寮�鍏� by sushanhu 20220420
-          Boolean piOn =AWSServiceTool.getAWSServiceStatus();
         try{
-            //add by sushanhu for test 20220421
-            //piOn=false;
-            if (piOn) {
-                //update to aws 2022/3/9 dennis 
-            PIHelper.PIIntegration pi =PIHelper.getPIIntegrationInfo('SBG027');
-            // NFMUtil.response result =NFMUtil.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);
-            AWSServiceTool.response result = AWSServiceTool.sendToPiAWS(rowDataStr,pi.newUrl,pi.token);//update forpipl by sushanhu 20220425
-            system.debug('aws result---'+result);
-            status = result.status;
-            system.debug('aws status--'+status);
-            responseBody=result.responseBody;
-            // Map<String, Object> res = (Map<String, Object>)JSON.deserializeUntyped(responseBody);
-            // status=(String)res.get(status);
-            if ('200'.equals(status)) {
-                logstr += status + '\n';
-                rowData.retry_cnt__c = 0;
-            }
-            //add by sushanhu 20220406 鍐欏叆閿欒鏃ュ織 start
-            else {
-                iflog.ErrorLog__c +=responseBody;
-            }
-            //add by sushanhu 20220406 鍐欏叆閿欒鏃ュ織 end
-            }else {
-                NFMUtil.sendToSap(rowDataStr, NFMUtil.SBG027_ENDPOINT);
-                rowData.retry_cnt__c = 0;
-                
-            }
             
+            NFMUtil.sendToSap(rowDataStr, NFMUtil.SBG027_ENDPOINT); 
+            rowData.retry_cnt__c = 0;
         }catch(Exception ex) {
             // TODO IOException
             // 銈ㄣ儵銉笺亴鐧虹敓銇椼仧鍫村悎

--
Gitblit v1.9.1