多级目录管理以及站点管理接口完成,图例管理基本接口
This commit is contained in:
@ -0,0 +1,110 @@
|
||||
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.GLegend;
|
||||
import com.fastbee.ggroup.service.IGLegendService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 图例Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-10-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ggroup/legend")
|
||||
@Api(tags = "图例")
|
||||
public class GLegendController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IGLegendService gLegendService;
|
||||
|
||||
/**
|
||||
* 查询图例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询图例列表")
|
||||
public TableDataInfo list(GLegend gLegend)
|
||||
{
|
||||
startPage();
|
||||
List<GLegend> list = gLegendService.selectGLegendList(gLegend);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出图例列表
|
||||
*/
|
||||
@ApiOperation("导出图例列表")
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GLegend gLegend)
|
||||
{
|
||||
List<GLegend> list = gLegendService.selectGLegendList(gLegend);
|
||||
ExcelUtil<GLegend> util = new ExcelUtil<GLegend>(GLegend.class);
|
||||
util.exportExcel(response, list, "图例数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图例详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取图例详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gLegendService.selectGLegendById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增图例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增图例")
|
||||
public AjaxResult add(@RequestBody GLegend gLegend)
|
||||
{
|
||||
return toAjax(gLegendService.insertGLegend(gLegend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改图例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改图例")
|
||||
public AjaxResult edit(@RequestBody GLegend gLegend)
|
||||
{
|
||||
return toAjax(gLegendService.updateGLegend(gLegend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除图例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除图例")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gLegendService.deleteGLegendByIds(ids));
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.ggroup.domain.dto.GGroupSiteDto;
|
||||
import com.fastbee.ggroup.domain.dto.GGroupSiteRelateDto;
|
||||
import com.fastbee.ggroup.domain.dto.GSitesEditDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -53,6 +54,16 @@ public class GSitesController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点关联组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:relate')")
|
||||
@PostMapping("/relate")
|
||||
@ApiOperation("站点关联组")
|
||||
public AjaxResult relate(@RequestBody GGroupSiteRelateDto gGroupSiteRelateDto){
|
||||
return toAjax(gSitesService.relateGroup(gGroupSiteRelateDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点列表
|
||||
*/
|
||||
|
Reference in New Issue
Block a user