| | |
| | | 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() { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |