获取时间对应不上 改为获取当前时间

0205cmt
zhaoyu 2024-10-30 10:39:54 +08:00
parent 98e6b46d2d
commit 52b45f1558
1 changed files with 4 additions and 3 deletions

View File

@ -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);
}
//判断获取的风速仪在本地是否存在