Administrator
2024-07-27 fa0d79ec13774593d14fd537e71908d084969233
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package com.dy.pipIrrRemote.records.lossDay;
 
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.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay;
import com.dy.pipIrrGlobal.voRm.VoLossDay;
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDayQueryVo;
import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDaySv;
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.*;
 
import java.util.List;
 
/**
 * @author :WuZeYu
 * @Date :2024/7/24  15:29
 * @LastEditTime :2024/7/24  15:29
 * @Description
 */
@Slf4j
@Tag(name = "漏损记录查询", description = "漏损记录查询")
@RestController
@RequestMapping(path = "lossDay")
public class LossDayCtrl {
 
    @Autowired
    private LossDaySv lossDaySv;
 
 
    /**
     * 根据指定条件获取漏损记录列表(历史)
     *
     * @param vo 查询条件
     * @return 符合条件的漏损记录列表(历史)
     */
    @Operation(summary = "获得一页漏损记录记录", description = "返回一页漏损记录数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回一页漏损记录数据(BaseResponse.content:QueryResultVo[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoActiveCard.class))}
            )
    })
    @GetMapping(path = "/getLossDayHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayHistory(@RequestParam LossDayQueryVo vo) {
        try {
            QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayHistory(vo);
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取漏损记录记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
 
    /**
     * 根据指定条件获取漏损记录列表(最新)
     *
     * @param vo 查询条件
     * @return 符合条件的漏损记录列表(最新)
     */
    @Operation(summary = "获得一页漏损记录记录", description = "返回一页漏损记录数据")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回一页漏损记录数据(BaseResponse.content:QueryResultVo[{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoActiveCard.class))}
            )
    })
    @GetMapping(path = "/getLossDayLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoLossDay>>> getLossDayLast(@RequestParam LossDayQueryVo vo) {
        try {
            QueryResultVo<List<VoLossDay>> res = lossDaySv.getLossDayLast(vo);
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("获取漏损记录记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
}