package com.ningdatech.carapi.analysis.controller;


import com.ningdatech.basic.model.PageVo;
import com.ningdatech.carapi.analysis.entity.req.WarnAnalysisListReq;
import com.ningdatech.carapi.analysis.entity.vo.WarnAnalysisByCarVo;
import com.ningdatech.carapi.analysis.entity.vo.WarnAnalysisByCompanyVo;
import com.ningdatech.carapi.analysis.entity.vo.WarnAnalysisByDriverVo;
import com.ningdatech.carapi.analysis.manage.WarnAnalysisManage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 综合预警分析 前端控制器
 * </p>
 *
 * @author WendyYang
 * @since 2022-10-14
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "分析评估-预警分析")
@RequestMapping("/api/v1/warn-analysis")
public class WarnAnalysisController {

    private final WarnAnalysisManage warnAnalysisManage;

    @ApiOperation("车辆综合预警分析列表")
    @GetMapping("/listCarWarnAnalysis")
    public PageVo<WarnAnalysisByCarVo> listWarnAnalysisCar(WarnAnalysisListReq req) {
        return warnAnalysisManage.listCarWarnAnalysis(req);
    }

    @ApiOperation("企业综合预警分析列表")
    @GetMapping("/listCompanyWarnAnalysis")
    public PageVo<WarnAnalysisByCompanyVo> listWarnAnalysisCompany(WarnAnalysisListReq req) {
        return warnAnalysisManage.listCompanyWarnAnalysis(req);
    }

    @ApiOperation("驾驶员综合预警分析列表")
    @GetMapping("/listDriverWarnAnalysis")
    public PageVo<WarnAnalysisByDriverVo> listDriverWarnAnalysis(WarnAnalysisListReq req) {
        return warnAnalysisManage.listDriverWarnAnalysis(req);
    }
}
