From e6068da47c1bef5517c9e5fdc8c726766867ad4e Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 15:10:02 +0800
Subject: [PATCH] Merge branch 'master' into LEXUpgrade2023-Deloitte

---
 force-app/main/default/classes/LexConInvoiceListTest.cls |  123 ++---------------------------------------
 1 files changed, 6 insertions(+), 117 deletions(-)

diff --git a/force-app/main/default/classes/LexConInvoiceListTest.cls b/force-app/main/default/classes/LexConInvoiceListTest.cls
index fb24ad3..f5f383c 100644
--- a/force-app/main/default/classes/LexConInvoiceListTest.cls
+++ b/force-app/main/default/classes/LexConInvoiceListTest.cls
@@ -1,5 +1,4 @@
 @isTest
-<<<<<<< HEAD
 private class LexConInvoiceListTest {
     static testMethod void conInvoiceListTestinit() {
         user myUser_test;
@@ -7,24 +6,12 @@
         Account myAccount1;
         User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
         System.runAs(thisUser) {
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            List<RecordType> rectHos = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-            ];
+            List<RecordType> rectHos = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
             if (rectHos.size() == 0) {
                 return;
             }
@@ -96,24 +83,12 @@
         Account myAccount1;
         User thisUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
         System.runAs(thisUser) {
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            List<RecordType> rectHos = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'
-            ];
+            List<RecordType> rectHos = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '鐥呴櫌'];
             if (rectHos.size() == 0) {
                 return;
             }
@@ -183,89 +158,3 @@
         }
     }
 }
-=======
-private class LexConInvoiceListTest
-{
-    static testMethod void conInvoiceListTestinit(){
-        user myUser_test;
-        Account myAccount2;
-        Account myAccount1;
-        User thisUser = [ select Id from User where Id = :UserInfo.getUserId()];
-        system.runAs(thisUser){
-            Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
-            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '璨╁2搴�'];
-            if (rectCo.size() == 0) {
-                return;
-            }
-            List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
-            if (rectHos.size() == 0) {
-                return;
-            }
-            myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
-            myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
-            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){
-            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Invoice_Date__c=Date.today(),Dealer_info__c=myAccount1.Id,Invoice_status__c='鑽夋涓�',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='鍙戠エ',recordtypeid = System.Label.RT_ConOrder_Invoice,Order_ProType__c = 'ET');
-            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Invoice_Date__c=Date.today(),Dealer_info__c=myAccount1.Id,Invoice_status__c='鎻愪氦',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='鍙戠エ',recordtypeid = System.Label.RT_ConOrder_Invoice,Order_ProType__c = 'ET');
-            insert new Consumable_order__c[]{TestList1,TestList2};
-            LexConInvoiceList.init();
-            // ConInvoiceListController CDC = new ConInvoiceListController();
-            // CDC.init();
-            // System.assertEquals('Test1', CDC.raesList[0].name);
-            // System.assertEquals('Test2', CDC.raesList[1].name);
-            // CDC.SortLimited();
-            // System.assertEquals('Test1', CDC.raesList[0].name);
-            // System.assertEquals('Test2', CDC.raesList[1].name);
-        }
-    }
-    //妫�绱�
-    static testMethod void invoiceCodeSearchTest(){
-        user myUser_test;
-        Account myAccount2;
-        Account myAccount1;
-        User thisUser = [ select Id from User where Id = :UserInfo.getUserId()];
-        system.runAs(thisUser){
-            Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
-            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '璨╁2搴�'];
-            if (rectCo.size() == 0) {
-                return;
-            }
-            List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
-            if (rectHos.size() == 0) {
-                return;
-            }
-            myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
-            myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
-            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){
-            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Invoice_Date__c=Date.today(),Dealer_info__c=myAccount1.Id,Invoice_status__c='鑽夋涓�',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='鍙戠エ',recordtypeid = System.Label.RT_ConOrder_Invoice,Order_ProType__c = 'ET');
-            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Invoice_Date__c=Date.today(),Dealer_info__c=myAccount1.Id,Invoice_status__c='鎻愪氦',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='鐩存帴閿�鍞粰鍖婚櫌',Order_status__c='鑽夋涓�',Order_type__c='鍙戠エ',recordtypeid = System.Label.RT_ConOrder_Invoice,Order_ProType__c = 'ET');
-            insert new Consumable_order__c[]{TestList1,TestList2};
-            LexConInvoiceList CDC = new LexConInvoiceList();
-            LexConInvoiceList.init();
-            LexConInvoiceList.invoiceCodeSearch(Date.today(),Date.today(),'鎻愪氦','test','test1','0010l00001ajxZ2AAI','鍖椾含','ET');
-            // CDC.init();
-            // System.assertEquals('Test1', CDC.raesList[0].name);
-            // System.assertEquals('Test2', CDC.raesList[1].name);
-            // CDC.coc.Invoice_status__c = '鎻愪氦';
-            // CDC.invoiceCodeSearch();
-            // System.assertEquals(1, CDC.raesList.size());
-            // CDC.clearUp();
-            // System.assertEquals(2, CDC.raesList.size());
-        }
-    }
-}
->>>>>>> LEXCommunityLiJun

--
Gitblit v1.9.1