| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- package com.sooka.sponest.data.digitalwaterconservancy.controller;
- import java.util.List;
- import java.io.IOException;
- import javax.servlet.http.HttpServletResponse;
- import com.sooka.sponest.data.digitalwaterconservancy.domain.CenterdataTWaterRainfallStation;
- import com.sooka.sponest.data.digitalwaterconservancy.service.ICenterdataTWaterRainfallStationService;
- 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.log.annotation.Log;
- import com.ruoyi.common.log.enums.BusinessType;
- import com.ruoyi.common.security.annotation.RequiresPermissions;
- import com.ruoyi.common.core.web.controller.BaseController;
- import com.ruoyi.common.core.web.domain.AjaxResult;
- import com.ruoyi.common.core.utils.poi.ExcelUtil;
- import com.ruoyi.common.core.web.page.TableDataInfo;
- /**
- * 水利-雨量站管理Controller
- *
- * @author LG
- * @date 2025-02-20
- */
- @RestController
- @RequestMapping("/rainfall/station")
- public class CenterdataTWaterRainfallStationController extends BaseController {
- @Autowired
- private ICenterdataTWaterRainfallStationService centerdataTWaterRainfallStationService;
- /**
- * 查询水利-雨量站管理列表
- */
- @GetMapping("/list")
- public TableDataInfo list(CenterdataTWaterRainfallStation centerdataTWaterRainfallStation) {
- startPage();
- List<CenterdataTWaterRainfallStation> list = centerdataTWaterRainfallStationService.selectCenterdataTWaterRainfallStationList(centerdataTWaterRainfallStation);
- return getDataTable(list);
- }
- /**
- * 导出水利-雨量站管理列表
- */
- @Log(title = "水利-雨量站管理", businessType = BusinessType.EXPORT)
- @PostMapping("/export")
- public void export(HttpServletResponse response, CenterdataTWaterRainfallStation centerdataTWaterRainfallStation) {
- List<CenterdataTWaterRainfallStation> list = centerdataTWaterRainfallStationService.selectCenterdataTWaterRainfallStationList(centerdataTWaterRainfallStation);
- ExcelUtil<CenterdataTWaterRainfallStation> util = new ExcelUtil<CenterdataTWaterRainfallStation>(CenterdataTWaterRainfallStation.class);
- util.exportExcel(response, list, "水利-雨量站管理数据");
- }
- /**
- * 获取水利-雨量站管理详细信息
- */
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") String id) {
- return AjaxResult.success(centerdataTWaterRainfallStationService.selectCenterdataTWaterRainfallStationById(id));
- }
- /**
- * 新增水利-雨量站管理
- */
- @Log(title = "水利-雨量站管理", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody CenterdataTWaterRainfallStation centerdataTWaterRainfallStation) {
- return toAjax(centerdataTWaterRainfallStationService.insertCenterdataTWaterRainfallStation(centerdataTWaterRainfallStation));
- }
- /**
- * 修改水利-雨量站管理
- */
- @Log(title = "水利-雨量站管理", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody CenterdataTWaterRainfallStation centerdataTWaterRainfallStation) {
- return toAjax(centerdataTWaterRainfallStationService.updateCenterdataTWaterRainfallStation(centerdataTWaterRainfallStation));
- }
- /**
- * 删除水利-雨量站管理
- */
- @Log(title = "水利-雨量站管理", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable String[] ids) {
- return toAjax(centerdataTWaterRainfallStationService.deleteCenterdataTWaterRainfallStationByIds(ids));
- }
- }
|