From 2aa8da8af66aa8ae00f25831aed6bb0364176e7b Mon Sep 17 00:00:00 2001 From: 高章伟 <gaozhangwei@prec-tech.com> Date: 星期四, 24 二月 2022 20:32:31 +0800 Subject: [PATCH] 1.15---2.24 变更代码 --- force-app/main/default/classes/ContactTriggerHandler.cls | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/force-app/main/default/classes/ContactTriggerHandler.cls b/force-app/main/default/classes/ContactTriggerHandler.cls index a438297..ad4e5ce 100644 --- a/force-app/main/default/classes/ContactTriggerHandler.cls +++ b/force-app/main/default/classes/ContactTriggerHandler.cls @@ -20,12 +20,16 @@ syncToAgencyContact(); updateDealerNum(); sendToComPlat(); + //NFM702 + // NFM702_Handler(this.newList , this.newMap , this.oldList , this.oldMap); } protected override void afterUpdate() { syncToAgencyContact(); updateDealerNum(); sendToComPlat(); + //NFM702 + // NFM702_Handler(this.newList , this.newMap , this.oldList , this.oldMap); } protected override void beforeUpdate() { @@ -376,4 +380,40 @@ } + + public void NFM702_Handler(List<Contact> newList, Map<Id, Contact> newMap, List<Contact> oldList, Map<Id, Contact> oldMap){ + List<Contact> conIdList = new List<Contact>(); + List<String> idList = new List<String>(); + String LOG_TYPE = 'NFM702'; + // iflog.Log__c = '---------'; + String ConTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Doctor').getRecordTypeId(); + if (Trigger.isUpdate && Trigger.isAfter) { + if (newList.size() > 0) { + for (Contact con : newList) { + Contact oldCon = oldMap.get(con.Id); + if ((con.RecordTypeId.equals(ConTypeId)) && (con.FullName__c != oldCon.FullName__c || con.Phone != oldCon.Phone || con.Department__c != oldCon.Department__c || con.Isactive__c != oldCon.Isactive__c)) { + idList.add(con.Id); + } + } + } + } + if(Trigger.isInsert && Trigger.isAfter){ + if (newList.size() > 0) { + for (Contact con : newList) { + if(con.RecordTypeId.equals(ConTypeId)){ + idList.add(con.Id); + } + } + } + } + if (idList.size() > 0) { + BatchIF_Log__c iflog = new BatchIF_Log__c(); + iflog.Log__c = '瑙﹀彂鎴愬姛'; + iflog.Type__c = LOG_TYPE; + insert iflog; + NFM702Controller.callout(iflog.Id, idList); + } + + } + } \ No newline at end of file -- Gitblit v1.9.1