package com.mosty.sjzx.controller;

import com.mosty.base.model.query.sjzx.YszxNyQuery;
import com.mosty.base.model.query.sjzx.YszxQuery;
import com.mosty.common.base.domain.BaseController;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.common.token.JwtSysUser;
import com.mosty.sjzx.service.SgfxService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@AllArgsConstructor
@RestController
@Api(tags = "专题分析--原magic接口")
@RequestMapping("/ztfx")
public class ZtfxController extends BaseController {

    @Resource
    private SgfxService sgfxService;

    @GetMapping("/afqsfx/rtj")
    @ApiOperation(value = "发案趋势分析-日统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> rtj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.rtj(dto));
    }

    @GetMapping("/afqsfx/ytj")
    @ApiOperation(value = "发案趋势分析-月统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> ytj(YszxNyQuery dto) {
        return ResponseResult.success(this.sgfxService.ytj(dto));
    }

    @GetMapping("/afqsfx/ztj")
    @ApiOperation(value = "发案趋势分析-月统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> ztj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.ztj(dto));
    }

    @GetMapping("/fascryyj/scryyj")
    @ApiOperation(value = "日统计-三车人员预警")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> scryyj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.scryyj(dto));
    }

    @GetMapping("/fascryyj/yscryyj")
    @ApiOperation(value = "月统计-三车人员预警")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> yscryyj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.yscryyj(dto));
    }

    @GetMapping("/fascryyj/zscryyj")
    @ApiOperation(value = "周统计-三车人员预警")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> zscryyj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.zscryyj(dto));
    }

    @GetMapping("/pcsfafx/rtj")
    @ApiOperation(value = "派出所发案分析--日统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> pcsfafxRtj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.pcsfafxRtj(dto));
    }

    @GetMapping("/pcsfafx/ytj")
    @ApiOperation(value = "派出所发案分析--月统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> pcsfafxytj(YszxNyQuery dto) {
        return ResponseResult.success(this.sgfxService.pcsfafxytj(dto));
    }

    @GetMapping("/pcsfafx/ztj")
    @ApiOperation(value = "派出所发案分析--周统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> pcsfafxztj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.pcsfafxztj(dto));
    }

    @GetMapping("/sjtj/ztsjtj")
    @ApiOperation(value = "专题分析-数据统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> ztsjtj(YszxQuery dto) {
        return ResponseResult.success(this.sgfxService.ztsjtj(dto));
    }

    @GetMapping("/sjtj/yztsjtj")
    @ApiOperation(value = "专题分析-月数据统计")
    @JwtSysUser
    public ResponseResult<List<Map<String, Object>>> yztsjtj(YszxNyQuery dto) {
        return ResponseResult.success(this.sgfxService.yztsjtj(dto));
    }
}


