From 6947068a02499b9d1022f9efca5bcf1bdd3f1c70 Mon Sep 17 00:00:00 2001
From: Denny Chen <chenbangcai@prec-tech.com>
Date: 星期一, 28 二月 2022 10:45:11 +0800
Subject: [PATCH] Note test
---
force-app/main/default/classes/NFMUtil.cls | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/NFMUtil.cls b/force-app/main/default/classes/NFMUtil.cls
index 4864541..f70f39d 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';
@@ -262,6 +263,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 +371,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;
--
Gitblit v1.9.1