高章伟
2022-03-10 823b027c0decb82043c6e39f2d6ef1bb020220b1
force-app/main/default/classes/SBG001TriggerHandler.cls
@@ -65,6 +65,7 @@
                                || acc.RecordTypeId == '01228000000TdFG'    // NDT
                                || acc.RecordTypeId == '01228000000TdFL'    // ANI
                                || acc.RecordTypeId == '01228000000TdF1'    // BS
                                || acc.RecordTypeId == '0120T0000003Cxt'    // IE直销
                            )
                            && acc.stautesD__c == 'Pass') || acc.RecordTypeId == SBG001TriggerHandler.Account_Agency_Id //办事处
                    ) {
@@ -85,6 +86,7 @@
                                || acc.RecordTypeId == '01228000000TdFG'    // NDT
                                || acc.RecordTypeId == '01228000000TdFL'    // ANI
                                || acc.RecordTypeId == '01228000000TdF1'    // BS 
                                || acc.RecordTypeId == '0120T0000003Cxt'    // IE直销
                            )
                            && acc.stautesD__c == 'Pass'
                            && (acc.ManagementCode_Ext__c       != old.ManagementCode_Ext__c
@@ -159,6 +161,7 @@
                                || con.AccountRecordTypeId__c == '01228000000TdFB'      // RVI
                                || con.AccountRecordTypeId__c == '01228000000TdFG'      // NDT
                                || con.AccountRecordTypeId__c == '01228000000TdF1'      // BS
                                || con.AccountRecordTypeId__c == '0120T0000003Cxt'    // IE直销
                            )
                            && con.StatusD__c == 'Pass') || con.AccountRecordTypeId__c == SBG001TriggerHandler.Account_Agency_Id// 办事处
                    ) {
@@ -184,6 +187,7 @@
                                || con.AccountRecordTypeId__c == '01228000000TdFG'      // NDT
                                || con.AccountRecordTypeId__c == '01228000000TdF1'      // BS
                                || con.AccountRecordTypeId__c == SBG001TriggerHandler.Account_Agency_Id // 办事处
                                || con.AccountRecordTypeId__c == '0120T0000003Cxt'    // IE直销
                            )
                            && con.StatusD__c == 'Pass'
                            && (con.ManagementCode_Ext__c   != old.ManagementCode_Ext__c
@@ -324,7 +328,7 @@
                SSBDCustomerContact.CustomerDescription = acc.FacilityName__c;
                SSBDCustomerContact.CustomerDescription2Description3
                                            = (String.isBlank(acc.DivisionName__c) ? '' : (acc.DivisionName__c=='无' ? '' : acc.DivisionName__c));
                if (acc.RecordTypeId == '01228000000TdF6' || acc.RecordTypeId == '01228000000TdFB' ||  acc.RecordTypeId == '01228000000TdFG' ||  acc.RecordTypeId == '01228000000TdFL') {      // IE or RVI
                if (acc.RecordTypeId == '01228000000TdF6' || acc.RecordTypeId == '01228000000TdFB' ||  acc.RecordTypeId == '01228000000TdFG' ||  acc.RecordTypeId == '01228000000TdFL' || acc.RecordTypeId == '0120T0000003Cxt') {      // IE or RVI
                    SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(acc.EnglishName__c) ? '' : acc.EnglishName__c);
                } else {
                    SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(acc.DepartmentName__c) ? '' : acc.Departmentname__c);
@@ -532,7 +536,7 @@
                SSBDCustomerContact.CustomerDescription = con.Account.FacilityName__c;
                SSBDCustomerContact.CustomerDescription2Description3
                                        = (String.isBlank(con.Account.DivisionName__c) ? '' : (con.Account.DivisionName__c=='无' ? '' : con.Account.DivisionName__c));
                if (con.AccountRecordTypeId__c == '01228000000TdF6' || con.AccountRecordTypeId__c == '01228000000TdFB' || con.AccountRecordTypeId__c == '01228000000TdFG' || con.AccountRecordTypeId__c == '01228000000TdFL') {      // IE or RVI
                if (con.AccountRecordTypeId__c == '01228000000TdF6' || con.AccountRecordTypeId__c == '01228000000TdFB' || con.AccountRecordTypeId__c == '01228000000TdFG' || con.AccountRecordTypeId__c == '01228000000TdFL' || con.AccountRecordTypeId__c == '0120T0000003Cxt') {      // IE or RVI
                    SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(con.Account.EnglishName__c) ? '' : con.Account.EnglishName__c);
                } else {
                    SSBDCustomerContact.CustomerDescription2Description3 += ',' + (String.isBlank(con.Account.DepartmentName__c) ? '' : con.Account.Departmentname__c);