Parcourir la source

报警详情 返回相机编码

sunhh il y a 1 an
Parent
commit
89638834a5

+ 6 - 4
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/MsgAlarmController.java

@@ -275,12 +275,14 @@ public class MsgAlarmController extends BaseController {
                 baseCameraManagement = baseCameraManagementList.get(0);
             }
 //        BaseCameraManagement baseCameraManagement = baseCameraManagementMapper.selectOne(lw);
-            if (StringUtils.isEmptySunhh(baseCameraManagement)) {
-                return AjaxResult.error("线路编码:" + msgAlarm.getRailwayCode() + "不存在对应里程范围为:"+ msgAlarm.getAlarmMile() +"的相机!");
-            }
+//            if (StringUtils.isEmptySunhh(baseCameraManagement)) {
+//                return AjaxResult.error("线路编码:" + msgAlarm.getRailwayCode() + "不存在对应里程范围为:"+ msgAlarm.getAlarmMile() +"的相机!");
+//            }
             MsgAlarmResp msgAlarmResp = new MsgAlarmResp();
             BeanUtils.copyProperties(msgAlarm, msgAlarmResp);
-            msgAlarmResp.setCameraCode(baseCameraManagement.getCameraCode());
+            if (!StringUtils.isEmptySunhh(baseCameraManagement)) {
+                msgAlarmResp.setCameraCode(baseCameraManagement.getCameraCode());
+            }
             if (!StringUtils.isEmptySunhh(msgAlarm.getReleasedBy())) {
 //                BaseUser user = baseUserService.getUser(msgAlarm.getReleasedBy());
 //                if (!StringUtils.isEmptySunhh(user) && !StringUtils.isEmptySunhh(user.getNickName())) {