From 9b197b7fac92278fb591ea8f4942c7d5687cb5ce Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 28 三月 2022 18:01:22 +0800
Subject: [PATCH] LJPH-C8FB4P【委托】配合PBI设备覆盖率的数据准备0328
---
force-app/main/default/classes/NFM612Rest.cls | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/force-app/main/default/classes/NFM612Rest.cls b/force-app/main/default/classes/NFM612Rest.cls
index 4690f58..2a76d75 100644
--- a/force-app/main/default/classes/NFM612Rest.cls
+++ b/force-app/main/default/classes/NFM612Rest.cls
@@ -1,5 +1,9 @@
@RestResource(urlMapping = '/NFM612/*')
global with sharing class NFM612Rest {
+ //add to AWS 鍥炲 start sushanhu 20220225
+ static Boolean SFStatus=true;
+ static String SFMessage='';
+ //add to AWS 鍥炲 end sushanhu 20220225
public static final String LOG_TYPE = 'NFM612';
global class GeData {
public RepairOderInfo repairOderInfo;
@@ -14,7 +18,10 @@
public String departmentCd; //鎶ヤ慨绉戝缂栫爜
public String repairApplyPerson; //鎶ヤ慨浜虹敤鎴风紪鐮�
public String repairApplicantName; //鎶ヤ慨浜哄鍚�
+ public String repairApplicantNameEncrypted; //鎶ヤ慨浜哄鍚嶅瘑鏂� add20220214
public String repairApplyPersonTel; //鎶ヤ慨浜鸿仈绯讳汉鐢佃瘽
+ public String repairApplyPersonTelEncrypted;//淇濅慨浜鸿仈绯荤數璇� 瀵嗘枃 add 20220214
+ public String DataId;//aws 瀛樺偍鍑瘉 add 20220214
public String repairApplyType; // 鎶ヤ慨浜哄矖浣�
public String equipmentCategory; //璁惧澶х被
public String assetType; //璁惧绫诲瀷
@@ -88,8 +95,16 @@
res.addHeader('Content-Type', 'application/json');
res.statusCode = 200;
//String jsonResponse = '{"status": "Success", "Message":' + gedata + '}';
- String jsonResponse = '{"status": "Success", "Message":"鎴愬姛"}';
- res.responseBody = Blob.valueOf(jsonResponse);
+ // String jsonResponse = '{"status": "Success", "Message":"鎴愬姛"}';
+ // res.responseBody = Blob.valueOf(jsonResponse);
+ //updata response toAWS 20220225 sushanhu start
+ NFMUtil.NFMResponse result = NFMUtil.getNFMResponse();
+ result.SFStatus=SFStatus;
+ result.SFMessage=SFMessage;
+ String jsonResponse =JSON.serialize(result);
+ system.debug('result---'+jsonResponse);
+ res.responseBody = blob.valueOf(jsonResponse);
+ //updata response toAWS 20220225 sushanhu end
return;
}
@future(callout = true)
@@ -220,7 +235,9 @@
repair.EndTimeThird__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.endTimeThird); //涓夋涓婇棬缁撴潫鏃堕棿
repair.FaultDescriptionThird__c = ged.repairOderInfo.faultDescriptionThird; //涓夋鏁呴殰鎻忚堪
repair.ApplicantType__c = ged.repairOderInfo.applicantType; //鐢宠淇悊浜虹被鍨�
-
+ repair.RepairApplicantName_Encrypted__c =ged.repairOderInfo.repairApplicantNameEncrypted; //鎶ヤ慨浜哄鍚嶅瘑鏂� add 20220214
+ repair.RepairApplicantTel_Encrypted__c = ged.repairOderInfo.repairApplyPersonTelEncrypted;//淇濅慨浜鸿仈绯荤數璇濆瘑鏂� add 20220214
+ repair.AWS_Data_Id__c =ged.repairOderInfo.DataId;//AWS 瀛樺偍鍑瘉 add 20220214
// repair.Applicant__c = canidMap.get(ged.repairOderInfo.applicantId).Id; //鐢宠淇悊浜虹紪鍙�
repair.Applicanter__c = personMap.get(ged.repairOderInfo.applicantId);//鐢宠淇悊浜虹紪鍙�
repair.ApplicationTime__c = NFMUtil.parseStr2DateTime(ged.repairOderInfo.applyDate); //鐢宠鏃堕棿
@@ -230,6 +247,8 @@
repair.AirframeCodeEngineer__c = ged.applyRepairInfo.equipmentCd; //鏈鸿韩缂栫爜(宸ョ▼甯�)
repair.ResponseResultDesc__c = ged.applyRepairInfo.responseResultDesc; //搴斿鎻忚堪
repair.ProcessResult__c = ged.applyRepairInfo.processResult; //澶勭悊缁撴灉
+
+
if ('闂宸茶В鍐�'.equals(ged.applyRepairInfo.processResult)) {
repair.Status__c = '鍏抽棴';
} else {
@@ -308,7 +327,7 @@
SELECT id, CManageCode__c,Employee_No_manual__c
FROM Contact
WHERE CManageCode__c IN: rpersonList OR Employee_No_manual__c IN:rpersonList];
- Map < String, Id > contactMap = new Map < String, Id > ();
+ Map < String, Id > contactMap = new Map < String, Id > ();
for (Contact con: couList) {
contactMap.put(con.CManageCode__c, con.Id);
if (String.isNotBlank(con.Employee_No_manual__c)) {
--
Gitblit v1.9.1