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/NewAndEditUserFaultInfoController.cls | 40 +++++++++++++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditUserFaultInfoController.cls b/force-app/main/default/classes/NewAndEditUserFaultInfoController.cls
index 44991ad..d45f3f2 100644
--- a/force-app/main/default/classes/NewAndEditUserFaultInfoController.cls
+++ b/force-app/main/default/classes/NewAndEditUserFaultInfoController.cls
@@ -11,23 +11,57 @@
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 NewAndEditUserFaultInfoController(ApexPages.StandardController controller){
List<String> fieldList = new List<String>(Schema.getGlobalDescribe().get('User_FaultInfo__c').getDescribe().fields.getMap().keyset());
// Add fields to controller. This is to avoid the SOQL error in visualforce page
if(!Test.isRunningTest()){
controller.addFields(fieldList); // contact lookup
+ LookUpOverrideFields.add('UFContact__c');
+ LookUpOverrideFields.add('CONTACT__c');
}
- LookUpOverrideFields.add('CONTACT__c');
Init(controller.getRecord());
//娣诲姞椤�
PIPL_Input_Account_Error_Msg = label.PIPL_Input_Account_Error_Msg;
+ //contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級
+ staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
SObject obj = controller.getRecord();
if(obj.Id == null){
//鍒濆鍖栧姞杞藉��
obj.put('OwnerId', UserInfo.getUserId());
+ } else {
+ User_FaultInfo__c userFaultInfo = [select CONTACT__c, UFContact__c from User_FaultInfo__c where id=:obj.Id];
+ System.debug('userFaultInfo: ' + userFaultInfo);
+ if (userFaultInfo.CONTACT__c != null) {
+ List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:userFaultInfo.CONTACT__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;
+ }
+ }
+ }else {
+ contactAWSDataId = '鏃�';
+ contactName = '鏃�';
+ }
+ if (userFaultInfo.UFContact__c != null) {
+ List<Contact> contact = [select AWS_Data_Id__c,Name from Contact where id=:userFaultInfo.UFContact__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 {
+ endUserDAWSDataId = '鏃�';
+ endUserDName = '鏃�';
+ }
}
- //contact淇℃伅锛堟悳绱㈡煡璇uery url鐢級
- staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact'));
}
--
Gitblit v1.9.1