diff --git a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java index 8a1dff83..f78c18da 100644 --- a/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java +++ b/src/main/java/com/zcloud/util/SaveAnemometerInfoScheduled.java @@ -42,11 +42,11 @@ public class SaveAnemometerInfoScheduled { }); anemometerList.forEach(anemometer -> { anemometer.put("FLID",UuidUtil.get32UUID()); - // String ftime = anemometer.getString("FTIME"); - Date date = new Date(); + 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 (Exception e) { throw new RuntimeException(e); diff --git a/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml b/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml index 44a21c71..0576a96b 100644 --- a/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml +++ b/src/main/resources/mybatis/datasource/anemometer/AnemometerMachineMapper.xml @@ -114,6 +114,7 @@ LEFT JOIN bus_anemometer_local al ON f.FNAME = al.FNAME and al.FTIME = ba.FTIME WHERE f.FNAME = #{FNAME} + LIMIT 1