package org.dromara.controller.statistics;


import cn.dev33.satoken.annotation.SaCheckPermission;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.domain.model.AjaxResult;
import org.dromara.domain.residentInfo.ResidentInfo;
import org.dromara.domain.staffManage.StaffManage;
import org.dromara.service.IStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 首页统计Controller
 *
 * @author boman
 * @date 2025-03-06
 */
@RestController
@RequestMapping("/wuYe/statistics")
public class StatisticsController {


    @Autowired
    private IStatisticsService statisticsService;
    /**
     * APP首页统计
     */
    @SaCheckPermission("wuYe:statistics:num:app")
    @GetMapping("/num/app")
    public R<Map<String, Object>> numApp()
    {
        return statisticsService.numApp();
    }



    /**
     * APP首页红点物业统计
     */
    @SaCheckPermission("wuYe:statistics:wuYeTips")
    @PostMapping("/num/app/wuYeTips")
    public R<Map<String, Object>> appWuYeTips(@RequestBody StaffManage staffManage)
    {
        return statisticsService.wuYeTips(staffManage);
    }
    /**
     * APP首页红点业主统计
     */
    @SaCheckPermission("wuYe:statistics:yeZhuTips")
    @PostMapping("/num/app/yeZhuTips")
    public R<Map<String, Object>> appYeZhuTips(@RequestBody ResidentInfo residentInfo)
    {
        return statisticsService.yeZhuTips(residentInfo);
    }

    /**
     * web车辆管控统计
     */
    @SaCheckPermission("wuYe:statistics:vehicleControl")
    @GetMapping("/num/vehicleControl")
    public AjaxResult vehicleControl()
    {
        return statisticsService.vehicleControl();
    }


    /**
     * todo PC车辆进出统计
     */
    @SaCheckPermission("wuYe:statistics:num:car")
    @GetMapping("/num/car")
    public AjaxResult numCar()
    {
        return statisticsService.numCar();
    }
}
