涂煌豪
2022-04-11 1b214a96d371ce90578fb7d6c14eecfcba5f87f0
Sfdc2PoContactBatch修改
2个文件已修改
8 ■■■■ 已修改文件
force-app/main/default/classes/Sfdc2PoContactBatch.cls 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/Sfdc2PoContactBatchTest.cls 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/Sfdc2PoContactBatch.cls
@@ -11,15 +11,18 @@
        //     WHERE Id != null AND RecordTypeId = '01210000000QfWiAAK' AND Account.Is_Active_Formula__c = '有效' AND MobilePhone != '' AND  Isactive__c = '有效'
        // ]);
        // 发送指定数据
        // 经销商和医院客户人员数据都需要重新执行 thh 20220411 start
        return Database.getQueryLocator([SELECT id, Name, IsFromSPO__c, RecordTypeId, UnifiedI_Contact_ID__c, SendToComPlat__c,MobilePhone
            FROM Contact
            WHERE Id != null 
                AND RecordTypeId = '01210000000QfWiAAK'
                AND (RecordTypeId = '01210000000QfWiAAK' OR RecordTypeId = '01210000000QfWdAAK')
                AND Account.Is_Active_Formula__c = '有效' 
                AND MobilePhone != '' 
                AND  ((Isactive__c = '有效' 
                AND SendToComPlat__c =true) OR SendToComPlat__c = true)
                AND SendToComPlat__c = true) OR SendToComPlat__c = true)
        ]);
        // 经销商和医院客户人员数据都需要重新执行 thh 20220411 start
    }
    global void execute(Database.BatchableContext BC, list < Contact > senContactList) {
force-app/main/default/classes/Sfdc2PoContactBatchTest.cls
@@ -2,6 +2,7 @@
public class Sfdc2PoContactBatchTest {
    // NFM606ControllerTest.makeTestRepair();
    static testMethod void testMethod1() {
        Oly_TriggerHandler.bypass('ContactTriggerHandler');
        List<RecordType> Agency = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Agency'];
        // 创建经销商
        Account company = new Account();