From 190bec9d5950a76e62b3bb1663f979a644695279 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期六, 09 八月 2025 15:22:27 +0800
Subject: [PATCH] 完善wcs'主控图地图显示
---
src/main/java/com/zy/common/utils/CommonUtils.java | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/common/utils/CommonUtils.java b/src/main/java/com/zy/common/utils/CommonUtils.java
index d3233b7..8a2e8b6 100644
--- a/src/main/java/com/zy/common/utils/CommonUtils.java
+++ b/src/main/java/com/zy/common/utils/CommonUtils.java
@@ -27,4 +27,28 @@
}
}
+ public static boolean isNumeric(String str) {
+ // 濡傛灉瀛楃涓蹭负绌猴紝鐩存帴杩斿洖false
+ if (str == null || str.length() == 0) {
+ return false;
+ }
+ // 鐢ㄦ鍒欒〃杈惧紡鍖归厤鏁板瓧
+ return str.matches("-?\\d+(\\.\\d+)?");
+ }
+
+ public static boolean isBoolean(String str) {
+ if (str == null) {
+ return false;
+ }
+
+ if (str.length() == 4 || str.length() == 5) {
+ if (str.equals("true") || str.equals("false")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
}
--
Gitblit v1.9.1