彭锟
2022-03-29 f20f7ae7178f481e073c02161770fd20b121e6a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@isTest
public with sharing class NFM624BatchTest {
    static testMethod void testMethod1() {
        BatchIF_Log__c testLog = new BatchIF_Log__c();
        testLog.CurrencyIsoCode = 'CNY';
        testLog.Type__c = 'NFM624';
        testLog.MessageGroupNumber__c = '123456789987';
        // testLog.Name = '20211207';
        testLog.ErrorLog__c = '';
        testLog.MessageGroupNumber__c = '20211207';
        testLog.RowDataFlg__c = true;
        testLog.retry_cnt__c = 0;
        testLog.Log__c = '[{"Type":"医生","State":"北京市","ServiceUserId":"","RelatedHospital":"354044","RelatedDepartment":"760129","RegSource":"2","PersonManagementCode":"C000132345","Name":"刘璐","Mobile":"13683268803","HospitalManagementCode2":"415","ForbiddenStatus":true,"DepartmentName":"北京大学第三医院 呼吸科 呼吸科","DepartmentManagementCode2":"416","DepartmentClass":"呼吸科","ContactId":"2552","ContactAddress":"","City":"海淀区","ApproverID":"","AgentFlag":false,"AccountName":"北京大学第三医院"}]';
        testLog.NFM624_Secondary_processing__c = false;
        //[Select Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c, Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, retry_cnt__c,NFM624_Secondary_processing__c  from BatchIF_Log__c where RowDataFlg__c = true and Id =: rowData_Id]
        insert testLog;
        Database.executeBatch(new NFM624Batch(),1);
    }
}