package com.mosty.yjzl.controller;

import com.mosty.base.model.dto.yjzl.*;
import com.mosty.base.model.query.yjzl.TbYjqkQuery;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.common.token.JwtSysUser;
import com.mosty.yjzl.service.YjzlStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@Api(tags = "预警信息相关统计接口，原magic旧接口--预警信息")
@AllArgsConstructor
@RestController
@RequestMapping("/yjxx")
public class YjzlStatisticsController {

    private YjzlStatisticsService yjzlStatisticsService;

    @ApiOperation("车辆预警列表TOP")
    @JwtSysUser
    @GetMapping("/yjcl/clyjlb")
    public ResponseResult<List<Map<String, Object>>> clyjlb(TbYjxxStatisticsDto vo) {
        return ResponseResult.success(yjzlStatisticsService.clyjlb(vo));
    }

    @ApiOperation("根据车牌号查询")
    @JwtSysUser
    @GetMapping("/yjcl/queryBycCphm")
    public ResponseResult<List<Map<String, Object>>> queryBycCphm(TbYjxxPageStatisticsDto vo) {
        return ResponseResult.success(yjzlStatisticsService.queryBycCphm(vo));
    }

    @ApiOperation("根据车牌号查询预警列表-日")
    @JwtSysUser
    @GetMapping("/yjcl/queryBycCphmlb")
    public ResponseResult<List<Map<String, Object>>> queryBycCphmlb(TbYjxxPageStatisticsDto vo) {
        return ResponseResult.success(yjzlStatisticsService.queryBycCphmlb(vo));
    }

    @ApiOperation("根据车牌号查询预警列表-月")
    @JwtSysUser
    @GetMapping("/yjcl/yqueryBycCphmlb")
    public ResponseResult<List<Map<String, Object>>> yqueryBycCphmlb(TbYjxxYStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yqueryBycCphmlb(dto));
    }

    @ApiOperation("根据车牌号查询预警列表-月")
    @JwtSysUser
    @GetMapping("/yjcl/zqueryBycCphmlb")
    public ResponseResult<List<Map<String, Object>>> zqueryBycCphmlb(TbYjxxPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zqueryBycCphmlb(dto));
    }

    @ApiOperation("日预警车辆TOP20")
    @JwtSysUser
    @GetMapping("/yjcl/yjcltj")
    public ResponseResult<List<Map<String, Object>>> yjcltj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjcltj(dto));
    }

    @ApiOperation("预警标签统计")
    @JwtSysUser
    @GetMapping("/yjcl/yjbqtj")
    public ResponseResult<List<Map<String, Object>>> yjbqtj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjbqtj(dto));
    }

    @ApiOperation("预警级别统计")
    @JwtSysUser
    @GetMapping("/yjcl/yjjbtj")
    public ResponseResult<List<Map<String, Object>>> yjjbtj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjjbtj(dto));
    }

    @ApiOperation("月预警车辆TOP20")
    @JwtSysUser
    @GetMapping("/yjcl/yyjcltj")
    public ResponseResult<List<Map<String, Object>>> yyjcltj(TbYjxxYStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yyjcltj(dto));
    }

    @ApiOperation("周预警车辆TOP20")
    @JwtSysUser
    @GetMapping("/yjcl/zyjcltj")
    public ResponseResult<List<Map<String, Object>>> zyjcltj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zyjcltj(dto));
    }

    @ApiOperation("根据身份证查询")
    @JwtSysUser
    @GetMapping("/yjry/queryBySfzh")
    public ResponseResult<List<Map<String, Object>>> queryBySfzh(TbYjxxRyStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.queryBySfzh(dto));
    }

    @ApiOperation("根据身份证查询列表-日")
    @JwtSysUser
    @GetMapping("/yjry/queryBySfzhlb")
    public ResponseResult<List<Map<String, Object>>> queryBySfzhlb(TbYjxxRyPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.queryBySfzhlb(dto));
    }

    @ApiOperation("根据身份证查询列表-日(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/queryBySfzhlbsc")
    public ResponseResult<List<Map<String, Object>>> queryBySfzhlbsc(TbYjxxRyPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.queryBySfzhlbsc(dto));
    }

    @ApiOperation("根据身份证查询列表-月")
    @JwtSysUser
    @GetMapping("/yjry/yqueryBySfzhlb")
    public ResponseResult<List<Map<String, Object>>> yqueryBySfzhlb(TbYjxxRyNyStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yqueryBySfzhlb(dto));
    }

    @ApiOperation("根据身份证查询列表-月(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/yqueryBySfzhlbsc")
    public ResponseResult<List<Map<String, Object>>> yqueryBySfzhlbsc(TbYjxxRyNyStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yqueryBySfzhlbsc(dto));
    }

    @ApiOperation("根据身份证查询列表-周")
    @JwtSysUser
    @GetMapping("/yjry/zqueryBySfzhlb")
    public ResponseResult<List<Map<String, Object>>> zqueryBySfzhlb(TbYjxxRyPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zqueryBySfzhlb(dto));
    }

    @ApiOperation("根据身份证查询列表-周(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/zqueryBySfzhlbsc")
    public ResponseResult<List<Map<String, Object>>> zqueryBySfzhlbsc(TbYjxxRyPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zqueryBySfzhlbsc(dto));
    }

    @ApiOperation("人员预警列表TOP")
    @JwtSysUser
    @GetMapping("/yjry/ryyjlb")
    public ResponseResult<List<Map<String, Object>>> ryyjlb(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.ryyjlb(dto));
    }

    @ApiOperation("预警级别统计-人员")
    @JwtSysUser
    @GetMapping("/yjry/yjjbtj")
    public ResponseResult<List<Map<String, Object>>> yjjbtjRy(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjjbtjRy(dto));
    }

    @ApiOperation("预警人员级别统计-人员")
    @JwtSysUser
    @GetMapping("/yjry/jbtj")
    public ResponseResult<List<Map<String, Object>>> jbtj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.jbtj(dto));
    }

    @ApiOperation("预警人员TOP20")
    @JwtSysUser
    @GetMapping("/yjry/yjrytj")
    public ResponseResult<List<Map<String, Object>>> yjrytj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjrytj(dto));
    }

    @ApiOperation("预警人员TOP20(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/yjrytjsc")
    public ResponseResult<List<Map<String, Object>>> yjrytjsc(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yjrytjsc(dto));
    }

    @ApiOperation("月预警人员TOP20")
    @JwtSysUser
    @GetMapping("/yjry/yyjrytj")
    public ResponseResult<List<Map<String, Object>>> yyjrytj(TbYjxxYyjStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yyjrytj(dto));
    }

    @ApiOperation("月预警人员TOP20(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/yyjrytjsc")
    public ResponseResult<List<Map<String, Object>>> yyjrytjsc(TbYjxxYyjStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.yyjrytjsc(dto));
    }

    @ApiOperation("周预警人员TOP20")
    @JwtSysUser
    @GetMapping("/yjry/zyjrytj")
    public ResponseResult<List<Map<String, Object>>> zyjrytj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zyjrytj(dto));
    }

    @ApiOperation("周预警人员TOP20(三车前科人员)")
    @JwtSysUser
    @GetMapping("/yjry/zyjrytjsc")
    public ResponseResult<List<Map<String, Object>>> zyjrytjsc(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zyjrytjsc(dto));
    }

    @ApiOperation("周边预警列表(不分页)")
    @JwtSysUser
    @GetMapping("/zbyj/zbyjbfylb")
    public ResponseResult<List<Map<String, Object>>> zbyjbfylb(TbYjxxRyPageStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zbyjbfylb(dto));
    }

    @ApiOperation("周边预警列表(不分页)")
    @JwtSysUser
    @GetMapping("/zbyj/zbyjtj")
    public ResponseResult<List<Map<String, Object>>> zbyjtj(TbYjxxStatisticsDto dto) {
        return ResponseResult.success(yjzlStatisticsService.zbyjtj(dto));
    }

    // 泸州态势统计-各区县预警情况
    @ApiOperation("泸州态势统计-各区县预警情况")
    @PostMapping("/getGqxyjqk")
    @JwtSysUser
    public ResponseResult<Map<String,Object>> getXfscAndLcTj(TbYjqkQuery dto) {
        return ResponseResult.success(yjzlStatisticsService.getGqxyjqk(dto));
    }

    // 泸州态势统计-警情与预警指令执行对比分析
    @ApiOperation("泸州态势统计-警情与预警指令执行对比分析")
    @PostMapping("/getJqscAndZlTj")
    @JwtSysUser
    public ResponseResult<Map<String,Object>> getJqscAndZlTj(TbYjqkQuery dto) {
        return ResponseResult.success(yjzlStatisticsService.getJqscAndZlTj(dto));
    }

}
