@isTest
<<<<<<< HEAD
private class LexOutboundorderImportControllerTest {
    static testMethod void myUnitTest() {
        user myUser_test;
        Account myAccount1;
        List<RecordType> rectHos;
        User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
        System.runAs(thisUser) {
            List<RecordType> rectCo = [
                SELECT Id
                FROM RecordType
                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '販売店'
            ];
            if (rectCo.size() == 0) {
                return;
            }
            rectHos = [
                SELECT Id
                FROM RecordType
                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '病院'
            ];
            if (rectHos.size() == 0) {
                return;
            }
            Profile prof = [
                SELECT Id
                FROM Profile
                WHERE Name = '901_经销商社区普通权限_2重验证(ET)'
            ];

            myAccount1 = new Account(
                name = 'Testaccount001',
                Dealer_discount__c = 20,
                RecordTypeId = rectCo[0].Id,
                AgentCode_Ext__c = '9999900'
            );
            insert myAccount1;

            Contact core = new Contact(
                email = 'jplumber@salesforce.com',
                firstname = 'Joe',
                lastname = 'Plumber',
                accountid = myAccount1.id
            );
            insert core;
            MyUser_Test = new User(
                ContactId = core.id,
                Alias = 'newUser',
                Email = 'newuser@testorg.com',
                EmailEncodingKey = 'UTF-8',
                LastName = 'TestUser',
                LanguageLocaleKey = 'zh_CN',
                LocaleSidKey = 'zh_CN',
                ProfileId = prof.Id,
                TimeZoneSidKey = 'Asia/Shanghai',
                UserName = 'testUser@testorg.com',
                Work_Location__c = '重庆'
            );
            insert MyUser_Test;
        }
        // TO DO: implement unit test

        System.runAs(myUser_Test) {
            Product2 prod01 = new Product2(
                Name = 'Test01',
                ProductCode = 'Test01',
                Asset_Model_No__c = 'Test01',
                SFDA_Status__c = '有効',
                Dealer_special_Object__c = true,
                Packing_list_manual__c = 12,
                Manual_Entry__c = false
            );
            Product2 prod02 = new Product2(
                Name = 'Test02',
                ProductCode = 'Test02',
                Asset_Model_No__c = 'Test02',
                SFDA_Status__c = '有効',
                Dealer_special_Object__c = true,
                Packing_list_manual__c = 12,
                Manual_Entry__c = false
            );
            insert new List<Product2>{ prod01, prod02 };
            Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
            Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
            insert new List<Product2__c>{ pro1, pro2 };
=======
private class LexOutboundorderImportControllerTest
{   
    static testMethod void myUnitTest() {

        user myUser_test;
        Account myAccount1 ;
        List<RecordType> rectHos;
        User thisUser = [ select Id from User where Id = :UserInfo.getUserId()];
        System.runAs(thisUser){
            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
            if (rectCo.size() == 0) {
                return;
            }
            rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
            if (rectHos.size() == 0) {
                return;
            }
            Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];
            
            myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900');
            insert myAccount1;
            
            Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
            insert core;
            MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '重庆');
            insert MyUser_Test;

        }
        // TO DO: implement unit test
      
        system.runAs(myUser_Test){
            Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true,Packing_list_manual__c=12,Manual_Entry__c = false);
            Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true,Packing_list_manual__c=12,Manual_Entry__c = false);
            insert new Product2[]{prod01,prod02};
            Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id);
            Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id);
            insert new Product2__c[] {pro1, pro2};
>>>>>>> LEXCommunityLiJun
            Consumable_order__c Order1 = new Consumable_order__c();
            Order1.Name = 'OCM_01_001';
            Order1.Order_status__c = '批准';
            Order1.Order_type__c = '订单';
            Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
            Order1.Dealer_Info__c = myAccount1.Id;
            Order1.Order_ProType__c = 'ET';
<<<<<<< HEAD
            insert Order1;
            Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
            Orderdet4.Name = 'OCM_01_001004';
            Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
=======
            insert  Order1;
            Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
            Orderdet4.Name = 'OCM_01_001004';
            Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
>>>>>>> LEXCommunityLiJun
            Orderdet4.Consumable_Arrived_order__c = Order1.Id;
            Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet4.Bar_Code__c = '123456789';
            Orderdet4.Consumable_Product__c = pro1.Id;
            Orderdet4.Arrive_date__c = Date.today().addDays(-1);
            Orderdet4.Box_Piece__c = '盒';

            Consumable_order_details2__c orderdet3 = new Consumable_order_details2__c();
            orderdet3.Name = 'OCM_01_001004';
<<<<<<< HEAD
            orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
=======
            orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
>>>>>>> LEXCommunityLiJun
            orderdet3.Consumable_Arrived_order__c = Order1.Id;
            orderdet3.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet3.Bar_Code__c = '123456788';
            orderdet3.Consumable_Product__c = pro1.Id;
            orderdet3.Arrive_date__c = Date.today().addDays(-1);
            orderdet3.Box_Piece__c = '盒';

            Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
            orderdet2.Name = 'OCM_01_001004';
<<<<<<< HEAD
            orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
=======
            orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
>>>>>>> LEXCommunityLiJun
            orderdet2.Consumable_Arrived_order__c = Order1.Id;
            orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet2.Bar_Code__c = '123456787';
            orderdet2.Consumable_Product__c = pro1.Id;
            orderdet2.Arrive_date__c = Date.today().addDays(-1);
            orderdet2.Box_Piece__c = '个';

            Consumable_order_details2__c orderdet1 = new Consumable_order_details2__c();
            Orderdet1.Name = 'OCM_01_001004';
<<<<<<< HEAD
            Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
=======
            Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
>>>>>>> LEXCommunityLiJun
            Orderdet1.Consumable_Arrived_order__c = Order1.Id;
            Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet1.Bar_Code__c = '123456786';
            Orderdet1.Consumable_Product__c = pro1.Id;
            Orderdet1.Arrive_date__c = Date.today().addDays(-1);
            Orderdet1.Box_Piece__c = '个';
<<<<<<< HEAD
            insert new List<Consumable_order_details2__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
            Account hosp1 = new Account(name = 'Testhosp001', RecordTypeId = rectHos[0].Id);
            insert hosp1;
            Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name = 'jxs001', Agency__c = myAccount1.Id, Hospital__c = hosp1.Id);
            insert jxs;
            List<Agency_Hospital_Link__c> jxsList = [
                SELECT Name, Hospital__r.Management_Code__c
                FROM Agency_Hospital_Link__c
                WHERE Name = 'Testhosp001'
            ];
=======
            insert new Consumable_order_details2__c[] {orderdet1, orderdet2,orderdet3,orderdet4};
            Account hosp1 = new Account(name='Testhosp001',RecordTypeId = rectHos[0].Id);
            insert hosp1;
            Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name='jxs001',Agency__c = myAccount1.Id,Hospital__c=hosp1.Id);
            insert jxs;
            List<Agency_Hospital_Link__c> jxsList = [select Name,Hospital__r.Management_Code__c from Agency_Hospital_Link__c where Name = 'Testhosp001'];
>>>>>>> LEXCommunityLiJun

            List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords1 = new List<LexOutboundorderImportController.ConsumableorderdetailsInfo>();
            //出库单
            Consumable_order__c cocObj = new Consumable_order__c();
            cocObj.Name = 'DB-FY2024-06-Z310002';
            cocObj.SummonsForDirction__c = '销售给二级经销商';
            cocObj.Order_Attachment__c = 'Test';
            cocObj.Order_Indication__c = '12233';
            cocObj.Order_ForCustomerText__c = '消化科';
            cocObj.Invoice_Note__c = 'test';
            cocObj.Outbound_Date__c = Date.today();
            insert cocObj;
            orderRecords1.add(new LexOutboundorderImportController.ConsumableorderdetailsInfo(cocObj));

            system.assertEquals(1, jxsList.size());
            PageReference page = new PageReference('/apex/OutboundorderImport');
            System.Test.setCurrentPage(page);
            OutboundorderImportController ctrl = new OutboundorderImportController();
            System.Test.startTest();
            String csvBody = '';
            csvBody = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
<<<<<<< HEAD
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456787,1,230,个,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456786,1,230,个,230,2017-02-17\n';

            LexOutboundorderImportController.importCSVFile(
                'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            //出库日期为空
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIsLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU3NjU3MjUwR1NGU0IsMSw0MDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0K',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            //内容为空
            //不需要二级经销商
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYywNCkRCLUZZMjAyNC0wNi1aMzEwMDAyLOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDAzLOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NjA5ODI1MFJFSk9RLDEsNDAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDEsNTAwMCwyMCw4LzYvMjAyMywsLCwNCg%3D%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLDgvNi8yMDIzLCwsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLDE2ODYyMDMyNTYwOTgyNTBSRUpPUSwxLDQwMDAsMjAsOC82LzIwMjMsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pywsLCwsMSw1MDAwLDIwLDgvNi8yMDIzLCwsDQo%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            //barcode 不存在 或单位错误
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLOebkiwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            //不存在出库单位
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLCwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxMjM0NTY3ODYsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );

            //导入
            List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
            List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
            String orderRecordsLwc = JSON.serialize(orderRecords);

            Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
            Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                orderRecordsLwc,
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                orderRecordsLwc,
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "宽甸东桥康复医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "直接销售给医院","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
=======
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456787,1,230,个,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456786,1,230,个,230,2017-02-17\n';
            
            LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K','%ET%','重庆','Testaccount001');
            //出库日期为空
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIsLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs6ZCp5a2Y5bi06Za%2F4oKs6Y2e7oa%2B57Kw6Y2W5ama5quMLDgxMDU2NDAs54C555WM5pW75raT5ruEy4nmkLTls7DumLLpjZblqZrmq4ws5aiR5aCd5a%2By57uJPywxNjg2MjAzMjU3NjU3MjUwR1NGU0IsMSw0MDAwLOmQqT8yMCw4LzYvMjAyMyzmtpPjiKDjgZHpjZjnhrfmtJwsLA0K','%ET%','重庆','Testaccount001');
            //内容为空
            //不需要二级经销商
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYywNCkRCLUZZMjAyNC0wNi1aMzEwMDAyLOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDAzLOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsMTY4NjIwMzI1NjA5ODI1MFJFSk9RLDEsNDAwMCwyMCw4LzYvMjAyMywsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDEsNTAwMCwyMCw4LzYvMjAyMywsLCwNCg%3D%3D','%ET%','重庆','Testaccount001');
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLDgvNi8yMDIzLCwsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLDE2ODYyMDMyNTYwOTgyNTBSRUpPUSwxLDQwMDAsMjAsOC82LzIwMjMsLCwNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pywsLCwsMSw1MDAwLDIwLDgvNi8yMDIzLCwsDQo%3D','%ET%','重庆','Testaccount001');
            //barcode 不存在 或单位错误
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLOebkiwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D','%ET%','重庆','Testaccount001');
            //不存在出库单位
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsODAwLCwsOC82LzIwMjMsDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxMjM0NTY3ODYsMiw1MDAs5LiqLCw4LzYvMjAyMywNCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOS6kuebuOiwg%2Bi0pyw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiw0LDkwMDAs55uSLCw4LzYvMjAyMywNCg%3D%3D','%ET%','重庆','Testaccount001');

            //导入
            List<String[]>  csvRecordStr = LexOutboundorderImportController.csvRecordStr;
            List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
            String orderRecordsLwc = JSON.serialize(orderRecords);

            Map<String, String> secondAgencyMap =  LexOutboundorderImportController.secondAgencyMap;
            Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
            LexOutboundorderImportController.dataImport(csvRecordStr,orderRecordsLwc,'%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
            LexOutboundorderImportController.dataImport(csvRecordStr,orderRecordsLwc,'%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
            LexOutboundorderImportController.dataImport(csvRecordStr,'[{"agencyName": "","hospitalCode": "8215356","hospitalName": "宽甸东桥康复医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "直接销售给医院","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]','%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
        




>>>>>>> LEXCommunityLiJun

            LexOutboundorderImportController ctrls = new LexOutboundorderImportController();
            LexOutboundorderImportController.init();
            Blob blobData = Blob.valueOf(csvBody);
            String base64Data = EncodingUtil.base64Encode(blobData);
<<<<<<< HEAD
            LexOutboundorderImportController.importCSVFile('base64Data', '%ET%', '重庆', 'Testaccount001');
            String csvBody1 = '';
            csvBody1 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,product,Outbound_Date__c\n';
            csvBody1 += 'CS-S0001,医院试用,,,,医院试用1,123456789,1,,盒,230,2017-02-17\n';
            csvBody1 += 'CS-S0001,医院试用,,,,医院试用1,123456788,1,,盒,230,2017-02-17\n';
            csvBody1 += 'CS-S0001,医院试用,,,,测医院试用1,123456787,1,,盒,230,2017-02-17\n';
            csvBody1 += 'CS-S0001,医院试用,,,,医院试用1,123456786,1,,盒,230,2017-02-17\n';
            Blob blobData1 = Blob.valueOf(csvBody1);
            String base64Data1 = EncodingUtil.base64Encode(blobData1);
            LexOutboundorderImportController.importCSVFile('base64Data1', '%ET%', '重庆', 'Testaccount001');
            String csvBody2 = '';
            csvBody2 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody2 += 'CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 += 'CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 += 'CS-S0001,医院试用,,,,测医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 += 'CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            Blob blobData2 = Blob.valueOf(csvBody2);
            String base64Data2 = EncodingUtil.base64Encode(blobData1);
            LexOutboundorderImportController.importCSVFile('base64Data2', '%ET%', '重庆', 'Testaccount001');

            String csvBody3 = '';
            csvBody3 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody3 += 'CS-S0001,医院试用,,,,医院试用1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody3 += 'CS-S0001,医院试用,,,,医院试用1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody3 += 'CS-S0001,医院试用,,,,测医院试用1,123456787,1,230,盒,230,2017-02-17\n';
            csvBody3 += 'CS-S0001,医院试用,,,,医院试用1,123456786,12,230,盒,230,2017-02-17\n';
            Blob blobData3 = Blob.valueOf(csvBody3);
            String base64Data3 = EncodingUtil.base64Encode(blobData3);
            LexOutboundorderImportController.importCSVFile('base64Data3', '%ET%', '重庆', 'Testaccount001');
            System.Test.stopTest();
=======
            LexOutboundorderImportController.importCSVFile('base64Data','%ET%','重庆','Testaccount001');
            String csvBody1 = '';
            csvBody1 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,product,Outbound_Date__c\n';
            csvBody1 +='CS-S0001,医院试用,,,,医院试用1,123456789,1,,盒,230,2017-02-17\n';
            csvBody1 +='CS-S0001,医院试用,,,,医院试用1,123456788,1,,盒,230,2017-02-17\n';
            csvBody1 +='CS-S0001,医院试用,,,,测医院试用1,123456787,1,,盒,230,2017-02-17\n';
            csvBody1 +='CS-S0001,医院试用,,,,医院试用1,123456786,1,,盒,230,2017-02-17\n';
            Blob blobData1 = Blob.valueOf(csvBody1);
            String base64Data1 = EncodingUtil.base64Encode(blobData1);
            LexOutboundorderImportController.importCSVFile('base64Data1','%ET%','重庆','Testaccount001');
            String csvBody2 = '';
            csvBody2 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody2 +='CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 +='CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 +='CS-S0001,医院试用,,,,测医院试用1,,1,230,盒,230,2017-02-17\n';
            csvBody2 +='CS-S0001,医院试用,,,,医院试用1,,1,230,盒,230,2017-02-17\n';
            Blob blobData2 = Blob.valueOf(csvBody2);
            String base64Data2 = EncodingUtil.base64Encode(blobData1);
            LexOutboundorderImportController.importCSVFile('base64Data2','%ET%','重庆','Testaccount001');

            String csvBody3 = '';
            csvBody3 = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody3 +='CS-S0001,医院试用,,,,医院试用1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody3 +='CS-S0001,医院试用,,,,医院试用1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody3 +='CS-S0001,医院试用,,,,测医院试用1,123456787,1,230,盒,230,2017-02-17\n';
            csvBody3 +='CS-S0001,医院试用,,,,医院试用1,123456786,12,230,盒,230,2017-02-17\n';
            Blob blobData3 = Blob.valueOf(csvBody3);
            String base64Data3 = EncodingUtil.base64Encode(blobData3);
            LexOutboundorderImportController.importCSVFile('base64Data3','%ET%','重庆','Testaccount001');
            System.Test.stopTest();


>>>>>>> LEXCommunityLiJun
        }
    }

    static testMethod void allTest() {
<<<<<<< HEAD
        user myUser_test;
        Account myAccount1;
        List<RecordType> rectHos;
        User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
        System.runAs(thisUser) {
            List<RecordType> rectCo = [
                SELECT Id
                FROM RecordType
                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '販売店'
            ];
            if (rectCo.size() == 0) {
                return;
            }
            rectHos = [
                SELECT Id
                FROM RecordType
                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '病院'
            ];
            if (rectHos.size() == 0) {
                return;
            }
            Profile prof = [
                SELECT Id
                FROM Profile
                WHERE Name = '901_经销商社区普通权限_2重验证(ET)'
            ];

            myAccount1 = new Account(
                name = 'Testaccount001',
                Dealer_discount__c = 20,
                RecordTypeId = rectCo[0].Id,
                AgentCode_Ext__c = '9999900'
            );
            insert myAccount1;

            Contact core = new Contact(
                email = 'jplumber@salesforce.com',
                firstname = 'Joe',
                lastname = 'Plumber',
                accountid = myAccount1.id
            );
            insert core;
            MyUser_Test = new User(
                ContactId = core.id,
                Alias = 'newUser',
                Email = 'newuser@testorg.com',
                EmailEncodingKey = 'UTF-8',
                LastName = 'TestUser',
                LanguageLocaleKey = 'zh_CN',
                LocaleSidKey = 'zh_CN',
                ProfileId = prof.Id,
                TimeZoneSidKey = 'Asia/Shanghai',
                UserName = 'testUser@testorg.com',
                Work_Location__c = '重庆'
            );
            insert MyUser_Test;
        }
        System.runAs(MyUser_Test) {
            Product2 prod01 = new Product2(
                Name = 'Test01',
                ProductCode = 'Test01',
                Asset_Model_No__c = 'Test01',
                SFDA_Status__c = '有効',
                Dealer_special_Object__c = true,
                Packing_list_manual__c = 12,
                Manual_Entry__c = false
            );
            Product2 prod02 = new Product2(
                Name = 'Test02',
                ProductCode = 'Test02',
                Asset_Model_No__c = 'Test02',
                SFDA_Status__c = '有効',
                Dealer_special_Object__c = true,
                Packing_list_manual__c = 12,
                Manual_Entry__c = false
            );
            insert new List<Product2>{ prod01, prod02 };
            Product2__c pro1 = new Product2__c(Name = 'Pro001', OT_CODE_Text__c = 'Test001', Product2__c = prod01.Id);
            Product2__c pro2 = new Product2__c(Name = 'Pro002', OT_CODE_Text__c = 'Test002', Product2__c = prod02.Id);
            insert new List<Product2__c>{ pro1, pro2 };
=======

        user myUser_test;
        Account myAccount1 ;
        List<RecordType> rectHos;
        User thisUser = [ select Id from User where Id = :UserInfo.getUserId()];
        System.runAs(thisUser){
            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
            if (rectCo.size() == 0) {
                return;
            }
            rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
            if (rectHos.size() == 0) {
                return;
            }
            Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];
            
            myAccount1 = new Account(name='Testaccount001',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id,AgentCode_Ext__c = '9999900');
            insert myAccount1;
            
            Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
            insert core;
            MyUser_Test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='TestUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '重庆');
            insert MyUser_Test;

        }
        System.runAs(MyUser_Test){
            Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '有効',Dealer_special_Object__c = true,Packing_list_manual__c=12,Manual_Entry__c = false);
            Product2 prod02 = new Product2(Name='Test02',ProductCode='Test02',Asset_Model_No__c = 'Test02',SFDA_Status__c = '有効',Dealer_special_Object__c = true,Packing_list_manual__c=12,Manual_Entry__c = false);
            insert new Product2[]{prod01,prod02};
            Product2__c pro1 = new Product2__c(Name='Pro001',OT_CODE_Text__c='Test001',Product2__c = prod01.Id);
            Product2__c pro2 = new Product2__c(Name='Pro002',OT_CODE_Text__c='Test002',Product2__c = prod02.Id);
            insert new Product2__c[] {pro1, pro2};
>>>>>>> LEXCommunityLiJun
            Consumable_order__c Order1 = new Consumable_order__c();
            Order1.Name = 'OCM_01_001';
            Order1.Order_status__c = '批准';
            Order1.Order_type__c = '订单';
            Order1.RecordTypeid = System.Label.RT_ConOrder_Order;
            Order1.Dealer_Info__c = myAccount1.Id;
            Order1.Order_ProType__c = 'ET';
<<<<<<< HEAD
            insert Order1;
=======
            insert  Order1;
>>>>>>> LEXCommunityLiJun

            Consumable_order__c Order2 = new Consumable_order__c();
            Order2.Name = 'OCM_01_001';
            Order2.Order_status__c = '批准';
            Order2.Order_type__c = '传票';
            order2.SummonsStatus_c__c = '已完成';
            Order2.Dealer_Info__c = myAccount1.Id;
            Order2.Order_ProType__c = 'ET';
            Order2.SummonsForDirction__c = '直接销售给医院';
<<<<<<< HEAD
            insert Order2;

            Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
            Orderdet4.Name = 'OCM_01_001004';
            Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
            Orderdet4.Consumable_Arrived_order__c = Order1.Id;
            Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet4.Bar_Code__c = '123456789';
            Orderdet4.Consumable_Product__c = pro1.Id;
            Orderdet4.Arrive_date__c = Date.today().addDays(-1);
            Orderdet4.Box_Piece__c = '盒';

            Consumable_order_details2__c orderdet3 = new Consumable_order_details2__c();
            orderdet3.Name = 'OCM_01_001004';
            orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
            orderdet3.Consumable_Arrived_order__c = Order1.Id;
            orderdet3.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet3.Bar_Code__c = '1686203254468250VVGIU';
            orderdet3.Consumable_Product__c = pro1.Id;
            orderdet3.Arrive_date__c = Date.today().addDays(-1);
            orderdet3.Box_Piece__c = '盒';
            orderdet3.Lose_Flag__c = false;

            Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
            orderdet2.Name = 'OCM_01_001004';
            orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
            orderdet2.Consumable_Arrived_order__c = Order1.Id;
            orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet2.Bar_Code__c = '1686203256098250REJOQ';
            orderdet2.Consumable_Product__c = pro1.Id;
            orderdet2.Arrive_date__c = Date.today().addDays(-1);
            orderdet2.Box_Piece__c = '个';

            Consumable_order_details2__c orderdet1 = new Consumable_order_details2__c();
            Orderdet1.Name = 'OCM_01_001004';
            Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
            Orderdet1.Consumable_Arrived_order__c = Order1.Id;
            Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet1.Bar_Code__c = '1686203257657250GSFSB';
            Orderdet1.Consumable_Product__c = pro1.Id;
            Orderdet1.Arrive_date__c = Date.today().addDays(-1);
            Orderdet1.Box_Piece__c = '个';
            insert new List<Consumable_order_details2__c>{ orderdet1, orderdet2, orderdet3, orderdet4 };
            Account hosp1 = new Account(name = 'Testhosp001', RecordTypeId = rectHos[0].Id);
            insert hosp1;
            Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name = 'jxs001', Agency__c = myAccount1.Id, Hospital__c = hosp1.Id);
            insert jxs;
            List<Agency_Hospital_Link__c> jxsList = [
                SELECT Name, Hospital__r.Management_Code__c
                FROM Agency_Hospital_Link__c
                WHERE Name = 'Testhosp001'
            ];
            //运行数据
            System.Test.startTest();
            LexOutboundorderImportController.init();
            String csvBody = '';
            //hospitalCode=null,hospitalName!=null
            csvBody = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456787,1,230,个,230,2017-02-17\n';
            csvBody +=
                'CS-S0001,销售给二级经销商,' +
                jxsList[0].Hospital__r.Management_Code__c +
                ',Testhosp001,test,测试二级经销商1,123456786,1,230,个,230,2017-02-17\n';
            String base64Content = EncodingUtil.Base64Encode(Blob.valueOf(csvBody));
            System.debug('base64Content==>' + base64Content);
            Blob blobContent = EncodingUtil.base64Decode(base64Content);
            System.debug('blobContent==>' + blobContent.toString());
            LexOutboundorderImportController.importCSVFile(base64Content, '%ET%', '重庆', 'Testaccount001');
            LexOutboundorderImportController.importCSVFile(
                'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            LexOutboundorderImportController.importCSVFile(
                '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLCwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLOebkiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSw0MDAwLDIwLOS4qiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs5LqS55u46LCD6LSnLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMSw1MDAwLDIwLOS4qiwsLA0K',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            LexOutboundorderImportController.importCSVFile('', '', '', '');

            //导入
            List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
            List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
            System.debug('111===>' + JSON.serialize(LexOutboundorderImportController.orderRecords));
            String orderRecordsLwc = JSON.serialize(orderRecords);
            Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
=======
            insert  Order2;



            Consumable_order_details2__c Orderdet4 = new Consumable_order_details2__c();
            Orderdet4.Name = 'OCM_01_001004';
            Orderdet4.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
            Orderdet4.Consumable_Arrived_order__c = Order1.Id;
            Orderdet4.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet4.Bar_Code__c = '123456789';
            Orderdet4.Consumable_Product__c = pro1.Id;
            Orderdet4.Arrive_date__c = Date.today().addDays(-1);
            Orderdet4.Box_Piece__c = '盒';

            Consumable_order_details2__c orderdet3 = new Consumable_order_details2__c();
            orderdet3.Name = 'OCM_01_001004';
            orderdet3.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
            orderdet3.Consumable_Arrived_order__c = Order1.Id;
            orderdet3.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet3.Bar_Code__c = '1686203254468250VVGIU';
            orderdet3.Consumable_Product__c = pro1.Id;
            orderdet3.Arrive_date__c = Date.today().addDays(-1);
            orderdet3.Box_Piece__c = '盒';
            orderdet3.Lose_Flag__c = false;


            Consumable_order_details2__c orderdet2 = new Consumable_order_details2__c();
            orderdet2.Name = 'OCM_01_001004';
            orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
            orderdet2.Consumable_Arrived_order__c = Order1.Id;
            orderdet2.Sterilization_limit__c = Date.today().addDays(-1);
            orderdet2.Bar_Code__c = '1686203256098250REJOQ';
            orderdet2.Consumable_Product__c = pro1.Id;
            orderdet2.Arrive_date__c = Date.today().addDays(-1);
            orderdet2.Box_Piece__c = '个';

            Consumable_order_details2__c orderdet1 = new Consumable_order_details2__c();
            Orderdet1.Name = 'OCM_01_001004';
            Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery ;
            Orderdet1.Consumable_Arrived_order__c = Order1.Id;
            Orderdet1.Sterilization_limit__c = Date.today().addDays(-1);
            Orderdet1.Bar_Code__c = '1686203257657250GSFSB';
            Orderdet1.Consumable_Product__c = pro1.Id;
            Orderdet1.Arrive_date__c = Date.today().addDays(-1);
            Orderdet1.Box_Piece__c = '个';
            insert new Consumable_order_details2__c[] {orderdet1, orderdet2,orderdet3,orderdet4};
            Account hosp1 = new Account(name='Testhosp001',RecordTypeId = rectHos[0].Id);
            insert hosp1;
            Agency_Hospital_Link__c jxs = new Agency_Hospital_Link__c(name='jxs001',Agency__c = myAccount1.Id,Hospital__c=hosp1.Id);
            insert jxs;
            List<Agency_Hospital_Link__c> jxsList = [select Name,Hospital__r.Management_Code__c from Agency_Hospital_Link__c where Name = 'Testhosp001'];
            //运行数据
            System.Test.startTest();
            LexOutboundorderImportController.init();
            String csvBody = '';
            //hospitalCode=null,hospitalName!=null
            csvBody = 'Name,SummonsForDirction__c,HospitalCode,Order_ForHospital__c,Order_ForCustomerText__c,Order_ForDealer__c,Bar_Code__c,Shipment_Count__c,Delivery_List_RMB__c,Box_Piece__c,Unitprice_To_agency__c,Outbound_Date__c\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456789,1,230,盒,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456788,1,230,盒,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456787,1,230,个,230,2017-02-17\n';
            csvBody +='CS-S0001,销售给二级经销商,' + jxsList[0].Hospital__r.Management_Code__c + ',Testhosp001,test,测试二级经销商1,123456786,1,230,个,230,2017-02-17\n';
            String base64Content = EncodingUtil.Base64Encode(Blob.valueOf(csvBody));
            System.debug('base64Content==>'+base64Content);
            Blob blobContent = EncodingUtil.base64Decode( base64Content);
            System.debug('blobContent==>'+ blobContent.toString());
            LexOutboundorderImportController.importCSVFile(base64Content,'%ET%','重庆','Testaccount001');
            LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NjIwMzI1NDQ2ODI1MFZWR0lVLDEsMjAwMCznm5IsMjAsMjAyMy82Lzgs5Lii5aSx5Y6f5ZugDQpEQi1GWTIwMjQtMDYtWjMxMDAwMyznm7TmjqXplIDllK7nu5nljLvpmaIsODEwNTY0MCzlrr3nlLjkuJzmoaXlurflpI3ljLvpmaIs5raI5YyW56eRLCwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSwzMDAwLOebkiwyMCwyMDIzLzYvOCzkuKLlpLHljp%2Flm6ANCkRCLUZZMjAyNC0wNi1aMzEwMDA0LOebtOaOpemUgOWUrue7meWMu%2BmZoiw4MTA1NjQwLOWuveeUuOS4nOahpeW6t%2BWkjeWMu%2BmZoizmtojljJbnp5EsLDE2ODYyMDMyNTc2NTcyNTBHU0ZTQiwxLDQwMDAs55uSLDIwLDIwMjMvNi84LOS4ouWkseWOn%2BWboA0K','%ET%','重庆','Testaccount001');
            LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVozMTAwMDIs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLCwxNjg2MjAzMjU0NDY4MjUwVlZHSVUsMSwyMDAwLDIwLOebkiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDMs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwxNjg2MjAzMjU2MDk4MjUwUkVKT1EsMSw0MDAwLDIwLOS4qiwsLA0KREItRlkyMDI0LTA2LVozMTAwMDQs5LqS55u46LCD6LSnLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMSw1MDAwLDIwLOS4qiwsLA0K','%ET%','重庆','Testaccount001');
            LexOutboundorderImportController.importCSVFile('','','','');
       

            //导入
            List<String[]>  csvRecordStr = LexOutboundorderImportController.csvRecordStr;
            List<LexOutboundorderImportController.ConsumableorderdetailsInfo> orderRecords = LexOutboundorderImportController.orderRecords;
            System.debug('111===>'+JSON.serialize(LexOutboundorderImportController.orderRecords));
            String orderRecordsLwc = JSON.serialize(orderRecords);
            Map<String, String> secondAgencyMap =  LexOutboundorderImportController.secondAgencyMap;
>>>>>>> LEXCommunityLiJun
            Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
            // hospitalSysMap.put('8105640',myAccount1.Id);
            // hospitalSysMap.put('8106864','0011000001g02glAAA');
            // hospitalSysMap.put('8106867','0011000001g02hUAAQ');
            // hospitalSysMap.put('8107348','0011000001g09fDAAQ');
<<<<<<< HEAD
            System.debug('hospitalSysMap==' + hospitalSysMap);
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                orderRecordsLwc,
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "销售给二级经销商","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
            LexOutboundorderImportController.dataImport(
                csvRecordStr,
                '[{"agencyName": "Test","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "直接销售给医院","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
                '%ET%',
                '重庆',
                'Testaccount001',
                'myAccount1.Id',
                'ET',
                secondAgencyMap,
                hospitalSysMap
            );
            //产品出货数量为空
            LexOutboundorderImportController.importCSVFile(
                'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            //单位盒 数量大于1(无效)
            LexOutboundorderImportController.importCSVFile(
                'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
                '%ET%',
                '重庆',
                'Testaccount001'
            );
            System.Test.stopTest();
        }
    }

    static testMethod void allTest1() {
        List<String[]> csvRecordStr = LexOutboundorderImportController.csvRecordStr;
        Map<String, String> secondAgencyMap = LexOutboundorderImportController.secondAgencyMap;
        Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
        System.debug('===>secondAgencyMap' + secondAgencyMap);
        System.debug('===>hospitalSysMap' + hospitalSysMap);
        LexOutboundorderImportController.dataImport(
            csvRecordStr,
            '[{"agencyName": "","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "销售给二级经销商","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]',
            '%ET%',
            '重庆',
            'Testaccount001',
            'myAccount1.Id',
            'ET',
            secondAgencyMap,
            hospitalSysMap
        );
        LexOutboundorderImportController.importCSVFile(
            '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLCznm5IsLDI3LzUvMjAwMiwNCkRCLUZZMjAyNC0wNS1aMzE3MTA3LOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4ODAyNTAs5aSn6L%2Be5aWH5Yqg5aSN5YGl5Yy76ZmiLOWkluenkSwsMTIzNDU2LDcwMCwwLOebkiwsMjcvNS8yMDAyLA0K',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
        LexOutboundorderImportController.importCSVFile(
            '77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLDAs55uSLCwyNy81LzIwMDIsDQpEQi1GWTIwMjQtMDUtWjMxNzEwNyzplIDllK7nu5nkuoznuqfnu4%2FplIDllYYsODgwMjUwLOWkp%2Bi%2FnuWlh%2BWKoOWkjeWBpeWMu%2BmZoizlpJbnp5EsLDEyMzQ1Niw3MDAsMCznm5IsLDI3LzUvMjAwMiwNCiwsLCwsLCwsLCwsLA0KLCwsLCwsLCwsLCwsDQosLCwsLCwsLCwsLCwNCiwsLCwsLCwsLCwsLA0KLCwscywsLCwsLCwsLA0K',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
        LexOutboundorderImportController.importCSVFile(
            'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLDEsLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
        //存在Barcode为空
        LexOutboundorderImportController.importCSVFile(
            'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
        //产品出货数量为空(无效)
        LexOutboundorderImportController.importCSVFile(
            'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
        //二级经销商不为空
        LexOutboundorderImportController.importCSVFile(
            'TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D',
            '%ET%',
            '重庆',
            'Testaccount001'
        );
    }
}
=======
            System.debug('hospitalSysMap=='+hospitalSysMap);
            LexOutboundorderImportController.dataImport(csvRecordStr,orderRecordsLwc,'%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
            LexOutboundorderImportController.dataImport(csvRecordStr,'[{"agencyName": "","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "销售给二级经销商","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]','%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
            LexOutboundorderImportController.dataImport(csvRecordStr,'[{"agencyName": "Test","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "直接销售给医院","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]','%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
            //产品出货数量为空 
            LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D','%ET%','重庆','Testaccount001');
            //单位盒 数量大于1(无效)
            LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D','%ET%','重庆','Testaccount001');
            System.Test.stopTest();

        }
    }


    static testMethod void allTest1() {
        List<String[]>  csvRecordStr = LexOutboundorderImportController.csvRecordStr;
        Map<String, String> secondAgencyMap =  LexOutboundorderImportController.secondAgencyMap;
        Map<String, String> hospitalSysMap = LexOutboundorderImportController.hospitalSysMap;
        System.debug('===>secondAgencyMap'+secondAgencyMap);
        System.debug('===>hospitalSysMap'+hospitalSysMap);
        LexOutboundorderImportController.dataImport(csvRecordStr,'[{"agencyName": "","hospitalCode": "8215356","hospitalName": "测试医院","order": {"Name": "DB-FY2024-06-Z310002","SummonsForDirction__c": "销售给二级经销商","Order_ForHospital__c":"测试医院","Order_Attachment__c": "","Order_Indication__c": "","Order_ForCustomerText__c": "消化科","Invoice_Note__c": "","Outbound_Date__c": "2023-06-08"}}]','%ET%','重庆','Testaccount001','myAccount1.Id','ET',secondAgencyMap,hospitalSysMap);
        LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLCznm5IsLDI3LzUvMjAwMiwNCkRCLUZZMjAyNC0wNS1aMzE3MTA3LOmUgOWUrue7meS6jOe6p%2Be7j%2BmUgOWVhiw4ODAyNTAs5aSn6L%2Be5aWH5Yqg5aSN5YGl5Yy76ZmiLOWkluenkSwsMTIzNDU2LDcwMCwwLOebkiwsMjcvNS8yMDAyLA0K','%ET%','重庆','Testaccount001');
        LexOutboundorderImportController.importCSVFile('77u%2FTmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA1LVozMTcxMDcs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDg4MDI1MCzlpKfov57lpYfliqDlpI3lgaXljLvpmaIs5aSW56eRLCwxMjM0NTYsNzAwLDAs55uSLCwyNy81LzIwMDIsDQpEQi1GWTIwMjQtMDUtWjMxNzEwNyzplIDllK7nu5nkuoznuqfnu4%2FplIDllYYsODgwMjUwLOWkp%2Bi%2FnuWlh%2BWKoOWkjeWBpeWMu%2BmZoizlpJbnp5EsLDEyMzQ1Niw3MDAsMCznm5IsLDI3LzUvMjAwMiwNCiwsLCwsLCwsLCwsLA0KLCwsLCwsLCwsLCwsDQosLCwsLCwsLCwsLCwNCiwsLCwsLCwsLCwsLA0KLCwscywsLCwsLCwsLA0K','%ET%','重庆','Testaccount001');
        LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsMTY4NzMxNDIzMDEzMTI1MFdVUlhFLDEsLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D','%ET%','重庆','Testaccount001');
        //存在Barcode为空 
        LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LUQzMTg5MDYs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDg2MTMs6YeR5Lmh5Y6%2F5Y2c6ZuG6ZWH5Y2r55Sf6ZmiLOa2iOWMluenkSwsLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D','%ET%','重庆','Testaccount001');
        //产品出货数量为空(无效)
        LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs55u05o6l6ZSA5ZSu57uZ5Yy76ZmiLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLCw1MDAs55uSLDE1LDIwMjMvNS8zMCzkuKLlpLHljp%2Flm6ANCg%3D%3D','%ET%','重庆','Testaccount001');
        //二级经销商不为空
        LexOutboundorderImportController.importCSVFile('TmFtZSxTdW1tb25zRm9yRGlyY3Rpb25fX2MsSG9zcGl0YWxDb2RlLE9yZGVyX0Zvckhvc3BpdGFsX19jLE9yZGVyX0ZvckN1c3RvbWVyVGV4dF9fYyxPcmRlcl9Gb3JEZWFsZXJfX2MsQmFyX0NvZGVfX2MsU2hpcG1lbnRfQ291bnRfX2MsRGVsaXZlcnlfTGlzdF9STUJfX2MsQm94X1BpZWNlX19jLFVuaXRwcmljZV9Ub19hZ2VuY3lfX2MsT3V0Ym91bmRfRGF0ZV9fYyxMb3NlX3JlYXNvbl9fYw0KREItRlkyMDI0LTA2LVMzMTc4MTMtMDEs6ZSA5ZSu57uZ5LqM57qn57uP6ZSA5ZWGLDgxMDU2NDAs5a6955S45Lic5qGl5bq35aSN5Yy76ZmiLOa2iOWMluenkSwsMTY4NzMyMjQ0NDUwOTI1MFVZR01QLDUsNTAwLOebkiwxNSwyMDIzLzUvMzAs5Lii5aSx5Y6f5ZugDQo%3D','%ET%','重庆','Testaccount001');


    }
}
>>>>>>> LEXCommunityLiJun
