Quellcode durchsuchen

解除报警修改

gao.qiang vor 9 Monaten
Ursprung
Commit
d48dc84255

+ 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<>();