From 0e43bab9d421948c61ca0f79b763942ba9e724a6 Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期三, 30 十一月 2022 16:47:51 +0800
Subject: [PATCH] 有些是集采的有些不是是这些文件
---
force-app/main/default/classes/TenderInformationHandlerTest.cls | 80 +++++++++++++++++++++++----------------
1 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/force-app/main/default/classes/TenderInformationHandlerTest.cls b/force-app/main/default/classes/TenderInformationHandlerTest.cls
index 51aff5c..754c58c 100644
--- a/force-app/main/default/classes/TenderInformationHandlerTest.cls
+++ b/force-app/main/default/classes/TenderInformationHandlerTest.cls
@@ -6,6 +6,8 @@
StaticParameter.EscapeOtherUpdateTenOwner = false;
Profile p = [select id from Profile where id = :System.Label.ProfileId_SystemAdmin];
String loginId = UserInfo.getUserId();
+ User thisUser= [select Id from User where Id=:UserInfo.getUserId()];
+System.runAs (thisUser){
User sys = [select id from User where Id = :loginId];
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
User u1 = new User(Test_staff__c = true);
@@ -24,6 +26,7 @@
u1.ProfileId = p.id;
u1.Job_Category__c = '閿�鍞湇鍔�';
u1.Province__c = '鏉变含';
+ u1.Employee_No__c = '0001';//20220426 ljh add
insert u1;
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
User u2 = new User(Test_staff__c = true);
@@ -43,6 +46,7 @@
u2.Job_Category__c = '閿�鍞帹骞�';
u2.Province__c = '鏉变含';
u2.IsActive = true;
+ u2.Employee_No__c = '0002';//20220426 ljh add
insert u2;
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
User u3 = new User(Test_staff__c = true);
@@ -62,6 +66,7 @@
u3.Job_Category__c = '閿�鍞帹骞�';
u3.Province__c = '鏉变含';
u3.IsActive = true;
+ u3.Employee_No__c = '0003';//20220426 ljh add
insert u3;
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
User u4 = new User(Test_staff__c = true);
@@ -81,35 +86,37 @@
u4.Job_Category__c = '閿�鍞帹骞�';
u4.Province__c = '鏉变含';
u4.IsActive = true;
+ u4.Employee_No__c = '0004';//20220426 ljh add
insert u4;
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
- User u5 = new User(Test_staff__c = true);
- u5.LastName = 'test00001';
- u5.FirstName = 'qbcuy';
- u5.Batch_User__c = true;
- u5.Alias = '12cs';
- u5.Email = 'olympusT221cd04@sunbridge.com';
- u5.Username = 'olymp11est3221@sunbridge.com';
- u5.CommunityNickname = 'fewfa';
- u5.IsActive = true;
- u5.EmailEncodingKey = 'ISO-2022-JP';
- u5.TimeZoneSidKey = 'Asia/Tokyo';
- u5.LocaleSidKey = 'ja_JP';
- u5.LanguageLocaleKey = 'ja';
- u5.ProfileId = p.id;
- u5.Job_Category__c = '閿�鍞帹骞�';
- u5.Province__c = '鏉变含';
- u5.IsActive = true;
- insert u5;
+ // User u5 = new User(Test_staff__c = true);
+ // u5.LastName = 'test00001';
+ // u5.FirstName = 'qbcuy';
+ // u5.Batch_User__c = true;
+ // u5.Alias = '12cs';
+ // u5.Email = 'olympusT221cd04@sunbridge.com';
+ // u5.Username = 'olymp11est3221@sunbridge.com';
+ // u5.CommunityNickname = 'fewfa';
+ // u5.IsActive = true;
+ // u5.EmailEncodingKey = 'ISO-2022-JP';
+ // u5.TimeZoneSidKey = 'Asia/Tokyo';
+ // u5.LocaleSidKey = 'ja_JP';
+ // u5.LanguageLocaleKey = 'ja';
+ // u5.ProfileId = p.id;
+ // u5.Job_Category__c = '閿�鍞帹骞�';
+ // u5.Province__c = '鏉变含';
+ // u5.IsActive = true;
+ // u5.Employee_No__c = '0005'; //20220426 ljh add
+ // insert u5;
// StaticParameter.EscapeOpportunityBefUpdTrigger = true;
- // OCM_Management_Province__c mp1 = new OCM_Management_Province__c();
- // mp1.Name = '鍖椾含';
- // mp1.GI_assistant__c = u1.Id;
- // mp1.SP_assistant__c = u2.Id;
- // mp1.Window2__c = u3.Id;
- // mp1.Admin_assistant3__c = u4.Id;
- // insert mp1;
+ OCM_Management_Province__c mp1 = new OCM_Management_Province__c();
+ mp1.Name = '鍖椾含';
+ mp1.GI_assistant__c = u1.Id;
+ mp1.SP_assistant__c = u2.Id;
+ mp1.Window2__c = u3.Id;
+ mp1.Admin_assistant3__c = u4.Id;
+ insert mp1;
// RecordType rt1 = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鐥呴櫌'];
// Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
// RecordType rt2 = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '鎴︾暐绉戝鍒嗛 鍛煎惛绉�'];
@@ -186,6 +193,7 @@
System.runAs(u1) {
info.OwnerId = u1.Id;
info.Name = 'TEST001';
+ info.InfoTitle__c = 'TEST001';
info.AreaProvince__c = '鍖椾含';
info.Hospital__c = hospital.Id;
info.IsBid__c = '鍚�';
@@ -197,17 +205,20 @@
info.YingyeWindow__c = u2.Id;
info.SP_assistant__c = u2.Id;
info.GI_assistant__c = u2.Id;
+ info.ResultDate__c=Date.today();
+ info.subInfoType__c='1-1锛氭剰瑙佸緛闆�';
info.department_selection__c = '01210000000QemLAAS';
if(!NFMUtil.isSandbox()){
info.RecordTypeId = '01210000000VLZ8';
} else {
- info.RecordTypeId = '0121m000000bKzA';
+ info.RecordTypeId = '01210000000VLZ8';
}
insert info;
info2.OwnerId = u1.Id;
info2.Name = 'TEST002';
+ info2.InfoTitle__c = 'TEST002';
info2.AreaProvince__c = '鍖椾含';
info2.Hospital__c = hospital.Id;
info2.IsBid__c = '鍚�';
@@ -219,7 +230,9 @@
info2.YingyeWindow__c = u2.Id;
info2.SP_assistant__c = u2.Id;
info2.GI_assistant__c = u2.Id;
- insert info2;
+ info2.ResultDate__c=Date.today();
+ info2.subInfoType__c='1-1锛氭剰瑙佸緛闆�';
+ // insert info2;
Tender_Opportunity_Link__c BlinksList = new Tender_Opportunity_Link__c();
BlinksList.Opportunity__c = opp.Id;
@@ -228,12 +241,12 @@
BlinksList.IsRelated__c = false;
insert BlinksList;
- Tender_Opportunity_Link__c BlinksList2 = new Tender_Opportunity_Link__c();
- BlinksList2.Opportunity__c = opp.Id;
- BlinksList2.CurrencyIsoCode = 'CNY';
- BlinksList2.Tender_information__c = info2.Id;
- BlinksList2.IsRelated__c = false;
- insert BlinksList2;
+ // Tender_Opportunity_Link__c BlinksList2 = new Tender_Opportunity_Link__c();
+ // BlinksList2.Opportunity__c = opp.Id;
+ // BlinksList2.CurrencyIsoCode = 'CNY';
+ // // BlinksList2.Tender_information__c = info2.Id;
+ // BlinksList2.IsRelated__c = false;
+ // insert BlinksList2;
List<Tender_information__c> clist = [select id, department_category__c from Tender_information__c ];
info.InfoType__c = '2锛氬叕鍛�';
@@ -243,4 +256,5 @@
Test.stopTest();
}
+}
}
\ No newline at end of file
--
Gitblit v1.9.1