liurunyu
2024-10-23 1bae77546205c892b48b9b1e84319108f440207a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.dy.pipIrrRemote.monitor;
 
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.voPr.VoOnLineIntake;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * @Author: liurunyu
 * @Date: 2024/10/23 11:32
 * @Description
 */
 
@Slf4j
@Tag(name = "监测控制", description = "监测控制")
@RestController
@RequestMapping(path = "monitor")
@RequiredArgsConstructor
public class MonitorCtrl {
    private final MonitorSv monitorSv;
 
    /**
     * 获取取水口列表(在线和不在线)
     *
     * @param qo
     * @return
     */
    @GetMapping(path = "all_intakes")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoOnLineIntake>>> allIntakes(QueryVo qo) {
        try {
            QueryResultVo<List<VoOnLineIntake>> res = monitorSv.selectOnLineIntakes(qo);
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询取水口异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
 
}