@isTest
private class OpportunityWebServiceTest
{
    private static Id pricebookId = ControllerUtil.getStandardPricebook().Id;
	
    @isTest static void test_method_one() {
    Opportunity opp = new Opportunity(
            Name='Opp',
            StageName='引合',
            CloseDate=Date.today(),
            CurrencyIsoCode = 'CNY'
        );
        insert opp;
        
        Quote q = new Quote(
            Name = 'quote',
            OpportunityId = opp.Id
        );
        insert q;

        OpportunityWebService.changeTrade(opp.id);
  }

    @isTest 
    static void test_method_one1() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '不要';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        product.SFDA_Status__c = '不要';
        update product;
        Product2 pro = [select id,SFDA_Status__c,Estimation_Entry_Possibility__c from Product2 where id = :product.Id];
        System.assertEquals('不要', pro.SFDA_Status__c);
        System.assertEquals('○', pro.Estimation_Entry_Possibility__c);
        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '不要';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111111';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6815;6822;6823;6825',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //update linc;

        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '3',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2028, 07, 22),
                                                RegisterNoClass_Old__c = '6815',
                                                RegisterNoClass_New__c = '6815',
                                                RegisterNoStatus__c = '有效'
                                                );
        insert prc;

        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
        pro = [select id,SFDA_Status__c,Estimation_Entry_Possibility__c from Product2 where id = :product.Id];
        System.assertEquals('不要', pro.SFDA_Status__c);
        System.assertEquals('○', pro.Estimation_Entry_Possibility__c);
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;

        System.Test.startTest();
        OpportunityWebService.updReg(opp.Id);
        OpportunityWebService.oppCheck(opp.Id,'1');
        System.Test.stopTest();

	}

    @isTest 
    static void test_method_four() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '有効';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '有効';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111111';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6815;6822;6823;6825',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //update linc;
        
        //linc = [select Id,Name,ScopeKey__c from License_Information__c where BusinessLicense__c = '20180522'];
        //System.assertEquals('123',linc.ScopeKey__c);
        //产品注册证
        //Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
        //                                        MedPrdClass__c = '3',
        //                                        ValidFrom__c = date.newinstance(2018, 07, 22),
        //                                        ValidTo__c = date.newinstance(2028, 07, 22),
        //                                        RegisterNoClass_Old__c = '6815',
        //                                        RegisterNoClass_New__c = '6815',
        //                                        RegisterNoStatus__c = '有效'
        //                                        );
        //insert prc;

        Product_Register__c prc1 = new Product_Register__c(Name = '国械注进2016222021',
                                        MedPrdClass__c = '2',
                                        ValidFrom__c = date.newinstance(2018, 07, 22),
                                        ValidTo__c = date.newinstance(2028, 07, 22),
                                        RegisterNoClass_Old__c = '6833',
                                        RegisterNoClass_New__c = '6833',
                                        RegisterNoStatus__c = '有效'
                                        );
        insert prc1;
        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc1.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;


        OpportunityWebService.oppCheck(opp.Id,'1');

    }

    @isTest 
    static void test_method_two() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '有効';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;

        Product2 product12 = new Product2( Name='テスト商品12');
        product12.SFDA_Status__c = '有効';
        product12.Intra_Trade_List_RMB_1__c = 100;
        product12.Intra_Trade_List_RMB_Date1__c = date.today();
        product12.Intra_Trade_Cost_RMB_1__c = 200;
        product12.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product12.Manual_Entry__c = false;
        product12.Asset_Model_No__c = '1111112';
        product12.ProductCode = 'OTV-SP1H-NA-12E12';
        insert product12;

        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '有効';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111112';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6822;6823;6825;6815A',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '2',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2018, 08, 22),
                                                RegisterNoClass_Old__c = '6833',
                                                RegisterNoClass_New__c = '6833'
                                                //RegisterNoStatus__c = '有效'
                                                );
        insert prc;
        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;


        OpportunityWebService.oppCheck(opp.Id,'1');

    }

    @isTest 
    static void test_method_three() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '不要';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6815;6822;6823;6825',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //System.assertEquals('123',linc.ScopeKey__c);
        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '3',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2028, 07, 22),
                                                RegisterNoClass_Old__c = '6815',
                                                RegisterNoClass_New__c = '6815',
                                                RegisterNoStatus__c = '有效'
                                                );
        insert prc;
        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;


        OpportunityWebService.oppCheck(opp.Id,'2');

    }


    @isTest 
    static void test_method_five() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '有効';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '有効';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111111';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '314;6822;6823;6825',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //update linc;
        
        //linc = [select Id,Name,ScopeKey__c from License_Information__c where BusinessLicense__c = '20180522'];
        //System.assertEquals('123',linc.ScopeKey__c);
        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '3',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2028, 07, 22),
                                                RegisterNoClass_Old__c = '6815',
                                                RegisterNoClass_New__c = '6815',
                                                RegisterNoStatus__c = '有效'
                                                );
        insert prc;

        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;

        OpportunityWebService.updReg(opp.Id);
        OpportunityWebService.oppCheck(opp.Id,'1');

    }

    @isTest 
    static void test_method_six() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '有効';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '有効';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111111';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6815',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //update linc;
        
        //linc = [select Id,Name,ScopeKey__c from License_Information__c where BusinessLicense__c = '20180522'];
        //System.assertEquals('123',linc.ScopeKey__c);
        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '2',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2028, 07, 22),
                                                RegisterNoClass_Old__c = '314',
                                                RegisterNoClass_New__c = '314',
                                                RegisterNoStatus__c = '有效'
                                                );
        insert prc;

        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;

        OpportunityWebService.updReg(opp.Id);
        OpportunityWebService.oppCheck(opp.Id,'1');

    }
    @isTest 
    static void test_method_seven() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }

        //经销商、联系人、用户信息
        Account myAccount1 = new Account(name='Testaccount001',
                                        Dealer_discount__c =20,
                                        Ban_On_Use_Date__c = Date.today().addDays(1),
                                        Business_Paper_Expiration_Date__c = Date.today().addDays(1),
                                        Tax_Practice_Expiration_Date__c = Date.today().addDays(1),
                                        Medical_Equipment_Expiration_Date__c = Date.today().addDays(1),
                                        RecordTypeId = rectCo[0].Id);
        insert myAccount1;
        Account acc1 = [select Id,Name,Is_Active_Formula__c from Account where Id = : myAccount1.Id];
        System.assertEquals('有效', acc1.Is_Active_Formula__c);
        Contact core1 = new Contact(email='test@salesforce.com', 
                                    firstname='test',
                                    lastname='001',
                                    accountid=myAccount1.Id);
        insert core1;

        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证(ET)'];

        Product2 product = new Product2( Name='テスト商品');
        product.SFDA_Status__c = '有効';
        product.Intra_Trade_List_RMB_1__c = 100;
        product.Intra_Trade_List_RMB_Date1__c = date.today();
        product.Intra_Trade_Cost_RMB_1__c = 200;
        product.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product.Manual_Entry__c = false;
        product.Asset_Model_No__c = '11111';
        product.ProductCode = 'OTV-SP1H-NA-12E';
        insert product;
        Product2 product1 = new Product2( Name='テスト商品1');
        product1.SFDA_Status__c = '有効';
        product1.Intra_Trade_List_RMB_1__c = 100;
        product1.Intra_Trade_List_RMB_Date1__c = date.today();
        product1.Intra_Trade_Cost_RMB_1__c = 200;
        product1.Intra_Trade_Cost_RMB_Date1__c = date.today();
        product1.Manual_Entry__c = false;
        product1.Asset_Model_No__c = '111111';
        product1.ProductCode = 'OTV-SP1H-NA-12E1';
        insert product1;
        PricebookEntry entry = new PricebookEntry( Pricebook2Id=pricebookId, Product2Id=product.Id);
        entry.UnitPrice = 0;
        entry.IsActive = true;
        entry.UseStandardPrice = false;
        entry.CurrencyIsoCode = 'CNY';
        insert entry;
        
        Opportunity opp = new Opportunity();
        opp.Name='aiueo';
        opp.StageName='contact';
        opp.Trade__c = '内貿';
        opp.CloseDate=Date.today();
        opp.CurrencyIsoCode = 'CNY';
        opp.Estimation_List_Price__c = 100;
        opp.Wholesale_Price__c = 101;
        opp.Dealer_Final_Price__c = 102;
        opp.OCM_Agent1_Price__c = 103;
        opp.Stocking_Price__c = 104;
        opp.Estimation_No__c = '105';
        opp.Estimation_Name__c = '106';
        opp.Estimation_Id__c = '107';
        opp.Agency1__c = myAccount1.Id;
        insert opp;
        
        OpportunityLineItem oppli = new OpportunityLineItem();
        oppli.OpportunityId = opp.Id;
        oppli.Id__c = '110';
        oppli.SFDA_Status__c = '有効';
        oppli.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十';
        oppli.ListPrice__c = 112;
        oppli.Quantity = 113;
        oppli.UnitPrice = 114;
        oppli.UnitPrice__c = 115;
        oppli.Qty_Unit__c = '116';
        oppli.Cost__c = 117;
        oppli.BSS_Category__c = 'G&R';
        oppli.Item_Order__c = 1;
        oppli.PricebookEntryId = entry.Id;
        insert oppli;
        
        OpportunityLineItem oppli2 = new OpportunityLineItem();
        oppli2.OpportunityId = opp.Id;
        oppli2.Id__c = '110';
        oppli2.SFDA_Status__c = '有効';
        oppli2.Name__c = '一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五';
        oppli2.ListPrice__c = 112;
        oppli2.Quantity = 113;
        oppli2.UnitPrice = 114;
        oppli2.UnitPrice__c = 115;
        oppli2.Qty_Unit__c = '116';
        oppli2.Cost__c = 117;
        oppli2.BSS_Category__c = 'G&R';
        oppli2.Item_Order__c = 1;
        oppli2.PricebookEntryId = entry.Id;
        insert oppli2;


        //医疗器械经营许可证
        License_Information__c linc = new License_Information__c( name='Test20181204',
                                                LicenseType__c = '医疗器械经营许可证',
                                                BusinessLicense__c = '20180522',
                                                ValidFrom__c = date.newinstance(2018, 05, 22),
                                                ValidTo__c = date.newinstance(2088, 05, 22),
                                                Scope3__c = '6815',
                                                LicenseAndAccount__c = myAccount1.Id
                                                );
        insert linc;
        //update linc;
        
        //linc = [select Id,Name,ScopeKey__c from License_Information__c where BusinessLicense__c = '20180522'];
        //System.assertEquals('123',linc.ScopeKey__c);
        //产品注册证
        Product_Register__c prc = new Product_Register__c(Name = '国械注进20162220210',
                                                MedPrdClass__c = '2',
                                                ValidFrom__c = date.newinstance(2018, 07, 22),
                                                ValidTo__c = date.newinstance(2028, 07, 22),
                                                RegisterNoClass_Old__c = '314',
                                                RegisterNoClass_New__c = '314',
                                                RegisterNoStatus__c = '有效'
                                                );
        insert prc;

        //新旧关系对照表
        Product_Register_contrast__c prcc = new Product_Register_contrast__c(
                                                Name = 'Test20181204',
                                                Register_new__c = '314',
                                                Register_old__c = '36815'
                                                );
        insert prcc;
        //产品-产品注册证关系
        Product_Register_Link__c  prlc = new Product_Register_Link__c(
                                                Product2__c = product.Id,
                                                Product_Register__c = prc.Id
                                                ); 
        insert prlc;
         user MyUser_Test1 = New User(ContactId = core1.Id,
                                    Alias = 'newUser1',
                                    Email='newuser1@testorg.com',
                                    EmailEncodingKey='UTF-8', 
                                    LastName='TestUser1', 
                                    LanguageLocaleKey='zh_CN',
                                    LocaleSidKey='zh_CN',
                                    Province__c = '北京市',
                                    ProfileId = prof.Id,
                                    TimeZoneSidKey='Asia/Shanghai', 
                                    UserName='testUser1@testorg.com');
        // insert MyUser_Test1;

        OpportunityWebService.updReg(opp.Id);
        OpportunityWebService.oppCheck(opp.Id,'1');
        //测试阿西赛多方法check
        OpportunityWebService.checkDangerItem(acc1.Id);
        OpportunityWebService.judgeIsAssistantAppliedOutTime(opp.Estimation_No__c);

    }
	
}