| | |
| | | import com.whyc.config.WebSocketConfig; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.AlarmPar; |
| | | import com.whyc.service.BattAlarmDataVerifyService; |
| | | import com.whyc.service.BattalarmDataService; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | private static BattalarmDataService service; |
| | | |
| | | private static BattAlarmDataVerifyService verifyService; |
| | | |
| | | private Session session; |
| | | |
| | | private HttpSession httpSession; |
| | |
| | | @Autowired |
| | | public void setService(BattalarmDataService service) { |
| | | BattAlarmDataSocket.service = service; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setVerifyService(BattAlarmDataVerifyService verifyService) { |
| | | BattAlarmDataSocket.verifyService = verifyService; |
| | | } |
| | | |
| | | @OnOpen |
| | |
| | | //查询分级告警的个数 |
| | | Response levelRes = service.serchByLevel(alarmPar.getUId()); |
| | | res.put("levelRes", levelRes); |
| | | //告警手动确认 |
| | | Response verifyListRes = verifyService.getPageOfWebSocket(alarmPar,lang); |
| | | res.put("verifyListRes",verifyListRes); |
| | | if (session.isOpen()) { |
| | | //推送信息 |
| | | synchronized (session) { |