水闸、灌区、泵站基本信息管理
This commit is contained in:
parent
be83b50ad0
commit
e18e832250
@ -41,7 +41,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询灌区基础信息列表
|
* 查询灌区基础信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询灌区基础信息列表")
|
@ApiOperation("查询灌区基础信息列表")
|
||||||
public TableDataInfo list(GSiteIrrigateInfo gSiteIrrigateInfo)
|
public TableDataInfo list(GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||||
@ -55,7 +55,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
* 导出灌区基础信息列表
|
* 导出灌区基础信息列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出灌区基础信息列表")
|
@ApiOperation("导出灌区基础信息列表")
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, GSiteIrrigateInfo gSiteIrrigateInfo)
|
public void export(HttpServletResponse response, GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||||
{
|
{
|
||||||
@ -67,7 +67,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取灌区基础信息详细信息
|
* 获取灌区基础信息详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiOperation("获取灌区基础信息详细信息")
|
@ApiOperation("获取灌区基础信息详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
@ -78,7 +78,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增灌区基础信息
|
* 新增灌区基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增灌区基础信息")
|
@ApiOperation("新增灌区基础信息")
|
||||||
public AjaxResult add(@RequestBody GSiteIrrigateInfo gSiteIrrigateInfo)
|
public AjaxResult add(@RequestBody GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||||
@ -89,7 +89,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改灌区基础信息
|
* 修改灌区基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改灌区基础信息")
|
@ApiOperation("修改灌区基础信息")
|
||||||
public AjaxResult edit(@RequestBody GSiteIrrigateInfo gSiteIrrigateInfo)
|
public AjaxResult edit(@RequestBody GSiteIrrigateInfo gSiteIrrigateInfo)
|
||||||
@ -100,7 +100,7 @@ public class GSiteIrrigateInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除灌区基础信息
|
* 删除灌区基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除灌区基础信息")
|
@ApiOperation("删除灌区基础信息")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -41,7 +41,7 @@ public class GSitePumpInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询泵站信息列表
|
* 查询泵站信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询泵站信息列表")
|
@ApiOperation("查询泵站信息列表")
|
||||||
public TableDataInfo list(GSitePumpInfo gSitePumpInfo)
|
public TableDataInfo list(GSitePumpInfo gSitePumpInfo)
|
||||||
@ -67,7 +67,7 @@ public class GSitePumpInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取泵站信息详细信息
|
* 获取泵站信息详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiOperation("获取泵站信息详细信息")
|
@ApiOperation("获取泵站信息详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
@ -78,7 +78,7 @@ public class GSitePumpInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增泵站信息
|
* 新增泵站信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增泵站信息")
|
@ApiOperation("新增泵站信息")
|
||||||
public AjaxResult add(@RequestBody GSitePumpInfo gSitePumpInfo)
|
public AjaxResult add(@RequestBody GSitePumpInfo gSitePumpInfo)
|
||||||
@ -89,7 +89,7 @@ public class GSitePumpInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改泵站信息
|
* 修改泵站信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改泵站信息")
|
@ApiOperation("修改泵站信息")
|
||||||
public AjaxResult edit(@RequestBody GSitePumpInfo gSitePumpInfo)
|
public AjaxResult edit(@RequestBody GSitePumpInfo gSitePumpInfo)
|
||||||
@ -100,7 +100,7 @@ public class GSitePumpInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除泵站信息
|
* 删除泵站信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除泵站信息")
|
@ApiOperation("删除泵站信息")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -41,7 +41,7 @@ public class GSiteReservoirInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询水库站点基础信息列表
|
* 查询水库站点基础信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询水库站点基础信息列表")
|
@ApiOperation("查询水库站点基础信息列表")
|
||||||
public TableDataInfo list(GSiteReservoirInfo gSiteReservoirInfo)
|
public TableDataInfo list(GSiteReservoirInfo gSiteReservoirInfo)
|
||||||
@ -55,7 +55,7 @@ public class GSiteReservoirInfoController extends BaseController
|
|||||||
* 导出水库站点基础信息列表
|
* 导出水库站点基础信息列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出水库站点基础信息列表")
|
@ApiOperation("导出水库站点基础信息列表")
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, GSiteReservoirInfo gSiteReservoirInfo)
|
public void export(HttpServletResponse response, GSiteReservoirInfo gSiteReservoirInfo)
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ public class GSiteReservoirInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增水库站点基础信息
|
* 新增水库站点基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增水库站点基础信息")
|
@ApiOperation("新增水库站点基础信息")
|
||||||
public AjaxResult add(@RequestBody GSiteReservoirInfo gSiteReservoirInfo)
|
public AjaxResult add(@RequestBody GSiteReservoirInfo gSiteReservoirInfo)
|
||||||
@ -89,7 +89,7 @@ public class GSiteReservoirInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改水库站点基础信息
|
* 修改水库站点基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改水库站点基础信息")
|
@ApiOperation("修改水库站点基础信息")
|
||||||
public AjaxResult edit(@RequestBody GSiteReservoirInfo gSiteReservoirInfo)
|
public AjaxResult edit(@RequestBody GSiteReservoirInfo gSiteReservoirInfo)
|
||||||
@ -100,7 +100,7 @@ public class GSiteReservoirInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除水库站点基础信息
|
* 删除水库站点基础信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除水库站点基础信息")
|
@ApiOperation("删除水库站点基础信息")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -39,7 +39,7 @@ public class GSiteRiverInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询河流基础信息列表
|
* 查询河流基础信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询河流基础信息列表")
|
@ApiOperation("查询河流基础信息列表")
|
||||||
public TableDataInfo list(GSiteRiverInfo gSiteRiverInfo)
|
public TableDataInfo list(GSiteRiverInfo gSiteRiverInfo)
|
||||||
|
@ -41,7 +41,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询水闸基本信息列表
|
* 查询水闸基本信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
//@PreAuthorize("@ss.hasPermi('ggroup:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询水闸基本信息列表")
|
@ApiOperation("查询水闸基本信息列表")
|
||||||
public TableDataInfo list(GSiteSluiceInfo gSiteSluiceInfo)
|
public TableDataInfo list(GSiteSluiceInfo gSiteSluiceInfo)
|
||||||
@ -55,7 +55,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
* 导出水闸基本信息列表
|
* 导出水闸基本信息列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出水闸基本信息列表")
|
@ApiOperation("导出水闸基本信息列表")
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, GSiteSluiceInfo gSiteSluiceInfo)
|
public void export(HttpServletResponse response, GSiteSluiceInfo gSiteSluiceInfo)
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
{
|
{
|
||||||
return success(gSiteSluiceInfoService.selectGSiteSluiceInfoById(id));
|
return success(gSiteSluiceInfoService.selectGSiteSluiceInfoById(id));
|
||||||
}*/
|
}*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:siteId')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:siteId')")
|
||||||
@GetMapping(value = "/{siteId}")
|
@GetMapping(value = "/{siteId}")
|
||||||
@ApiOperation("获取水闸基本信息详细信息")
|
@ApiOperation("获取水闸基本信息详细信息")
|
||||||
public AjaxResult getsiteIdInfo(@PathVariable("siteId") Long siteId)
|
public AjaxResult getsiteIdInfo(@PathVariable("siteId") Long siteId)
|
||||||
@ -85,7 +85,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增水闸基本信息
|
* 新增水闸基本信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:add')")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增水闸基本信息")
|
@ApiOperation("新增水闸基本信息")
|
||||||
public AjaxResult add(@RequestBody GSiteSluiceInfo gSiteSluiceInfo)
|
public AjaxResult add(@RequestBody GSiteSluiceInfo gSiteSluiceInfo)
|
||||||
@ -96,7 +96,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改水闸基本信息
|
* 修改水闸基本信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:edit')")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改水闸基本信息")
|
@ApiOperation("修改水闸基本信息")
|
||||||
public AjaxResult edit(@RequestBody GSiteSluiceInfo gSiteSluiceInfo)
|
public AjaxResult edit(@RequestBody GSiteSluiceInfo gSiteSluiceInfo)
|
||||||
@ -107,7 +107,7 @@ public class GSiteSluiceInfoController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除水闸基本信息
|
* 删除水闸基本信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:info:remove')")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除水闸基本信息")
|
@ApiOperation("删除水闸基本信息")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -35,7 +35,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/gis/sites")
|
@RequestMapping("/gis/sites")
|
||||||
@Api(tags = "站点")
|
@Api(tags = "站点")
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:groups')")
|
//@PreAuthorize("@ss.hasPermi('ggroup:groups')")
|
||||||
public class GSitesController extends BaseController
|
public class GSitesController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ public class GSitesController extends BaseController
|
|||||||
* 导出站点列表
|
* 导出站点列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("导出站点列表")
|
@ApiOperation("导出站点列表")
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:sites:export')")
|
// @PreAuthorize("@ss.hasPermi('ggroup:sites:export')")
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, GSitesSelectDto gSites)
|
public void export(HttpServletResponse response, GSitesSelectDto gSites)
|
||||||
{
|
{
|
||||||
@ -142,6 +142,14 @@ public class GSitesController extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点已设备关联列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/device-linked")
|
||||||
|
@ApiOperation("已关联设备")
|
||||||
|
public AjaxResult deviceLinked(){
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,10 @@
|
|||||||
<groupId>com.fastbee</groupId>
|
<groupId>com.fastbee</groupId>
|
||||||
<artifactId>fastbee-system-service</artifactId>
|
<artifactId>fastbee-system-service</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fastbee</groupId>
|
||||||
|
<artifactId>fastbee-iot-service</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.fastbee.ggroup.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.fastbee.common.annotation.Excel;
|
||||||
|
import com.fastbee.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点设备关系对象 g_site_device
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-05
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "GSiteDevice",description = "站点设备关系 g_site_device")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class GSiteDevice extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 站点id */
|
||||||
|
@Excel(name = "站点id")
|
||||||
|
@ApiModelProperty("站点id")
|
||||||
|
private Long siteId;
|
||||||
|
|
||||||
|
/** 设备id */
|
||||||
|
@Excel(name = "设备id")
|
||||||
|
@ApiModelProperty("设备id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.fastbee.ggroup.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteDevice;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.github.yulichang.interfaces.MPJBaseJoin;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点设备关系Mapper接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-05
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface GSiteDeviceMapper extends MPJBaseMapper<GSiteDevice>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 站点设备关系
|
||||||
|
*/
|
||||||
|
public GSiteDevice selectGSiteDeviceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系列表
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 站点设备关系集合
|
||||||
|
*/
|
||||||
|
public List<GSiteDevice> selectGSiteDeviceList(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertGSiteDevice(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateGSiteDevice(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点设备关系
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteDeviceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点设备关系
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteDeviceByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.fastbee.ggroup.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteDevice;
|
||||||
|
import com.fastbee.iot.domain.Device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点设备关系Service接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-05
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface IGSiteDeviceService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 站点设备关系
|
||||||
|
*/
|
||||||
|
public GSiteDevice selectGSiteDeviceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系列表
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 站点设备关系集合
|
||||||
|
*/
|
||||||
|
public List<GSiteDevice> selectGSiteDeviceList(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertGSiteDevice(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateGSiteDevice(GSiteDevice gSiteDevice);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点设备关系
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点设备关系主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteDeviceByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点设备关系信息
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteDeviceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备已经关联关系信息
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public Device getGSiteDeviceByDevice(Long id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,116 @@
|
|||||||
|
package com.fastbee.ggroup.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fastbee.ggroup.mapper.GSitesMapper;
|
||||||
|
import com.fastbee.iot.domain.Device;
|
||||||
|
import com.fastbee.iot.mapper.DeviceMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.fastbee.ggroup.mapper.GSiteDeviceMapper;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteDevice;
|
||||||
|
import com.fastbee.ggroup.service.IGSiteDeviceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点设备关系Service业务层处理
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-11-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class GSiteDeviceServiceImpl implements IGSiteDeviceService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private GSiteDeviceMapper gSiteDeviceMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private GSitesMapper gSitesMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeviceMapper deviceMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 站点设备关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public GSiteDevice selectGSiteDeviceById(Long id)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.selectGSiteDeviceById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备关系列表
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 站点设备关系
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<GSiteDevice> selectGSiteDeviceList(GSiteDevice gSiteDevice)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.selectGSiteDeviceList(gSiteDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertGSiteDevice(GSiteDevice gSiteDevice)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.insertGSiteDevice(gSiteDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点设备关系
|
||||||
|
*
|
||||||
|
* @param gSiteDevice 站点设备关系
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateGSiteDevice(GSiteDevice gSiteDevice)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.updateGSiteDevice(gSiteDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点设备关系
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteGSiteDeviceByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.deleteGSiteDeviceByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点设备关系信息
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteGSiteDeviceById(Long id)
|
||||||
|
{
|
||||||
|
return gSiteDeviceMapper.deleteGSiteDeviceById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点设备已经关联关系信息
|
||||||
|
*
|
||||||
|
* @param id 站点设备关系主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Device getGSiteDeviceByDevice(Long id){
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.fastbee.ggroup.mapper.GSiteDeviceMapper">
|
||||||
|
|
||||||
|
<resultMap type="GSiteDevice" id="GSiteDeviceResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="siteId" column="site_id" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectGSiteDeviceVo">
|
||||||
|
select id, site_id, device_id from g_site_device
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectGSiteDeviceList" parameterType="GSiteDevice" resultMap="GSiteDeviceResult">
|
||||||
|
<include refid="selectGSiteDeviceVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||||
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectGSiteDeviceById" parameterType="Long" resultMap="GSiteDeviceResult">
|
||||||
|
<include refid="selectGSiteDeviceVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertGSiteDevice" parameterType="GSiteDevice" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into g_site_device
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="siteId != null">site_id,</if>
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="siteId != null">#{siteId},</if>
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateGSiteDevice" parameterType="GSiteDevice">
|
||||||
|
update g_site_device
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="siteId != null">site_id = #{siteId},</if>
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteGSiteDeviceById" parameterType="Long">
|
||||||
|
delete from g_site_device where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteGSiteDeviceByIds" parameterType="String">
|
||||||
|
delete from g_site_device where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -6,6 +6,7 @@ import com.fastbee.iot.domain.Device;
|
|||||||
import com.fastbee.iot.domain.DeviceGroup;
|
import com.fastbee.iot.domain.DeviceGroup;
|
||||||
import com.fastbee.iot.model.*;
|
import com.fastbee.iot.model.*;
|
||||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValuesOutput;
|
import com.fastbee.iot.model.ThingsModels.ThingsModelValuesOutput;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ import java.util.Set;
|
|||||||
* @date 2021-12-16
|
* @date 2021-12-16
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface DeviceMapper
|
public interface DeviceMapper extends MPJBaseMapper<Device>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询设备
|
* 查询设备
|
||||||
|
Loading…
x
Reference in New Issue
Block a user