From fd9df05c48c09b4d7f39a3b401882bda226dedea Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 31 十月 2023 20:38:18 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/OPDPlanHandlerTest.cls | 74 ++++++++++++++++++++++++++++++++++---
1 files changed, 68 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/OPDPlanHandlerTest.cls b/force-app/main/default/classes/OPDPlanHandlerTest.cls
index d1d7dfd..adca66f 100644
--- a/force-app/main/default/classes/OPDPlanHandlerTest.cls
+++ b/force-app/main/default/classes/OPDPlanHandlerTest.cls
@@ -107,17 +107,31 @@
// 2020/10/29 mzy 鎺ㄥ箍缁忕悊璧嬪�� SFDC-BUF6LN add start
static testMethod void updateMngTest() {
// OPDPlanHandler.test();
- OPDPlan__c OPDPlan01 = new OPDPlan__c();
- OPDPlan01.Status__c = '鎻愪氦';
- OPDPlan01.NoOpp_Reason__c= 'HCP瀵瑰簲';
- OPDPlan01.OPDType__c = '浜嬩欢';
- insert OPDPlan01;
+ // OPDPlan__c OPDPlan01 = new OPDPlan__c();
+ // OPDPlan01.Status__c = '鎻愪氦';
+ // OPDPlan01.NoOpp_Reason__c= 'HCP瀵瑰簲';
+ // OPDPlan01.OPDType__c = '浜嬩欢';
+ // insert OPDPlan01;
+
+ //鐢ㄦ埛
+ // Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
+ // User hpOwner = new User(Test_staff__c = true, LastName = 'hp1', FirstName = 'owner', Alias = 'hp', Work_Location__c = '鍖椾含', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
+ // insert hpOwner;
+ // User hpOwner2 = new User(Test_staff__c = true, LastName = 'hp21', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '閲嶅簡', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
+ // insert hpOwner2;
OPDPlan__c OPDPlan02 = new OPDPlan__c();
OPDPlan02.Status__c = '鑽夋涓�';
OPDPlan02.NoOpp_Reason__c= 'HCP瀵瑰簲';
OPDPlan02.OPDType__c = '璇环';
+ oPDPlan02.noReportStatus__c = '宸蹭繚瀛�';
+ // oPDPlan02.SalesManager__c = hpOwner.id;
+ // oPDPlan02.BuchangApprovalManagerSales__c = hpOwner2.id;
insert OPDPlan02;
+ OPDPlan02.Status__c = '鎻愪氦';
+ oPDPlan02.noReportStatus__c = '鎻愪氦';
+ // update OPDPlan02;
+
/**
OPDPlan__c OPDPlan03 = new OPDPlan__c();
OPDPlan03.id = OPDPlan02.id;
@@ -356,6 +370,7 @@
oPDPlan4.OPD_Customers_Target__c =anot1.id;
oPDPlan4.PlanProdDetail__c ='CV-290*4; GI-290闀滃瓙*1; GI-290闀滃瓙CF*1;';
oPDPlan4.OPDType__c = '瀛︿細';
+ oPDPlan4.AttachmentCertificate__c = '0001.png';
insert oPDPlan4;
//鍙栨秷
@@ -363,7 +378,7 @@
tempCancelPostponePlan.Status__c = '鍙栨秷鎴愬姛';
tempCancelPostponePlan.CancelOPDPlan__c = oPDPlan4.Id;
tempCancelPostponePlan.RecordTypeId = '01210000000gQyL';
- tempCancelPostponePlan.cancelReasonCombobox__c = '鏃犲鍝�';
+ tempCancelPostponePlan.cancelReasonCombobox__c = '澶囧搧涓嶈冻';
insert tempCancelPostponePlan;
@@ -388,8 +403,32 @@
oPDPlan5.OPD_Customers_Target__c =anot1.id;
oPDPlan5.PlanProdDetail__c ='CV-290*4; GI-290闀滃瓙*1; GI-290闀滃瓙CF*1;';
oPDPlan5.OriginalOpdPlan__c = oPDPlan4.Id;
+
+ // oPDPlan5.OriginalOpdPlan__c = 'a3E10000000S7pdEAC';
oPDPlan5.OPDType__c = '瀛︿細';
+
+
+ ContentVersion version = new ContentVersion(
+ Title = 'A-65224941-20200923--1.docx',
+ VersionData = EncodingUtil.base64Decode('test'),
+ ContentLocation = 's',
+ PathOnClient = 'test.txt'
+ );
+ insert version;
+ version = [select ContentDocumentId from ContentVersion where Id =: version.Id];
+ ContentDocumentLink link = new ContentDocumentLink();
+ link.ContentDocumentId = version.ContentDocumentId;
+ link.LinkedEntityId = oPDPlan4.Id;
+ link.ShareType = 'V';
+ link.Visibility = 'AllUsers';
+ insert link;
+
+
+
+
insert oPDPlan5;
+
+ // OriginalOpdPlan__c = 'a3E10000000S7pdEAC';
@@ -484,6 +523,7 @@
insert insertTarget;
OPDPlan__C opd = [SELECT Id,OPDPlan_ImplementDate__c FROM OPDPlan__C WHERE id =: oPDPlan0.Id];
+
opd.OPDPlan_ImplementDate__c = opd.OPDPlan_ImplementDate__c.addDays(5);
@@ -493,9 +533,31 @@
update opd;
+
+
oPDPlan0.Status__c = '瀹屾瘯';
update oPDPlan0;
+
+
+ // OPDPlan__c oPDPlanTestDoc = new OPDPlan__c();
+ // oPDPlanTestDoc.Status__c = '瀹℃壒涓�';
+ // oPDPlanTestDoc.OPDType__c = '浜嬩欢';
+ // oPDPlanTestDoc.PlanProdDetail__c ='CV-290*4; GI-290闀滃瓙*1; GI-290闀滃瓙CF*1;';
+ // oPDPlanTestDoc.Account_Laboratory__c =dep.Id;
+ // oPDPlanTestDoc.OPDPlan_ImplementDate__c = Date.today();
+ // oPDPlanTestDoc.OPDPlan_ImplementDate_temp__c = Date.today();
+ // oPDPlanTestDoc.NoOpp_Reason__c = 'HCP瀵瑰簲';
+ // oPDPlanTestDoc.RentalReson__c = '鏃犳硶杩涘叆鎵嬫湳瀹�';
+ // oPDPlanTestDoc.AttachmentCertificate__c = '0001.png';
+ // oPDPlanTestDoc.Task_ID__c = task.Id;
+ // oPDPlanTestDoc.OriginalOpdPlan__c = 'a3E10000000S7pdEAC';
+ // insert oPDPlanTestDoc;
+
+
+
+
+
}
//2021-06-26 mzy end
--
Gitblit v1.9.1