| | |
| | | package com.dy.pipIrrRemote.monitor; |
| | | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.mw.protocol.rtuState.RtuStatus; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | |
| | | QueryResultVo<List<VoOnLineIntake>> res = monitorSv.selectOnLineIntakes(qo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("查询取水口异常", e); |
| | | log.error("命令执行异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * RTU在通信中间件中的运行状态 |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "rtuStatus") |
| | | @SsoAop() |
| | | public BaseResponse<RtuStatus> rtuStatus(String rtuAddr){ |
| | | try { |
| | | RtuStatus res = monitorSv.rtuStatus(rtuAddr); |
| | | if(res != null){ |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | }else{ |
| | | return BaseResponseUtils.buildErrorMsg("后台系统出错,从通信中间件未得到查询结果"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("命令执行异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |