From 927e81f5c3402d3307b2e7b4b079cc99ecef4d18 Mon Sep 17 00:00:00 2001 From: 涂煌豪 <997058689@qq.com> Date: 星期五, 11 三月 2022 19:21:24 +0800 Subject: [PATCH] NFMUtil --- force-app/main/default/classes/NFMUtil.cls | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 55 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/NFMUtil.cls b/force-app/main/default/classes/NFMUtil.cls index 4864541..d1bd09b2 100644 --- a/force-app/main/default/classes/NFMUtil.cls +++ b/force-app/main/default/classes/NFMUtil.cls @@ -130,6 +130,7 @@ // 鏂版湇鍔$郴缁� 鏈湴鐜锛堜复鏃讹級 // AWS_DOMAIN = 'http://114.249.236.98:29990'; // AWS_DOMAIN = 'http://jzbase.bqbot.com:29990'; + // AWS_DOMAIN = 'http://114.249.238.243:29990'; requestURILMS = '/v1/uc/user/syncOlympusUnit'; @@ -173,6 +174,12 @@ // 鏅烘収鍖荤枟&鏈嶅姟鏂扮郴缁熼�氫俊 鐢ㄦ埛鎺ュ彛 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'; @@ -262,6 +269,33 @@ } /** + * [formatDate2StrDateNewTime description] + * @param dt [鏃ユ湡] + * @return [description] + * 鎷兼帴鏃ユ湡/鏃堕棿锛屽弬鏁版棩鏈燂紙骞存湀鏃ワ級+ 褰撳墠鏃堕棿锛堟椂鍒嗙锛� + */ + public static String formatDate2StrDateNewTime(Date dt) { + String rtn = null; + if (dt == null) { + return rtn; + } + rtn = String.valueOf(dt); + rtn = rtn.replaceAll('-', ''); + if (rtn >= '40001231') { + rtn = '99991231'; + } else if (rtn < '19000101') { + rtn = '19000101'; + } + + String phourMinuteSecond = String.valueOf(DateTime.now()); + if(phourMinuteSecond.length() >= 19){ + phourMinuteSecond = phourMinuteSecond.subString(10,19).replaceall(':', ''); + } + return rtn + phourMinuteSecond; + } + + + /** * @return yyyyMMddHHmmss 銇棩浠樻枃瀛楀垪 */ public static String formatDateTime2Str(Datetime dt) { @@ -343,6 +377,27 @@ } return parseStr2Date(pDateTime.substring(0, 8)); } + + /** + * add wangweipeng 2022/02/15 + * [parseStr2DateTime description] + * @param pDate [鏃ユ湡锛堜笉鍖呮嫭鏃堕棿锛塢 + * @return [description] + * + * 鎷兼帴鏃ユ湡/鏃堕棿锛屽叾涓棩鏈熶负鐪熷疄鏃ユ湡锛屾椂闂翠负褰撳墠鏃堕棿 + + */ + public static Datetime parseStr3DateTime(String pDate) { + if (String.isBlank(pDate)) { + return null; + } + String phourMinuteSecond = String.valueOf(DateTime.now()); + if(phourMinuteSecond.length() >= 19){ + phourMinuteSecond = phourMinuteSecond.subString(10,19).replaceall(':', ''); + } + return parseStr2DateTime(pDate.substring(0, 8), phourMinuteSecond); + } + public static Datetime parseStr2DateTime(String pDateTime) { if (pDateTime == null || pDateTime.length() != 14) { return null; @@ -1101,8 +1156,6 @@ system.debug('resb:' + resb); return resb; } - - //鍙戦�佺粰鍏遍�氬钩鍙� 绮剧悽鎶�鏈� thh 2021-09-22 end public static Integer ControllerUtil() { -- Gitblit v1.9.1