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/NFMUtil.cls | 70 ++++++++++++++++++++++++----------
1 files changed, 49 insertions(+), 21 deletions(-)
diff --git a/force-app/main/default/classes/NFMUtil.cls b/force-app/main/default/classes/NFMUtil.cls
index 75592b4..421d0c2 100644
--- a/force-app/main/default/classes/NFMUtil.cls
+++ b/force-app/main/default/classes/NFMUtil.cls
@@ -101,16 +101,16 @@
NFM401_ENDPOINT = 'http://ec2-161-189-3-104.cn-northwest-1.compute.amazonaws.com.cn:8088/dojtest/dojInfo/recevie';
NFM402_ENDPOINT = 'http://ec2-161-189-3-104.cn-northwest-1.compute.amazonaws.com.cn:8088/dojtest/dojInfo/getDojInfoByRefNo';
- // NFM501_ENDPOINT = 'http://cusdata.qianlima.com/test/v1/info/page/';
NFM501_ENDPOINT = 'https://sfpi-mebg-test.olympuschina.com/api/nfm/501';
- NFM502_ENDPOINT = 'http://cusdata.qianlima.com/test/v1/info/detailHtml?url=';
- NFM504_ENDPOINT = 'http://cusdata.qianlima.com/test/v1/customer/albs/feedback';
+ NFM502_ENDPOINT = 'http://cusdata.qianlima.com/v1/info/detailHtml?url=';
+ NFM504_ENDPOINT = 'http://cusdata.qianlima.com/v1/customer/albs/feedback';
CBPR_Auth_Sap = 'Basic U0ZEQ19XU1VTRVI6cG9xMTIzNDU=';
// LHJ 20180824 CBPR End
//CBPR_Auth_Spo = 'http://cbpr.chinacloudsites.cn/sfdc/token';
CBPR_Auth_Spo = 'http://cbpr.olympuschina.com/sfdc/token';
QLM_Token = 'http://cusdata.qianlima.com/v1/token';
+
// 鏅烘収鍖荤枟&鏈嶅姟鏂扮郴缁熼�氫俊 瀹㈡埛鎺ュ彛
NFM601_ENDPOINT = 'https://wdp.olympus.com.cn:44301/RESTAdapter/NFM601';
@@ -128,7 +128,7 @@
NFM115_ENDPOINT = 'https://wdp.olympus.com.cn:44301/RESTAdapter/NFM115';
// 鏂版湇鍔$郴缁� 娴嬭瘯鐜
AWS_DOMAIN = 'https://olympus.bqbot.com';
- // 鏂版湇鍔$郴缁� 鏈湴鐜锛堜复鏃讹級
+ // 鏂版湇鍔$郴缁� 鏈湴鐜锛堜复鏃讹級
// AWS_DOMAIN = 'http://114.249.236.98:29990';
// AWS_DOMAIN = 'http://jzbase.bqbot.com:29990';
// AWS_DOMAIN = 'http://114.249.238.243:29990';
@@ -144,7 +144,7 @@
NFM007_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM007';
NFM008_ENDPOINT = 'https://owdc.olympus.co.jp/XISOAPAdapter/MessageServlet?senderParty=&senderService=OCM_SFDC_P&receiverParty=&receiverService=&interface=NFM008_Sync_BC2GPI&interfaceNamespace=http%3A%2F%2Folympus.co.jp%2Fgpi%2FNFM008';
//NFM103_ENDPOINT = 'https://owdc.olympus.co.jp/XISOAPAdapter/MessageServlet?senderParty=&senderService=OCM_SFDC_P&receiverParty=&receiverService=&interface=NFM103_Sync_BC2GPI&interfaceNamespace=http%3A%2F%2Folympus.co.jp%2Fgpi%2FNFM103';
- NFM103_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM103';// 鍘焥aphost
+ NFM103_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM103';
//NFM106_ENDPOINT = 'https://owdc.olympus.co.jp/XISOAPAdapter/MessageServlet?senderParty=&senderService=OCM_SFDC_P&receiverParty=&receiverService=&interface=NFM106_Sync_BC2GPI&interfaceNamespace=http%3A%2F%2Folympus.co.jp%2Fgpi%2FNFM106';
NFM106_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM106';
// LHJ 20180824 CBPR Start
@@ -159,8 +159,7 @@
NFM401_ENDPOINT = 'http://ec2-161-189-3-104.cn-northwest-1.compute.amazonaws.com.cn:8082/doj/dojInfo/recevie';
NFM402_ENDPOINT = 'http://ec2-161-189-3-104.cn-northwest-1.compute.amazonaws.com.cn:8082/doj/dojInfo/getDojInfoByRefNo';
- // NFM501_ENDPOINT = 'http://cusdata.qianlima.com/v1/info/page/';
- NFM501_ENDPOINT ='https://sfpi-mebg-test.olympuschina.com/api/nfm/501';
+ NFM501_ENDPOINT ='https://sfpi-mebg-test.olympuschina.com/api/nfm/501';
NFM502_ENDPOINT = 'http://cusdata.qianlima.com/v1/info/detailHtml?url=';
NFM504_ENDPOINT = 'http://cusdata.qianlima.com/v1/customer/albs/feedback';
CBPR_Auth_Sap = 'Basic U0ZEQ19XU1VTRVI6cG9wMTIzNDU=';
@@ -176,11 +175,14 @@
// 鏅烘収鍖荤枟&鏈嶅姟鏂扮郴缁熼�氫俊 鐢ㄦ埛鎺ュ彛
NFM621_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM621';
NFM622_ENDPOINT = 'https://api-platform.olympuschina.com/prod-api/api/sso/sfdc_activitydata';
+ NFM701_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM701';
+ NFM702_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM702';
+ NFM703_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM703';
//鏍锋湰绠$悊
NFM115_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM115';
- // 鏂版湇鍔$郴缁�
+ // 鏂版湇鍔$郴缁�
AWS_DOMAIN = 'https://svc-elb.olympuschina.com';
requestURILMS = '/v1/uc/user/syncOlympusUnit';
@@ -230,6 +232,7 @@
webservice String timestamp;
webservice String appKey;
}
+ // add to aws response sushanhu 20220224 start
global class NFMResponse{
public Boolean SFStatus;
public String SFMessage;
@@ -249,6 +252,7 @@
return result;
}
+// add to aws response sushanhu 20220224 end
/**
* @return yyyyMMdd 銇棩浠樻枃瀛楀垪
*/
@@ -621,6 +625,32 @@
return rowData;
}
+ // public static BatchIF_Log__c makeRowDataToOnline(NFMUtil.MonitoringToOnline Monitoring, String NFMType, Object NFMData) {
+ // BatchIF_Log__c rowData = new BatchIF_Log__c();
+ // rowData.Type__c = NFMType;
+ // rowData.MessageGroupNumber__c = Monitoring.MessageGroupNumber;
+ // rowData.TransmissionDateTime__c = Monitoring.TransmissionDateTime;
+ // rowData.RowDataFlg__c = true;
+ // rowData.Log__c = '';
+ // rowData.ErrorLog__c = '';
+ // String rowDataStr = JSON.serialize(NFMData);
+ // if (rowDataStr.length() > 0) {
+ // Integer splitIdx = 1;
+ // while (rowDataStr.length() > 0) {
+ // if (splitIdx == 1) {
+ // rowData.put('Log__c', rowDataStr.substring(0, (rowDataStr.length() > MaxLogColumnLength ? MaxLogColumnLength : rowDataStr.length())));
+ // } else if (splitIdx == 13) {
+ // rowData.ErrorLog__c = rowDataStr;
+ // break;
+ // } else {
+ // rowData.put('Log' + splitIdx + '__c', rowDataStr.substring(0, (rowDataStr.length() > MaxLogColumnLength ? MaxLogColumnLength : rowDataStr.length())));
+ // }
+ // splitIdx++;
+ // rowDataStr = rowDataStr.substring((rowDataStr.length() > MaxLogColumnLength ? MaxLogColumnLength : rowDataStr.length()));
+ // }
+ // }
+ // return rowData;
+ // }
public static BatchIF_Log__c makeRowData(BatchIF_Log__c iflog, String NFMType, Object NFMData) {
// TransmissionDateTime銇ō瀹�
Datetime nowDT = Datetime.now();
@@ -889,9 +919,9 @@
public class response {
public string status;
public string responseBody;
- public response(string status, string responseBody ) {
- this.status = status;
- this.responseBody = responseBody;
+ public response(string status, string responseBody) {
+ this.status = status;
+ this.responseBody = responseBody;
}
}
// WLIG-BXQBH6 end
@@ -1017,13 +1047,13 @@
req.setEndpoint(endpoint);
req.setMethod('GET');
HTTPResponse response = http.send(req);
- String statusCode = response.getStatus();
+ String statusCode = String.valueof(response.getStatusCode());
System.debug('response:' + response);
//http锛氱姸鎬佸拰code
//濡傛灉鐘舵�佷笉閫氳繃 锛� 鍒欏皢鐘舵�佸強绌虹殑鐨勬暟鎹� 锛� 杩斿洖
- if (String.isNotBlank(statusCode)) {
- return new response(statusCode, null);
- }
+ // if (String.isNotBlank(statusCode)) {
+ // return new response(statusCode, null);
+ // }
System.debug('=====2======' + response.getBody());
//姝e父鎵ц
return new response(statusCode, response.getBody());
@@ -1040,13 +1070,13 @@
req.setMethod('POST');
req.setBody(jsonStr);
HTTPResponse response = http.send(req);
- String statusCode = response.getStatus();
+ String statusCode = String.valueof(response.getStatusCode());
System.debug('response:' + response);
//http锛氱姸鎬佸拰code
//濡傛灉鐘舵�佷笉閫氳繃 锛� 鍒欏皢鐘舵�佸強绌虹殑鐨勬暟鎹� 锛� 杩斿洖
- if (String.isNotBlank(statusCode)) {
- return new response(statusCode, null);
- }
+ // if (String.isNotBlank(statusCode)) {
+ // return new response(statusCode, null);
+ // }
System.debug('=====2======' + response.getBody());
//姝e父鎵ц
return new response(statusCode, response.getBody());
@@ -1215,8 +1245,6 @@
system.debug('resb:' + resb);
return resb;
}
-
-
//鍙戦�佺粰鍏遍�氬钩鍙� 绮剧悽鎶�鏈� thh 2021-09-22 end
public static Integer ControllerUtil() {
--
Gitblit v1.9.1