Browse Source

模拟预警信息接口开发

gao.qiang 5 months ago
parent
commit
34f4d2ee07

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

@@ -1075,7 +1075,7 @@ public class GeoHazardMonitorTokenController {
 //                            respHeartbeatVo.setPreAlarmList(responseList);
 //                        }
                     } else if (!ObjectUtils.isEmpty(preAlarmLists)) {
-                        if (!"[]".equals(preAlarmLists.get(0).getPreAlarmList()) && !ObjectUtils.isEmpty(preAlarmLists.get(0).getPreAlarmList())) {
+                        if (!ObjectUtils.isEmpty(preAlarmLists.get(0).getPreAlarmList()) && !"[]".equals(preAlarmLists.get(0).getPreAlarmList())) {
                             log.info("preAlarm.getPreAlarmList()------" + preAlarmLists.get(0).getPreAlarmList());
                             List<PreAlarmListResponse> responseList = new ArrayList<>();
                             List<PreAlarmResponse.PreAlarmList> preAlarmList = JSON.parseArray(preAlarmLists.get(0).getPreAlarmList(), PreAlarmResponse.PreAlarmList.class);
@@ -1638,7 +1638,7 @@ public class GeoHazardMonitorTokenController {
                         respHeartbeatVo.setIsAlarm(2);
                     }
                 } else if (!ObjectUtils.isEmpty(preAlarmLists)) {
-                    if (!"[]".equals(preAlarmLists.get(0).getPreAlarmList()) && !ObjectUtils.isEmpty(preAlarmLists.get(0).getPreAlarmList())) {
+                    if (!ObjectUtils.isEmpty(preAlarmLists.get(0).getPreAlarmList()) && !"[]".equals(preAlarmLists.get(0).getPreAlarmList())) {
                         log.info("preAlarm.getPreAlarmList()------" + preAlarmLists.get(0).getPreAlarmList());
                         List<PreAlarmListResponse> responseList = new ArrayList<>();
                         List<PreAlarmResponse.PreAlarmList> preAlarmList = JSON.parseArray(preAlarmLists.get(0).getPreAlarmList(), PreAlarmResponse.PreAlarmList.class);