站点基本信息接口完善等
This commit is contained in:
@ -1,28 +1,20 @@
|
||||
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.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.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.ggroup.domain.GSiteIrrigateInfo;
|
||||
import com.fastbee.ggroup.service.IGSiteIrrigateInfoService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
|
||||
/**
|
||||
* 灌区基础信息Controller
|
||||
@ -38,31 +30,6 @@ public class GSiteIrrigateInfoController extends BaseController
|
||||
@Autowired
|
||||
private IGSiteIrrigateInfoService gSiteIrrigateInfoService;
|
||||
|
||||
/**
|
||||
* 查询灌区基础信息列表
|
||||
*/
|
||||
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询灌区基础信息列表")
|
||||
public TableDataInfo list(GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteIrrigateInfo> list = gSiteIrrigateInfoService.selectGSiteIrrigateInfoList(gSiteIrrigateInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出灌区基础信息列表
|
||||
*/
|
||||
@ApiOperation("导出灌区基础信息列表")
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||
{
|
||||
List<GSiteIrrigateInfo> list = gSiteIrrigateInfoService.selectGSiteIrrigateInfoList(gSiteIrrigateInfo);
|
||||
ExcelUtil<GSiteIrrigateInfo> util = new ExcelUtil<GSiteIrrigateInfo>(GSiteIrrigateInfo.class);
|
||||
util.exportExcel(response, list, "灌区基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取灌区基础信息详细信息
|
||||
@ -72,20 +39,8 @@ public class GSiteIrrigateInfoController extends BaseController
|
||||
@ApiOperation("获取灌区基础信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gSiteIrrigateInfoService.selectGSiteIrrigateInfoBySiteId(id));
|
||||
return AjaxResult.success(gSiteIrrigateInfoService.selectGSiteIrrigateInfoBySiteId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增灌区基础信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增灌区基础信息")
|
||||
public AjaxResult add(@RequestBody GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||
{
|
||||
return toAjax(gSiteIrrigateInfoService.insertGSiteIrrigateInfo(gSiteIrrigateInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改灌区基础信息
|
||||
*/
|
||||
@ -97,14 +52,4 @@ public class GSiteIrrigateInfoController extends BaseController
|
||||
return toAjax(gSiteIrrigateInfoService.updateGSiteIrrigateInfo(gSiteIrrigateInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除灌区基础信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除灌区基础信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSiteIrrigateInfoService.deleteGSiteIrrigateInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -40,29 +40,6 @@ public class GSiteMonitorInfoController extends BaseController
|
||||
this.gSiteInfoService = gSiteInfoService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点基础信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询站点基础信息列表")
|
||||
public TableDataInfo list(GSiteMonitorInfo gSiteMonitorInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteMonitorInfo> list = gSiteInfoService.selectGSiteInfoList(gSiteMonitorInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点基础信息列表
|
||||
*/
|
||||
@ApiOperation("导出站点基础信息列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteMonitorInfo gSiteMonitorInfo)
|
||||
{
|
||||
List<GSiteMonitorInfo> list = gSiteInfoService.selectGSiteInfoList(gSiteMonitorInfo);
|
||||
ExcelUtil<GSiteMonitorInfo> util = new ExcelUtil<>(GSiteMonitorInfo.class);
|
||||
util.exportExcel(response, list, "站点基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点基础信息详细信息
|
||||
@ -74,16 +51,6 @@ public class GSiteMonitorInfoController extends BaseController
|
||||
return AjaxResult.success(gSiteInfoService.selectGSiteInfoById(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点基础信息
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation("新增站点基础信息")
|
||||
public AjaxResult add(@RequestBody GSiteMonitorInfo gSiteMonitorInfo)
|
||||
{
|
||||
return toAjax(gSiteInfoService.insertGSiteInfo(gSiteMonitorInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点基础信息
|
||||
*/
|
||||
@ -94,13 +61,4 @@ public class GSiteMonitorInfoController extends BaseController
|
||||
return toAjax(gSiteInfoService.updateGSiteInfo(gSiteMonitorInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点基础信息
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除站点基础信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSiteInfoService.deleteGSiteInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -38,31 +38,6 @@ public class GSitePumpInfoController extends BaseController
|
||||
@Autowired
|
||||
private IGSitePumpInfoService gSitePumpInfoService;
|
||||
|
||||
/**
|
||||
* 查询泵站信息列表
|
||||
*/
|
||||
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询泵站信息列表")
|
||||
public TableDataInfo list(GSitePumpInfo gSitePumpInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSitePumpInfo> list = gSitePumpInfoService.selectGSitePumpInfoList(gSitePumpInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出泵站信息列表
|
||||
*/
|
||||
@ApiOperation("导出泵站信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSitePumpInfo gSitePumpInfo)
|
||||
{
|
||||
List<GSitePumpInfo> list = gSitePumpInfoService.selectGSitePumpInfoList(gSitePumpInfo);
|
||||
ExcelUtil<GSitePumpInfo> util = new ExcelUtil<GSitePumpInfo>(GSitePumpInfo.class);
|
||||
util.exportExcel(response, list, "泵站信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取泵站信息详细信息
|
||||
@ -72,18 +47,7 @@ public class GSitePumpInfoController extends BaseController
|
||||
@ApiOperation("获取泵站信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gSitePumpInfoService.selectGSitePumpInfoBySiteId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增泵站信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增泵站信息")
|
||||
public AjaxResult add(@RequestBody GSitePumpInfo gSitePumpInfo)
|
||||
{
|
||||
return toAjax(gSitePumpInfoService.insertGSitePumpInfo(gSitePumpInfo));
|
||||
return AjaxResult.success(gSitePumpInfoService.selectGSitePumpInfoBySiteId(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,14 +61,4 @@ public class GSitePumpInfoController extends BaseController
|
||||
return toAjax(gSitePumpInfoService.updateGSiteSluiceInfo(gSitePumpInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除泵站信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除泵站信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSitePumpInfoService.deleteGSitePumpInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -38,32 +38,6 @@ public class GSiteReservoirInfoController extends BaseController
|
||||
@Autowired
|
||||
private IGSiteReservoirInfoService gSiteReservoirInfoService;
|
||||
|
||||
/**
|
||||
* 查询水库站点基础信息列表
|
||||
*/
|
||||
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询水库站点基础信息列表")
|
||||
public TableDataInfo list(GSiteReservoirInfo gSiteReservoirInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteReservoirInfo> list = gSiteReservoirInfoService.selectGSiteReservoirInfoList(gSiteReservoirInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水库站点基础信息列表
|
||||
*/
|
||||
@ApiOperation("导出水库站点基础信息列表")
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteReservoirInfo gSiteReservoirInfo)
|
||||
{
|
||||
List<GSiteReservoirInfo> list = gSiteReservoirInfoService.selectGSiteReservoirInfoList(gSiteReservoirInfo);
|
||||
ExcelUtil<GSiteReservoirInfo> util = new ExcelUtil<GSiteReservoirInfo>(GSiteReservoirInfo.class);
|
||||
util.exportExcel(response, list, "水库站点基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取根据站点id获取水库站点基础信息详细信息
|
||||
*/
|
||||
@ -72,18 +46,7 @@ public class GSiteReservoirInfoController extends BaseController
|
||||
@ApiOperation("获取水库站点基础信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("siteId") Long siteId)
|
||||
{
|
||||
return success(gSiteReservoirInfoService.selectGSiteReservoirInfoById(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水库站点基础信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增水库站点基础信息")
|
||||
public AjaxResult add(@RequestBody GSiteReservoirInfo gSiteReservoirInfo)
|
||||
{
|
||||
return toAjax(gSiteReservoirInfoService.insertGSiteReservoirInfo(gSiteReservoirInfo));
|
||||
return AjaxResult.success(gSiteReservoirInfoService.selectGSiteReservoirInfoBySiteId(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,15 +59,4 @@ public class GSiteReservoirInfoController extends BaseController
|
||||
{
|
||||
return toAjax(gSiteReservoirInfoService.updateGSiteReservoirInfo(gSiteReservoirInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水库站点基础信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除水库站点基础信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSiteReservoirInfoService.deleteGSiteReservoirInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -36,65 +36,18 @@ public class GSiteRiverInfoController extends BaseController
|
||||
@Autowired
|
||||
private IGSiteRiverInfoService gRiverInfoService;
|
||||
|
||||
/**
|
||||
* 查询河流基础信息列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询河流基础信息列表")
|
||||
public TableDataInfo list(GSiteRiverInfo gSiteRiverInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gSiteRiverInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据站点id获取河流基本信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/byStationId/{stationId}")
|
||||
@ApiOperation("根据站点id获取河流基本信息")
|
||||
public AjaxResult listByStationId(@PathVariable("stationId") Long stationId){
|
||||
GSiteRiverInfo gSiteRiverInfo = new GSiteRiverInfo();
|
||||
gSiteRiverInfo.setSiteId(stationId);
|
||||
List<GSiteRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gSiteRiverInfo);
|
||||
return success(!list.isEmpty()?list.get(0):null);
|
||||
public AjaxResult listByStationId(@PathVariable("stationId") Long siteId){
|
||||
|
||||
return AjaxResult.success(gRiverInfoService.selectGRiverInfoBySiteId(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出河流基础信息列表
|
||||
*/
|
||||
@ApiOperation("导出河流基础信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteRiverInfo gSiteRiverInfo)
|
||||
{
|
||||
List<GSiteRiverInfo> list = gRiverInfoService.selectGRiverInfoList(gSiteRiverInfo);
|
||||
ExcelUtil<GSiteRiverInfo> util = new ExcelUtil<GSiteRiverInfo>(GSiteRiverInfo.class);
|
||||
util.exportExcel(response, list, "河流基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 河流基础信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取河流基础信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gRiverInfoService.selectGRiverInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增河流基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增河流基础信息")
|
||||
public AjaxResult add(@RequestBody GSiteRiverInfo gSiteRiverInfo)
|
||||
{
|
||||
return toAjax(gRiverInfoService.insertGRiverInfo(gSiteRiverInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改河流基础信息
|
||||
@ -107,14 +60,5 @@ public class GSiteRiverInfoController extends BaseController
|
||||
return toAjax(gRiverInfoService.updateGRiverInfo(gSiteRiverInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除河流基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除河流基础信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gRiverInfoService.deleteGRiverInfoByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,60 +38,18 @@ public class GSiteSluiceInfoController extends BaseController
|
||||
@Autowired
|
||||
private IGSiteSluiceInfoService gSiteSluiceInfoService;
|
||||
|
||||
/**
|
||||
* 查询水闸基本信息列表
|
||||
*/
|
||||
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询水闸基本信息列表")
|
||||
public TableDataInfo list(GSiteSluiceInfo gSiteSluiceInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteSluiceInfo> list = gSiteSluiceInfoService.selectGSiteSluiceInfoList(gSiteSluiceInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水闸基本信息列表
|
||||
*/
|
||||
@ApiOperation("导出水闸基本信息列表")
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteSluiceInfo gSiteSluiceInfo)
|
||||
{
|
||||
List<GSiteSluiceInfo> list = gSiteSluiceInfoService.selectGSiteSluiceInfoList(gSiteSluiceInfo);
|
||||
ExcelUtil<GSiteSluiceInfo> util = new ExcelUtil<GSiteSluiceInfo>(GSiteSluiceInfo.class);
|
||||
util.exportExcel(response, list, "水闸基本信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取水闸基本信息详细信息
|
||||
*
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取水闸基本信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gSiteSluiceInfoService.selectGSiteSluiceInfoById(id));
|
||||
}*/
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:siteId')")
|
||||
@GetMapping(value = "/{siteId}")
|
||||
@ApiOperation("获取水闸基本信息详细信息")
|
||||
public AjaxResult getsiteIdInfo(@PathVariable("siteId") Long siteId)
|
||||
{
|
||||
return success(gSiteSluiceInfoService.selectGSiteSluiceInfoBySiteId(siteId));
|
||||
return AjaxResult.success(gSiteSluiceInfoService.selectGSiteSluiceInfoBySiteId(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水闸基本信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增水闸基本信息")
|
||||
public AjaxResult add(@RequestBody GSiteSluiceInfo gSiteSluiceInfo)
|
||||
{
|
||||
return toAjax(gSiteSluiceInfoService.insertGSiteSluiceInfo(gSiteSluiceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水闸基本信息
|
||||
@ -104,19 +62,7 @@ public class GSiteSluiceInfoController extends BaseController
|
||||
return toAjax(gSiteSluiceInfoService.updateGSiteSluiceInfo(gSiteSluiceInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水闸基本信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除水闸基本信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSiteSluiceInfoService.deleteGSiteSluiceInfoByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 更新水库的基本信息
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user