From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新

---
 force-app/main/default/classes/LostCancelReportHandlerTest.cls |  361 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 219 insertions(+), 142 deletions(-)

diff --git a/force-app/main/default/classes/LostCancelReportHandlerTest.cls b/force-app/main/default/classes/LostCancelReportHandlerTest.cls
index c5c17b7..7677053 100644
--- a/force-app/main/default/classes/LostCancelReportHandlerTest.cls
+++ b/force-app/main/default/classes/LostCancelReportHandlerTest.cls
@@ -2,178 +2,255 @@
 private class LostCancelReportHandlerTest {
 
 
-	@isTest static void test_method_one() {
-		// recode type 銈掑彇寰�
-		List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
-		if (rectCo.size() == 0) {
-			throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
-		}
-		List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
-		if (rectSct.size() == 0) {
-			throw new ControllerUtil.myException('not found 鎴︾暐绉戝鍒嗛 recodetype');
-		}
-		List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('瑷虹檪绉� 娑堝寲绉�', '瑷虹檪绉� 鍛煎惛绉�') order by Name desc];
-		if (rectDpt.size() == 0) {
-			throw new ControllerUtil.myException('not found 瑷虹檪绉� recodetype');
-		}
-		List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc];
-		if (rectLost.size() == 0) {
-			throw new ControllerUtil.myException('not found Lost_cancel_report recodetype');
-		}
+    @isTest static void test_method_one() {
+        // recode type 銈掑彇寰�
+        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
+        if (rectCo.size() == 0) {
+            throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
+        }
+        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
+        if (rectSct.size() == 0) {
+            throw new ControllerUtil.myException('not found 鎴︾暐绉戝鍒嗛 recodetype');
+        }
+        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('瑷虹檪绉� 娑堝寲绉�', '瑷虹檪绉� 鍛煎惛绉�') order by Name desc];
+        if (rectDpt.size() == 0) {
+            throw new ControllerUtil.myException('not found 瑷虹檪绉� recodetype');
+        }
+        List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc];
+        if (rectLost.size() == 0) {
+            throw new ControllerUtil.myException('not found Lost_cancel_report recodetype');
+        }
 
-		// insert
-		Account company1 = new Account();
-		company1.RecordTypeId = rectCo[0].Id;
-		company1.Name         = '鐥呴櫌銉嗐偣銉�1';
-		insert company1;
+        // insert
+        Account company1 = new Account();
+        company1.RecordTypeId = rectCo[0].Id;
+        company1.Name         = '鐥呴櫌銉嗐偣銉�1';
+        insert company1;
 
-		List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c];
+        List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c];
 
-		Account depart1 = new Account();
-		depart1.RecordTypeId = rectDpt[0].Id;
-		depart1.Name         = '*';
-		depart1.Department_Name__c  = '瑷虹檪绉�1';
-		depart1.ParentId            = dc1s[0].Id;
-		depart1.Department_Class__c = dc1s[0].Id;
-		depart1.Hospital__c         = company1.Id;
-		insert depart1;
+        Account depart1 = new Account();
+        depart1.RecordTypeId = rectDpt[0].Id;
+        depart1.Name         = '*';
+        depart1.Department_Name__c  = '瑷虹檪绉�1';
+        depart1.ParentId            = dc1s[0].Id;
+        depart1.Department_Class__c = dc1s[0].Id;
+        depart1.Hospital__c         = company1.Id;
+        insert depart1;
 
-		// 鍟嗚珖
-		Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(),
-		                                   Hospital__c = company1.Id,
-		                                   Department_Class__c = dc1s[0].Id,
-		                                   AccountId = depart1.Id
-		                                   );
-		insert opp1;
+        // 鍟嗚珖
+        Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(),
+                                           Hospital__c = company1.Id,
+                                           Department_Class__c = dc1s[0].Id,
+                                           AccountId = depart1.Id
+                                           );
+        insert opp1;
 
-		// 澶卞崟
-		Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(
-			Opportunity__c = opp1.Id,
-			RecordTypeId = rectLost[0].Id
-			);
-		insert lcr1;
+        // 澶卞崟
+        Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(
+            Opportunity__c = opp1.Id,
+            RecordTypeId = rectLost[0].Id
+            );
+        insert lcr1;
 
-		//test
-		lcr1.Report_Status__c = '鎵瑰噯';
-		update lcr1;
+        // 20220720 ljh add start 
+        lcr1.Report_Status__c = '鐢宠涓�';
+        update lcr1;
+        // 20220720 ljh add edn
+        //test
+        lcr1.Report_Status__c = '鎵瑰噯';
+        update lcr1;
 
-		Opportunity opptest = [SELECT Id, Lost_Cancel_Report__c FROM Opportunity WHERE Id =: opp1.Id];
+        Opportunity opptest = [SELECT Id, Lost_Cancel_Report__c FROM Opportunity WHERE Id =: opp1.Id];
 
-		// System.assertEquals(lcr1.Id, opptest.Lost_Cancel_Report__c);
-	}
+        // System.assertEquals(lcr1.Id, opptest.Lost_Cancel_Report__c);
+    }
 
-	// add tcm 20211212 start
-	@isTest static void test_method_two() {
-		// recode type 銈掑彇寰�
-		List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
-		if (rectCo.size() == 0) {
-			throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
-		}
-		List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
-		if (rectSct.size() == 0) {
-			throw new ControllerUtil.myException('not found 鎴︾暐绉戝鍒嗛 recodetype');
-		}
-		List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('瑷虹檪绉� 娑堝寲绉�', '瑷虹檪绉� 鍛煎惛绉�') order by Name desc];
-		if (rectDpt.size() == 0) {
-			throw new ControllerUtil.myException('not found 瑷虹檪绉� recodetype');
-		}
-		List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc];
-		if (rectLost.size() == 0) {
-			throw new ControllerUtil.myException('not found Lost_cancel_report recodetype');
-		}
+    // add tcm 20211212 start
+    @isTest static void test_method_two() {
+        // recode type 銈掑彇寰�
+        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
+        if (rectCo.size() == 0) {
+            throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
+        }
+        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
+        if (rectSct.size() == 0) {
+            throw new ControllerUtil.myException('not found 鎴︾暐绉戝鍒嗛 recodetype');
+        }
+        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('瑷虹檪绉� 娑堝寲绉�', '瑷虹檪绉� 鍛煎惛绉�') order by Name desc];
+        if (rectDpt.size() == 0) {
+            throw new ControllerUtil.myException('not found 瑷虹檪绉� recodetype');
+        }
+        List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc];
+        if (rectLost.size() == 0) {
+            throw new ControllerUtil.myException('not found Lost_cancel_report recodetype');
+        }
 
-		// insert
-		Account company1 = new Account();
-		company1.RecordTypeId = rectCo[0].Id;
-		company1.Name = '鐥呴櫌銉嗐偣銉�1';
-		insert company1;
+        // insert
+        Account company1 = new Account();
+        company1.RecordTypeId = rectCo[0].Id;
+        company1.Name = '鐥呴櫌銉嗐偣銉�1';
+        insert company1;
 
-		List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c];
+        List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c];
 
-		Account depart1 = new Account();
-		depart1.RecordTypeId = rectDpt[0].Id;
-		depart1.Name = '*';
-		depart1.Department_Name__c  = '瑷虹檪绉�1';
-		depart1.ParentId= dc1s[0].Id;
-		depart1.Department_Class__c = dc1s[0].Id;
-		depart1.Hospital__c= company1.Id;
-		insert depart1;
+        Account depart1 = new Account();
+        depart1.RecordTypeId = rectDpt[0].Id;
+        depart1.Name = '*';
+        depart1.Department_Name__c  = '瑷虹檪绉�1';
+        depart1.ParentId= dc1s[0].Id;
+        depart1.Department_Class__c = dc1s[0].Id;
+        depart1.Hospital__c= company1.Id;
+        insert depart1;
 
-		Account depart2 = new Account();
-		depart2.RecordTypeId = rectDpt[0].Id;
-		depart2.Name = '*111';
-		depart2.Department_Name__c  = '瑷虹檪绉�2';
-		depart2.ParentId= dc1s[0].Id;
-		depart2.Department_Class__c = dc1s[0].Id;
-		depart2.Hospital__c= company1.Id;
-		insert depart2;
+        Account depart2 = new Account();
+        depart2.RecordTypeId = rectDpt[0].Id;
+        depart2.Name = '*111';
+        depart2.Department_Name__c  = '瑷虹檪绉�2';
+        depart2.ParentId= dc1s[0].Id;
+        depart2.Department_Class__c = dc1s[0].Id;
+        depart2.Hospital__c= company1.Id;
+        insert depart2;
 
-		// 璇环
-		Opportunity opp1 = new Opportunity(Name='opp1', StageName='oppName', CloseDate=Date.today(),Hospital__c = company1.Id,Department_Class__c = dc1s[0].Id,AccountId = depart1.Id);
-		insert opp1;
+        // 璇环
+        Opportunity opp1 = new Opportunity(Name='opp1', StageName='oppName', CloseDate=Date.today(),Hospital__c = company1.Id,Department_Class__c = dc1s[0].Id,AccountId = depart1.Id);
+        insert opp1;
 
-		// 澶卞崟
-		Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(Opportunity__c = opp1.Id,RecordTypeId = rectLost[0].Id);
-		insert lcr1;
+        // 澶卞崟
+        Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(Opportunity__c = opp1.Id,RecordTypeId = rectLost[0].Id);
+        insert lcr1;
 
 
-		//澶卞崟鍝佺墝1
-		PCLLostBrand__c pcllb1=new PCLLostBrand__c();
-		pcllb1.LostPrice__c=1332;
-		pcllb1.Lost_Reason_Sub__c='浠锋牸';   //鍘熷洜娆�
-		pcllb1.Lost_reason_main__c='浠锋牸';     //鍘熷洜涓�
-		pcllb1.Lost_By_Company__c='铔囩墝';       //鍝佺墝(涓�)
-		pcllb1.Agency__c=depart1.Id;            //缁忛攢鍟�
-		pcllb1.Lost_cancel_report__c=lcr1.Id;
+        //澶卞崟鍝佺墝1
+        PCLLostBrand__c pcllb1=new PCLLostBrand__c();
+        pcllb1.LostPrice__c=1332;
+        pcllb1.Lost_Reason_Sub__c='浠锋牸';   //鍘熷洜娆�
+        pcllb1.Lost_reason_main__c='浠锋牸';     //鍘熷洜涓�
+        pcllb1.Lost_By_Company__c='铔囩墝';       //鍝佺墝(涓�)
+        pcllb1.Agency__c=depart1.Id;            //缁忛攢鍟�
+        pcllb1.Lost_cancel_report__c=lcr1.Id;
 
-		//澶卞崟鍝佺墝2
-		PCLLostBrand__c pcllb2=pcllb1.clone();
-		pcllb2.Lost_By_Company__c='鍏朵粬';       //鍝佺墝(涓�)
-		pcllb2.Lost_By_Company_Mannual__c='澶卞崟鍝佺墝';   //鎵嬪姩鍝佺墝
+        //澶卞崟鍝佺墝2
+        PCLLostBrand__c pcllb2=pcllb1.clone();
+        pcllb2.Lost_By_Company__c='鍏朵粬';       //鍝佺墝(涓�)
+        pcllb2.Lost_By_Company_Mannual__c='澶卞崟鍝佺墝';   //鎵嬪姩鍝佺墝
         pcllb2.Agency__c=depart2.Id;            //缁忛攢鍟�
-		pcllb2.AgencyMannual__c='鎵嬪姩缁忛攢鍟�';
-		insert new List<PCLLostBrand__c> {pcllb1,pcllb2};
+        pcllb2.AgencyMannual__c='鎵嬪姩缁忛攢鍟�';
+        insert new List<PCLLostBrand__c> {pcllb1,pcllb2};
 
+       
+        // 浜у搧
+        Product2 pro1 = new Product2(Name='name01', Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP',Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n01',ProductCode_Ext__c='pc01',Manual_Entry__c=false);
+        Product2 pro2 = new Product2(Name='name02', Brand_Name__c='鍏朵粬',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false);
+        // Product2 pro3 = new Product2(Name='name03',Lost_By_Company__c='鍏朵粬',IsActive=true,Family='SP3',Fixture_Model_No__c='n03',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n03',ProductCode_Ext__c='pc03',Manual_Entry__c=false);
+         if(NFMUtil.isSandbox()){
+                pro1.RecordTypeId = '0129D000001NacD';
+                pro2.RecordTypeId = '0129D000001NacD';
+            } else {
+                pro1.RecordTypeId = '01210000000aMAE';
+                pro2.RecordTypeId = '01210000000aMAE';
+            }
 
-		// 浜у搧
-		Product2 pro1 = new Product2(Name='name01',	Brand_Name__c='铔囩墝',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP',Fixture_Model_No__c='n01',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n01',ProductCode_Ext__c='pc01',Manual_Entry__c=false);
-		Product2 pro2 = new Product2(Name='name02',	Brand_Name__c='鍏朵粬',Category5__c='绔炰簤瀵规墜',IsActive=true,Family='SP2',Fixture_Model_No__c='n02',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n02',ProductCode_Ext__c='pc02',Manual_Entry__c=false);
-		// Product2 pro3 = new Product2(Name='name03',Lost_By_Company__c='鍏朵粬',IsActive=true,Family='SP3',Fixture_Model_No__c='n03',Serial_Lot_No__c='S/N tracing',Fixture_Model_No_T__c = 'n03',ProductCode_Ext__c='pc03',Manual_Entry__c=false);
-		insert new List<Product2> {pro1,pro2};
+        insert new List<Product2> {pro1,pro2};
 
 
 
 
-		//澶卞崟鍨嬪彿
-		PCLLostProduct__c pcllp1=new PCLLostProduct__c();
-		pcllp1.Quantity__c=2;
-		pcllp1.LostBrandName__c='铔囩墝';
-		pcllp1.ProductClass__c='涓绘満';
-		pcllp1.ProductCategory__c='4K';
-		pcllp1.LostProduct__c=pro1.Id;     //浜у搧Id
-		pcllp1.LostProductMannual__c='澶卞崟瀵规墜鍨嬪彿锛堟墜鍔級';   //澶卞崟瀵规墜鍨嬪彿锛堟墜鍔級
-		pcllp1.PCLLostBrand__c=pcllb1.Id;     //璇环澶卞崟鍝佺墝
+        //澶卞崟鍨嬪彿
+        PCLLostProduct__c pcllp1=new PCLLostProduct__c();
+        pcllp1.Quantity__c=2;
+        pcllp1.LostBrandName__c='铔囩墝';
+        pcllp1.ProductClass__c='涓绘満';
+        pcllp1.ProductCategory__c='4K';
+        pcllp1.LostProduct__c=pro1.Id;     //浜у搧Id
+        pcllp1.LostProductMannual__c='澶卞崟瀵规墜鍨嬪彿锛堟墜鍔級';   //澶卞崟瀵规墜鍨嬪彿锛堟墜鍔級
+        pcllp1.PCLLostBrand__c=pcllb1.Id;     //璇环澶卞崟鍝佺墝
 
-		PCLLostProduct__c pcllp2=pcllp1.clone();
-		pcllp2.LostBrandName__c='鍏朵粬';
-		pcllp2.ProductClass__c='涓绘満';
-		pcllp2.ProductCategory__c='4K';
-		pcllp2.LostProduct__c=pro2.Id;     //浜у搧Id
-		pcllp2.PCLLostBrand__c=pcllb2.Id;     //璇环澶卞崟鍝佺墝
+        PCLLostProduct__c pcllp2=pcllp1.clone();
+        pcllp2.LostBrandName__c='鍏朵粬';
+        pcllp2.ProductClass__c='涓绘満';
+        pcllp2.ProductCategory__c='4K';
+        pcllp2.LostProduct__c=pro2.Id;     //浜у搧Id
+        pcllp2.PCLLostBrand__c=pcllb2.Id;     //璇环澶卞崟鍝佺墝
 
-		// PCLLostProduct__c pcllp3=pcllp1.clone();
-		// pcllp3.LostBrandName__c='鍏朵粬';
-		// pcllp3.LostProduct__c=pro3.Id;     //浜у搧Id
-		// pcllp3.PCLLostBrand__c=pcllb2.Id;     //璇环澶卞崟鍝佺墝
+        // PCLLostProduct__c pcllp3=pcllp1.clone();
+        // pcllp3.LostBrandName__c='鍏朵粬';
+        // pcllp3.LostProduct__c=pro3.Id;     //浜у搧Id
+        // pcllp3.PCLLostBrand__c=pcllb2.Id;     //璇环澶卞崟鍝佺墝
 
-		insert new List<PCLLostProduct__c> {pcllp1,pcllp2};
+        insert new List<PCLLostProduct__c> {pcllp1,pcllp2};
 
 
-		//test
-		lcr1.Report_Status__c = '鎵瑰噯';
-		update lcr1;
+        //test
+        lcr1.Report_Status__c = '鎵瑰噯';
+        update lcr1;
 
-	}
-	// add tcm 20211212 end
+    }
+    // add tcm 20211212 end
+    // 20221206 ljh start
+    @isTest static void test_method_three() {
+        // recode type 銈掑彇寰�
+        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
+        if (rectCo.size() == 0) {
+            throw new ControllerUtil.myException('not found 鐥呴櫌 recodetype');
+        }
+        List<RecordType> rectSct = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
+        if (rectSct.size() == 0) {
+            throw new ControllerUtil.myException('not found 鎴︾暐绉戝鍒嗛 recodetype');
+        }
+        List<RecordType> rectDpt = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Account' and Name IN ('瑷虹檪绉� 娑堝寲绉�', '瑷虹檪绉� 鍛煎惛绉�') order by Name desc];
+        if (rectDpt.size() == 0) {
+            throw new ControllerUtil.myException('not found 瑷虹檪绉� recodetype');
+        }
+        List<RecordType> rectLost = [select Id, Name from RecordType where IsActive = true and SobjectType = 'Lost_cancel_report__c' and DeveloperName IN ('PCL_Lost_report', 'PCL_Cancel_report') order by DeveloperName desc];
+        if (rectLost.size() == 0) {
+            throw new ControllerUtil.myException('not found Lost_cancel_report recodetype');
+        }
+
+        // insert
+        Account company1 = new Account();
+        company1.RecordTypeId = rectCo[0].Id;
+        company1.Name         = '鐥呴櫌銉嗐偣銉�1';
+        insert company1;
+
+        List<Account> dc1s = [Select Id, Name, Department_Class_Label__c, Sys_Dept_Name_Change_Chk__c from Account where Parent.Id = : company1.Id order by Department_Class_Label__c];
+
+        Account depart1 = new Account();
+        depart1.RecordTypeId = rectDpt[0].Id;
+        depart1.Name         = '*';
+        depart1.Department_Name__c  = '瑷虹檪绉�1';
+        depart1.ParentId            = dc1s[0].Id;
+        depart1.Department_Class__c = dc1s[0].Id;
+        depart1.Hospital__c         = company1.Id;
+        insert depart1;
+
+        // 鍟嗚珖
+        Opportunity opp1 = new Opportunity(Name='aiueo', StageName='contact', CloseDate=Date.today(),
+                                           Hospital__c = company1.Id,
+                                           Department_Class__c = dc1s[0].Id,
+                                           AccountId = depart1.Id
+                                           );
+        insert opp1;
+
+        // 澶卞崟
+        Lost_cancel_report__c lcr1 = new Lost_cancel_report__c(
+            Opportunity__c = opp1.Id,
+            RecordTypeId = rectLost[0].Id
+            );
+        insert lcr1;
+
+        // 20220720 ljh add start 
+        lcr1.Report_Status__c = '鐢宠涓�';
+        update lcr1;
+        // 20220720 ljh add edn
+        //test
+        lcr1.Report_Status__c = '鎵瑰噯';
+        update lcr1;
+
+        Opportunity opptest = [SELECT Id, Lost_Cancel_Report__c FROM Opportunity WHERE Id =: opp1.Id];
+        delete lcr1;
+        // System.assertEquals(lcr1.Id, opptest.Lost_Cancel_Report__c);
+    }
+    // 20221206 ljh start
 
 }
\ No newline at end of file

--
Gitblit v1.9.1