From 962519811b7c4be07f30d09e791798b0ea79d3ae Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 08 三月 2023 09:54:02 +0800
Subject: [PATCH] 同步代码
---
force-app/main/default/classes/DealerPersonnelController.cls | 62 +++++++++++++++++++++---------
1 files changed, 43 insertions(+), 19 deletions(-)
diff --git a/force-app/main/default/classes/DealerPersonnelController.cls b/force-app/main/default/classes/DealerPersonnelController.cls
index 61215a3..4646a3a 100644
--- a/force-app/main/default/classes/DealerPersonnelController.cls
+++ b/force-app/main/default/classes/DealerPersonnelController.cls
@@ -86,24 +86,24 @@
inputList.add(inputValues);
//瀵煎叆鐨勬暟鎹�
- System.debug('inputValues[0]===============>'+ inputValues[0]);
- System.debug('inputValues[1]===============>'+ inputValues[1]);
- System.debug('inputValues[2]===============>'+ inputValues[2]);
- System.debug('inputValues[3]===============>'+ inputValues[3]);
- //SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy start
- System.debug('inputValues[4]===============>'+ inputValues[4]);
- System.debug('inputValues[4]===============>'+ inputValues[5]);
- System.debug('inputValues[6]===============>'+ inputValues[6]);
- System.debug('inputValues[7]===============>'+ inputValues[7]);
- System.debug('inputValues[8]===============>'+ inputValues[8]);
- System.debug('inputValues[9]===============>'+ inputValues[9]);
- System.debug('inputValues[10]===============>'+ inputValues[10]);
- System.debug('inputValues[11]===============>'+ inputValues[11]);
- System.debug('inputValues[12]===============>'+ inputValues[12]);
- System.debug('inputValues[13]===============>'+ inputValues[13]);
- System.debug('inputValues[14]===============>'+ inputValues[14]);
- System.debug('inputValues[15]===============>'+ inputValues[15]);
- System.debug('inputValues[16]===============>'+ inputValues[16]);
+ // System.debug('inputValues[0]===============>'+ inputValues[0]);
+ // System.debug('inputValues[1]===============>'+ inputValues[1]);
+ // System.debug('inputValues[2]===============>'+ inputValues[2]);
+ // System.debug('inputValues[3]===============>'+ inputValues[3]);
+ // //SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy start
+ // System.debug('inputValues[4]===============>'+ inputValues[4]);
+ // System.debug('inputValues[5]===============>'+ inputValues[5]);
+ // System.debug('inputValues[6]===============>'+ inputValues[6]);
+ // System.debug('inputValues[7]===============>'+ inputValues[7]);
+ // System.debug('inputValues[8]===============>'+ inputValues[8]);
+ // System.debug('inputValues[9]===============>'+ inputValues[9]);
+ // System.debug('inputValues[10]===============>'+ inputValues[10]);
+ // System.debug('inputValues[11]===============>'+ inputValues[11]);
+ // System.debug('inputValues[12]===============>'+ inputValues[12]);
+ // System.debug('inputValues[13]===============>'+ inputValues[13]);
+ // System.debug('inputValues[14]===============>'+ inputValues[14]);
+ // System.debug('inputValues[15]===============>'+ inputValues[15]);
+ // System.debug('inputValues[16]===============>'+ inputValues[16]);
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy end
}
@@ -115,7 +115,10 @@
Map<Id,String> ManagementCodeMap = new Map<Id,String>();
List<Id> AccountIdList =new List<Id>();
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy end
+ System.debug('managementCodeList===============>'+ managementCodeList);
+ System.debug('CustomerNameList===============>'+ CustomerNameList);
List<Account> accountList = [select id, Name,Management_Code__c from Account where Management_Code__c in: managementCodeList and Name in:CustomerNameList ];
+ System.debug('iaccountList===============>'+ accountList);
for(Account ac : accountList){
accountIdMap.put(ac.Management_Code__c,ac);
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy start
@@ -125,11 +128,23 @@
}
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy start
//鏌ヨ瀹㈡埛浜哄憳鏄惁鏈夋暟鎹�
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
+ // Map<String,Contact> contactIdMapName = new Map<String,Contact>();
List<Contact> contactList = [select id, CManageCode__c,AccountId from Contact where AccountId in: AccountIdList and CManageCode__c in:CManageCodeList ];
+ // List<Contact> contactList = [select id, CManageCode__c,AccountId,Name from Contact where AccountId in: AccountIdList ];
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� end
for(Contact cc : contactList){
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
+ // String namekey = cc.Name.replace(' ', '');
+ // String contactKey2=ManagementCodeMap.get(cc.AccountId)+'_'+namekey;
+ // contactIdMapName.put(contactKey2,cc);
String contactKey=ManagementCodeMap.get(cc.AccountId)+'_'+cc.CManageCode__c;
contactIdMap.put(contactKey,cc);
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� end
}
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
+ // System.debug('contactIdMapName++'+contactIdMapName);
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
List<Contact> cnupdateList = new List<Contact>();
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy end
List<Contact> cnList = new List<Contact>();
@@ -355,6 +370,10 @@
//SWAG-CEW85A 銆愬鎵樸�戞秷鑰楀搧&DAMS绯荤粺缁忛攢鍟嗕汉鍛樼鐞嗏�斺�斾俊鎭畬鍠勶紱fy start
System.debug('001+'+lineList[3]+'_'+lineList[6]);
System.debug('002+'+contactIdMap.get(lineList[3]+'_'+lineList[6]));
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
+ // System.debug('003+'+lineList[3]+'_'+lineList[0]);
+ // System.debug('004+'+contactIdMapName.get(lineList[3]+'_'+lineList[0]));
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
//DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start
if(errorflag1){
errorMage += 'error: 绗�' + lineNumber + '琛� 锛�'+lineList[0]+'锛� 鐨勬暟鎹�'+errorMageHang;
@@ -365,7 +384,12 @@
con.Id=contactIdMap.get(lineList[3]+'_'+lineList[6]).Id;
cnupdateList.add(con);
}else {
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start 0228
+ // if(!contactIdMapName.containsKey(lineList[3]+'_'+lineList[0])){
+ // cnList.add(con);
+ // }
cnList.add(con);
+ //DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� end
}
//DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start
}
@@ -525,7 +549,7 @@
public static boolean VerifyCertificationLevel(String data) {
//DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� start
// if(data=='A'||data=='B'||data==''){
- if(data=='A绾�(澶辨晥)'||data=='B绾�'||data=='B绾�(澶辨晥)'||data=='B绾ф湭閫氳繃'||data=='鍒濈骇'||data=='鍒濈骇鏈�氳繃'||data=='鏈璇�'||data==''){
+ if(data=='A绾�'||data=='A绾ф湭閫氳繃'||data=='A绾ф湭閫氳繃锛堝け鏁堬級'||data=='A绾�(澶辨晥)'||data=='B绾�'||data=='B绾�(澶辨晥)'||data=='B绾ф湭閫氳繃'||data=='鍒濈骇'||data=='鍒濈骇鏈�氳繃'||data=='鏈璇�'||data==''){
//DB202301262139 SFDC缁忛攢鍟嗕汉鍛樺鍏ュ姛鑳芥敼杩� end
return true;
}
--
Gitblit v1.9.1