From 80f74bc1dfbf4a6f2fa358efe027590d2cdb5b99 Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期二, 19 四月 2022 10:39:16 +0800
Subject: [PATCH] 代理商公共小组,无影响。
---
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