gis组管理,站点管理部分接口
This commit is contained in:
@ -48,8 +48,14 @@
|
||||
<version>3.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-ggroup-service</artifactId>
|
||||
<version>3.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fastbee</groupId>-->
|
||||
<!-- <artifactId>fastbee-project-service</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
@ -0,0 +1,114 @@
|
||||
package com.fastbee.data.controller.gis;
|
||||
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.ggroup.domain.GGroups;
|
||||
import com.fastbee.ggroup.domain.dto.GGroupSite;
|
||||
import com.fastbee.ggroup.service.IGGroupsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-09-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gis/groups")
|
||||
@Api(tags = "组")
|
||||
public class GGroupsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* 查询组下面的直属站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:listSite')")
|
||||
@GetMapping("/list-site")
|
||||
@ApiOperation("查询组下面的直属站点")
|
||||
public TableDataInfo listSite(GGroups gGroups)
|
||||
{
|
||||
super.startPage();
|
||||
List<GGroupSite> list = gGroupsService.selectGGroupsListSites(gGroups);
|
||||
return super.getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出组列表
|
||||
*/
|
||||
@ApiOperation("导出组列表")
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GGroups gGroups)
|
||||
{
|
||||
List<GGroups> list = gGroupsService.selectGGroupsList(gGroups);
|
||||
ExcelUtil<GGroups> util = new ExcelUtil<GGroups>(GGroups.class);
|
||||
util.exportExcel(response, list, "组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取组详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取组详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gGroupsService.selectGGroupsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增组")
|
||||
public AjaxResult add(@RequestBody GGroups gGroups)
|
||||
{
|
||||
return toAjax(gGroupsService.insertGGroups(gGroups));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改组")
|
||||
public AjaxResult edit(@RequestBody GGroups gGroups)
|
||||
{
|
||||
return toAjax(gGroupsService.updateGGroups(gGroups));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:groups:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除组")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gGroupsService.deleteGGroupsByIds(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.GSites;
|
||||
import com.fastbee.ggroup.service.IGSitesService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 站点Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-09-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gis/sites")
|
||||
@Api(tags = "站点")
|
||||
public class GSitesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IGSitesService gSitesService;
|
||||
|
||||
/**
|
||||
* 查询站点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询站点列表")
|
||||
public TableDataInfo list(GSites gSites)
|
||||
{
|
||||
startPage();
|
||||
List<GSites> list = gSitesService.selectGSitesList(gSites);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出站点列表
|
||||
*/
|
||||
@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, "站点数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取站点详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(gSitesService.selectGSitesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增站点")
|
||||
public AjaxResult add(@RequestBody GSites gSites)
|
||||
{
|
||||
return toAjax(gSitesService.insertGSites(gSites));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改站点")
|
||||
public AjaxResult edit(@RequestBody GSites gSites)
|
||||
{
|
||||
return toAjax(gSitesService.updateGSites(gSites));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除站点")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(gSitesService.deleteGSitesByIds(ids));
|
||||
}
|
||||
}
|
@ -19,7 +19,6 @@ 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.core.page.TableDataInfo;
|
||||
|
Reference in New Issue
Block a user