From 52b45f15586b58eb7bb8137f3ad65ae5a443bc5d Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 30 Oct 2024 10:39:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=97=B6=E9=97=B4=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E4=B8=8D=E4=B8=8A=20=E6=94=B9=E4=B8=BA=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zcloud/util/SaveAnemometerInfoScheduled.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java index 0c3af353..8a1dff83 100644 --- a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java +++ b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java @@ -42,12 +42,13 @@ public class SaveAnemometerInfoScheduled { }); anemometerList.forEach(anemometer -> { anemometer.put("FLID",UuidUtil.get32UUID()); - String ftime = anemometer.getString("FTIME"); + // String ftime = anemometer.getString("FTIME"); + Date date = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { - Date date = simpleDateFormat.parse(ftime); + // Date date = simpleDateFormat.parse(ftime); anemometer.put("FTIME",simpleDateFormat.format(date)); - } catch (ParseException e) { + } catch (Exception e) { throw new RuntimeException(e); } //判断获取的风速仪在本地是否存在