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/LexArriveGsDetailsControllerTest.cls |  128 +-----------------------------------------
 1 files changed, 4 insertions(+), 124 deletions(-)

diff --git a/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls
index 68e894b..d93b59f 100644
--- a/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls
+++ b/force-app/main/default/classes/LexArriveGsDetailsControllerTest.cls
@@ -1,33 +1,20 @@
 @isTest
 public class LexArriveGsDetailsControllerTest {
     @IsTest
-<<<<<<< HEAD
     static void test1() {
-=======
-    static void test1(){
->>>>>>> LEXCommunityLiJun
         User myUser_test = new User();
         Account myAccount1;
         Account myAccount2;
         Contact core;
         User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
-<<<<<<< HEAD
         NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
         insert n;
         System.runAs(currentUser) {
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
             Product2 prod01 = new Product2(
                 Name = 'Test01',
                 ProductCode = 'Test01',
@@ -66,29 +53,6 @@
             );
             insert myUser_Test;
             System.runAs(MyUser_Test) {
-=======
-        NoteStay__c n = new NoteStay__c(Name = 'NoteStay',IsStay__c = true); 
-        insert n;
-        System.runAs(currentUser){
-            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '璨╁2搴�'];
-            if (rectCo.size() == 0) {
-                return;
-            }
-            Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
-            Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',Dealer_special_Object__c = true,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,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};
-            myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id);
-            insert myAccount2;
-            core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.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');
-            insert myUser_Test;
-            System.runAs(MyUser_Test){
->>>>>>> LEXCommunityLiJun
                 StaticParameter.ConsumableAssetHanderTrigger = true;
                 Consumable_order__c order1 = new Consumable_order__c();
                 order1.Name = 'OCM_01_001';
@@ -96,26 +60,16 @@
                 order1.Order_type__c = '璁㈠崟';
                 order1.Dealer_Info__c = myAccount2.Id;
                 order1.RecordTypeid = System.Label.RT_ConOrder_Arrive;
-<<<<<<< HEAD
                 insert order1;
 
-=======
-                insert  order1;
-    
->>>>>>> LEXCommunityLiJun
                 Consumable_order__c olyorder = new Consumable_order__c();
                 olyorder.Name = 'OCM_01_001';
                 olyorder.Order_status__c = '鎵瑰噯';
                 olyorder.Order_type__c = '璁㈠崟';
                 olyorder.Dealer_Info__c = myAccount2.Id;
                 olyorder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
-<<<<<<< HEAD
                 insert olyorder;
 
-=======
-                insert  olyorder;
-    
->>>>>>> LEXCommunityLiJun
                 //璁㈠崟鏄庣粏
                 Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
                 Orderdet1.Name = 'OCM_01_001001';
@@ -131,7 +85,6 @@
                 //Orderdet2.IsArrival__c = true;
                 Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
                 Orderdet2.Bar_Code__c = '22222';
-<<<<<<< HEAD
 
                 insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2 };
                 LexArriveGsDetailsController.init(order1.Id);
@@ -141,44 +94,25 @@
                     LexArriveGsDetailsController.consumableorderdetailsRecords.size(),
                     order1.Id
                 );
-=======
-    
-                insert new Consumable_order_details2__c[] {Orderdet1, Orderdet2};
-                LexArriveGsDetailsController.init(order1.Id);
-                LexArriveGsDetailsController.proSale(JSON.serialize(LexArriveGsDetailsController.coc), LexArriveGsDetailsController.coc.Arrive_Order__r.Total_num__c, LexArriveGsDetailsController.consumableorderdetailsRecords.size(), order1.Id);
->>>>>>> LEXCommunityLiJun
             }
         }
     }
 
     @IsTest
-<<<<<<< HEAD
     static void test2() {
-=======
-    static void test2(){
->>>>>>> LEXCommunityLiJun
         User myUser_test = new User();
         Account myAccount1;
         Account myAccount2;
         Contact core;
         User currentUser = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];
-<<<<<<< HEAD
         NoteStay__c n = new NoteStay__c(Name = 'NoteStay', IsStay__c = true);
         insert n;
         System.runAs(currentUser) {
-            List<RecordType> rectCo = [
-                SELECT Id
-                FROM RecordType
-                WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'
-            ];
+            List<RecordType> rectCo = [SELECT Id FROM RecordType WHERE IsActive = TRUE AND SobjectType = 'Account' AND Name = '璨╁2搴�'];
             if (rectCo.size() == 0) {
                 return;
             }
-            Profile prof = [
-                SELECT Id
-                FROM Profile
-                WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'
-            ];
+            Profile prof = [SELECT Id FROM Profile WHERE Name = '901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
             Product2 prod01 = new Product2(
                 Name = 'Test01',
                 ProductCode = 'Test01',
@@ -217,29 +151,6 @@
             );
             insert myUser_Test;
             System.runAs(MyUser_Test) {
-=======
-        NoteStay__c n = new NoteStay__c(Name = 'NoteStay',IsStay__c = true); 
-        insert n;
-        System.runAs(currentUser){
-            List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '璨╁2搴�'];
-            if (rectCo.size() == 0) {
-                return;
-            }
-            Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�(ET)'];
-            Product2 prod01 = new Product2(Name='Test01',ProductCode='Test01',Asset_Model_No__c = 'Test01',SFDA_Status__c = '鏈夊姽',Dealer_special_Object__c = true,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,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};
-            myAccount2 = new Account(name='Testaccount002',Dealer_discount__c =20,RecordTypeId = rectCo[0].Id);
-            insert myAccount2;
-            core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount2.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');
-            insert myUser_Test;
-            System.runAs(MyUser_Test){
->>>>>>> LEXCommunityLiJun
                 StaticParameter.ConsumableAssetHanderTrigger = true;
                 Consumable_order__c order1 = new Consumable_order__c();
                 order1.Name = 'OCM_01_001';
@@ -247,11 +158,7 @@
                 order1.Order_type__c = '璁㈠崟';
                 order1.RecordTypeid = System.Label.RT_ConOrder_Arrive;
                 order1.IsShipment__c = true;
-<<<<<<< HEAD
                 insert order1;
-=======
-                insert  order1;
->>>>>>> LEXCommunityLiJun
 
                 Consumable_order__c olyorder = new Consumable_order__c();
                 olyorder.Name = 'OCM_01_001';
@@ -260,7 +167,6 @@
                 olyorder.Dealer_Info__c = myAccount2.Id;
                 olyorder.RecordTypeid = System.Label.RT_ConOrder_Delivery;
                 olyorder.IsShipment__c = true;
-<<<<<<< HEAD
                 insert olyorder;
 
                 //璁㈠崟鏄庣粏
@@ -280,35 +186,9 @@
                 Orderdet2.Bar_Code__c = '22222';
 
                 insert new List<Consumable_order_details2__c>{ Orderdet1, Orderdet2 };
-=======
-                insert  olyorder;
-
-
-                //璁㈠崟鏄庣粏
-                Consumable_order_details2__c Orderdet1 = new Consumable_order_details2__c();
-                Orderdet1.Name = 'OCM_01_001001';
-                Orderdet1.Consumable_order_minor__c = olyorder.Id;
-                Orderdet1.Consumable_Arrived_order__c = order1.Id;
-                //Orderdet1.IsArrival__c = true;
-                Orderdet1.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
-                Orderdet1.Bar_Code__c = '11111';
-                Consumable_order_details2__c Orderdet2 = new Consumable_order_details2__c();
-                Orderdet2.Name = 'OCM_01_001002';
-                Orderdet2.Consumable_order_minor__c = olyorder.Id;
-                Orderdet2.Consumable_Arrived_order__c = order1.Id;
-                //Orderdet2.IsArrival__c = true;
-                Orderdet2.RecordTypeId = System.Label.RT_ConOrderDetail2_Delivery;
-                Orderdet2.Bar_Code__c = '22222';
-
-                insert new Consumable_order_details2__c[] {Orderdet1, Orderdet2};
->>>>>>> LEXCommunityLiJun
                 LexArriveGsDetailsController.init(order1.Id);
                 LexArriveGsDetailsController.proSale(JSON.serialize(LexArriveGsDetailsController.coc), 1, 1, order1.Id);
             }
         }
     }
-<<<<<<< HEAD
 }
-=======
-}
->>>>>>> LEXCommunityLiJun

--
Gitblit v1.9.1