涂煌豪
2022-05-16 d075f9ef422d029599749fcf65c44740dbe4d8f9
force-app/main/default/classes/NFMUtil.cls
@@ -63,6 +63,9 @@
    public static String NFM703_ENDPOINT = null;
    public static String NFM115_ENDPOINT = null;
    // 电子签收单SFDC2SAP thh 20220427 start
    public static String NFM116_ENDPOINT = null;
    // 电子签收单SFDC2SAP thh 20220427 end
    public static String NFM112_ENDPOINT = null;
@@ -126,10 +129,16 @@
            NFM112_ENDPOINT = 'http://wdp.olympus.com.cn:8089/RESTAdapter/NFM112';
            NFM115_ENDPOINT = 'https://wdp.olympus.com.cn:44301/RESTAdapter/NFM115';
            // sanbox电子签收单SFDC2SAP thh 20220427 start
            NFM116_ENDPOINT = 'https://wdp.olympus.com.cn:44301/RESTAdapter/NFM116';
            // sanbox电子签收单SFDC2SAP thh 20220427 end
            // 新服务系统 测试环境
            AWS_DOMAIN = 'https://olympus.bqbot.com';
              // 新服务系统 本地环境(临时)
            // AWS_DOMAIN = 'http://114.249.236.98:29990';
            // AWS_DOMAIN = 'http://114.249.231.75:29995';
            // AWS_DOMAIN = 'http://jzbase.bqbot.com:29990';
            // AWS_DOMAIN = 'http://114.249.238.243:29990';
@@ -179,8 +188,14 @@
            NFM702_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM702';
            NFM703_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM703';
            //先款后修
            NFM112_ENDPOINT = 'http://wdp.olympus.com.cn:8089/RESTAdapter/NFM112';
            //样本管理
            NFM115_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM115';
            // 电子签收单SFDC2SAP thh 20220427 start
            NFM116_ENDPOINT = 'https://wdp.olympus.com.cn:44302/RESTAdapter/NFM116';
            // 电子签收单SFDC2SAP thh 20220427 end
 // 新服务系统
            AWS_DOMAIN = 'https://svc-elb.olympuschina.com';
@@ -364,6 +379,24 @@
        }
        return rtn;
    }
    // lt  20220419  Start
    /**
     * @return yyyy/MM/dd の日付文字列
     */
    public static String formatDateTime2StrSprit2(DateTime dt) {
        String rtn = null;
        if (dt == null) {
            rtn = '';
        } else {
            String pDate = formatDateTime2Str(dt);
            rtn = (pDate.substring(0, 4)) + '/' +
                (pDate.substring(4, 6)) + '/' +
                (pDate.substring(6, 8));
        }
        return rtn;
    }
    // lt  20220419  End
     /**
     * add       wangweipeng       2022/02/11
@@ -1047,13 +1080,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());
        //正常执行
        return new response(statusCode, response.getBody());
@@ -1070,13 +1103,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());
        //正常执行
        return new response(statusCode, response.getBody());