liurunyu
2025-02-06 5872dc75850327c61d2b5b9f6bd1f3b46d325990
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.dy.pipIrrRemote.allRound;
 
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.voAllRound.VoArIntakeRemote;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @Author: liurunyu
 * @Date: 2025/1/14 16:59
 * @Description
 */
@Slf4j
@Tag(name = "取水口综合信息之相关监测数据", description = "取水口综合信息之相关监测数据")
@RestController
@RequestMapping(path = "ar4Remote")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class Ar4RemoteCtrl {
 
    private Ar4RemoteSv sv;
 
    @Autowired
    private void setSv(Ar4RemoteSv sv) {
        this.sv = sv;
    }
 
    /**
     * 综合信息
     * 取水口监测数据
     * @return
     */
    @Operation(summary = "综合信息", description = "取水口监测数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "取水口监测数据(BaseResponse.content:VoArIntakeRemote{})",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoArIntakeRemote.class))}
            )
    })
    @GetMapping(path = "intakeInfo")
    @SsoAop()
    public BaseResponse<VoArIntakeRemote> intakeInfo(Long intakeId) {
        if (intakeId == null || intakeId.longValue() == 0L) {
            return BaseResponseUtils.buildException("取水口id不能为空");
        }
        VoArIntakeRemote res = this.sv.intakeInfo(intakeId);
        return BaseResponseUtils.buildSuccess(res);
    }
}