package com.usky.fire.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.fire.domain.DemGridMemderStatistic;
import com.usky.fire.service.DemGridMemderStatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 网格基础信息统计表 前端控制器
 * </p>
 *
 * @author han
 * @since 2023-10-30
 */
@RestController
@RequestMapping("/demGridMemderStatistic")
public class DemGridMemderStatisticController {

    @Autowired
    private DemGridMemderStatisticService demGridMemderStatisticService;

    /**
     * 网格基础信息统计
     * @param gridArea      网格区域
     * @param mapGridName    测绘院地图网格名称
     * @param gridGrade  网格等级(2、中网格 3、小网格)
     * @return
     */
    @GetMapping("gridMemderStatistic")
    public ApiResult<DemGridMemderStatistic> gridMemderStatistic(@RequestParam(value = "gridArea", required = false) String gridArea,
                                                                 @RequestParam(value = "mapGridName",required = false) String mapGridName,
                                                                       @RequestParam(value = "gridGrade",required = false) Integer gridGrade){
        return ApiResult.success(demGridMemderStatisticService.gridMemderStatistic(gridArea,mapGridName,gridGrade));
    }

}

