package com.djhk.uav.equ.controller;

import com.djhk.common.core.controller.BaseController;
import com.djhk.common.core.domain.AjaxResult;
import com.djhk.uav.equ.service.StatService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
* 统计分析
*
* @author gzm
* @since 1.0.0 2023-06-25
*/
@RestController
@RequestMapping("/stat")
@AllArgsConstructor
public class StatController extends BaseController {
    @Autowired
    private StatService statService;



    @PostMapping("/getStatForDept")
    public AjaxResult getStatForDept(@RequestBody Map map){
        return AjaxResult.success(statService.getStatForDept(map));
    }



    @PostMapping("/getStatForType")
    public AjaxResult getStatForType(@RequestBody Map map){
        return AjaxResult.success(statService.getStatForType(map));
    }


    @PostMapping("/getStatForModel")
//    @RequiresPermissions("uav:stat")
    public AjaxResult getStatForModel(@RequestBody Map map){
        return AjaxResult.success(statService.getStatForModel(map));
    }


    @PostMapping("/getStatForEqu")
    public AjaxResult getStatForEqu(@RequestBody Map map){

        return AjaxResult.success(statService.getStatForEqu(map));
    }

}