package com.fastbee.data.controller.gis;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.ggroup.domain.GSiteMonitorInfo;
import com.fastbee.ggroup.service.IGSiteMonitorInfoService;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.common.core.page.TableDataInfo;

/**
 * 站点基础信息Controller
 *
 * @author kerwincui
 * &#064;date  2024-10-10
 */
@RestController
@RequestMapping("/gis/site/monitor/info")
//@PreAuthorize("@ss.hasPermi('ggroup:groups')")
@Api(tags = "站点基础信息")
public class GSiteMonitorInfoController extends BaseController
{

    private final IGSiteMonitorInfoService gSiteInfoService;

    public GSiteMonitorInfoController(IGSiteMonitorInfoService gSiteInfoService) {
        this.gSiteInfoService = gSiteInfoService;
    }


    /**
     * 获取站点基础信息详细信息
     */
    @GetMapping(value = "/{siteId}")
    @ApiOperation("获取站点基础信息详细信息")
    public AjaxResult getInfo(@PathVariable("siteId") Long siteId)
    {
        return AjaxResult.success(gSiteInfoService.selectGSiteInfoById(siteId));
    }

    /**
     * 修改站点基础信息
     */
    @PutMapping
    @ApiOperation("修改站点基础信息")
    public AjaxResult edit(@RequestBody GSiteMonitorInfo gSiteMonitorInfo)
    {
        return toAjax(gSiteInfoService.updateGSiteInfo(gSiteMonitorInfo));
    }

}
