图例相关接口完善等
This commit is contained in:
parent
04def663c1
commit
eefc4e9a45
@ -16,6 +16,12 @@
|
|||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- 单元测试-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- spring-boot-devtools -->
|
<!-- spring-boot-devtools -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -115,12 +115,16 @@ token:
|
|||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
typeAliasesPackage: com.fastbee.**.domain # 搜索指定包别名
|
typeAliasesPackage: com.fastbee.**.domain # 搜索指定包别名
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml # 配置mapper的扫描,找到所有的mapper.xml映射文件
|
mapperLocations: classpath*:mapper/**/*Mapper.xml # 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
configLocation: classpath:mybatis/mybatis-config.xml # 加载全局的配置文件
|
configLocation: classpath:mybatis/mybatis-config.xml
|
||||||
|
# 加载全局的配置文件
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
id-type: ASSIGN_ID
|
id-type: ASSIGN_ID
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
logic-delete-field: del_flag
|
||||||
|
logic-delete-value: 2 # 逻辑已删除值(默认为 1)
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
|
||||||
# PageHelper分页插件
|
# PageHelper分页插件
|
||||||
pagehelper:
|
pagehelper:
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
||||||
<setting name="defaultExecutorType" value="SIMPLE" />
|
<setting name="defaultExecutorType" value="SIMPLE" />
|
||||||
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||||
<setting name="logImpl" value="SLF4J" />
|
<!-- <setting name="logImpl" value="SLF4J" />-->
|
||||||
|
<setting name="logImpl" value="org.apache.ibatis.logging.nologging.NoLoggingImpl" />
|
||||||
<!-- 使用驼峰命名法转换字段 -->
|
<!-- 使用驼峰命名法转换字段 -->
|
||||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
||||||
</settings>
|
</settings>
|
||||||
|
@ -36,7 +36,10 @@ public class MimeTypeUtils
|
|||||||
// 视频格式
|
// 视频格式
|
||||||
"mp4", "avi", "rmvb",
|
"mp4", "avi", "rmvb",
|
||||||
// pdf
|
// pdf
|
||||||
"pdf" };
|
"pdf" ,
|
||||||
|
//json
|
||||||
|
"json"
|
||||||
|
};
|
||||||
|
|
||||||
public static String getExtension(String prefix)
|
public static String getExtension(String prefix)
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@ package com.fastbee.data.controller.gis;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.fastbee.ggroup.domain.GSites;
|
||||||
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -108,4 +109,19 @@ public class GLegendController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(gLegendService.deleteGLegendByIds(ids));
|
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;
|
package com.fastbee.data.controller.gis;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
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.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -51,60 +56,35 @@ public class GLegendTypeController extends BaseController
|
|||||||
return getDataTable(list);
|
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}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiOperation("获取图例类型详细信息")
|
@ApiOperation("获取图例类型详细信息")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
return success(gLegendTypeService.selectGLegendTypeById(id));
|
return success(gLegendTypeService.selectGLegendTypeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增图例类型
|
*获取图例的类别列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('ggroup:type:add')")
|
@PreAuthorize("@ss.hasPermi('ggroup:type:category')")
|
||||||
@PostMapping
|
@GetMapping(value = "/category/list")
|
||||||
@ApiOperation("新增图例类型")
|
@ApiOperation("获取图例的类别列表")
|
||||||
public AjaxResult add(@RequestBody GLegendType gLegendType)
|
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));
|
||||||
|
}
|
||||||
|
}
|
@ -106,11 +106,7 @@
|
|||||||
<version>1.9.27</version>
|
<version>1.9.27</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -25,5 +25,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
@ -0,0 +1,125 @@
|
|||||||
|
package com.fastbee.ggroup.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
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_info
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-10-10
|
||||||
|
*/
|
||||||
|
@ApiModel(value = "GSiteInfo",description = "站点基础信息 g_site_info")
|
||||||
|
@Data
|
||||||
|
public class GSiteInfo extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 站点ID,主键,自增长 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 监测站点 */
|
||||||
|
@Excel(name = "监测站点")
|
||||||
|
@ApiModelProperty("监测站点")
|
||||||
|
private String monitoringStation;
|
||||||
|
|
||||||
|
/** 站点桩号 */
|
||||||
|
@Excel(name = "站点桩号")
|
||||||
|
@ApiModelProperty("站点桩号")
|
||||||
|
private String pileNumber;
|
||||||
|
|
||||||
|
/** 项目名称 */
|
||||||
|
@Excel(name = "项目名称")
|
||||||
|
@ApiModelProperty("项目名称")
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/** 建设年度 */
|
||||||
|
@Excel(name = "建设年度")
|
||||||
|
@ApiModelProperty("建设年度")
|
||||||
|
private String constructionYear;
|
||||||
|
|
||||||
|
/** 设备品牌 */
|
||||||
|
@Excel(name = "设备品牌")
|
||||||
|
@ApiModelProperty("设备品牌")
|
||||||
|
private String equipmentBrand;
|
||||||
|
|
||||||
|
/** 设备型号 */
|
||||||
|
@Excel(name = "设备型号")
|
||||||
|
@ApiModelProperty("设备型号")
|
||||||
|
private String equipmentModel;
|
||||||
|
|
||||||
|
/** 站点位置 */
|
||||||
|
@Excel(name = "站点位置")
|
||||||
|
@ApiModelProperty("站点位置")
|
||||||
|
private String siteLocation;
|
||||||
|
|
||||||
|
/** 站点坐标 */
|
||||||
|
@Excel(name = "站点坐标")
|
||||||
|
@ApiModelProperty("站点坐标")
|
||||||
|
private String siteCoordinates;
|
||||||
|
|
||||||
|
/** 经度 */
|
||||||
|
@Excel(name = "经度")
|
||||||
|
@ApiModelProperty("经度")
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/** 纬度 */
|
||||||
|
@Excel(name = "纬度")
|
||||||
|
@ApiModelProperty("纬度")
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/** 保护范围 */
|
||||||
|
@Excel(name = "保护范围")
|
||||||
|
@ApiModelProperty("保护范围")
|
||||||
|
private String protectionScope;
|
||||||
|
|
||||||
|
/** 保护范围备注 */
|
||||||
|
@Excel(name = "保护范围备注")
|
||||||
|
@ApiModelProperty("保护范围备注")
|
||||||
|
private String protectionScopeRemarks;
|
||||||
|
|
||||||
|
/** 故障报修 */
|
||||||
|
@Excel(name = "故障报修")
|
||||||
|
@ApiModelProperty("故障报修")
|
||||||
|
private String faultReport;
|
||||||
|
|
||||||
|
/** 管理人员 */
|
||||||
|
@Excel(name = "管理人员")
|
||||||
|
@ApiModelProperty("管理人员")
|
||||||
|
private String manager;
|
||||||
|
|
||||||
|
/** 管理者手机 */
|
||||||
|
@Excel(name = "管理者手机")
|
||||||
|
@ApiModelProperty("管理者手机")
|
||||||
|
private String managerPhone;
|
||||||
|
|
||||||
|
/** 站点实际图片URL */
|
||||||
|
@Excel(name = "站点实际图片URL")
|
||||||
|
@ApiModelProperty("站点实际图片URL")
|
||||||
|
private String pictures;
|
||||||
|
|
||||||
|
/** 行政区代码 */
|
||||||
|
@Excel(name = "行政区代码")
|
||||||
|
@ApiModelProperty("行政区代码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在,2代表删除) */
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/** 所属站点id */
|
||||||
|
@Excel(name = "所属站点id")
|
||||||
|
@ApiModelProperty("所属站点id")
|
||||||
|
private Long siteId;
|
||||||
|
|
||||||
|
}
|
@ -53,4 +53,5 @@ private static final long serialVersionUID = 1L;
|
|||||||
@ApiModelProperty("项目id")
|
@ApiModelProperty("项目id")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,5 @@ import java.util.List;
|
|||||||
public class GGroupSiteRelateDto {
|
public class GGroupSiteRelateDto {
|
||||||
private List<Long> siteIds;//站点id列表
|
private List<Long> siteIds;//站点id列表
|
||||||
private Long parentId;//父节点id
|
private Long parentId;//父节点id
|
||||||
|
private Long ProjectId;//项目id
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.fastbee.ggroup.domain.dto;
|
||||||
|
|
||||||
|
import com.fastbee.common.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GLegendCateGoryDto {
|
||||||
|
/** 图标 */
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/** 图标名称 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 图例类型名称 */
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/** 类别 */
|
||||||
|
private String category;
|
||||||
|
}
|
@ -3,6 +3,8 @@ package com.fastbee.ggroup.domain.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站点编辑对象 g_sites
|
* 站点编辑对象 g_sites
|
||||||
*
|
*
|
||||||
@ -10,8 +12,7 @@ import lombok.Data;
|
|||||||
* @date 2024-09-29
|
* @date 2024-09-29
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class GSitesEditDto
|
public class GSitesEditDto implements Serializable {
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private Long id;//站点id
|
private Long id;//站点id
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.fastbee.ggroup.enums;
|
package com.fastbee.ggroup.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public enum GroupTagEnum {
|
public enum GroupTagEnum {
|
||||||
RIVERS_LAKES(1, "江河湖泊"),
|
RIVERS_LAKES(1, "江河湖泊"),
|
||||||
WATER_CONSERVANCY_PROJECTS(2, "水利工程"),
|
WATER_CONSERVANCY_PROJECTS(2, "水利工程"),
|
||||||
@ -16,14 +19,6 @@ public enum GroupTagEnum {
|
|||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GroupTagEnum fromCode(int code) {
|
public static GroupTagEnum fromCode(int code) {
|
||||||
for (GroupTagEnum tag : GroupTagEnum.values()) {
|
for (GroupTagEnum tag : GroupTagEnum.values()) {
|
||||||
if (tag.getCode() == code) {
|
if (tag.getCode() == code) {
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.fastbee.ggroup.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author mi9688
|
||||||
|
* @date 2024/10/09 17:00
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum SiteTypeCategoryEnum {
|
||||||
|
//水利设施与管理
|
||||||
|
WATER_MANAGEMENT("水利设施与管理"),
|
||||||
|
//检测站
|
||||||
|
DETECTION_STATION("检测站"),
|
||||||
|
//公共设施
|
||||||
|
PUBLIC_FACILITIES("公共设施"),
|
||||||
|
//报警事件
|
||||||
|
ALARM_EVENT("报警事件"),
|
||||||
|
//其他
|
||||||
|
OTHER("其他");
|
||||||
|
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
SiteTypeCategoryEnum(String name){this.name = name;}
|
||||||
|
|
||||||
|
public static SiteTypeCategoryEnum getEnum(String name){
|
||||||
|
for(SiteTypeCategoryEnum siteTypeCategoryEnum : SiteTypeCategoryEnum.values()){
|
||||||
|
if(siteTypeCategoryEnum.getName().equals(name)){
|
||||||
|
return siteTypeCategoryEnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.fastbee.ggroup.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点基础信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-10-10
|
||||||
|
*/
|
||||||
|
public interface GSiteInfoMapper extends BaseMapper<GSiteInfo>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 站点基础信息
|
||||||
|
*/
|
||||||
|
public GSiteInfo selectGSiteInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息列表
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 站点基础信息集合
|
||||||
|
*/
|
||||||
|
public List<GSiteInfo> selectGSiteInfoList(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertGSiteInfo(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateGSiteInfo(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点基础信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点基础信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteInfoByIds(Long[] ids);
|
||||||
|
}
|
@ -1,7 +1,10 @@
|
|||||||
package com.fastbee.ggroup.service;
|
package com.fastbee.ggroup.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fastbee.ggroup.domain.GLegend;
|
import com.fastbee.ggroup.domain.GLegend;
|
||||||
|
import com.fastbee.ggroup.domain.dto.GLegendCateGoryDto;
|
||||||
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,4 +62,11 @@ public interface IGLegendService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteGLegendById(Long id);
|
public int deleteGLegendById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取不同类别图例列表
|
||||||
|
*/
|
||||||
|
public List<?> getLegendListByCategory();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.fastbee.ggroup.service;
|
package com.fastbee.ggroup.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fastbee.ggroup.domain.GLegendType;
|
import com.fastbee.ggroup.domain.GLegendType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,4 +60,6 @@ public interface IGLegendTypeService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteGLegendTypeById(Long id);
|
public int deleteGLegendTypeById(Long id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.fastbee.ggroup.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点基础信息Service接口
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-10-10
|
||||||
|
*/
|
||||||
|
public interface IGSiteInfoService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 站点基础信息
|
||||||
|
*/
|
||||||
|
public GSiteInfo selectGSiteInfoById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息列表
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 站点基础信息集合
|
||||||
|
*/
|
||||||
|
public List<GSiteInfo> selectGSiteInfoList(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertGSiteInfo(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateGSiteInfo(GSiteInfo gSiteInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点基础信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点基础信息主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteInfoByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点基础信息信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteGSiteInfoById(Long id);
|
||||||
|
}
|
@ -51,7 +51,6 @@ public class GGroupsServiceImpl implements IGGroupsService
|
|||||||
@Override
|
@Override
|
||||||
public List<GGroups> selectGGroupsList(GGroups gGroups)
|
public List<GGroups> selectGGroupsList(GGroups gGroups)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<GGroups> groups = gGroupsMapper.selectGGroupsList(gGroups);
|
List<GGroups> groups = gGroupsMapper.selectGGroupsList(gGroups);
|
||||||
return buildTree(groups);
|
return buildTree(groups);
|
||||||
}
|
}
|
||||||
@ -65,11 +64,9 @@ public class GGroupsServiceImpl implements IGGroupsService
|
|||||||
private List<GGroups> buildTree(List<GGroups> groups) {
|
private List<GGroups> buildTree(List<GGroups> groups) {
|
||||||
Map<Long, GGroups> map = new HashMap<>();
|
Map<Long, GGroups> map = new HashMap<>();
|
||||||
List<GGroups> roots = new ArrayList<>();
|
List<GGroups> roots = new ArrayList<>();
|
||||||
|
|
||||||
for (GGroups group : groups) {
|
for (GGroups group : groups) {
|
||||||
map.put(group.getId(), group);
|
map.put(group.getId(), group);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (GGroups group : groups) {
|
for (GGroups group : groups) {
|
||||||
Long parentId = group.getParentId();
|
Long parentId = group.getParentId();
|
||||||
if (parentId == null || !map.containsKey(parentId)) {
|
if (parentId == null || !map.containsKey(parentId)) {
|
||||||
@ -86,9 +83,6 @@ public class GGroupsServiceImpl implements IGGroupsService
|
|||||||
return roots;
|
return roots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增组
|
* 新增组
|
||||||
*
|
*
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
package com.fastbee.ggroup.service.impl;
|
package com.fastbee.ggroup.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.fastbee.common.utils.DateUtils;
|
import com.fastbee.common.utils.DateUtils;
|
||||||
import com.fastbee.ggroup.domain.GLegendType;
|
import com.fastbee.ggroup.domain.GLegendType;
|
||||||
|
import com.fastbee.ggroup.domain.dto.GLegendCateGoryDto;
|
||||||
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
import com.fastbee.ggroup.domain.dto.GLegendDto;
|
||||||
import com.github.yulichang.toolkit.JoinWrappers;
|
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.fastbee.ggroup.mapper.GLegendMapper;
|
import com.fastbee.ggroup.mapper.GLegendMapper;
|
||||||
@ -19,6 +26,7 @@ import com.fastbee.ggroup.service.IGLegendService;
|
|||||||
* @date 2024-10-08
|
* @date 2024-10-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class GLegendServiceImpl implements IGLegendService
|
public class GLegendServiceImpl implements IGLegendService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -45,14 +53,14 @@ public class GLegendServiceImpl implements IGLegendService
|
|||||||
@Override
|
@Override
|
||||||
public List<GLegendDto> selectGLegendList(GLegend gLegend)
|
public List<GLegendDto> selectGLegendList(GLegend gLegend)
|
||||||
{
|
{
|
||||||
|
|
||||||
MPJLambdaWrapper<GLegend> wrapper = new MPJLambdaWrapper<GLegend>()
|
MPJLambdaWrapper<GLegend> wrapper = new MPJLambdaWrapper<GLegend>()
|
||||||
.select(GLegend::getId,GLegend::getIcon,GLegend::getType,GLegend::getName)
|
.select(GLegend::getId,GLegend::getIcon,GLegend::getType,GLegend::getName)
|
||||||
.select(GLegendType::getTypeName,GLegendType::getCategory)
|
.select(GLegendType::getTypeName,GLegendType::getCategory)
|
||||||
.leftJoin(GLegendType.class,GLegendType::getId,GLegend::getType);
|
.leftJoin(GLegendType.class,GLegendType::getId,GLegend::getType);
|
||||||
|
if(StringUtils.isNotBlank(gLegend.getSearchValue())){
|
||||||
|
wrapper.like(GLegend::getName,gLegend.getSearchValue());
|
||||||
|
}
|
||||||
return gLegendMapper.selectJoinList(GLegendDto.class,wrapper);
|
return gLegendMapper.selectJoinList(GLegendDto.class,wrapper);
|
||||||
// return gLegendMapper.selectGLegendList(gLegend);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,4 +112,32 @@ public class GLegendServiceImpl implements IGLegendService
|
|||||||
{
|
{
|
||||||
return gLegendMapper.deleteGLegendById(id);
|
return gLegendMapper.deleteGLegendById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<?> getLegendListByCategory() {
|
||||||
|
MPJLambdaWrapper<GLegend> wrapper = new MPJLambdaWrapper<GLegend>()
|
||||||
|
.select(GLegend::getIcon, GLegend::getName)
|
||||||
|
.select(GLegendType::getTypeName, GLegendType::getCategory)
|
||||||
|
.leftJoin(GLegendType.class, GLegendType::getId, GLegend::getType);
|
||||||
|
// 获取所有的 GLegendCateGoryDto 列表
|
||||||
|
List<GLegendCateGoryDto> gLegendCateGoryList = gLegendMapper.selectJoinList(GLegendCateGoryDto.class, wrapper);
|
||||||
|
// 按照类别分成多个list结集合
|
||||||
|
gLegendCateGoryList.forEach(System.err::println);
|
||||||
|
Map<String, List<GLegendCateGoryDto>> map = gLegendCateGoryList.stream()
|
||||||
|
.collect(Collectors.groupingBy(GLegendCateGoryDto::getCategory));
|
||||||
|
System.err.println(map);
|
||||||
|
List<Map<String, Object>> list=new ArrayList<>();
|
||||||
|
// 循环这个map
|
||||||
|
for (Map.Entry<String, List<GLegendCateGoryDto>> entry : map.entrySet()) {
|
||||||
|
System.err.println(entry.getKey() + " : " + entry.getValue());
|
||||||
|
Map<String,Object> itemMap=new HashMap<>();
|
||||||
|
itemMap.put("category",entry.getKey());
|
||||||
|
itemMap.put("list",entry.getValue());
|
||||||
|
list.add(itemMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
package com.fastbee.ggroup.service.impl;
|
package com.fastbee.ggroup.service.impl;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.fastbee.common.utils.DateUtils;
|
import com.fastbee.common.utils.DateUtils;
|
||||||
|
import com.fastbee.ggroup.enums.SiteTypeCategoryEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.fastbee.ggroup.mapper.GLegendTypeMapper;
|
import com.fastbee.ggroup.mapper.GLegendTypeMapper;
|
||||||
@ -93,4 +98,6 @@ public class GLegendTypeServiceImpl implements IGLegendTypeService
|
|||||||
{
|
{
|
||||||
return gLegendTypeMapper.deleteGLegendTypeById(id);
|
return gLegendTypeMapper.deleteGLegendTypeById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.fastbee.ggroup.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.fastbee.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.fastbee.ggroup.mapper.GSiteInfoMapper;
|
||||||
|
import com.fastbee.ggroup.domain.GSiteInfo;
|
||||||
|
import com.fastbee.ggroup.service.IGSiteInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点基础信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author kerwincui
|
||||||
|
* @date 2024-10-10
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class GSiteInfoServiceImpl implements IGSiteInfoService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private GSiteInfoMapper gSiteInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 站点基础信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public GSiteInfo selectGSiteInfoById(Long id)
|
||||||
|
{
|
||||||
|
return gSiteInfoMapper.selectGSiteInfoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询站点基础信息列表
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 站点基础信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<GSiteInfo> selectGSiteInfoList(GSiteInfo gSiteInfo)
|
||||||
|
{
|
||||||
|
return gSiteInfoMapper.selectGSiteInfoList(gSiteInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertGSiteInfo(GSiteInfo gSiteInfo)
|
||||||
|
{
|
||||||
|
gSiteInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return gSiteInfoMapper.insertGSiteInfo(gSiteInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改站点基础信息
|
||||||
|
*
|
||||||
|
* @param gSiteInfo 站点基础信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateGSiteInfo(GSiteInfo gSiteInfo)
|
||||||
|
{
|
||||||
|
gSiteInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return gSiteInfoMapper.updateGSiteInfo(gSiteInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除站点基础信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的站点基础信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteGSiteInfoByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return gSiteInfoMapper.deleteGSiteInfoByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除站点基础信息信息
|
||||||
|
*
|
||||||
|
* @param id 站点基础信息主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteGSiteInfoById(Long id)
|
||||||
|
{
|
||||||
|
return gSiteInfoMapper.deleteGSiteInfoById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,6 @@ package com.fastbee.ggroup.service.impl;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fastbee.common.exception.ServiceException;
|
import com.fastbee.common.exception.ServiceException;
|
||||||
@ -12,9 +11,6 @@ import com.fastbee.ggroup.domain.dto.GGroupSiteDto;
|
|||||||
import com.fastbee.ggroup.domain.dto.GGroupSiteRelateDto;
|
import com.fastbee.ggroup.domain.dto.GGroupSiteRelateDto;
|
||||||
import com.fastbee.ggroup.domain.dto.GSitesEditDto;
|
import com.fastbee.ggroup.domain.dto.GSitesEditDto;
|
||||||
import com.fastbee.ggroup.mapper.GSiteGroupsMapper;
|
import com.fastbee.ggroup.mapper.GSiteGroupsMapper;
|
||||||
|
|
||||||
import com.github.yulichang.toolkit.JoinWrappers;
|
|
||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -60,7 +56,7 @@ public class GSitesServiceImpl extends ServiceImpl<GSiteGroupsMapper,GSiteGroups
|
|||||||
|
|
||||||
return gSitesMapper.selectList(new LambdaQueryWrapper<GSites>()
|
return gSitesMapper.selectList(new LambdaQueryWrapper<GSites>()
|
||||||
.select(GSites::getId, GSites::getName, GSites::getIcon, GSites::getType)
|
.select(GSites::getId, GSites::getName, GSites::getIcon, GSites::getType)
|
||||||
.eq(GSites::getProjectId, 1)
|
.eq(GSites::getProjectId, gSites.getProjectId())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,16 +71,13 @@ public class GSitesServiceImpl extends ServiceImpl<GSiteGroupsMapper,GSiteGroups
|
|||||||
public int insertGSites(GGroupSiteDto gGroupSiteDto) {
|
public int insertGSites(GGroupSiteDto gGroupSiteDto) {
|
||||||
|
|
||||||
GSites gSites = new GSites();
|
GSites gSites = new GSites();
|
||||||
gSites.setName(gGroupSiteDto.getName().trim());
|
BeanUtils.copyProperties(gGroupSiteDto, gSites);
|
||||||
gSites.setType(gGroupSiteDto.getType());
|
//是否存在同名站点
|
||||||
gSites.setIcon(gGroupSiteDto.getIcon());
|
GSites sameNameSite = gSitesMapper.selectOne(new LambdaQueryWrapper<GSites>()
|
||||||
gSites.setProjectId(gGroupSiteDto.getProjectId());
|
|
||||||
//根据名称判断是否存在该站点
|
|
||||||
GSites gSites1 = gSitesMapper.selectOne(new LambdaQueryWrapper<GSites>()
|
|
||||||
.select(GSites::getName, GSites::getId)
|
.select(GSites::getName, GSites::getId)
|
||||||
.eq(GSites::getName, gGroupSiteDto.getName().trim()));
|
.eq(GSites::getName, gGroupSiteDto.getName().trim()));
|
||||||
if (gSites1 != null) {
|
if (Objects.isNull(sameNameSite )) {
|
||||||
throw new ServiceException("站点名称已存在!");
|
throw new ServiceException("站点名称重复!");
|
||||||
}
|
}
|
||||||
//插入站点表
|
//插入站点表
|
||||||
int inserted = gSitesMapper.insert(gSites);
|
int inserted = gSitesMapper.insert(gSites);
|
||||||
@ -102,22 +95,13 @@ public class GSitesServiceImpl extends ServiceImpl<GSiteGroupsMapper,GSiteGroups
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateGSites(GSitesEditDto gSitesEditDto) {
|
public int updateGSites(GSitesEditDto gSitesEditDto) {
|
||||||
//查修改前站点名称
|
//是否存在同名站点
|
||||||
GSites gSites = gSitesMapper.selectGSitesById(gSitesEditDto.getId());
|
GSites sameNameSite = gSitesMapper.selectOne(new LambdaQueryWrapper<GSites>()
|
||||||
if (Objects.isNull(gSites)) {
|
|
||||||
throw new ServiceException("修改站点不存在!");
|
|
||||||
}
|
|
||||||
//判断修改后是否和修改前一致
|
|
||||||
if(gSites.getName().trim().equals(gSitesEditDto.getName().trim())){
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
//不能有重复名字的站点
|
|
||||||
GSites gSites1 = gSitesMapper.selectOne(new LambdaQueryWrapper<GSites>()
|
|
||||||
.select(GSites::getName, GSites::getId)
|
.select(GSites::getName, GSites::getId)
|
||||||
.eq(GSites::getName, gSitesEditDto.getName().trim()));
|
.eq(GSites::getName, gSitesEditDto.getName().trim())
|
||||||
|
.ne(GSites::getId, gSitesEditDto.getId()));
|
||||||
if (Objects.nonNull(gSites1)) {
|
if (Objects.nonNull(sameNameSite)) {
|
||||||
throw new ServiceException("站点名称已存在!");
|
throw new ServiceException("站点名称重复!");
|
||||||
}
|
}
|
||||||
GSites sites = new GSites();
|
GSites sites = new GSites();
|
||||||
BeanUtils.copyProperties(gSitesEditDto, sites);
|
BeanUtils.copyProperties(gSitesEditDto, sites);
|
||||||
@ -144,20 +128,17 @@ public class GSitesServiceImpl extends ServiceImpl<GSiteGroupsMapper,GSiteGroups
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int deleteGSitesById(Long id) {
|
public int deleteGSitesById(Long id) {
|
||||||
GSiteGroups gSiteGroups = gSiteGroupsMapper.selectGSiteGroupsById(id);
|
|
||||||
if (Objects.isNull(gSiteGroups)) {
|
|
||||||
throw new ServiceException("站点不存在");
|
|
||||||
}
|
|
||||||
// int deleted = gSitesMapper.deleteById(gSiteGroups.getSiteId());
|
|
||||||
//删除关系
|
|
||||||
return gSiteGroupsMapper.deleteById(id);
|
return gSiteGroupsMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点关联组
|
||||||
|
* @param gGroupSiteRelateDto 传输对象
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int relateGroup(GGroupSiteRelateDto gGroupSiteRelateDto) {
|
public int relateGroup(GGroupSiteRelateDto gGroupSiteRelateDto) {
|
||||||
Long parentId = gGroupSiteRelateDto.getParentId();
|
if (StringUtils.isBlank(gGroupSiteRelateDto.getParentId().toString())) {
|
||||||
if (StringUtils.isBlank(parentId.toString())) {
|
|
||||||
throw new ServiceException("请选择分组!");
|
throw new ServiceException("请选择分组!");
|
||||||
}
|
}
|
||||||
List<Long> siteIds = gGroupSiteRelateDto.getSiteIds();
|
List<Long> siteIds = gGroupSiteRelateDto.getSiteIds();
|
||||||
@ -170,8 +151,8 @@ public class GSitesServiceImpl extends ServiceImpl<GSiteGroupsMapper,GSiteGroups
|
|||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
.stream()
|
.stream()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
item.setParentId(parentId);
|
item.setParentId(gGroupSiteRelateDto.getParentId());
|
||||||
item.setProjectId(1L);
|
item.setProjectId(gGroupSiteRelateDto.getProjectId());
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
|
@ -0,0 +1,166 @@
|
|||||||
|
<?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.GSiteInfoMapper">
|
||||||
|
|
||||||
|
<resultMap type="GSiteInfo" id="GSiteInfoResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="monitoringStation" column="monitoring_station" />
|
||||||
|
<result property="pileNumber" column="pile_number" />
|
||||||
|
<result property="projectName" column="project_name" />
|
||||||
|
<result property="constructionYear" column="construction_year" />
|
||||||
|
<result property="equipmentBrand" column="equipment_brand" />
|
||||||
|
<result property="equipmentModel" column="equipment_model" />
|
||||||
|
<result property="siteLocation" column="site_location" />
|
||||||
|
<result property="siteCoordinates" column="site_coordinates" />
|
||||||
|
<result property="longitude" column="longitude" />
|
||||||
|
<result property="latitude" column="latitude" />
|
||||||
|
<result property="protectionScope" column="protection_scope" />
|
||||||
|
<result property="protectionScopeRemarks" column="protection_scope_remarks" />
|
||||||
|
<result property="faultReport" column="fault_report" />
|
||||||
|
<result property="manager" column="manager" />
|
||||||
|
<result property="managerPhone" column="manager_phone" />
|
||||||
|
<result property="pictures" column="pictures" />
|
||||||
|
<result property="code" column="code" />
|
||||||
|
<result property="remarks" column="remarks" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="siteId" column="site_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectGSiteInfoVo">
|
||||||
|
select id, monitoring_station, pile_number, project_name, construction_year, equipment_brand, equipment_model, site_location, site_coordinates, longitude, latitude, protection_scope, protection_scope_remarks, fault_report, manager, manager_phone, pictures, code, remarks, del_flag, create_time, create_by, update_time, update_by, site_id from g_site_info
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectGSiteInfoList" parameterType="GSiteInfo" resultMap="GSiteInfoResult">
|
||||||
|
<include refid="selectGSiteInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="monitoringStation != null and monitoringStation != ''"> and monitoring_station = #{monitoringStation}</if>
|
||||||
|
<if test="pileNumber != null and pileNumber != ''"> and pile_number = #{pileNumber}</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="constructionYear != null and constructionYear != ''"> and construction_year = #{constructionYear}</if>
|
||||||
|
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
|
||||||
|
<if test="equipmentModel != null and equipmentModel != ''"> and equipment_model = #{equipmentModel}</if>
|
||||||
|
<if test="siteLocation != null and siteLocation != ''"> and site_location = #{siteLocation}</if>
|
||||||
|
<if test="siteCoordinates != null and siteCoordinates != ''"> and site_coordinates = #{siteCoordinates}</if>
|
||||||
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||||
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||||
|
<if test="protectionScope != null and protectionScope != ''"> and protection_scope = #{protectionScope}</if>
|
||||||
|
<if test="protectionScopeRemarks != null and protectionScopeRemarks != ''"> and protection_scope_remarks = #{protectionScopeRemarks}</if>
|
||||||
|
<if test="faultReport != null and faultReport != ''"> and fault_report = #{faultReport}</if>
|
||||||
|
<if test="manager != null and manager != ''"> and manager = #{manager}</if>
|
||||||
|
<if test="managerPhone != null and managerPhone != ''"> and manager_phone = #{managerPhone}</if>
|
||||||
|
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||||
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||||
|
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectGSiteInfoById" parameterType="Long" resultMap="GSiteInfoResult">
|
||||||
|
<include refid="selectGSiteInfoVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertGSiteInfo" parameterType="GSiteInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into g_site_info
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="monitoringStation != null and monitoringStation != ''">monitoring_station,</if>
|
||||||
|
<if test="pileNumber != null">pile_number,</if>
|
||||||
|
<if test="projectName != null">project_name,</if>
|
||||||
|
<if test="constructionYear != null">construction_year,</if>
|
||||||
|
<if test="equipmentBrand != null">equipment_brand,</if>
|
||||||
|
<if test="equipmentModel != null">equipment_model,</if>
|
||||||
|
<if test="siteLocation != null">site_location,</if>
|
||||||
|
<if test="siteCoordinates != null">site_coordinates,</if>
|
||||||
|
<if test="longitude != null">longitude,</if>
|
||||||
|
<if test="latitude != null">latitude,</if>
|
||||||
|
<if test="protectionScope != null">protection_scope,</if>
|
||||||
|
<if test="protectionScopeRemarks != null">protection_scope_remarks,</if>
|
||||||
|
<if test="faultReport != null">fault_report,</if>
|
||||||
|
<if test="manager != null">manager,</if>
|
||||||
|
<if test="managerPhone != null">manager_phone,</if>
|
||||||
|
<if test="pictures != null">pictures,</if>
|
||||||
|
<if test="code != null">code,</if>
|
||||||
|
<if test="remarks != null">remarks,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="siteId != null">site_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="monitoringStation != null and monitoringStation != ''">#{monitoringStation},</if>
|
||||||
|
<if test="pileNumber != null">#{pileNumber},</if>
|
||||||
|
<if test="projectName != null">#{projectName},</if>
|
||||||
|
<if test="constructionYear != null">#{constructionYear},</if>
|
||||||
|
<if test="equipmentBrand != null">#{equipmentBrand},</if>
|
||||||
|
<if test="equipmentModel != null">#{equipmentModel},</if>
|
||||||
|
<if test="siteLocation != null">#{siteLocation},</if>
|
||||||
|
<if test="siteCoordinates != null">#{siteCoordinates},</if>
|
||||||
|
<if test="longitude != null">#{longitude},</if>
|
||||||
|
<if test="latitude != null">#{latitude},</if>
|
||||||
|
<if test="protectionScope != null">#{protectionScope},</if>
|
||||||
|
<if test="protectionScopeRemarks != null">#{protectionScopeRemarks},</if>
|
||||||
|
<if test="faultReport != null">#{faultReport},</if>
|
||||||
|
<if test="manager != null">#{manager},</if>
|
||||||
|
<if test="managerPhone != null">#{managerPhone},</if>
|
||||||
|
<if test="pictures != null">#{pictures},</if>
|
||||||
|
<if test="code != null">#{code},</if>
|
||||||
|
<if test="remarks != null">#{remarks},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="siteId != null">#{siteId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateGSiteInfo" parameterType="GSiteInfo">
|
||||||
|
update g_site_info
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="monitoringStation != null and monitoringStation != ''">monitoring_station = #{monitoringStation},</if>
|
||||||
|
<if test="pileNumber != null">pile_number = #{pileNumber},</if>
|
||||||
|
<if test="projectName != null">project_name = #{projectName},</if>
|
||||||
|
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
|
||||||
|
<if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if>
|
||||||
|
<if test="equipmentModel != null">equipment_model = #{equipmentModel},</if>
|
||||||
|
<if test="siteLocation != null">site_location = #{siteLocation},</if>
|
||||||
|
<if test="siteCoordinates != null">site_coordinates = #{siteCoordinates},</if>
|
||||||
|
<if test="longitude != null">longitude = #{longitude},</if>
|
||||||
|
<if test="latitude != null">latitude = #{latitude},</if>
|
||||||
|
<if test="protectionScope != null">protection_scope = #{protectionScope},</if>
|
||||||
|
<if test="protectionScopeRemarks != null">protection_scope_remarks = #{protectionScopeRemarks},</if>
|
||||||
|
<if test="faultReport != null">fault_report = #{faultReport},</if>
|
||||||
|
<if test="manager != null">manager = #{manager},</if>
|
||||||
|
<if test="managerPhone != null">manager_phone = #{managerPhone},</if>
|
||||||
|
<if test="pictures != null">pictures = #{pictures},</if>
|
||||||
|
<if test="code != null">code = #{code},</if>
|
||||||
|
<if test="remarks != null">remarks = #{remarks},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="siteId != null">site_id = #{siteId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteGSiteInfoById" parameterType="Long">
|
||||||
|
delete from g_site_info where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteGSiteInfoByIds" parameterType="String">
|
||||||
|
delete from g_site_info where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -26,7 +26,9 @@
|
|||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
|
<if test="projectId != null and projectId != ''"> and space = #{projectId}</if>
|
||||||
<if test="space != null and space != ''"> and space = #{space}</if>
|
<if test="space != null and space != ''"> and space = #{space}</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
public class Text {
|
|
||||||
|
|
||||||
}
|
|
@ -54,7 +54,7 @@ public class QxtrTask {
|
|||||||
* 定时任务 新增太阳能设备
|
* 定时任务 新增太阳能设备
|
||||||
*/
|
*/
|
||||||
public void getSolarDeviceFromHttp() throws Exception {
|
public void getSolarDeviceFromHttp() throws Exception {
|
||||||
log.info("定时任务,新增 太阳能设备 数据");
|
// log.info("定时任务,新增 太阳能设备 数据");
|
||||||
Device device = new Device();
|
Device device = new Device();
|
||||||
device.setProductId(Long.valueOf(SOLAR_DEVICE.getType()));
|
device.setProductId(Long.valueOf(SOLAR_DEVICE.getType()));
|
||||||
List<Device> devices = iDeviceService.selectDeviceList(device);
|
List<Device> devices = iDeviceService.selectDeviceList(device);
|
||||||
@ -65,7 +65,7 @@ public class QxtrTask {
|
|||||||
* 定时任务 更新设备在线状态
|
* 定时任务 更新设备在线状态
|
||||||
*/
|
*/
|
||||||
public void updateDeviceStatus() throws Exception {
|
public void updateDeviceStatus() throws Exception {
|
||||||
log.info("定时任务,更新设备在线状态");
|
// log.info("定时任务,更新设备在线状态");
|
||||||
Device device = new Device();
|
Device device = new Device();
|
||||||
ArrayList<Map<String, Object>> resultList = new ArrayList<>();
|
ArrayList<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
device.setProductId(136L);
|
device.setProductId(136L);
|
||||||
@ -92,7 +92,7 @@ public class QxtrTask {
|
|||||||
* 定时任务 流量计设备
|
* 定时任务 流量计设备
|
||||||
*/
|
*/
|
||||||
public void getFlowMeterDeviceFromHttp() throws Exception {
|
public void getFlowMeterDeviceFromHttp() throws Exception {
|
||||||
log.info("定时任务,新增 流量计设备 数据");
|
// log.info("定时任务,新增 流量计设备 数据");
|
||||||
Device device = new Device();
|
Device device = new Device();
|
||||||
device.setProductId(Long.valueOf(FLOW_METER_DEVICE.getType()));
|
device.setProductId(Long.valueOf(FLOW_METER_DEVICE.getType()));
|
||||||
List<Device> devices = iDeviceService.selectDeviceList(device);
|
List<Device> devices = iDeviceService.selectDeviceList(device);
|
||||||
@ -103,7 +103,7 @@ public class QxtrTask {
|
|||||||
* 定时任务 门锁控制设备
|
* 定时任务 门锁控制设备
|
||||||
*/
|
*/
|
||||||
public void getDoorLockDeviceFromHttp() throws Exception {
|
public void getDoorLockDeviceFromHttp() throws Exception {
|
||||||
log.info("定时任务,新增 门锁控制设备 数据");
|
// log.info("定时任务,新增 门锁控制设备 数据");
|
||||||
Device device = new Device();
|
Device device = new Device();
|
||||||
device.setProductId(Long.valueOf(DOOR_LOCK_DEVICE.getType()));
|
device.setProductId(Long.valueOf(DOOR_LOCK_DEVICE.getType()));
|
||||||
List<Device> devices = iDeviceService.selectDeviceList(device);
|
List<Device> devices = iDeviceService.selectDeviceList(device);
|
||||||
|
6
pom.xml
6
pom.xml
@ -62,6 +62,12 @@
|
|||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- SpringBoot 测试 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<version>2.5.14</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user