package com.usky.fire.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.fire.domain.BaseGgpFacility;
import com.usky.fire.service.BaseGgpFacilityService;
import com.usky.fire.service.vo.BaseGgpFacilityListVO;
import com.usky.fire.service.vo.BaseGgpFacilityStatisticVO;
import com.usky.fire.service.vo.BaseGgpFacilityVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 地理信息 前端控制器
 * </p>
 *
 * @author han
 * @since 2023-04-10
 */
@RestController
@RequestMapping("/baseGgpFacility")
public class BaseGgpFacilityController {
    @Autowired
    private BaseGgpFacilityService baseGgpFacilityService;
    /**
     * 地理信息-撒点
     *
     * @param baseGgpFacilityVO
     * @return
     */
    @PostMapping("baseGgpFacilityList")
    public ApiResult<List<BaseGgpFacility>> baseGgpFacilityList(@RequestBody BaseGgpFacilityVO baseGgpFacilityVO) {
        return ApiResult.success(baseGgpFacilityService.baseGgpFacilityList(baseGgpFacilityVO));
    }

    /**
     * 统计
     * @param baseGgpFacilityVO
     * @return
     */
    @PostMapping("statistic")
    public ApiResult<List<BaseGgpFacilityStatisticVO>> statistic(@RequestBody BaseGgpFacilityVO baseGgpFacilityVO){
        return ApiResult.success(baseGgpFacilityService.statistic(baseGgpFacilityVO));
    }
}

