From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新

---
 force-app/main/default/classes/NewAndEditInquiryFormController.cls |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/NewAndEditInquiryFormController.cls b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
index 83308e8..ac204b5 100644
--- a/force-app/main/default/classes/NewAndEditInquiryFormController.cls
+++ b/force-app/main/default/classes/NewAndEditInquiryFormController.cls
@@ -8,6 +8,12 @@
     public String staticResourceContact {get; set;}
     public String staticResourceLead {get; set;}
     public String urlCheckContactAWSid {get; set;}
+    public String contactAWSDataId{set;get;}
+    public String contactName{set;get;}
+    //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+    public String staticResourceV2 {get; set;}
+    //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
+
     public NewAndEditInquiryFormController(ApexPages.StandardController controller) {
         List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('Inquiry_form__c').getDescribe().fields.getMap().keyset());  
         // Add fields to controller. This is to avoid the SOQL error in visualforce page
@@ -24,6 +30,25 @@
         if(obj.Id == null){
             //鍒濆鍖栧姞杞藉��
             obj.put('OwnerId',UserInfo.getUserId());
+            //SWAG-CBUB2W  you 20220427 start
+            obj.put('Name','*');
+            //SWAG-CBUB2W  you 20220427 end
+        }else {
+            //鑱旂郴浜虹殑Id
+            Inquiry_form__c ifc = [select Contact_Name__c from Inquiry_form__c where id=:obj.Id];
+            if(ifc != null){
+                List<Contact> c = [select AWS_Data_Id__c,Name from Contact where id=:ifc.Contact_Name__c];
+                if(c.size()>0){
+                    if (c[0].AWS_Data_Id__c != null && c[0].AWS_Data_Id__c != '') {
+                        contactAWSDataId = c[0].AWS_Data_Id__c;
+                    }else {
+                        contactName = c[0].Name;
+                    }
+                }
+            }else {
+                contactAWSDataId = '鏃�';
+                contactName = '鏃�';
+            }
         }
         //contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級
         staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
@@ -31,6 +56,9 @@
         staticResourceLead = JSON.serialize(PIHelper.getPIIntegrationInfo('Lead'));
 
         checkUrl('CF00N1000000962n8_lkid','Contact');
+        //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start
+        staticResourceV2 = JSON.serialize(PIHelper.getPIIntegrationInfo('Inquiry_form__cV2'));
+        //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end
     }
 
     @RemoteAction

--
Gitblit v1.9.1