Commit b50f73fe authored by 王晓倩's avatar 王晓倩

暂时解决异常

parent 664a3595
...@@ -3,6 +3,7 @@ package com.zehong.web.controller.websocket; ...@@ -3,6 +3,7 @@ package com.zehong.web.controller.websocket;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.zehong.system.domain.TDeviceAlarm; import com.zehong.system.domain.TDeviceAlarm;
import com.zehong.system.domain.vo.DeviceAlarmVo;
import com.zehong.system.service.ITDeviceAlarmService; import com.zehong.system.service.ITDeviceAlarmService;
import com.zehong.system.service.ITDeviceInfoService; import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.system.service.ITPipeService; import com.zehong.system.service.ITPipeService;
...@@ -34,7 +35,12 @@ public class WebSocketController { ...@@ -34,7 +35,12 @@ public class WebSocketController {
@GetMapping("/send") @GetMapping("/send")
public void send(int alarmId){ public void send(int alarmId){
TDeviceAlarm alarm = itDeviceAlarmService.selectTDeviceAlarmById(alarmId); DeviceAlarmVo alarm = null;
try {
alarm = itDeviceAlarmService.selectTDeviceAlarmById(alarmId);
} catch (Exception e) {
e.printStackTrace();
}
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("alarmInfo",alarm); json.put("alarmInfo",alarm);
if(PIPE_TYPE.equals(alarm.getAlarmType())){ if(PIPE_TYPE.equals(alarm.getAlarmType())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment