图例相关接口完善等
This commit is contained in:
@ -3,6 +3,7 @@ package com.fastbee.data.controller.gis;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.ggroup.domain.GSites;
|
||||
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -108,4 +109,19 @@ public class GLegendController extends BaseController
|
||||
{
|
||||
return toAjax(gLegendService.deleteGLegendByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图例按照类别划分列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:legend:list')")
|
||||
@GetMapping("/category-list")
|
||||
@ApiOperation("获取图例按照类别划分列表")
|
||||
public AjaxResult listByCategory(GLegend gLegend){
|
||||
return success(gLegendService.getLegendListByCategory());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
package com.fastbee.data.controller.gis;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.ggroup.enums.GroupTagEnum;
|
||||
import com.fastbee.ggroup.enums.SiteTypeCategoryEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -51,60 +56,35 @@ public class GLegendTypeController extends BaseController
|
||||
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')")
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:type:info')")
|
||||
@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)
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:type:category')")
|
||||
@GetMapping(value = "/category/list")
|
||||
@ApiOperation("获取图例的类别列表")
|
||||
public AjaxResult typeList()
|
||||
{
|
||||
return toAjax(gLegendTypeService.insertGLegendType(gLegendType));
|
||||
List<Map<String, Object>> labelList = new ArrayList<>();
|
||||
for (SiteTypeCategoryEnum categoryEnum : SiteTypeCategoryEnum.values()) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("name", categoryEnum.getName());
|
||||
labelList.add(map);
|
||||
}
|
||||
return AjaxResult.success(labelList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改图例类型
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -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.GSiteInfo;
|
||||
import com.fastbee.ggroup.service.IGSiteInfoService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 站点基础信息Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-10-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gis/site/info")
|
||||
@Api(tags = "站点基础信息")
|
||||
public class GSiteInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IGSiteInfoService gSiteInfoService;
|
||||
|
||||
/**
|
||||
* 查询站点基础信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询站点基础信息列表")
|
||||
public TableDataInfo list(GSiteInfo gSiteInfo)
|
||||
{
|
||||
startPage();
|
||||
List<GSiteInfo> list = gSiteInfoService.selectGSiteInfoList(gSiteInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点基础信息列表
|
||||
*/
|
||||
@ApiOperation("导出站点基础信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GSiteInfo gSiteInfo)
|
||||
{
|
||||
List<GSiteInfo> list = gSiteInfoService.selectGSiteInfoList(gSiteInfo);
|
||||
ExcelUtil<GSiteInfo> util = new ExcelUtil<GSiteInfo>(GSiteInfo.class);
|
||||
util.exportExcel(response, list, "站点基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点基础信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取站点基础信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gSiteInfoService.selectGSiteInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增站点基础信息")
|
||||
public AjaxResult add(@RequestBody GSiteInfo gSiteInfo)
|
||||
{
|
||||
return toAjax(gSiteInfoService.insertGSiteInfo(gSiteInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改站点基础信息")
|
||||
public AjaxResult edit(@RequestBody GSiteInfo gSiteInfo)
|
||||
{
|
||||
return toAjax(gSiteInfoService.updateGSiteInfo(gSiteInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点基础信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除站点基础信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSiteInfoService.deleteGSiteInfoByIds(ids));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user