From ba1c90575c47f9cb5c2ce0a20da90d3b1739b5fa Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 26 四月 2022 11:47:45 +0800
Subject: [PATCH] 0425 Commit
---
force-app/main/default/classes/NewLoanerUserController.cls | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/NewLoanerUserController.cls b/force-app/main/default/classes/NewLoanerUserController.cls
index 2a612b9..623d7d0 100644
--- a/force-app/main/default/classes/NewLoanerUserController.cls
+++ b/force-app/main/default/classes/NewLoanerUserController.cls
@@ -7,7 +7,27 @@
public List<loaner_user__c> dataLines {get; private set;}
//璁㈠崟Id
public String laId {get; private set;}
- //
+ // Update 20220317 By Yang Kaiyu Start
+ public String staticResource {get; set;}
+ public String staticResourceContact {get; set;}
+ //PI contact
+ public List<ContactClass> conList {get;set;}
+
+ public String contactId {get;set;}
+ public string conListJson {get{
+ if(conList==null)return null;
+ return JSON.serialize(conList);
+ }}
+ public String dataLinesJson{get{
+ if(dataLines==null)return null;
+ return JSON.serialize(dataLines);
+ }}
+ class ContactClass{
+ public String contactIdValue{set;get;}
+ public String contactNameValue{set;get;}
+ public String contactPhoneValue{set;get;}
+ }
+ // Update 20220317 By Yang Kaiyu End
/*public NewLoanerUserController() {
laId = System.currentPageReference().getParameters().get('headId');
//ApexPages.currentPage().getParameters().get('headId');
@@ -21,7 +41,12 @@
}else{
loaner_user__c lu = [select id,loaner_application__c from loaner_user__c where id = :luId];
laId = lu.loaner_application__c;
- }
+ }
+ // Update 20220317 By Yang Kaiyu Start
+ staticResource = JSON.serialize(PIHelper.getPIIntegrationInfo('loaner_user__c'));
+ staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('contact'));
+ conList = new List<ContactClass>();
+ // Update 20220317 By Yang Kaiyu End
}
@@ -37,9 +62,21 @@
baseUrl += '/production';
}
dataLines = new List<loaner_user__c>();
- luList = [select id,Contact__c,ContactNumber__c,FromThePeriod__c,EndThePeriod__c,Remarks__c,Customer__c,Follow_UP_Opp__c from loaner_user__c where loaner_application__c =:laId];
+ // Update 20220317 By Yang Kaiyu Start
+ luList = [select id,Contact__r.AWS_Data_Id__c,Contact__c,Contact__r.LastName,Contact__r.Phone,Contact__r.LastName_Encrypted__c,Contact__r.Phone_Encrypted__c,ContactNumber__c,
+ FromThePeriod__c,EndThePeriod__c,Remarks__c,Customer__c,Follow_UP_Opp__c
+ from loaner_user__c
+ where loaner_application__c =:laId];
+ // Update 20220317 By Yang Kaiyu End
if(luList.size() >0){
for(loaner_user__c lu : luList){
+ // Update 20220317 By Yang Kaiyu Start
+ ContactClass con = new ContactClass();
+ con.contactIdValue = lu.Contact__r.AWS_Data_Id__c;
+ con.contactNameValue = lu.Contact__r.LastName_Encrypted__c;
+ con.contactPhoneValue= lu.Contact__r.Phone_Encrypted__c;
+ conList.add(con);
+ // Update 20220317 By Yang Kaiyu End
dataLines.add(lu);
}
}
@@ -55,6 +92,8 @@
public PageReference updateUser() {
+ System.debug('杩涘叆updateUser');
+
List<loaner_user__c> updateList = new List<loaner_user__c>();
loaner_application__c la =[select id,RecordType.DeveloperName from loaner_application__c where id=:laId];
List<String> contactIdList = new List<String>();
@@ -62,6 +101,7 @@
String firstLuId = '';
String accountName = '';
List<String> idList = new List<String>();
+ System.debug('dataLines = ' + dataLines);
for(loaner_user__c luc : dataLines){
if(!(String.isBlank(luc.Contact__c) || luc.Customer__c == null)){
loaner_user__c lu = new loaner_user__c();
--
Gitblit v1.9.1