From 3ba0123db48f8bab81ddf0913e1b95280ef545e8 Mon Sep 17 00:00:00 2001
From: Li Jun <buli@deloitte.com.cn>
Date: 星期四, 31 三月 2022 17:56:53 +0800
Subject: [PATCH] Deploy0331

---
 force-app/main/default/classes/StraightBackAddressController.cls |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/StraightBackAddressController.cls b/force-app/main/default/classes/StraightBackAddressController.cls
index f4e8e7b..45a9643 100644
--- a/force-app/main/default/classes/StraightBackAddressController.cls
+++ b/force-app/main/default/classes/StraightBackAddressController.cls
@@ -12,6 +12,7 @@
     public String tableDataStr{ get; set; }
     public String staticResource {get; set;}
     public String staticResourceContact {get; set;}
+    public String staticResourceRepair {get; set;}
     public Contact newCon{get; set;}
 
     /***************搴曢儴 缂栬緫鍜屾柊澧炵殑 瀵硅薄*******************/
@@ -66,6 +67,7 @@
     public String contactNameValue{set;get;}
     public String contactIdValue{set;get;}
     public String addressDataIds{set;get;} 
+    public String sfRecordId{set;get;} 
     // Add by Li Jun for PIPL 20220308 End
 
     public String accRecordTypeId {set;get;}//褰撳墠 璁板綍绫诲瀷id 
@@ -100,6 +102,7 @@
 
         staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('Address__c'));
         staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
+        staticResourceRepair = JSON.serialize(PIHelper.getPIIntegrationInfo('Repair__c'));
     }
 
     /**
@@ -524,6 +527,7 @@
                         try{
                             //鏂板涓�鏉¤仈绯讳汉鏁版嵁
                             insert addContact;
+                            sfRecordId = addContact.id;
                             insUpdData.Create_Contacts__c = '';
                         }catch(Exception e){
                             //ApexPages.addMessages(e);
@@ -554,6 +558,7 @@
                 try{
                     //鏂板鎴栦慨鏀规暟鎹�
                     upsert insUpdData;
+                    
                     ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, '淇濆瓨鎴愬姛锛�'));
                     isSearchBtn = true;
                     //淇濆瓨鎴愬姛锛岄渶瑕佸垵濮嬪寲涓�涓嬫瀵硅薄锛岄槻姝㈠啀娆$偣鍑绘鎸夐挳淇濆瓨涓�涓潯鍚屾牱鐨勬暟鎹�
@@ -579,7 +584,7 @@
 
     //鏌ヨ淇悊琛ㄦ暟鎹�
     private String makeTextRepairSql(String uuid){
-        String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c FROM Repair__c where id = \''+RepairId+'\'';
+        String RepairSql = 'SELECT ID,NAME,HP_ID__c,HP_Name__c,Delivered_Product__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,Dealer__c,Dealer__r.Name,Returns_Product_way__c,Address_Type_Index__c,AWS_Data_Id__c FROM Repair__c where id = \''+RepairId+'\'';
         return RepairSql;
     }
     //鏌ヨ鍦板潃琛ㄦ暟鎹�
@@ -675,6 +680,14 @@
     class AddressData {
         //鏁版嵁
         public Address__c address { get; set; }
+
+        public string addressJson { get{
+            if (address == null) {
+                return null;
+            }
+            return JSON.serialize(address);
+        } }
+
         //缂栬緫鎸夐挳鏄惁灞曠ず
         public String canEdit { get; private set; }
         //缂栬緫鎸夐挳鏄惁灞曠ず

--
Gitblit v1.9.1