package com.zc.business.controller; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.zc.business.domain.DcNoStakeWarningTable; import com.zc.business.service.impl.DcNoStakeWarningTableServiceImpl; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; import java.util.Date; import java.util.List; /** * 无桩号预警Controller * * @author zhaoxianglong */ @Api(tags = {"无桩号预警"}) @RestController @RequestMapping("/business/dcNoStakeWarningTable") public class DcNoStakeWarningTableController extends BaseController { @Resource private DcNoStakeWarningTableServiceImpl dcNoStakeWarningTableService; //*********************************路网设施增删改查****************************************** /** * 分页查询无桩号预警列表 * * @param dcNoStakeWarningTable 请求参数 * @return 分页查询结果 */ @ApiOperation("分页查询路网设施列表") // @PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:list')") @GetMapping("list") public TableDataInfo listFacility(DcNoStakeWarningTable dcNoStakeWarningTable, @RequestParam(value = "endTime", required = false) Date endTime, @RequestParam(value = "startTime", required = false)Date startTime) { return getDataTable(dcNoStakeWarningTableService.pageDcNoStakeWarningTable(dcNoStakeWarningTable,endTime,startTime)); } /** * 无分页查询无桩号预警列表 * * @param dcNoStakeWarningTable 请求参数 * @return 查询结果 */ @ApiOperation("无分页查询路网设施列表") // @PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:query')") @GetMapping("query") public AjaxResult queryFacility(DcNoStakeWarningTable dcNoStakeWarningTable, @RequestParam(value = "endTime", required = false) Date endTime, @RequestParam(value = "startTime", required = false)Date startTime) { return AjaxResult.success(dcNoStakeWarningTableService.listDcNoStakeWarningTable(dcNoStakeWarningTable,endTime,startTime)); } /** * 根据id查询无桩号预警信息 * * @param id id * @return 查询结果 */ @ApiOperation("根据id查询路网设施信息") // @PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:query')") @GetMapping("{id}") public AjaxResult getFacility(@PathVariable String id) { return AjaxResult.success(dcNoStakeWarningTableService.getDcNoStakeWarningTable(id)); } /** * 新增 * * @param dcNoStakeWarningTable 新增参数 * @return 新增操作结果 */ @ApiOperation("新增") //@PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:add')") @Log(title = "新增路网设施", businessType = BusinessType.INSERT) @PostMapping public AjaxResult addFacility(@Valid @RequestBody DcNoStakeWarningTable dcNoStakeWarningTable) { return toAjax(dcNoStakeWarningTableService.addDcNoStakeWarningTable(dcNoStakeWarningTable)); } /** * 修改 * * @param dcNoStakeWarningTable 修改参数 * @return 修改操作结果 */ @ApiOperation("修改") // @PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:edit')") @Log(title = "修改路网设施", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult editFacility(@Valid @RequestBody DcNoStakeWarningTable dcNoStakeWarningTable) { return toAjax(dcNoStakeWarningTableService.editDcNoStakeWarningTable(dcNoStakeWarningTable)); } /** * 删除 * * @param ids id集 * @return 删除操作结果 */ @ApiOperation("删除") // @PreAuthorize("@ss.hasPermi('iot:dcNoStakeWarningTable:remove')") @Log(title = "删除", businessType = BusinessType.DELETE) @DeleteMapping("{ids}") public AjaxResult removeFacility(@PathVariable List ids) { return toAjax(dcNoStakeWarningTableService.removeDcNoStakeWarningTable(ids)); } }