From 1312ba82d4c880bdb5357d28e0d4af5b285f610f Mon Sep 17 00:00:00 2001 From: 高章伟 <gaozhangwei@prec-tech.com> Date: 星期四, 10 三月 2022 15:54:39 +0800 Subject: [PATCH] 最近一月修改内容 --- force-app/main/default/classes/NFM703Controller.cls | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 49 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/NFM703Controller.cls b/force-app/main/default/classes/NFM703Controller.cls index e7a9490..ecadff5 100644 --- a/force-app/main/default/classes/NFM703Controller.cls +++ b/force-app/main/default/classes/NFM703Controller.cls @@ -1,3 +1,8 @@ +/********************************************************************** + * @msg: + * 1.涓婁紶OBPM鐨勬暟鎹噷闇�瑕佸寘鍚敵璇蜂汉鍜屽叾浠栧叡鏈夋潈闄愮殑浜猴紝浣嗕笉闇�瑕佸尯鍒� + * 2.浼犺緭鏃朵娇鐢ㄥ憳宸ョ紪鍙凤紝澶氫汉鏃剁敤閫楀彿鍒嗛殧 +*************************************************************************/ public without sharing class NFM703Controller { private static final String LOG_TYPE = 'NFM703'; @@ -40,6 +45,7 @@ public String WorkshopPlace; //浼氬満鍦扮偣=WorkshopPlace__c public String HostName; //浼氳涓诲姙鏂�=HostName__c public String CooperatorCompany; //浼氳鎵垮姙鏂�=cooperatorCompany__c + public String SharedEditing; // 鐢宠浜�+鍏卞悓缂栬緫浜�=Shared_Editing__c } @future(callout = true) public static void callout(String iflog_Id, List < String > camIdList) { @@ -75,7 +81,10 @@ Expected_Hcp_Attendance__c, Activity_Type_Name__c, HostName__c, - cooperatorCompany__c, + cooperatorCompany__c, + Owner.Employee_No__c, + Shared_Editing__c, + Carbon_Copy__c, IF_Approved__c from Campaign where id in: camIdList]; String logstr = ' ' + 'NumberOfRecord=' + camList.size() + '\n'; @@ -90,6 +99,19 @@ mon.TransmissionDateTime = nowStr; mon.Text = ''; + Map<String, String> transferMap = new Map<String, String>(); + List<BatchIF_Transfer__c> transferList = [select Table__c, + Column__c, + External_value__c, + Internal_value__c + from BatchIF_Transfer__c + where Dropped_Flag__c = false + and (Table__c = 'Application_for_Conference_Adjudication__c') + ]; + for (BatchIF_Transfer__c t : transferList) { + transferMap.put(t.Column__c + t.Internal_value__c, t.External_value__c); + } + try { for (Campaign cam : camList) { @@ -100,7 +122,7 @@ ged.StartDate = NFMUtil.formatDate2StrSpo(cam.StartDate); ged.EndDate = NFMUtil.formatDate2StrSpo(cam.EndDate); ged.BudgetType = cam.Budget_Type__c; - ged.OfficeCategory = cam.OfficeCategory__c; + ged.OfficeCategory = NFMUtil.getMapValue(transferMap, 'OfficeCategory__c', cam.OfficeCategory__c, iflog); ged.MeetingType = cam.Meeting_Type__c; ged.ActivityTypeName = cam.Activity_Type_Name__c; ged.StateMaster = cam.State_Master__r.Name; @@ -110,6 +132,8 @@ ged.CooperatorCompany = cam.cooperatorCompany__c; ged.ExpectedOlympusAttendance = String.valueOf(cam.Expected_Olympus_Attendance__c); ged.ExpectedHcpAttendance = String.valueOf(cam.Expected_Hcp_Attendance__c); + // 鏆傛椂瀹氫箟涓轰富鎷呭綋锛屽悗缁坊鍔犲叾浠栧叡浜汉 + ged.SharedEditing = Modify_Sharing(cam.Owner.Employee_No__c, cam.Shared_Editing__c, cam.Carbon_Copy__c); gds.GeData.add(ged); } @@ -222,4 +246,27 @@ upsert rowDataSFDC; } + + public static String Modify_Sharing(String owner, String shared_editors, String carbon_copies) { + if (String.isBlank(owner) && String.isBlank(shared_editors) && String.isBlank(carbon_copies)) { + return ''; + } + String ret = ''; + if (String.isNotBlank(owner)) { + ret = owner; + } + if (String.isNotBlank(shared_editors)) { + if (ret.length() > 0) { + ret = ret + ','; + } + ret = ret + shared_editors; + } + if (String.isNotBlank(carbon_copies)) { + if (ret.length() > 0) { + ret = ret + ','; + } + ret = ret + carbon_copies; + } + return ret; + } } \ No newline at end of file -- Gitblit v1.9.1