From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/NFM606Controller.cls | 31 +++++++++++++++++++++++++------
1 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/NFM606Controller.cls b/force-app/main/default/classes/NFM606Controller.cls
index 28d07d6..86bb8e4 100644
--- a/force-app/main/default/classes/NFM606Controller.cls
+++ b/force-app/main/default/classes/NFM606Controller.cls
@@ -111,6 +111,9 @@
Account.Parent.ParentId,
UniqueNumber__c,
AWS_Data_Id__c,
+ ChargeState__c, // 20220829 ljh LLIU-CHR8FF add
+ Account.RecordTypeId,// 20220829 ljh LLIU-CHR8FF add
+ ChargeState__r.Level1_Code__c,// 20220829 ljh LLIU-CHR8FF add
Name, Email from Contact where id in: conIdList AND RecordTypeId != '01210000000QtkyAAC'
];
String logstr = iflog.Log__c + ' ' + 'NumberOfRecord=' + conList.size() + '\n';
@@ -123,7 +126,8 @@
//ged.ContactId = String.isBlank(con.) ? '':con.AWS_UnifiedI_Contact_ID__c; //AWS 鏅烘収鍖荤枟ID
////update to AWS_UnifiedI_Contact_ID__c sushanhu 20220228 end
ged.ServiceUserId = String.isBlank(con.ServicePlatformCode__c) ? '':con.ServicePlatformCode__c; //鏈嶅姟骞冲彴鐢ㄦ埛ID???
- ged.Mobile = String.isNotBlank(con.UniqueNumber__c) ? con.UniqueNumber__c:con.MobilePhone;//鎵嬫満
+ //ged.Mobile = String.isNotBlank(con.UniqueNumber__c) ? con.UniqueNumber__c:con.MobilePhone;//鎵嬫満
+ ged.Mobile = con.MobilePhone;//鎵嬫満 zhj 鏂版柟妗堟敼閫� 涓嶉渶瑕乁niqueNumber__c
ged.PersonManagementCode = con.CManageCode__c; //浜哄憳绠$悊缂栫爜
ged.Status = '鏈夋晥'.equals(con.Isactive__c) ? true:false ;//鐘舵��
ged.Name = con.Name;//濮撳悕
@@ -142,7 +146,6 @@
ged.Hospital = con.Account.Parent_Management_Code__c;//鍖婚櫌缂栫爜
ged.Department = con.Account.Management_Code__c; //绉戝缂栫爜
ged.AgentFlag = false;//鍖婚櫌
-
}
// 缁忛攢鍟�
if ('01210000000QfWiAAK'.equals(con.RecordTypeId)) {
@@ -163,7 +166,7 @@
me.NumberOfRecord = '' + gds.GeData.size();
gds.Monitoring = me;
-
+
logstr = iflog.Log__c + '\nNumberOfRecord=' + gds.GeData.size() + ' ';
NFMUtil.Monitoring Monitoring = new NFMUtil.Monitoring();
Monitoring.Tag = gds.Monitoring.Tag;
@@ -196,9 +199,9 @@
if (rowData != null) {
upsert rowData;
}
- iflog.Log__c = logstr;
- system.debug('======================================'+logstr);
+ iflog.Log__c = iflog.Log__c + logstr;
upsert iflog;
+
}
private static GeData getStateAndCity(GeData ged,Contact con){
@@ -206,7 +209,16 @@
String city = '';
String salesdepartment_Dept = '';
if (String.isBlank(con.Account.ParentId)) {//鍖婚櫌/缁忛攢鍟嗕笅鐨勮仈绯讳汉锛岃幏鍙栧尰闄�/缁忛攢鍟嗙殑鐪佸拰甯傜殑缂栫爜;閿�鍞湰閮�
- state = con.Account.State_Master__r.Level1_Code__c;
+ // 20220829 ljh LLIU-CHR8FF update start
+ // state = con.Account.State_Master__r.Level1_Code__c;
+ Id AgencyId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
+ // System.debug('aaa000zheli'+con.ChargeState__c+'~'+AgencyId+'~'+con.Account.RecordTypeId+'~'+con.Account.State_Master__c);
+ if(String.isNotBlank(con.ChargeState__c) && con.Account.RecordTypeId == AgencyId &&String.valueOf(con.ChargeState__c).substring(0,15) != String.valueOf(con.Account.State_Master__c).substring(0,15)){
+ state = con.ChargeState__r.Level1_Code__c;
+ }else{
+ state = con.Account.State_Master__r.Level1_Code__c;
+ }
+ // 20220829 ljh LLIU-CHR8FF update end
city = con.Account.City_Master__r.Level2_Code__c;
salesdepartment_Dept = con.Account.Salesdepartment_Dept__c; //閿�鍞湰閮�
} else if(String.isNotBlank(con.Account.Parent.ParentId)){//绉戝涓嬬殑鑱旂郴浜猴紝 鑾峰彇鍖婚櫌鐨勭渷鍜屽競鐨勭紪鐮�;閿�鍞湰閮�
@@ -218,6 +230,13 @@
city = con.Account.Hospital_Department_Class__r.City_Master__r.Level2_Code__c;//甯�
salesdepartment_Dept = con.Account.Hospital_Department_Class__r.Salesdepartment_Dept__c;//閿�鍞湰閮�
}
+ //LLIU-CKQ5FS 銆愬鎵樸�慡FDC涓娾�滃鏃﹀ぇ瀛﹂檮灞炰腑灞卞尰闄㈠帵闂ㄥ尰闄⑩�濈渷甯傞棶棰� LY 20221101 end
+ system.debug('1111111111111111111111111111');
+ if (con.Account.Parent_Management_Code__c =='8045004') {
+ state = 'CN-19';
+ city = 'CN-1917';
+ }
+ //LLIU-CKQ5FS 銆愬鎵樸�慡FDC涓娾�滃鏃﹀ぇ瀛﹂檮灞炰腑灞卞尰闄㈠帵闂ㄥ尰闄⑩�濈渷甯傞棶棰� LY 20221101 end
ged.State = state;
ged.City = city;
ged.SalesBusinessDivision = salesdepartment_Dept;
--
Gitblit v1.9.1