From bfca7a84bec815da594f1d12558535ed06d2490b Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 13 九月 2022 09:57:32 +0800
Subject: [PATCH] 本地提交备份
---
force-app/main/default/classes/NFM608Rest.cls | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/NFM608Rest.cls b/force-app/main/default/classes/NFM608Rest.cls
index 35afcaa..80d9d65 100644
--- a/force-app/main/default/classes/NFM608Rest.cls
+++ b/force-app/main/default/classes/NFM608Rest.cls
@@ -54,6 +54,20 @@
main(rowData_Id);
}
global static void main(String rowData_Id) {
+
+ 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 = 'Event__c')
+ ];
+ for (BatchIF_Transfer__c t : transferList) {
+ transferMap.put(t.Column__c + t.External_value__c, t.Internal_value__c);
+ }
+
BatchIF_Log__c rowData = [Select Id, Name, Log__c, ErrorLog__c, Log2__c, Log3__c, Log4__c, Log5__c, Log6__c, Log7__c, Log8__c, Log9__c, Log10__c, Log11__c, Log12__c, MessageGroupNumber__c, retry_cnt__c from BatchIF_Log__c where RowDataFlg__c = true and Id =: rowData_Id];
String logstr = rowData.MessageGroupNumber__c + ' start\n';
BatchIF_Log__c iflog = new BatchIF_Log__c();
@@ -109,12 +123,13 @@
}
}
- Event__c report = new Event__c();
+ Event__c report = new Event__c();//鎶ュ憡涓�瑙�
report.ServicePlatformCode__c = ged.replyID;//AWS娲诲姩缂栫爜
report.Account_ID__c = departmentAccount.Id;//绉戝
report.whatid__c = departmentAccount.Id;
// report.VisitType__c = ged.visitInfo;//浠诲姟绫诲瀷
report.Visitor1_ID__c = contactId; //瑷晱鑰�1
+ report.Visitor1__c = contactId;
report.StartDateTime__c = NFMUtil.parseStr2DateTime(ged.visitStartDate);//寮�濮嬫椂闂�
report.ActivityDate__c = NFMUtil.parseDateTimeStr2Date(ged.visitStartDate);//娲诲姩鏃ユ湡
report.EndDateTime__c = NFMUtil.parseStr2DateTime(ged.visitEndDate);//缁撴潫鏃堕棿
@@ -123,8 +138,11 @@
report.Location__c = departmentAccount.Name; //浣嶇疆
report.Activity_Type2__c = strType;//鎷滆鍖哄垎
- // report.Activity_PurposeEscFSE__c = ged.visitPurpose;//鎷滆鐩殑
- // report.Purpose_TypeFSE__c = ged.activityDifferentiation;//娲诲姩鍖哄垎
+ //report.Activity_PurposeEscFSE__c = ged.visitPurpose;//鎷滆鐩殑
+ //report.Activity_PurposeFSE__c = ged.visitPurpose;//鎷滆鐩殑
+ //report.Purpose_TypeFSE__c = ged.activityDifferentiation;//娲诲姩鍖哄垎
+ report.Activity_PurposeFSE__c = NFMUtil.getMapValue(transferMap, 'Activity_PurposeFSE__c', string.valueof(ged.visitPurpose), iflog);
+ report.Purpose_TypeFSE__c = NFMUtil.getMapValue(transferMap, 'Purpose_TypeFSE__c', string.valueof(ged.activityDifferentiation), iflog);
report.Daily_Report__c = drc.Id;//鏃ユ姤
insert report;
logstr += '鎶ュ憡涓�瑙� [ '+ged.replyID+' ] 淇濆瓨鎴愬姛锛乗n';
--
Gitblit v1.9.1