接口逻辑完善,大屏树状结构接口,站点图json数据存储等,零碎修改等

This commit is contained in:
mi9688
2024-10-12 17:45:54 +08:00
parent eefc4e9a45
commit 22b3df8ddb
29 changed files with 500 additions and 183 deletions

View File

@ -34,16 +34,26 @@ public class GGroupsController extends BaseController
private IGGroupsService gGroupsService;
/**
* 查询组列表
* 查询组树状结构列表
*/
@PreAuthorize("@ss.hasPermi('iot:groups:list')")
@GetMapping("/list")
@ApiOperation("查询组列表")
public AjaxResult list(GGroups gGroups)
{
List<GGroups> list = gGroupsService.selectGGroupsList(gGroups);
return success(list);
return success(gGroupsService.selectGGroupsList(gGroups));
}
/**
* 查询组带叶子节点树状列表
*/
@PreAuthorize("@ss.hasPermi('iot:groups:list')")
@GetMapping("/list-with-leaf")
@ApiOperation("查询组带叶子节点树状列表")
public AjaxResult listWithLeaf(GGroups gGroups){
return success(gGroupsService.selectGGroupsAndSitesList(gGroups));
}
/**
* 查询组下面的直属站点
*/

View File

@ -1,9 +1,9 @@
package com.fastbee.data.controller.gis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.fastbee.ggroup.domain.GSites;
import com.fastbee.common.utils.poi.ExcelUtil;
import com.fastbee.ggroup.domain.dto.GLegendUpdateDto;
import com.fastbee.ggroup.domain.dto.GLegendDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -17,15 +17,14 @@ 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;
import javax.servlet.http.HttpServletResponse;
/**
* 图例Controller
*
@ -41,7 +40,7 @@ public class GLegendController extends BaseController
private IGLegendService gLegendService;
/**
* 查询图例列表
* 查询/搜索图例列表
*/
@PreAuthorize("@ss.hasPermi('ggroup:legend:list')")
@GetMapping("/list")
@ -56,15 +55,15 @@ public class GLegendController extends BaseController
/**
* 导出图例列表
*/
// @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<GLegendDto> list = gLegendService.selectGLegendList(gLegend);
ExcelUtil<GLegendDto> util = new ExcelUtil<GLegendDto>(GLegendDto.class);
util.exportExcel(response, list, "图例数据");
}
/**
* 获取图例详细信息
@ -94,7 +93,7 @@ public class GLegendController extends BaseController
@PreAuthorize("@ss.hasPermi('ggroup:legend:edit')")
@PutMapping
@ApiOperation("修改图例")
public AjaxResult edit(@RequestBody GLegend gLegend)
public AjaxResult edit(@RequestBody GLegendUpdateDto gLegend)
{
return toAjax(gLegendService.updateGLegend(gLegend));
}

View File

@ -6,6 +6,7 @@ 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 com.fastbee.ggroup.domain.dto.GSitesSelectDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
@ -42,15 +43,15 @@ public class GSitesController extends BaseController
private IGSitesService gSitesService;
/**
* 查询站点列表
* 查询/搜索站点列表
*/
@PreAuthorize("@ss.hasPermi('ggroup:sites:list')")
@GetMapping("/list")
@ApiOperation("查询站点列表")
public TableDataInfo list(GSites gSites)
public TableDataInfo list(GSitesSelectDto gSites)
{
startPage();
List<GSites> list = gSitesService.selectGSitesList(gSites);
List<?> list = gSitesService.selectGSitesList(gSites);
return getDataTable(list);
}
@ -64,18 +65,18 @@ public class GSitesController extends BaseController
return toAjax(gSitesService.relateGroup(gGroupSiteRelateDto));
}
/**
* 导出站点列表
*/
@ApiOperation("导出站点列表")
@PreAuthorize("@ss.hasPermi('ggroup:sites:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, GSites gSites)
{
List<GSites> list = gSitesService.selectGSitesList(gSites);
ExcelUtil<GSites> util = new ExcelUtil<GSites>(GSites.class);
util.exportExcel(response, list, "站点数据");
}
// /**
// * 导出站点列表
// */
// @ApiOperation("导出站点列表")
// @PreAuthorize("@ss.hasPermi('ggroup:sites:export')")
// @PostMapping("/export")
// public void export(HttpServletResponse response, GSitesSelectDto gSites)
// {
// List<GSites> list = gSitesService.selectGSitesList(gSites);
// ExcelUtil<GSites> util = new ExcelUtil<GSites>(GSites.class);
// util.exportExcel(response, list, "站点数据");
// }
/**
* 获取站点详细信息