@isTest
public with sharing class NFM501FutureControllerTest {
	@TestSetup
	static void makeData(){
		TestDataUtility.CreatePIPolicyConfiguration('QLMNFM501');
	}
	public NFM501FutureControllerTest() {

	}
	// @testSetup
	// static void makeTestQLM502() {
	// 	BatchIF_Transfer__c transfer1 = new BatchIF_Transfer__c();
	// 	transfer1.Table__c          = 'QLMoldMark';
	// 	// transfer1.Column__c         = '*';
	// 	// transfer1.External_Value__c = 'PCS';
	// 	transfer1.Internal_Value__c = '*';
	// 	// QLMoldMarkTransfers.add(transfer1);
	// 	insert transfer1;

	// 	List<BatchIF_Transfer__c> NFM501GainEndTimeTransfers = new List<BatchIF_Transfer__c>();
	// 	BatchIF_Transfer__c transfer2 = new BatchIF_Transfer__c();
	// 	transfer2.Table__c          = 'NFM501GainEndTime';
	// 	transfer2.NFM501_Gain_End_Time__c = Datetime.now();
	// 	// transfer1.Column__c         = '*';
	// 	// transfer1.External_Value__c = 'PCS';
	// 	// transfer1.Internal_Value__c = '*';
	// 	NFM501GainEndTimeTransfers.add(transfer2);
	// 	insert NFM501GainEndTimeTransfers;

	// 	List<BatchIF_Transfer__c> NFM501TokenTransfers = new List<BatchIF_Transfer__c>();
	// 	BatchIF_Transfer__c transfer3 = new BatchIF_Transfer__c();
	// 	transfer3.Table__c          = 'NFM501Token';
	// 	transfer3.NFM501_Token__c = null;//'eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImV4cCI6MTYyNDI2MTc1OX0.s55zh9SSpwqRdp1wXH43_wEGpwlZtMfRgl1x8t69A-N0H7QrzRNmK5MNqNGGLhQ2LL_AbMSJmDfwO5chgwndoA';
	// 	// transfer1.Column__c         = '*';
	// 	// transfer1.External_Value__c = 'PCS';
	// 	// transfer1.Internal_Value__c = '*';
	// 	NFM501TokenTransfers.add(transfer3);
	// 	insert NFM501TokenTransfers;

	// 	Tender_information__c Ten = new Tender_information__c();
	// 	Ten.Name = '123456';
	// 	Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';

	// 	insert Ten;

	// 	bidInfoFile__c bidInfoFile  = new bidInfoFile__c();
	// 	bidInfoFile.Tender_information__c = Ten.Id;
	// 	bidInfoFile.infoAddress__c = 'http://aa.aa.com';
	// 	insert bidInfoFile;

	// bidInfoFile__c bidInfoFile  = new bidInfoFile__c();
	// 	bidInfoFile.Tender_information__c = Ten.Id;
	// 	bidInfoFile.infoAddress__c = 'http://aa.aa.com';
	// 	insert bidInfoFile;
	// 	BatchIF_Log__c rowData = new BatchIF_Log__c();
	// 	rowData.Type__c = 'NFM501';
	// 	rowData.RowDataFlg__c = true;
	// 	rowData.Log__c = '{"code":"0","data":{"cursorMark":"60d01dde42ec7ed48d3730d6","list1":[{"agentRelationName":["李蕾电"],"agentRelationWay":["12345678"],"agentUnit":["四川乾新招投标代理有限公司"],"areaCity":"惠州市","areaCountry":"","areaProvince":"广东省","biddingType":"0","bidingAcquireTime":"2021-01-13 00:00:00","bidingEndTime":"2021-01-13 00:00:00","budget":[{"amount":"250000.00","unit":"元"}],"infoFile":["http://cusdata.qianlima.com/vip/info/download/V2/eyJhbGciOiJIUzI1NiJ9.eyJpbmZvSWQiOiIyMjczMjgxOTAiLCJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImZpbGVVcmwiOiI0QjY2Mzg2MzY4MzI0MTQyNzY2MjU5NEI0QTc0NEM1NzcxNkI2RjcyNkI1MTNEM0QifQ.3UTAGOde4plSKFKf_DV1sBWXJbdsz7zN8a1KZZys6bo"],"infoId":"227328190","infoPublishTime":"2021-06-21 09:41:26","infoQianlimaUrl":"http://www.qianlima.com/zb/detail/20210621_227328190.html","infoTitle":"皮肤镜图像处理工作站调研公告","infoType":"5","infoTypeSegment":"7","isElectronic":"0","keywords":"图像处理","openBidingTime":"2021-01-13 00:00:00","projectId":"38_99df2844cf784982acdc61d00d7a7dbb","target":{"targetDetails":[{"number1":"12","totalPrice":"2645000.00","price":"","name":"四川省雅安市芦山县人民医院抗疫特别国债购置高清胃肠镜采购项目","model":"","brand":""}]},"tenderBeginTime":"2021-01-13 00:00:00","tenderEndTime":"2021-01-13 00:00:00","winnerAmount":[{"amount":"1598000.00","unit":"元"}],"xmNumber":"CD-1624266167710","zhaoBiaoUnit":["惠州市第一人民医院","OCM","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院"],"zhaoRelationName":["范梅红"],"zhaoRelationWay":["0752-2883625"],"zhongBiaoUnit":["成都宋庄创意科技有限公司","OCSM","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司"],"zhongRelationName":["1234"],"zhongRelationWay":["1234567"]}]},"msg":"正确返回数据"}';
	// 	rowData.MessageGroupNumber__c = transfer1.Internal_Value__c;
	// 	insert rowData;

	// 	BatchIF_Log__c iflog = new BatchIF_Log__c();
	// 	iflog.Type__c = 'NFM501';
	// 	iflog.RowDataFlg__c = false;
	// 	iflog.Log__c = ' ';
	// 	iflog.ErrorLog__c = ' ';
	// 	iflog.MessageGroupNumber__c = rowData.MessageGroupNumber__c;
	// 	insert iflog;


		
	// }

	@IsTest
	static void Test501Future() {
		BatchIF_Transfer__c transfer1 = new BatchIF_Transfer__c();
		transfer1.Table__c          = 'QLMoldMark';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		transfer1.Internal_Value__c = '*';
		// QLMoldMarkTransfers.add(transfer1);
		insert transfer1;

		List<BatchIF_Transfer__c> NFM501GainEndTimeTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer2 = new BatchIF_Transfer__c();
		transfer2.Table__c          = 'NFM501GainEndTime';
		transfer2.NFM501_Gain_End_Time__c = Datetime.now();
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501GainEndTimeTransfers.add(transfer2);
		insert NFM501GainEndTimeTransfers;

		List<BatchIF_Transfer__c> NFM501TokenTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer3 = new BatchIF_Transfer__c();
		transfer3.Table__c          = 'NFM501Token';
		transfer3.NFM501_Token__c = null;//'eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImV4cCI6MTYyNDI2MTc1OX0.s55zh9SSpwqRdp1wXH43_wEGpwlZtMfRgl1x8t69A-N0H7QrzRNmK5MNqNGGLhQ2LL_AbMSJmDfwO5chgwndoA';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501TokenTransfers.add(transfer3);
		insert NFM501TokenTransfers;

		Tender_information__c Ten = new Tender_information__c();
		// Ten.Name = '123456';
		Ten.InfoTitle__c = '123456';
		Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';

		insert Ten;

		bidInfoFile__c bidInfoFile  = new bidInfoFile__c();
		bidInfoFile.Tender_information__c = Ten.Id;
		bidInfoFile.infoAddress__c = 'http://aa.aa.com';
		insert bidInfoFile;
		BatchIF_Log__c rowData = new BatchIF_Log__c();
		rowData.Type__c = 'NFM501';
		rowData.RowDataFlg__c = true;
		rowData.Log__c = '{"code":"0","data":{"cursorMark":"60d01dde42ec7ed48d3730d6","list1":[{"DataId":"1234567890","agentRelationName":["李蕾电"],"agentRelationWay":["12345678"],"agentUnit":["四川乾新招投标代理有限公司"],"areaCity":"惠州市","areaCountry":"","areaProvince":"广东省","biddingType":"0","bidingAcquireTime":"2021-01-13 00:00:00","bidingEndTime":"2021-01-13 00:00:00","budget":[{"amount":"250000.00","unit":"元"}],"infoFile":["http://cusdata.qianlima.com/vip/info/download/V2/eyJhbGciOiJIUzI1NiJ9.eyJpbmZvSWQiOiIyMjczMjgxOTAiLCJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImZpbGVVcmwiOiI0QjY2Mzg2MzY4MzI0MTQyNzY2MjU5NEI0QTc0NEM1NzcxNkI2RjcyNkI1MTNEM0QifQ.3UTAGOde4plSKFKf_DV1sBWXJbdsz7zN8a1KZZys6bo"],"infoId":"227328190","infoPublishTime":"2021-06-21 09:41:26","infoQianlimaUrl":"http://www.qianlima.com/zb/detail/20210621_227328190.html","infoTitle":"皮肤镜图像处理工作站调研公告","infoType":"5","infoTypeSegment":"7","isElectronic":"0","keywords":"图像处理","openBidingTime":"2021-01-13 00:00:00","projectId":"38_99df2844cf784982acdc61d00d7a7dbb","target":{"targetDetails":[{"number1":"12","totalPrice":"2645000.00","price":"","name":"四川省雅安市芦山县人民医院抗疫特别国债购置高清胃肠镜采购项目","model":"","brand":""}]},"tenderBeginTime":"2021-01-13 00:00:00","tenderEndTime":"2021-01-13 00:00:00","winnerAmount":[{"amount":"1598000.00","unit":"元"}],"xmNumber":"CD-1624266167710","zhaoBiaoUnit":["惠州市第一人民医院","OCM","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院"],"zhaoRelationName":["范梅红"],"zhaoRelationWay":["0752-2883625"],"zhongBiaoUnit":["成都宋庄创意科技有限公司","OCSM","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司"],"zhongRelationName":["1234"],"zhongRelationWay":["1234567"],"ZhaoRelationWayEncrypted":["1234567890"],"AgentRelationWayEncrypted":["1234567890"],"AgentRelationNameEncrypted":["1234567890"],"ZhongRelationWayEncrypted":["1234567890"],"ZhaoRelationNameEncrypted":["1234567890"],"ZhongRelationNameEncrypted":["1234567890"]}]},"msg":"正确返回数据"}';
		rowData.MessageGroupNumber__c = transfer1.Internal_Value__c;
		insert rowData;

		BatchIF_Log__c iflog = new BatchIF_Log__c();
		iflog.Type__c = 'NFM501';
		iflog.RowDataFlg__c = false;
		iflog.Log__c = ' ';
		iflog.ErrorLog__c = ' ';
		iflog.MessageGroupNumber__c = rowData.MessageGroupNumber__c;
		insert iflog;
		BatchIF_Log__c rowData01 = [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,
		                          NFM501Future_Count__c,
		                          NFM501_Web_Annex_Count__c from BatchIF_Log__c
		                          where RowDataFlg__c = true];
		BatchIF_Log__c iflog01 = [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,
		                        NFM501Future_Count__c,
		                        NFM501_Web_Annex_Count__c from BatchIF_Log__c Limit 1];
		Tender_information__c te1 = [Select Id, ProjectId__c, InfoType__c, Other_units__c
		                             FROM Tender_information__c];

		List<NFM501Controller.AmountItem> AmountItem = new List<NFM501Controller.AmountItem>();

		Test.startTest();
		Test.setMock(HttpCalloutMock.class, new NFM501HttpCallMock());
		NFM501FutureController.main(rowData01.Id, iflog01.Id, false,'txid');
		NFM501FutureController.USACurrency(AmountItem, te1, 'BudgetAmount');
		NFM501FutureController.OtherCurrency(AmountItem, te1, 'Budget');
		Test.stopTest();
	}

		@IsTest
	static void Test501Future01() {
		BatchIF_Transfer__c transfer1 = new BatchIF_Transfer__c();
		transfer1.Table__c          = 'QLMoldMark';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		transfer1.Internal_Value__c = '*';
		// QLMoldMarkTransfers.add(transfer1);
		insert transfer1;

		List<BatchIF_Transfer__c> NFM501GainEndTimeTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer2 = new BatchIF_Transfer__c();
		transfer2.Table__c          = 'NFM501GainEndTime';
		transfer2.NFM501_Gain_End_Time__c = Datetime.now();
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501GainEndTimeTransfers.add(transfer2);
		insert NFM501GainEndTimeTransfers;

		List<BatchIF_Transfer__c> NFM501TokenTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer3 = new BatchIF_Transfer__c();
		transfer3.Table__c          = 'NFM501Token';
		transfer3.NFM501_Token__c = null;//'eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImV4cCI6MTYyNDI2MTc1OX0.s55zh9SSpwqRdp1wXH43_wEGpwlZtMfRgl1x8t69A-N0H7QrzRNmK5MNqNGGLhQ2LL_AbMSJmDfwO5chgwndoA';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501TokenTransfers.add(transfer3);
		insert NFM501TokenTransfers;

		Tender_information__c Ten = new Tender_information__c();
		Ten.InfoTitle__c = '123456';
		// Ten.Name = '123456';
		Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';

		insert Ten;

		bidInfoFile__c bidInfoFile  = new bidInfoFile__c();
		bidInfoFile.Tender_information__c = Ten.Id;
		bidInfoFile.infoAddress__c = 'http://aa.aa.com';
		insert bidInfoFile;
		BatchIF_Log__c rowData = new BatchIF_Log__c();
		rowData.Type__c = 'NFM501';
		rowData.RowDataFlg__c = true;
		rowData.Log__c = '{"code":"0","data":{"cursorMark":"60d01dde42ec7ed48d3730d6","list1":[{"DataId":"1234567890","agentRelationName":["李蕾电"],"agentRelationWay":["12345678"],"agentUnit":["四川乾新招投标代理有限公司"],"areaCity":"惠州市","areaCountry":"","areaProvince":"广东省","biddingType":"0","bidingAcquireTime":"2021-01-13 00:00:00","bidingEndTime":"2021-01-13 00:00:00","budget":[{"amount":"250000.00","unit":"元"}],"infoFile":["http://cusdata.qianlima.com/vip/info/download/V2/eyJhbGciOiJIUzI1NiJ9.eyJpbmZvSWQiOiIyMjczMjgxOTAiLCJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImZpbGVVcmwiOiI0QjY2Mzg2MzY4MzI0MTQyNzY2MjU5NEI0QTc0NEM1NzcxNkI2RjcyNkI1MTNEM0QifQ.3UTAGOde4plSKFKf_DV1sBWXJbdsz7zN8a1KZZys6bo"],"infoId":"227328190","infoPublishTime":"2021-06-21 09:41:26","infoQianlimaUrl":"http://www.qianlima.com/zb/detail/20210621_227328190.html","infoTitle":"皮肤镜图像处理工作站调研公告","infoType":"1","infoTypeSegment":"1","isElectronic":"0","keywords":"图像处理","openBidingTime":"2021-01-13 00:00:00","projectId":"38_99df2844cf784982acdc61d00d7a7dbb","target":{"targetDetails":[{"number1":"12","totalPrice":"2645000.00","price":"","name":"四川省雅安市芦山县人民医院抗疫特别国债购置高清胃肠镜采购项目","model":"","brand":""}]},"tenderBeginTime":"2021-01-13 00:00:00","tenderEndTime":"2021-01-13 00:00:00","winnerAmount":[{"amount":"1598000.00","unit":"元"}],"xmNumber":"CD-1624266167710","zhaoBiaoUnit":["惠州市第一人民医院","OCM","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院"],"zhaoRelationName":["范梅红"],"zhaoRelationWay":["0752-2883625"],"zhongBiaoUnit":["成都宋庄创意科技有限公司","OCSM","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司"],"zhongRelationName":["1234"],"zhongRelationWay":["1234567"],"ZhaoRelationWayEncrypted":["1234567890"],"AgentRelationWayEncrypted":["1234567890"],"AgentRelationNameEncrypted":["1234567890"],"ZhongRelationWayEncrypted":["1234567890"],"ZhaoRelationNameEncrypted":["1234567890"],"ZhongRelationNameEncrypted":["1234567890"]}]},"msg":"正确返回数据"}';
		rowData.MessageGroupNumber__c = transfer1.Internal_Value__c;
		insert rowData;

		BatchIF_Log__c iflog = new BatchIF_Log__c();
		iflog.Type__c = 'NFM501';
		iflog.RowDataFlg__c = false;
		iflog.Log__c = ' ';
		iflog.ErrorLog__c = ' ';
		iflog.MessageGroupNumber__c = rowData.MessageGroupNumber__c;
		insert iflog;
		BatchIF_Log__c rowData01 = [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,
		                          NFM501Future_Count__c,
		                          NFM501_Web_Annex_Count__c from BatchIF_Log__c
		                          where RowDataFlg__c = true];
		BatchIF_Log__c iflog01 = [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,
		                        NFM501Future_Count__c,
		                        NFM501_Web_Annex_Count__c from BatchIF_Log__c Limit 1];
		Tender_information__c te1 = [Select Id, ProjectId__c, InfoType__c, Other_units__c
		                             FROM Tender_information__c];

		List<NFM501Controller.AmountItem> AmountItem = new List<NFM501Controller.AmountItem>();

		Test.startTest();
		Test.setMock(HttpCalloutMock.class, new NFM501HttpCallMock());
		NFM501FutureController.main(rowData01.Id, iflog01.Id, false,'txid');
		NFM501FutureController.USACurrency(AmountItem, te1, 'BudgetAmount');
		NFM501FutureController.OtherCurrency(AmountItem, te1, 'Budget');
		Test.stopTest();
	}

	// 报错
	@IsTest
	static void myTest1() {
		BatchIF_Transfer__c transfer1 = new BatchIF_Transfer__c();
		transfer1.Table__c          = 'QLMoldMark';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		transfer1.Internal_Value__c = '*';
		// QLMoldMarkTransfers.add(transfer1);
		insert transfer1;

		List<BatchIF_Transfer__c> NFM501GainEndTimeTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer2 = new BatchIF_Transfer__c();
		transfer2.Table__c          = 'NFM501GainEndTime';
		transfer2.NFM501_Gain_End_Time__c = Datetime.now();
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501GainEndTimeTransfers.add(transfer2);
		insert NFM501GainEndTimeTransfers;

		List<BatchIF_Transfer__c> NFM501TokenTransfers = new List<BatchIF_Transfer__c>();
		BatchIF_Transfer__c transfer3 = new BatchIF_Transfer__c();
		transfer3.Table__c          = 'NFM501Token';
		transfer3.NFM501_Token__c = null;//'eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImV4cCI6MTYyNDI2MTc1OX0.s55zh9SSpwqRdp1wXH43_wEGpwlZtMfRgl1x8t69A-N0H7QrzRNmK5MNqNGGLhQ2LL_AbMSJmDfwO5chgwndoA';
		// transfer1.Column__c         = '*';
		// transfer1.External_Value__c = 'PCS';
		// transfer1.Internal_Value__c = '*';
		NFM501TokenTransfers.add(transfer3);
		insert NFM501TokenTransfers;

		Tender_information__c Ten = new Tender_information__c();
		// Ten.Name = '123456';
		Ten.InfoTitle__c = '123456';
		Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';

		insert Ten;

		bidInfoFile__c bidInfoFile  = new bidInfoFile__c();
		bidInfoFile.Tender_information__c = Ten.Id;
		bidInfoFile.infoAddress__c = 'http://aa.aa.com';
		insert bidInfoFile;
		BatchIF_Log__c rowData = new BatchIF_Log__c();
		rowData.Type__c = 'NFM501';
		rowData.RowDataFlg__c = true;
		rowData.Log__c = '{"code":"0","data":{"cursorMark":"60d01dde42ec7ed48d3730d6","list1":[{"DataId":"1234567890","agentRelationName":["李蕾电"],"agentRelationWay":["12345678"],"agentUnit":["四川乾新招投标代理有限公司"],"areaCity":"惠州市","areaCountry":"","areaProvince":"广东省","biddingType":"0","bidingAcquireTime":"2021-01-13 00:00:00","bidingEndTime":"2021-01-13 00:00:00","budget":[{"amount":"250000.00","unit":"元"}],"infoFile":["http://cusdata.qianlima.com/vip/info/download/V2/eyJhbGciOiJIUzI1NiJ9.eyJpbmZvSWQiOiIyMjczMjgxOTAiLCJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImZpbGVVcmwiOiI0QjY2Mzg2MzY4MzI0MTQyNzY2MjU5NEI0QTc0NEM1NzcxNkI2RjcyNkI1MTNEM0QifQ.3UTAGOde4plSKFKf_DV1sBWXJbdsz7zN8a1KZZys6bo"],"infoId":"227328190","infoPublishTime":"2021-06-21 09:41:26","infoQianlimaUrl":"http://www.qianlima.com/zb/detail/20210621_227328190.html","infoTitle":"皮肤镜图像处理工作站调研公告","infoType":"5","infoTypeSegment":"7","isElectronic":"0","keywords":"图像处理","openBidingTime":"2021-01-13 00:00:00","projectId":"38_99df2844cf784982acdc61d00d7a7dbb","target":{"targetDetails":[{"number1":"12","totalPrice":"2645000.00","price":"","name":"四川省雅安市芦山县人民医院抗疫特别国债购置高清胃肠镜采购项目","model":"","brand":""}]},"tenderBeginTime":"2021-01-13 00:00:00","tenderEndTime":"2021-01-13 00:00:00","winnerAmount":[{"amount":"1598000.00","unit":"元"}],"xmNumber":"CD-1624266167710","zhaoBiaoUnit":["惠州市第一人民医院","OCM","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院","惠州市第一人民医院"],"zhaoRelationName":["范梅红"],"zhaoRelationWay":["0752-2883625"],"zhongBiaoUnit":["成都宋庄创意科技有限公司","OCSM","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司","成都宋庄创意科技有限公司"],"zhongRelationName":["1234"],"zhongRelationWay":["1234567"],"ZhaoRelationWayEncrypted":["1234567890"],"AgentRelationWayEncrypted":["1234567890"],"AgentRelationNameEncrypted":["1234567890"],"ZhongRelationWayEncrypted":["1234567890"],"ZhaoRelationNameEncrypted":["1234567890"],"ZhongRelationNameEncrypted":["1234567890"]}]},"msg":"正确返回数据"}';
		rowData.MessageGroupNumber__c = transfer1.Internal_Value__c;
		insert rowData;

		BatchIF_Log__c iflog = new BatchIF_Log__c();
		iflog.Type__c = 'NFM501';
		iflog.RowDataFlg__c = false;
		iflog.Log__c = ' ';
		iflog.ErrorLog__c = ' ';
		iflog.MessageGroupNumber__c = rowData.MessageGroupNumber__c;
		insert iflog;
		BatchIF_Log__c rowData01 = [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,
		                          NFM501Future_Count__c,
		                          NFM501_Web_Annex_Count__c from BatchIF_Log__c
		                          where RowDataFlg__c = true];
		BatchIF_Log__c iflog01 = [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,
		                        NFM501Future_Count__c,
		                        NFM501_Web_Annex_Count__c from BatchIF_Log__c Limit 1];


		Test.startTest();
		Test.setMock(HttpCalloutMock.class, new NFM501HttpCallMockEx());
		NFM501FutureController.main(rowData01.Id, iflog01.Id, false,'txid');

		Test.stopTest();
	}
	
}