站点搜索接口,图例管理,mybatis-plus连表插件整合,零碎修改等

This commit is contained in:
mi9688
2024-10-09 15:03:18 +08:00
parent b66357dd77
commit 04def663c1
21 changed files with 568 additions and 28 deletions

View File

@ -3,6 +3,7 @@ package com.fastbee.data.controller.gis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.ggroup.domain.dto.GLegendDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -47,22 +48,22 @@ public class GLegendController extends BaseController
public TableDataInfo list(GLegend gLegend)
{
startPage();
List<GLegend> list = gLegendService.selectGLegendList(gLegend);
List<GLegendDto> 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, "图例数据");
}
// @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, "图例数据");
// }
/**
* 获取图例详细信息

View File

@ -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.GLegendType;
import com.fastbee.ggroup.service.IGLegendTypeService;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.common.core.page.TableDataInfo;
/**
* 图例类型Controller
*
* @author kerwincui
* @date 2024-10-09
*/
@RestController
@RequestMapping("/gis/legend/type")
@Api(tags = "图例类型")
public class GLegendTypeController extends BaseController
{
@Autowired
private IGLegendTypeService gLegendTypeService;
/**
* 查询图例类型列表
*/
@PreAuthorize("@ss.hasPermi('ggroup:type:list')")
@GetMapping("/list")
@ApiOperation("查询图例类型列表")
public TableDataInfo list(GLegendType gLegendType)
{
startPage();
List<GLegendType> list = gLegendTypeService.selectGLegendTypeList(gLegendType);
return getDataTable(list);
}
/**
* 导出图例类型列表
*/
@ApiOperation("导出图例类型列表")
@PreAuthorize("@ss.hasPermi('ggroup:type:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, GLegendType gLegendType)
{
List<GLegendType> list = gLegendTypeService.selectGLegendTypeList(gLegendType);
ExcelUtil<GLegendType> util = new ExcelUtil<GLegendType>(GLegendType.class);
util.exportExcel(response, list, "图例类型数据");
}
/**
* 获取图例类型详细信息
*/
@PreAuthorize("@ss.hasPermi('ggroup:type:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取图例类型详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(gLegendTypeService.selectGLegendTypeById(id));
}
/**
* 新增图例类型
*/
@PreAuthorize("@ss.hasPermi('ggroup:type:add')")
@PostMapping
@ApiOperation("新增图例类型")
public AjaxResult add(@RequestBody GLegendType gLegendType)
{
return toAjax(gLegendTypeService.insertGLegendType(gLegendType));
}
/**
* 修改图例类型
*/
@PreAuthorize("@ss.hasPermi('ggroup:type:edit')")
@PutMapping
@ApiOperation("修改图例类型")
public AjaxResult edit(@RequestBody GLegendType gLegendType)
{
return toAjax(gLegendTypeService.updateGLegendType(gLegendType));
}
/**
* 删除图例类型
*/
@PreAuthorize("@ss.hasPermi('ggroup:type:remove')")
@DeleteMapping("/{ids}")
@ApiOperation("删除图例类型")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(gLegendTypeService.deleteGLegendTypeByIds(ids));
}
}

View File

@ -131,4 +131,20 @@ public class GSitesController extends BaseController
{
return toAjax(gSitesService.deleteGSitesByIds(ids));
}
/**
* 搜索站点
*/
@PreAuthorize("@ss.hasPermi('ggroup:sites:search')")
@GetMapping("/search")
@ApiOperation("搜索站点")
public TableDataInfo search(GSites gSites){
startPage();
List<GSites> list = gSitesService.searchGSitesList(gSites);
return getDataTable(list);
}
}