|
@@ -95,6 +95,7 @@ import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@@ -1799,7 +1800,11 @@ public class GeoHazardMonitorTokenController {
|
|
|
PreAlarm preAlarm = new PreAlarm();
|
|
|
preAlarm.setTrainId(preAlarmResponse.getTrainId());
|
|
|
preAlarm.setPreAlarmNum(preAlarmResponse.getPreAlarmNum());
|
|
|
- preAlarm.setPreAlarmTime(new Date(preAlarmResponse.getPreAlarmTime()));
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.setTime(new Date(preAlarmResponse.getPreAlarmTime()));
|
|
|
+ cal.set(Calendar.MILLISECOND, 0);
|
|
|
+ cal.set(Calendar.MILLISECOND, 0);
|
|
|
+ preAlarm.setPreAlarmTime(cal.getTime());
|
|
|
preAlarm.setPreAlarmType(preAlarmResponse.getPreAlarmType());
|
|
|
preAlarm.setPreAlarmList(JSON.toJSONString(preAlarmResponse.getPreAlarmList()));
|
|
|
preAlarm.setCreatedTime(new Date());
|