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/NFM103Controller.cls | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/NFM103Controller.cls b/force-app/main/default/classes/NFM103Controller.cls
index 2006145..0913c9f 100644
--- a/force-app/main/default/classes/NFM103Controller.cls
+++ b/force-app/main/default/classes/NFM103Controller.cls
@@ -103,6 +103,9 @@
public String ReturnType;//杩斿搧鏂瑰紡
public String UpdateStatus;//鐩磋繑淇敼鏍囪瘑
//add by wangweipeng 2021/07/14 end
+ //add pi 鍔犲瘑 sushanhu 20220222 start
+ public String DataId;//AWS瀛樺偍鍑瘉
+ //add pi 鍔犲瘑 sushanhu 20220222 end
}
////NFM103淇敼Rest end
@@ -327,7 +330,7 @@
,Returns_Product_way__c //杩斿搧鏂瑰紡
,FSE_ApplyForRepair_time__c //鐢宠淇悊鏃堕棿
//add by wangweipeng 2021/07/14 start
-
+ ,AWS_Data_Id__c //add by sushanhu AWSDateID for PIPL
from Repair__c where Id IN :repairIds]; // 鍓婇櫎銉囥兗銈裤倰妞滅储銇椼仾銇勩伅銇氥�丄ll ROWS 銇勩倝銇亜銇仛
System.debug(Logginglevel.DEBUG, 'NFM103_ recptList.size()=' + recptList.size());
@@ -472,7 +475,11 @@
element.Postal = rpr.address_ZipCode__c; //閭紪
element.ReturnType = NFMUtil.getMapValue(ReturnsProductWayMap,'Returns_Product_way__c', rpr.Returns_Product_way__c, iflog);//杩斿搧鏂瑰紡
element.UpdateStatus = rpr.Address_type__c; //鐢宠淇悊鏃堕棿
- //add by wangweipeng 2021/07/14 start
+ //add by wangweipeng 2021/07/14 end
+ //add pi 瀵嗘枃 sushanhu 20220222 start
+ element.DataId =rpr.AWS_Data_Id__c;//aws瀛樺偍鍑瘉
+ //add pi 瀵嗘枃 sushanhu 20220222 end
+
}
if (repairRequest.GeneralData.size() > 0) {
@@ -571,10 +578,24 @@
// NFM103淇敼Rest end
// WLIG-BXQBH6 start
- NFMUtil.response response =
- NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
- status = response.status;
+ // NFMUtil.response response =
+ // NFMUtil.sendToSapStatusAndBody(rowDataStr, NFMUtil.NFM103_ENDPOINT);
+ //update to aws 20220222 sushanhu start for PIPL
+ NFMUtil.response res = NFMUtil.getAwsToken();
+ String token=res.responseBody;
+ if(String.isBlank(token)){
+ iflog.ErrorLog__c='NFM103'+'鑾峰彇aws token 澶辫触';
+
+ }
+ NFMUtil.response response = NFMUtil.sendToPiAWS(rowDataStr, NFMUtil.NFM103_ENDPOINT,token);
+ //update to aws 20220222 sushanhu end for PIPL
+ status = response.status;
+ system.debug('AWS Response status:'+status);
ResponseBody = response.responseBody;
+ //update to aws 20220302 sushanhu start for PIPL
+ Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(ResponseBody);
+ system.System.debug('NGM103 AWS result--'+ ResponseBody);
+ //update to aws 20220302 sushanhu end for PIPL
NFM103Response NFM103Response = new NFM103Response();
system.debug(ResponseBody);
if (string.isNotEmpty(ResponseBody)) {
--
Gitblit v1.9.1