gao.qiang преди 9 месеца
родител
ревизия
d48dc84255
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

+ 6 - 1
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -436,10 +436,15 @@ public class GeoHazardMonitorTokenController {
             if (releaseAlarmVo.getReleaseTime().toString().length() == 10) {
                 releaseAlarmVo.setReleaseTime(releaseAlarmVo.getReleaseTime() * 1000);
             }
-            msgAlarm.setReleasedTime(new Date(releaseAlarmVo.getReleaseTime()));
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(new Date(releaseAlarmVo.getReleaseTime()));
+            cal.set(Calendar.MILLISECOND, 0);
+            cal.set(Calendar.MILLISECOND, 0);
+            msgAlarm.setReleasedTime(cal.getTime());
             msgAlarm.setReleaseContent(releaseAlarmVo.getReleaseContent());
             msgAlarm.setReleasedBy(releaseAlarmVo.getOperator());
             msgAlarm.setUpdateBy(releaseAlarmVo.getOperator());
+            msgAlarm.setUpdateTime(new Date());
             msgAlarm.setIsRelease(1);
             boolean count = msgAlarmService.updateById(msgAlarm);
             Map<String, Object> map = new HashMap<>();