From 9ed0e7a2efb8dd44876970766431ed80da93db1f Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 15 四月 2022 10:10:20 +0800 Subject: [PATCH] 20220415Backup --- force-app/main/default/classes/NewAndEditOrderController.cls | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/force-app/main/default/classes/NewAndEditOrderController.cls b/force-app/main/default/classes/NewAndEditOrderController.cls index 24a55f6..7eb816a 100644 --- a/force-app/main/default/classes/NewAndEditOrderController.cls +++ b/force-app/main/default/classes/NewAndEditOrderController.cls @@ -10,6 +10,10 @@ public String PIPL_Input_Account_Error_Msg{set;get;} public String contactId{set;get;}//For Lookup field public String staticResourceContact {get; set;} + public String contactAWSDataId{set;get;} + public String contactName{set;get;} + public String endUserDAWSDataId{set;get;} + public String endUserDName{set;get;} public NewAndEditOrderController(ApexPages.StandardController controller){ @@ -33,9 +37,39 @@ if(obj.Id == null){ //鍒濆鍖栧姞杞藉�� obj.put('OwnerId',UserInfo.getUserId()); + } else { + //鑱旂郴浜虹殑Id + Order order = [select EndUser__c, EndUserD__c from Order where id=:obj.Id]; + System.debug('order: ' + order); + if(order != null){ + if (order.EndUser__c != null) { + List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:order.EndUser__c]; + if(contact.size()>0){ + if (contact[0].AWS_Data_Id__c != null && contact[0].AWS_Data_Id__c != '') { + contactAWSDataId = contact[0].AWS_Data_Id__c; + }else { + contactName = contact[0].Name; + } + } + } + if (order.EndUserD__c != null) { + List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:order.EndUserD__c]; + if(contact.size()>0){ + if (contact[0].AWS_Data_Id__c != null && contact[0].AWS_Data_Id__c != '') { + endUserDAWSDataId = contact[0].AWS_Data_Id__c; + }else { + endUserDName = contact[0].Name; + } + } + } + }else { + contactAWSDataId = '鏃�'; + contactName = '鏃�'; + } } //contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級 staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); + } -- Gitblit v1.9.1