package com.ruoyi.alarmpoints.well.controller;
|
|
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.beans.factory.annotation.Autowired;
|
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.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.alarmpoints.well.domain.ArdWellGuideCamera;
|
import com.ruoyi.alarmpoints.well.service.IArdWellGuideCameraService;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
/**
|
* 井关联引导相机Controller
|
*
|
* @author ard
|
* @date 2024-01-15
|
*/
|
@Api(tags = "井关联引导相机接口")
|
@RestController
|
@RequestMapping("/well/guidecamera")
|
public class ArdWellGuideCameraController extends BaseController
|
{
|
@Autowired
|
private IArdWellGuideCameraService ardWellGuideCameraService;
|
|
/**
|
* 查询井关联引导相机列表
|
*/
|
@ApiOperation("查询井关联引导相机列表")
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:list')")
|
@GetMapping("/list")
|
public TableDataInfo list(ArdWellGuideCamera ardWellGuideCamera)
|
{
|
startPage();
|
List<ArdWellGuideCamera> list = ardWellGuideCameraService.selectArdWellGuideCameraList(ardWellGuideCamera);
|
return getDataTable(list);
|
}
|
|
/**
|
* 导出井关联引导相机列表
|
*/
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:export')")
|
@Log(title = "井关联引导相机", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, ArdWellGuideCamera ardWellGuideCamera)
|
{
|
List<ArdWellGuideCamera> list = ardWellGuideCameraService.selectArdWellGuideCameraList(ardWellGuideCamera);
|
ExcelUtil<ArdWellGuideCamera> util = new ExcelUtil<ArdWellGuideCamera>(ArdWellGuideCamera.class);
|
util.exportExcel(response, list, "井关联引导相机数据");
|
}
|
|
/**
|
* 获取井关联引导相机详细信息
|
*/
|
@ApiOperation("获取井关联引导相机详细信息")
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:query')")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
{
|
return success(ardWellGuideCameraService.selectArdWellGuideCameraById(id));
|
}
|
|
/**
|
* 新增井关联引导相机
|
*/
|
@ApiOperation("新增井关联引导相机")
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:add')")
|
@Log(title = "井关联引导相机", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody ArdWellGuideCamera ardWellGuideCamera)
|
{
|
return toAjax(ardWellGuideCameraService.insertArdWellGuideCamera(ardWellGuideCamera));
|
}
|
|
/**
|
* 修改井关联引导相机
|
*/
|
@ApiOperation("修改井关联引导相机")
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:edit')")
|
@Log(title = "井关联引导相机", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody ArdWellGuideCamera ardWellGuideCamera)
|
{
|
return toAjax(ardWellGuideCameraService.updateArdWellGuideCamera(ardWellGuideCamera));
|
}
|
|
/**
|
* 删除井关联引导相机
|
*/
|
@ApiOperation("删除井关联引导相机")
|
@PreAuthorize("@ss.hasPermi('well:guidecamera:remove')")
|
@Log(title = "井关联引导相机", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{ids}")
|
public AjaxResult remove(@PathVariable String[] ids)
|
{
|
return toAjax(ardWellGuideCameraService.deleteArdWellGuideCameraByIds(ids));
|
}
|
}
|