diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..48e341a
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,3 @@
+{
+ "lockfileVersion": 1
+}
diff --git a/pom.xml b/pom.xml
index 1b9688b..e241318 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
+
com.ruoyi
ruoyi
3.8.5
@@ -11,7 +11,7 @@
ruoyi
http://www.ruoyi.vip
若依管理系统
-
+
3.8.5
UTF-8
@@ -31,8 +31,10 @@
4.1.2
2.3
0.9.1
+ 1.3.7
+ 5.8.0
-
+
@@ -178,6 +180,20 @@
${ruoyi.version}
+
+
+ org.mybatis.generator
+ mybatis-generator-core
+ ${mybatis-generator.version}
+
+
+
+
+ cn.hutool
+ hutool-all
+ ${hutool.version}
+
+
@@ -236,4 +252,4 @@
-
\ No newline at end of file
+
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 9a4cde8..2370321 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -61,6 +61,11 @@
ruoyi-generator
+
+ org.projectlombok
+ lombok
+
+
@@ -80,17 +85,17 @@
-
- org.apache.maven.plugins
- maven-war-plugin
- 3.1.0
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
false
${project.artifactId}
-
-
+
+
${project.artifactId}
-
\ No newline at end of file
+
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetConfigController.java
new file mode 100644
index 0000000..eba5255
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetConfigController.java
@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.device;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.web.domain.po.OnenetConfig;
+import com.ruoyi.web.service.IOnenetConfigService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * onenet参数Controller
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+@RestController
+@RequestMapping("/device/config")
+public class OnenetConfigController extends BaseController
+{
+ @Autowired
+ private IOnenetConfigService onenetConfigService;
+
+ /**
+ * 查询onenet参数列表
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(OnenetConfig onenetConfig)
+ {
+ startPage();
+ List list = onenetConfigService.selectOnenetConfigList(onenetConfig);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出onenet参数列表
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:export')")
+ @Log(title = "onenet参数", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, OnenetConfig onenetConfig)
+ {
+ List list = onenetConfigService.selectOnenetConfigList(onenetConfig);
+ ExcelUtil util = new ExcelUtil(OnenetConfig.class);
+ util.exportExcel(response, list, "onenet参数数据");
+ }
+
+ /**
+ * 获取onenet参数详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Integer id)
+ {
+ return success(onenetConfigService.selectOnenetConfigById(id));
+ }
+
+ /**
+ * 新增onenet参数
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:add')")
+ @Log(title = "onenet参数", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody OnenetConfig onenetConfig)
+ {
+ return toAjax(onenetConfigService.insertOnenetConfig(onenetConfig));
+ }
+
+ /**
+ * 修改onenet参数
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:edit')")
+ @Log(title = "onenet参数", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody OnenetConfig onenetConfig)
+ {
+ return toAjax(onenetConfigService.updateOnenetConfig(onenetConfig));
+ }
+
+ /**
+ * 删除onenet参数
+ */
+ @PreAuthorize("@ss.hasPermi('device:config:remove')")
+ @Log(title = "onenet参数", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Integer[] ids)
+ {
+ return toAjax(onenetConfigService.deleteOnenetConfigByIds(ids));
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetEquipController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetEquipController.java
new file mode 100644
index 0000000..248580a
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/device/OnenetEquipController.java
@@ -0,0 +1,110 @@
+package com.ruoyi.web.controller.device;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.web.domain.dto.OnenetEquipDto;
+import com.ruoyi.web.domain.po.OnenetConfig;
+import com.ruoyi.web.domain.po.OnenetEquip;
+import com.ruoyi.web.domain.vo.OnenetEquipVo;
+import com.ruoyi.web.service.IOnenetConfigService;
+import com.ruoyi.web.service.IOnenetEquipService;
+import com.ruoyi.web.service.IOnenetEquipService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * onenet参数Controller
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+@RestController
+@RequestMapping("/device/equip")
+public class OnenetEquipController extends BaseController
+{
+ @Resource
+ private IOnenetEquipService onenetEquipService;
+ @Resource
+ private IOnenetConfigService onenetConfigService;
+
+ /**
+ * 查询onenet参数列表
+ */
+ @PreAuthorize("@ss.hasPermi('device:equip:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(OnenetEquip onenetConfig)
+ {
+ startPage();
+ List list = onenetEquipService.selectOnenetEquipList(onenetConfig);
+
+ return getDataTable(list);
+ }
+
+ /**
+ * 查询
+ * @return
+ */
+ @PreAuthorize("@ss.hasPermi('device:equip:list')")
+ @GetMapping("/getApiKey")
+ public AjaxResult getApiKey()
+ {
+ String onenetApiKey = onenetConfigService.selectOnenetConfigByKey("onenet_api_key");
+
+ return success(onenetApiKey);
+ }
+
+ /**
+ * 导出onenet参数列表
+ */
+ @PreAuthorize("@ss.hasPermi('device:equip:export')")
+ @Log(title = "onenet参数", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, OnenetEquip onenetConfig)
+ {
+ List list = onenetEquipService.selectOnenetEquipList(onenetConfig);
+ ExcelUtil util = new ExcelUtil(OnenetEquipVo.EquipList.class);
+ util.exportExcel(response, list, "onenet参数数据");
+ }
+
+ /**
+ * 获取onenet参数详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('device:equip:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Integer id)
+ {
+ return success(onenetEquipService.selectOnenetEquipById(id));
+ }
+
+
+ /**
+ * 写缓存命令
+ */
+ @PostMapping("/writeCommand")
+ public AjaxResult writeCommand(@RequestBody OnenetEquipDto.InsertDto InsertDto)
+ {
+ return success(onenetEquipService.writeCommand(InsertDto));
+ }
+
+ /**
+ * 查询设备数据
+ */
+ @GetMapping("/equipData")
+ public TableDataInfo equipData(OnenetEquipDto.EquipDataParam equipDataParam)
+ {
+ startPage();
+ List equipDatas = onenetEquipService.selectEquipDatas(equipDataParam);
+
+ return getDataTable(equipDatas);
+ }
+
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/dto/OnenetEquipDto.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/dto/OnenetEquipDto.java
new file mode 100644
index 0000000..7130692
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/dto/OnenetEquipDto.java
@@ -0,0 +1,49 @@
+package com.ruoyi.web.domain.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author lijunjie
+ * @date 2023-01-09 10:56
+ */
+@Data
+public class OnenetEquipDto {
+
+ @ApiModel("OnenetEquipDto - InsertDto")
+ @Data
+ public static class InsertDto{
+ @ApiModelProperty("")
+ private String imei;
+ @ApiModelProperty("")
+ private String obj_id;
+ @ApiModelProperty("")
+ private String obj_inst_id;
+ @ApiModelProperty("")
+ private String mode;
+ @ApiModelProperty("")
+ private String expired_time;
+ @ApiModelProperty("")
+ private String trigger_msg;
+ @ApiModelProperty("")
+ private String res_id;
+ @ApiModelProperty("")
+ private String command;
+ }
+
+ @ApiModel("OnenetEquipDto - EquipDataParam")
+ @Data
+ public static class EquipDataParam{
+ @ApiModelProperty("设备id")
+ private String obj_id;
+ @ApiModelProperty("开始时间")
+ private String start;
+ @ApiModelProperty("结束时间")
+ private String end;
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetConfig.java
new file mode 100644
index 0000000..6d00884
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetConfig.java
@@ -0,0 +1,69 @@
+package com.ruoyi.web.domain.po;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * onenet参数对象 onenet_config
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+public class OnenetConfig extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** */
+ private Integer id;
+
+ /** 建 */
+ @Excel(name = "建")
+ private String configKey;
+
+ /** 值 */
+ @Excel(name = "值")
+ private String configValue;
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setConfigKey(String configKey)
+ {
+ this.configKey = configKey;
+ }
+
+ public String getConfigKey()
+ {
+ return configKey;
+ }
+ public void setConfigValue(String configValue)
+ {
+ this.configValue = configValue;
+ }
+
+ public String getConfigValue()
+ {
+ return configValue;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("configKey", getConfigKey())
+ .append("configValue", getConfigValue())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquip.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquip.java
new file mode 100644
index 0000000..34e7189
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquip.java
@@ -0,0 +1,150 @@
+package com.ruoyi.web.domain.po;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OnenetEquip implements Serializable {
+ private Integer id;
+
+ private String title;
+
+ private Byte online;
+
+ private String tags;
+
+ private String protocol;
+
+ private String location;
+
+ private String authInfo;
+
+ private String otherInfo;
+
+ private String createBy;
+
+ private Date createTime;
+
+ private String updateBy;
+
+ private Date updateTime;
+
+ private static final long serialVersionUID = 1L;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title == null ? null : title.trim();
+ }
+
+ public Byte getOnline() {
+ return online;
+ }
+
+ public void setOnline(Byte online) {
+ this.online = online;
+ }
+
+ public String getTags() {
+ return tags;
+ }
+
+ public void setTags(String tags) {
+ this.tags = tags == null ? null : tags.trim();
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol == null ? null : protocol.trim();
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location == null ? null : location.trim();
+ }
+
+ public String getAuthInfo() {
+ return authInfo;
+ }
+
+ public void setAuthInfo(String authInfo) {
+ this.authInfo = authInfo == null ? null : authInfo.trim();
+ }
+
+ public String getOtherInfo() {
+ return otherInfo;
+ }
+
+ public void setOtherInfo(String otherInfo) {
+ this.otherInfo = otherInfo == null ? null : otherInfo.trim();
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy == null ? null : createBy.trim();
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy == null ? null : updateBy.trim();
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", title=").append(title);
+ sb.append(", online=").append(online);
+ sb.append(", tags=").append(tags);
+ sb.append(", protocol=").append(protocol);
+ sb.append(", location=").append(location);
+ sb.append(", authInfo=").append(authInfo);
+ sb.append(", otherInfo=").append(otherInfo);
+ sb.append(", createBy=").append(createBy);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateBy=").append(updateBy);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquipExample.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquipExample.java
new file mode 100644
index 0000000..157863d
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/po/OnenetEquipExample.java
@@ -0,0 +1,1001 @@
+package com.ruoyi.web.domain.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class OnenetEquipExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List oredCriteria;
+
+ public OnenetEquipExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(Integer value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(Integer value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(Integer value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(Integer value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(Integer value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(Integer value1, Integer value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleIsNull() {
+ addCriterion("title is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleIsNotNull() {
+ addCriterion("title is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleEqualTo(String value) {
+ addCriterion("title =", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleNotEqualTo(String value) {
+ addCriterion("title <>", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleGreaterThan(String value) {
+ addCriterion("title >", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleGreaterThanOrEqualTo(String value) {
+ addCriterion("title >=", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleLessThan(String value) {
+ addCriterion("title <", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleLessThanOrEqualTo(String value) {
+ addCriterion("title <=", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleLike(String value) {
+ addCriterion("title like", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleNotLike(String value) {
+ addCriterion("title not like", value, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleIn(List values) {
+ addCriterion("title in", values, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleNotIn(List values) {
+ addCriterion("title not in", values, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleBetween(String value1, String value2) {
+ addCriterion("title between", value1, value2, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andTitleNotBetween(String value1, String value2) {
+ addCriterion("title not between", value1, value2, "title");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineIsNull() {
+ addCriterion("online is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineIsNotNull() {
+ addCriterion("online is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineEqualTo(Byte value) {
+ addCriterion("online =", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineNotEqualTo(Byte value) {
+ addCriterion("online <>", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineGreaterThan(Byte value) {
+ addCriterion("online >", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineGreaterThanOrEqualTo(Byte value) {
+ addCriterion("online >=", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineLessThan(Byte value) {
+ addCriterion("online <", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineLessThanOrEqualTo(Byte value) {
+ addCriterion("online <=", value, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineIn(List values) {
+ addCriterion("online in", values, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineNotIn(List values) {
+ addCriterion("online not in", values, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineBetween(Byte value1, Byte value2) {
+ addCriterion("online between", value1, value2, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andOnlineNotBetween(Byte value1, Byte value2) {
+ addCriterion("online not between", value1, value2, "online");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsIsNull() {
+ addCriterion("tags is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsIsNotNull() {
+ addCriterion("tags is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsEqualTo(String value) {
+ addCriterion("tags =", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsNotEqualTo(String value) {
+ addCriterion("tags <>", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsGreaterThan(String value) {
+ addCriterion("tags >", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsGreaterThanOrEqualTo(String value) {
+ addCriterion("tags >=", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsLessThan(String value) {
+ addCriterion("tags <", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsLessThanOrEqualTo(String value) {
+ addCriterion("tags <=", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsLike(String value) {
+ addCriterion("tags like", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsNotLike(String value) {
+ addCriterion("tags not like", value, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsIn(List values) {
+ addCriterion("tags in", values, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsNotIn(List values) {
+ addCriterion("tags not in", values, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsBetween(String value1, String value2) {
+ addCriterion("tags between", value1, value2, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andTagsNotBetween(String value1, String value2) {
+ addCriterion("tags not between", value1, value2, "tags");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolIsNull() {
+ addCriterion("protocol is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolIsNotNull() {
+ addCriterion("protocol is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolEqualTo(String value) {
+ addCriterion("protocol =", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolNotEqualTo(String value) {
+ addCriterion("protocol <>", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolGreaterThan(String value) {
+ addCriterion("protocol >", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolGreaterThanOrEqualTo(String value) {
+ addCriterion("protocol >=", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolLessThan(String value) {
+ addCriterion("protocol <", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolLessThanOrEqualTo(String value) {
+ addCriterion("protocol <=", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolLike(String value) {
+ addCriterion("protocol like", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolNotLike(String value) {
+ addCriterion("protocol not like", value, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolIn(List values) {
+ addCriterion("protocol in", values, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolNotIn(List values) {
+ addCriterion("protocol not in", values, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolBetween(String value1, String value2) {
+ addCriterion("protocol between", value1, value2, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andProtocolNotBetween(String value1, String value2) {
+ addCriterion("protocol not between", value1, value2, "protocol");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationIsNull() {
+ addCriterion("location is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationIsNotNull() {
+ addCriterion("location is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationEqualTo(String value) {
+ addCriterion("location =", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationNotEqualTo(String value) {
+ addCriterion("location <>", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationGreaterThan(String value) {
+ addCriterion("location >", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationGreaterThanOrEqualTo(String value) {
+ addCriterion("location >=", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationLessThan(String value) {
+ addCriterion("location <", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationLessThanOrEqualTo(String value) {
+ addCriterion("location <=", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationLike(String value) {
+ addCriterion("location like", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationNotLike(String value) {
+ addCriterion("location not like", value, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationIn(List values) {
+ addCriterion("location in", values, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationNotIn(List values) {
+ addCriterion("location not in", values, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationBetween(String value1, String value2) {
+ addCriterion("location between", value1, value2, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andLocationNotBetween(String value1, String value2) {
+ addCriterion("location not between", value1, value2, "location");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoIsNull() {
+ addCriterion("auth_info is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoIsNotNull() {
+ addCriterion("auth_info is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoEqualTo(String value) {
+ addCriterion("auth_info =", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoNotEqualTo(String value) {
+ addCriterion("auth_info <>", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoGreaterThan(String value) {
+ addCriterion("auth_info >", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoGreaterThanOrEqualTo(String value) {
+ addCriterion("auth_info >=", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoLessThan(String value) {
+ addCriterion("auth_info <", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoLessThanOrEqualTo(String value) {
+ addCriterion("auth_info <=", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoLike(String value) {
+ addCriterion("auth_info like", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoNotLike(String value) {
+ addCriterion("auth_info not like", value, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoIn(List values) {
+ addCriterion("auth_info in", values, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoNotIn(List values) {
+ addCriterion("auth_info not in", values, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoBetween(String value1, String value2) {
+ addCriterion("auth_info between", value1, value2, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andAuthInfoNotBetween(String value1, String value2) {
+ addCriterion("auth_info not between", value1, value2, "authInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoIsNull() {
+ addCriterion("other_info is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoIsNotNull() {
+ addCriterion("other_info is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoEqualTo(String value) {
+ addCriterion("other_info =", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoNotEqualTo(String value) {
+ addCriterion("other_info <>", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoGreaterThan(String value) {
+ addCriterion("other_info >", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoGreaterThanOrEqualTo(String value) {
+ addCriterion("other_info >=", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoLessThan(String value) {
+ addCriterion("other_info <", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoLessThanOrEqualTo(String value) {
+ addCriterion("other_info <=", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoLike(String value) {
+ addCriterion("other_info like", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoNotLike(String value) {
+ addCriterion("other_info not like", value, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoIn(List values) {
+ addCriterion("other_info in", values, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoNotIn(List values) {
+ addCriterion("other_info not in", values, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoBetween(String value1, String value2) {
+ addCriterion("other_info between", value1, value2, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andOtherInfoNotBetween(String value1, String value2) {
+ addCriterion("other_info not between", value1, value2, "otherInfo");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByIsNull() {
+ addCriterion("create_by is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByIsNotNull() {
+ addCriterion("create_by is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByEqualTo(String value) {
+ addCriterion("create_by =", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByNotEqualTo(String value) {
+ addCriterion("create_by <>", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByGreaterThan(String value) {
+ addCriterion("create_by >", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByGreaterThanOrEqualTo(String value) {
+ addCriterion("create_by >=", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByLessThan(String value) {
+ addCriterion("create_by <", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByLessThanOrEqualTo(String value) {
+ addCriterion("create_by <=", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByLike(String value) {
+ addCriterion("create_by like", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByNotLike(String value) {
+ addCriterion("create_by not like", value, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByIn(List values) {
+ addCriterion("create_by in", values, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByNotIn(List values) {
+ addCriterion("create_by not in", values, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByBetween(String value1, String value2) {
+ addCriterion("create_by between", value1, value2, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateByNotBetween(String value1, String value2) {
+ addCriterion("create_by not between", value1, value2, "createBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNull() {
+ addCriterion("create_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIsNotNull() {
+ addCriterion("create_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeEqualTo(Date value) {
+ addCriterion("create_time =", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotEqualTo(Date value) {
+ addCriterion("create_time <>", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThan(Date value) {
+ addCriterion("create_time >", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("create_time >=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThan(Date value) {
+ addCriterion("create_time <", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("create_time <=", value, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeIn(List values) {
+ addCriterion("create_time in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotIn(List values) {
+ addCriterion("create_time not in", values, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeBetween(Date value1, Date value2) {
+ addCriterion("create_time between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("create_time not between", value1, value2, "createTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByIsNull() {
+ addCriterion("update_by is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByIsNotNull() {
+ addCriterion("update_by is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByEqualTo(String value) {
+ addCriterion("update_by =", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByNotEqualTo(String value) {
+ addCriterion("update_by <>", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByGreaterThan(String value) {
+ addCriterion("update_by >", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
+ addCriterion("update_by >=", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByLessThan(String value) {
+ addCriterion("update_by <", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByLessThanOrEqualTo(String value) {
+ addCriterion("update_by <=", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByLike(String value) {
+ addCriterion("update_by like", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByNotLike(String value) {
+ addCriterion("update_by not like", value, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByIn(List values) {
+ addCriterion("update_by in", values, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByNotIn(List values) {
+ addCriterion("update_by not in", values, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByBetween(String value1, String value2) {
+ addCriterion("update_by between", value1, value2, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateByNotBetween(String value1, String value2) {
+ addCriterion("update_by not between", value1, value2, "updateBy");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNull() {
+ addCriterion("update_time is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIsNotNull() {
+ addCriterion("update_time is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeEqualTo(Date value) {
+ addCriterion("update_time =", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotEqualTo(Date value) {
+ addCriterion("update_time <>", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThan(Date value) {
+ addCriterion("update_time >", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+ addCriterion("update_time >=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThan(Date value) {
+ addCriterion("update_time <", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+ addCriterion("update_time <=", value, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeIn(List values) {
+ addCriterion("update_time in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotIn(List values) {
+ addCriterion("update_time not in", values, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+ addCriterion("update_time between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+ addCriterion("update_time not between", value1, value2, "updateTime");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/OnenetEquipVo.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/OnenetEquipVo.java
new file mode 100644
index 0000000..a51d37f
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/OnenetEquipVo.java
@@ -0,0 +1,94 @@
+package com.ruoyi.web.domain.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @Author: lijunjie
+ * @date: 2023/01/07 09:37
+ * @Version: 1.0
+ */
+public class OnenetEquipVo {
+ @Data
+ @ApiModel("DcsDeviceValVo-二氧化硫温度")
+ public static class EquipList {
+ private Integer id;
+
+ private String title;
+
+ private String online;
+
+ private String tags;
+
+ private String protocol;
+
+ private String location;
+
+ private String authInfo;
+
+ private String otherInfo;
+
+ private String createBy;
+
+ private Date createTime;
+
+ private String updateBy;
+
+ private Date updateTime;
+ }
+
+ @Data
+ @ApiModel("DcsDeviceValVo-二氧化硫温度")
+ public static class EquipData {
+ @ApiModelProperty("原始数据")
+ private String deviceData;
+ @ApiModelProperty("数据时间")
+ private String dataTime;
+ @ApiModelProperty("阀门状态")
+ private String valveStatus1;
+ private String valveStatus2;
+ private String valveStatus3;
+ private String valveStatus4;
+ private String valveStatus5;
+ private String valveStatus6;
+ private String valveStatus7;
+ private String valveStatus8;
+ @ApiModelProperty("设定开度")
+ private String setOpening;
+ @ApiModelProperty("实际开度")
+ private String actualOpening;
+ @ApiModelProperty("进水温度")
+ private String waterInletTemperature;
+ @ApiModelProperty("回水温度")
+ private String waterReturnTemperature;
+ @ApiModelProperty("电池电量")
+ private String batteryPower;
+ @ApiModelProperty("加速度X Y Z轴")
+ private String acceleratedX;
+ @ApiModelProperty("")
+ private String acceleratedY;
+ @ApiModelProperty("")
+ private String acceleratedZ;
+ @ApiModelProperty("信号强度")
+ private String signalStrength;
+ @ApiModelProperty("阀门时间")
+ private String valveTime;
+ @ApiModelProperty("上报间隔")
+ private String reportingInterval;
+ @ApiModelProperty("间隔单位")
+ private String intervalUnit;
+ @ApiModelProperty("上报有效时长")
+ private String effectiveTime;
+ @ApiModelProperty("总上报次数")
+ private String totalNumberReports;
+ @ApiModelProperty("其他")
+ private String other;
+ @ApiModelProperty("累加校验和")
+ private String check;
+ @ApiModelProperty("结束符")
+ private String finish;
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetConfigMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetConfigMapper.java
new file mode 100644
index 0000000..5ef9606
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetConfigMapper.java
@@ -0,0 +1,61 @@
+package com.ruoyi.web.persist.mapper;
+
+import java.util.List;
+import com.ruoyi.web.domain.po.OnenetConfig;
+
+/**
+ * onenet参数Mapper接口
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+public interface OnenetConfigMapper
+{
+ /**
+ * 查询onenet参数
+ *
+ * @param id onenet参数主键
+ * @return onenet参数
+ */
+ public OnenetConfig selectOnenetConfigById(Integer id);
+
+ /**
+ * 查询onenet参数列表
+ *
+ * @param onenetConfig onenet参数
+ * @return onenet参数集合
+ */
+ public List selectOnenetConfigList(OnenetConfig onenetConfig);
+
+ /**
+ * 新增onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ public int insertOnenetConfig(OnenetConfig onenetConfig);
+
+ /**
+ * 修改onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ public int updateOnenetConfig(OnenetConfig onenetConfig);
+
+ /**
+ * 删除onenet参数
+ *
+ * @param id onenet参数主键
+ * @return 结果
+ */
+ public int deleteOnenetConfigById(Integer id);
+
+ /**
+ * 批量删除onenet参数
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteOnenetConfigByIds(Integer[] ids);
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetEquipMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetEquipMapper.java
new file mode 100644
index 0000000..dcb24b9
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/persist/mapper/OnenetEquipMapper.java
@@ -0,0 +1,30 @@
+package com.ruoyi.web.persist.mapper;
+
+import com.ruoyi.web.domain.po.OnenetEquip;
+import com.ruoyi.web.domain.po.OnenetEquipExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OnenetEquipMapper {
+ long countByExample(OnenetEquipExample example);
+
+ int deleteByExample(OnenetEquipExample example);
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(OnenetEquip record);
+
+ int insertSelective(OnenetEquip record);
+
+ List selectByExample(OnenetEquipExample example);
+
+ OnenetEquip selectByPrimaryKey(Integer id);
+
+ int updateByExampleSelective(@Param("record") OnenetEquip record, @Param("example") OnenetEquipExample example);
+
+ int updateByExample(@Param("record") OnenetEquip record, @Param("example") OnenetEquipExample example);
+
+ int updateByPrimaryKeySelective(OnenetEquip record);
+
+ int updateByPrimaryKey(OnenetEquip record);
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetConfigService.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetConfigService.java
new file mode 100644
index 0000000..16e71f8
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetConfigService.java
@@ -0,0 +1,67 @@
+package com.ruoyi.web.service;
+
+import java.util.List;
+import com.ruoyi.web.domain.po.OnenetConfig;
+
+/**
+ * onenet参数Service接口
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+public interface IOnenetConfigService
+{
+ /**
+ * 查询onenet参数
+ *
+ */
+ public String selectOnenetConfigByKey(String configKey);
+
+ /**
+ * 查询onenet参数
+ *
+ * @param id onenet参数主键
+ * @return onenet参数
+ */
+ public OnenetConfig selectOnenetConfigById(Integer id);
+
+ /**
+ * 查询onenet参数列表
+ *
+ * @param onenetConfig onenet参数
+ * @return onenet参数集合
+ */
+ public List selectOnenetConfigList(OnenetConfig onenetConfig);
+
+ /**
+ * 新增onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ public int insertOnenetConfig(OnenetConfig onenetConfig);
+
+ /**
+ * 修改onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ public int updateOnenetConfig(OnenetConfig onenetConfig);
+
+ /**
+ * 批量删除onenet参数
+ *
+ * @param ids 需要删除的onenet参数主键集合
+ * @return 结果
+ */
+ public int deleteOnenetConfigByIds(Integer[] ids);
+
+ /**
+ * 删除onenet参数信息
+ *
+ * @param id onenet参数主键
+ * @return 结果
+ */
+ public int deleteOnenetConfigById(Integer id);
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetEquipService.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetEquipService.java
new file mode 100644
index 0000000..58ca088
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/IOnenetEquipService.java
@@ -0,0 +1,46 @@
+package com.ruoyi.web.service;
+
+import com.ruoyi.web.domain.dto.OnenetEquipDto;
+import com.ruoyi.web.domain.po.OnenetEquip;
+import com.ruoyi.web.domain.vo.OnenetEquipVo;
+
+import java.util.List;
+
+/**
+ * 设备Service接口
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+public interface IOnenetEquipService
+{
+ /**
+ * 查询设备
+ *
+ * @param id 设备主键
+ * @return 设备
+ */
+ public OnenetEquip selectOnenetEquipById(Integer id);
+
+ /**
+ * 查询设备列表
+ *
+ * @param onenetEquip 设备
+ * @return 设备集合
+ */
+ public List selectOnenetEquipList(OnenetEquip onenetEquip);
+
+ /**
+ * 写缓存命令
+ * @param InsertDto
+ * @return
+ */
+ public boolean writeCommand(OnenetEquipDto.InsertDto InsertDto);
+
+ /**
+ * 查询设备数据
+ * @param equipDataParam
+ * @return
+ */
+ public List selectEquipDatas(OnenetEquipDto.EquipDataParam equipDataParam);
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetConfigServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetConfigServiceImpl.java
new file mode 100644
index 0000000..6c08787
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetConfigServiceImpl.java
@@ -0,0 +1,116 @@
+package com.ruoyi.web.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.web.domain.po.OnenetConfig;
+import com.ruoyi.web.persist.mapper.OnenetConfigMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.web.service.IOnenetConfigService;
+
+import javax.annotation.Resource;
+
+/**
+ * onenet参数Service业务层处理
+ *
+ * @author lijunjie
+ * @date 2023-01-06
+ */
+@Service
+public class OnenetConfigServiceImpl implements IOnenetConfigService
+{
+ @Resource
+ private OnenetConfigMapper onenetConfigMapper;
+
+ /**
+ * 查询onenet参数
+ */
+ @Override
+ public String selectOnenetConfigByKey(String configKey)
+ {
+ OnenetConfig onenetConfigExample = new OnenetConfig();
+ onenetConfigExample.setConfigKey("onenet_api_key");
+
+ List onenetConfigs = onenetConfigMapper.selectOnenetConfigList(onenetConfigExample);
+ String configValue = null;
+ if (onenetConfigs.size() > 0){
+ configValue = onenetConfigs.get(0).getConfigValue();
+ }
+
+ return configValue;
+ }
+
+ /**
+ * 查询onenet参数
+ *
+ * @param id onenet参数主键
+ * @return onenet参数
+ */
+ @Override
+ public OnenetConfig selectOnenetConfigById(Integer id)
+ {
+ return onenetConfigMapper.selectOnenetConfigById(id);
+ }
+
+ /**
+ * 查询onenet参数列表
+ *
+ * @param onenetConfig onenet参数
+ * @return onenet参数
+ */
+ @Override
+ public List selectOnenetConfigList(OnenetConfig onenetConfig)
+ {
+ return onenetConfigMapper.selectOnenetConfigList(onenetConfig);
+ }
+
+ /**
+ * 新增onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ @Override
+ public int insertOnenetConfig(OnenetConfig onenetConfig)
+ {
+ onenetConfig.setCreateTime(DateUtils.getNowDate());
+ return onenetConfigMapper.insertOnenetConfig(onenetConfig);
+ }
+
+ /**
+ * 修改onenet参数
+ *
+ * @param onenetConfig onenet参数
+ * @return 结果
+ */
+ @Override
+ public int updateOnenetConfig(OnenetConfig onenetConfig)
+ {
+ onenetConfig.setUpdateTime(DateUtils.getNowDate());
+ return onenetConfigMapper.updateOnenetConfig(onenetConfig);
+ }
+
+ /**
+ * 批量删除onenet参数
+ *
+ * @param ids 需要删除的onenet参数主键
+ * @return 结果
+ */
+ @Override
+ public int deleteOnenetConfigByIds(Integer[] ids)
+ {
+ return onenetConfigMapper.deleteOnenetConfigByIds(ids);
+ }
+
+ /**
+ * 删除onenet参数信息
+ *
+ * @param id onenet参数主键
+ * @return 结果
+ */
+ @Override
+ public int deleteOnenetConfigById(Integer id)
+ {
+ return onenetConfigMapper.deleteOnenetConfigById(id);
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetEquipServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetEquipServiceImpl.java
new file mode 100644
index 0000000..a5d0dcc
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/impl/OnenetEquipServiceImpl.java
@@ -0,0 +1,287 @@
+package com.ruoyi.web.service.impl;
+
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.HexUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpUtil;
+import com.alibaba.druid.util.HexBin;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.web.domain.dto.OnenetEquipDto;
+import com.ruoyi.web.domain.po.OnenetConfig;
+import com.ruoyi.web.domain.po.OnenetEquip;
+import com.ruoyi.web.domain.vo.OnenetEquipVo;
+import com.ruoyi.web.persist.mapper.OnenetConfigMapper;
+import com.ruoyi.web.service.IOnenetEquipService;
+import org.apache.poi.ss.formula.functions.Hex2Dec;
+import org.springframework.http.*;
+import org.springframework.stereotype.Service;
+import org.springframework.util.MultiValueMap;
+import org.springframework.util.unit.DataUnit;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.UriBuilder;
+
+import javax.annotation.Resource;
+import java.net.URI;
+import java.util.*;
+
+/**
+ * @Author: lijunjie
+ * @date: 2023/01/06 15:32
+ * @Version: 1.0
+ */
+@Service
+public class OnenetEquipServiceImpl implements IOnenetEquipService {
+ @Resource
+ private OnenetConfigMapper onenetConfigMapper;
+
+ @Override
+ public OnenetEquip selectOnenetEquipById(Integer id) {
+ return null;
+ }
+
+ @Override
+ public List selectOnenetEquipList(OnenetEquip onenetEquip) {
+ OnenetConfig onenetConfigExample = new OnenetConfig();
+ onenetConfigExample.setConfigKey("onenet_api_key");
+
+ List onenetConfigs = onenetConfigMapper.selectOnenetConfigList(onenetConfigExample);
+ List list = new ArrayList<>();
+ if (onenetConfigs.size() > 0){
+ OnenetConfig onenetConfig = onenetConfigs.get(0);
+
+ String url = "http://api.heclouds.com/devices";
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("api-key", onenetConfig.getConfigValue());
+
+ HttpEntity> httpEntity = new HttpEntity>(null,headers);
+
+ HashMap paramMap = new HashMap<>();
+ paramMap.put("page", "1");
+ paramMap.put("per_page", "10");
+
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, String.class, paramMap);
+
+ String body = response.getBody();
+ JSONObject json1 = JSON.parseObject(body);
+ JSONObject json2 = json1.getJSONObject("data");
+ JSONArray devices = json2.getJSONArray("devices");
+
+ if (devices.size() > 0){
+ for (int i = 0; i < devices.size(); i++) {
+ JSONObject device = devices.getJSONObject(i);
+
+ OnenetEquipVo.EquipList onenetEquipData = new OnenetEquipVo.EquipList();
+ onenetEquipData.setId(Integer.parseInt(device.get("id").toString()));
+ onenetEquipData.setTitle(device.get("title").toString());
+ onenetEquipData.setOnline((boolean) device.get("online") == true ? "正常" : "离线");
+ onenetEquipData.setTags(device.get("tags").toString());
+ onenetEquipData.setProtocol(device.get("protocol").toString());
+ onenetEquipData.setLocation(device.get("location").toString());
+ onenetEquipData.setAuthInfo(device.get("auth_info").toString());
+ onenetEquipData.setCreateTime(DateUtil.parse(device.get("create_time").toString()));
+
+ list.add(onenetEquipData);
+ }
+// list = JSON.parseArray(devices.toJSONString(),OnenetEquip.class);
+
+ return list;
+ }
+ }
+
+ return list;
+ }
+
+ /**
+ * 写缓存命令
+ * @param InsertDto
+ * @return
+ */
+ @Override
+ public boolean writeCommand(OnenetEquipDto.InsertDto InsertDto) {
+ OnenetConfig onenetConfigExample = new OnenetConfig();
+ onenetConfigExample.setConfigKey("onenet_api_key");
+
+ List onenetConfigs = onenetConfigMapper.selectOnenetConfigList(onenetConfigExample);
+ List list = new ArrayList<>();
+ if (onenetConfigs.size() > 0) {
+ HashMap uriParams = new HashMap<>();
+ uriParams.put("imei", InsertDto.getImei());
+ uriParams.put("obj_id", InsertDto.getObj_id());
+ uriParams.put("obj_inst_id", InsertDto.getObj_inst_id());
+ uriParams.put("mode", InsertDto.getMode());
+ uriParams.put("expired_time", "2023-01-10T09:35:03");
+ uriParams.put("trigger_msg", InsertDto.getTrigger_msg());
+
+ String uriParam = HttpUtil.toParams(uriParams);
+
+
+ String url = "http://api.heclouds.com/nbiot/offline?" + uriParam;
+// String url = "http://api.heclouds.com/nbiot/offline?imei=866472059908495&obj_id=1024242896&obj_inst_id=0&mode=1&expired_time=2023-01-10T09%3A45%3A07&trigger_msg=4";
+
+ HttpHeaders headers = new HttpHeaders();
+ MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
+ headers.setContentType(type);
+ headers.add("Accept", MediaType.APPLICATION_JSON.toString());
+
+ OnenetConfig onenetConfig = onenetConfigs.get(0);
+ headers.set("api-key", onenetConfig.getConfigValue());
+
+ JSONObject json1 = new JSONObject();
+ json1.put("res_id", InsertDto.getRes_id());
+ json1.put("val", InsertDto.getCommand());
+ JSONArray jsonArray = new JSONArray();
+ jsonArray.set(0, json1);
+ JSONObject json = new JSONObject();
+ json.put("data", jsonArray);
+
+ HttpEntity formEntity = new HttpEntity(json.toString(), headers);
+
+ RestTemplate restTemplate = new RestTemplate();
+ String response= restTemplate.postForEntity(url,formEntity,String.class).getBody();
+// String response= "{\"errno\":0,\"error\":\"succ\",\"data\":{\"uuid\":\"75841c59-a3f8-5524-ba39-f319a36259ee\"}}";
+
+ JSONObject responseJson = JSON.parseObject(response);
+ Integer errno = responseJson.getObject("errno", Integer.class);
+ if (errno == 0){
+ return true;
+ }
+ }
+
+
+ return false;
+ }
+
+ /**
+ * 查询设备数据
+ * @param equipDataParam
+ * @return
+ */
+ @Override
+ public List selectEquipDatas(OnenetEquipDto.EquipDataParam equipDataParam) {
+ OnenetConfig onenetConfigExample = new OnenetConfig();
+ onenetConfigExample.setConfigKey("onenet_api_key");
+
+ List onenetConfigs = onenetConfigMapper.selectOnenetConfigList(onenetConfigExample);
+ List onenetEquipVoList = new ArrayList<>();
+
+ if (onenetConfigs.size() > 0) {
+ HashMap uriParams = new HashMap<>();
+ if (!StrUtil.hasEmpty(equipDataParam.getStart())){
+ uriParams.put("start", equipDataParam.getStart());
+ }
+ if (!StrUtil.hasEmpty(equipDataParam.getEnd())){
+ uriParams.put("end", equipDataParam.getEnd());
+ }
+
+ String uriParam = HttpUtil.toParams(uriParams);
+
+ String url = "http://api.heclouds.com/devices/" + equipDataParam.getObj_id() +"/datapoints?" + uriParam;
+
+ OnenetConfig onenetConfig = onenetConfigs.get(0);
+// String response = HttpRequest.get(url).header("api-key", onenetConfig.getConfigValue()).execute().body();
+
+ String response = "{\"errno\":0,\"data\":{\"count\":1,\"datastreams\":[{\"datapoints\":[{\"at\":\"2023-01-09 17:47:15.969\",\"value\":\"68C00866472059908495852F015100FFFE0A6464220901002310010014731641646400000065014E000000000000182301091747150503000002015116\"}, {\"at\":\"2023-01-09 17:47:15.969\",\"value\":\"68C00866472059908495852F015100FFFE0A6464220901002310010014731641646400000065014E000000000000182301091747150503000002015116\"}],\"id\":\"3200_0_5750\"}]},\"error\":\"succ\"}";
+
+ JSONObject responseJson = JSON.parseObject(response);
+
+ Integer errno = responseJson.getObject("errno", Integer.class);
+ if (errno == 0){
+ JSONObject dataJson = responseJson.getJSONObject("data");
+ JSONArray dataArray = dataJson.getJSONArray("datastreams");
+ JSONArray datapoints = dataArray.getJSONObject(0).getJSONArray("datapoints");
+
+
+ for (int i = 0; i < datapoints.size(); i++) {
+ JSONObject datapoint = datapoints.getJSONObject(i);
+ String equipData = datapoint.getString("value");
+// String equipData = "68C00866472059908495852F015100FFFE0A6464220901002310010014731641646400000065014E000000000000182301091747150503000002015116";
+
+ String statusInfo = equipData.substring(62);
+ OnenetEquipVo.EquipData equipDataVo = new OnenetEquipVo.EquipData();
+ equipDataVo.setDeviceData(equipData);
+ equipDataVo.setDataTime(datapoint.getString("at"));
+
+ //阀门状态
+ String valveStatus = statusInfo.substring(0, 2);
+
+ valveStatus = String.format("%08d", Integer.valueOf(hexToBin(valveStatus)));
+
+ equipDataVo.setValveStatus8(valveStatus.substring(0, 1).equals("1") ? "角度存在偏差" : "角度正常");
+ equipDataVo.setValveStatus7(valveStatus.substring(1, 2).equals("1") ? "加速度传感器异常" : "加速度传感器正常");
+ equipDataVo.setValveStatus6(valveStatus.substring(2, 3).equals("1") ? "回水传感器异常" : "回水传感器正常");
+ equipDataVo.setValveStatus5(valveStatus.substring(3, 4).equals("1") ? "电池电量低" : "电池电量正常");
+ equipDataVo.setValveStatus4(valveStatus.substring(4, 5).equals("1") ? "电位器异常" : "电位器正常");
+ equipDataVo.setValveStatus3(valveStatus.substring(5, 6).equals("1") ? "行程开关异常" : "行程开关正常");
+ equipDataVo.setValveStatus2(valveStatus.substring(6, 7).equals("1") ? "阀门堵转" : "阀门动作正常");
+ equipDataVo.setValveStatus1(valveStatus.substring(7, 8).equals("1") ? "阀开" : "阀关");
+ //设定开度
+ equipDataVo.setSetOpening(Integer.valueOf(statusInfo.substring(2, 4), 16) + "%");
+ //实际开度
+ equipDataVo.setActualOpening(Integer.valueOf(statusInfo.substring(4, 6), 16) + "%");
+ //进水温度
+ equipDataVo.setWaterInletTemperature(Integer.valueOf(statusInfo.substring(6, 10), 16) / 100.0 + "度");
+ //回水温度
+ equipDataVo.setWaterReturnTemperature(Integer.valueOf(statusInfo.substring(10, 14), 16) / 100.0 + "度");
+ //电池电量
+ equipDataVo.setBatteryPower(Integer.valueOf(statusInfo.substring(14, 18), 16) / 100.0 + "V");
+ //加速度X Y Z轴
+ equipDataVo.setAcceleratedX(statusInfo.substring(18, 22));
+ equipDataVo.setAcceleratedY(statusInfo.substring(22, 26));
+ equipDataVo.setAcceleratedZ(statusInfo.substring(26, 30));
+ //信号强度
+ equipDataVo.setSignalStrength(statusInfo.substring(30, 32));
+ //阀门时间
+ DateTime dateTime = new DateTime("20" + statusInfo.substring(32, 44));
+ equipDataVo.setValveTime(dateTime.toString());
+// $valve_time = substr($status_info, 32, 12);
+// $re['valve_time'] = date('Y-m-d H:i:s', strtotime('20'.$valve_time));
+ //上报间隔
+ equipDataVo.setReportingInterval(statusInfo.substring(44, 46));
+ //间隔单位
+ String intervalUnit = statusInfo.substring(46, 48);
+ switch (intervalUnit){
+ case "01":
+ equipDataVo.setIntervalUnit("分钟");
+ break;
+ case "02":
+ equipDataVo.setIntervalUnit("小时");
+ break;
+ case "03":
+ equipDataVo.setIntervalUnit("天");
+ break;
+ }
+ //上报有效时长
+ equipDataVo.setEffectiveTime(statusInfo.substring(48, 50));
+ //总上报次数
+ equipDataVo.setTotalNumberReports(Integer.valueOf(statusInfo.substring(50, 54), 16).toString());
+ //其他
+ equipDataVo.setOther(statusInfo.substring(54, 56));
+ //累加校验和
+ equipDataVo.setCheck(statusInfo.substring(56, 58));
+ //结束符
+ equipDataVo.setFinish(statusInfo.substring(58, 60));
+
+ onenetEquipVoList.add(equipDataVo);
+ }
+
+ }
+ }
+
+ return onenetEquipVoList;
+ }
+
+ public String hexToBin(String hexS){
+ //字符串形式十进制--作为桥梁!
+ int sint = Integer.valueOf(hexS, 16);
+ //十进制在转换成二进制的字符串形式输出!
+ String bin = Integer.toBinaryString(sint);
+
+ return bin;
+ }
+}
diff --git a/ruoyi-admin/src/main/resources/mapper/device/OnenetConfigMapper.xml b/ruoyi-admin/src/main/resources/mapper/device/OnenetConfigMapper.xml
new file mode 100644
index 0000000..096a8e9
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/mapper/device/OnenetConfigMapper.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, config_key, config_value, create_by, create_time, update_by, update_time from onenet_config
+
+
+
+
+
+
+
+ insert into onenet_config
+
+ config_key,
+ config_value,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+
+
+ #{configKey},
+ #{configValue},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+
+
+
+
+ update onenet_config
+
+ config_key = #{configKey},
+ config_value = #{configValue},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+
+ where id = #{id}
+
+
+
+ delete from onenet_config where id = #{id}
+
+
+
+ delete from onenet_config where id in
+
+ #{id}
+
+
+
diff --git a/ruoyi-admin/src/main/resources/mapper/device/OnenetEquipMapper.xml b/ruoyi-admin/src/main/resources/mapper/device/OnenetEquipMapper.xml
new file mode 100644
index 0000000..4c43a46
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/mapper/device/OnenetEquipMapper.xml
@@ -0,0 +1,323 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, title, online, tags, protocol, location, auth_info, other_info, create_by, create_time,
+ update_by, update_time
+
+
+
+
+ delete from onenet_equip
+ where id = #{id,jdbcType=INTEGER}
+
+
+ delete from onenet_equip
+
+
+
+
+
+ insert into onenet_equip (id, title, online,
+ tags, protocol, location,
+ auth_info, other_info, create_by,
+ create_time, update_by, update_time
+ )
+ values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{online,jdbcType=TINYINT},
+ #{tags,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR},
+ #{authInfo,jdbcType=VARCHAR}, #{otherInfo,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
+ #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
+ )
+
+
+ insert into onenet_equip
+
+
+ id,
+
+
+ title,
+
+
+ online,
+
+
+ tags,
+
+
+ protocol,
+
+
+ location,
+
+
+ auth_info,
+
+
+ other_info,
+
+
+ create_by,
+
+
+ create_time,
+
+
+ update_by,
+
+
+ update_time,
+
+
+
+
+ #{id,jdbcType=INTEGER},
+
+
+ #{title,jdbcType=VARCHAR},
+
+
+ #{online,jdbcType=TINYINT},
+
+
+ #{tags,jdbcType=VARCHAR},
+
+
+ #{protocol,jdbcType=VARCHAR},
+
+
+ #{location,jdbcType=VARCHAR},
+
+
+ #{authInfo,jdbcType=VARCHAR},
+
+
+ #{otherInfo,jdbcType=VARCHAR},
+
+
+ #{createBy,jdbcType=VARCHAR},
+
+
+ #{createTime,jdbcType=TIMESTAMP},
+
+
+ #{updateBy,jdbcType=VARCHAR},
+
+
+ #{updateTime,jdbcType=TIMESTAMP},
+
+
+
+
+
+ update onenet_equip
+
+
+ id = #{record.id,jdbcType=INTEGER},
+
+
+ title = #{record.title,jdbcType=VARCHAR},
+
+
+ online = #{record.online,jdbcType=TINYINT},
+
+
+ tags = #{record.tags,jdbcType=VARCHAR},
+
+
+ protocol = #{record.protocol,jdbcType=VARCHAR},
+
+
+ location = #{record.location,jdbcType=VARCHAR},
+
+
+ auth_info = #{record.authInfo,jdbcType=VARCHAR},
+
+
+ other_info = #{record.otherInfo,jdbcType=VARCHAR},
+
+
+ create_by = #{record.createBy,jdbcType=VARCHAR},
+
+
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+
+
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
+
+
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+
+
+
+
+
+
+
+ update onenet_equip
+ set id = #{record.id,jdbcType=INTEGER},
+ title = #{record.title,jdbcType=VARCHAR},
+ online = #{record.online,jdbcType=TINYINT},
+ tags = #{record.tags,jdbcType=VARCHAR},
+ protocol = #{record.protocol,jdbcType=VARCHAR},
+ location = #{record.location,jdbcType=VARCHAR},
+ auth_info = #{record.authInfo,jdbcType=VARCHAR},
+ other_info = #{record.otherInfo,jdbcType=VARCHAR},
+ create_by = #{record.createBy,jdbcType=VARCHAR},
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+
+
+
+
+
+ update onenet_equip
+
+
+ title = #{title,jdbcType=VARCHAR},
+
+
+ online = #{online,jdbcType=TINYINT},
+
+
+ tags = #{tags,jdbcType=VARCHAR},
+
+
+ protocol = #{protocol,jdbcType=VARCHAR},
+
+
+ location = #{location,jdbcType=VARCHAR},
+
+
+ auth_info = #{authInfo,jdbcType=VARCHAR},
+
+
+ other_info = #{otherInfo,jdbcType=VARCHAR},
+
+
+ create_by = #{createBy,jdbcType=VARCHAR},
+
+
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+
+
+ update_by = #{updateBy,jdbcType=VARCHAR},
+
+
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update onenet_equip
+ set title = #{title,jdbcType=VARCHAR},
+ online = #{online,jdbcType=TINYINT},
+ tags = #{tags,jdbcType=VARCHAR},
+ protocol = #{protocol,jdbcType=VARCHAR},
+ location = #{location,jdbcType=VARCHAR},
+ auth_info = #{authInfo,jdbcType=VARCHAR},
+ other_info = #{otherInfo,jdbcType=VARCHAR},
+ create_by = #{createBy,jdbcType=VARCHAR},
+ create_time = #{createTime,jdbcType=TIMESTAMP},
+ update_by = #{updateBy,jdbcType=VARCHAR},
+ update_time = #{updateTime,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index bd62a98..1e126fb 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -52,13 +52,13 @@
org.apache.commons
commons-lang3
-
+
com.fasterxml.jackson.core
jackson-databind
-
+
com.baomidou
@@ -132,6 +132,12 @@
javax.servlet-api
+
+
+ cn.hutool
+ hutool-all
+
+
-
\ No newline at end of file
+
diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml
index 094e33d..70a55e5 100644
--- a/ruoyi-generator/pom.xml
+++ b/ruoyi-generator/pom.xml
@@ -1,40 +1,67 @@
-
-
-
- ruoyi
- com.ruoyi
- 3.8.5
-
- 4.0.0
-
- ruoyi-generator
-
-
- generator代码生成
-
-
-
-
-
-
- org.apache.velocity
- velocity-engine-core
-
-
-
-
- commons-collections
- commons-collections
-
-
-
-
- com.ruoyi
- ruoyi-common
-
-
-
-
-
\ No newline at end of file
+
+
+
+ ruoyi
+ com.ruoyi
+ 3.8.5
+
+ 4.0.0
+
+ ruoyi-generator
+
+
+ generator代码生成
+
+
+
+
+
+
+ org.apache.velocity
+ velocity-engine-core
+
+
+
+
+ commons-collections
+ commons-collections
+
+
+
+
+ com.ruoyi
+ ruoyi-common
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-core
+
+
+
+
+
+ ${project.artifactId}
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.3.7
+
+ ${basedir}/src/main/resources/mbg.xml
+ true
+
+
+
+ mysql
+ mysql-connector-java
+ 8.0.23
+
+
+
+
+
+
diff --git a/ruoyi-generator/src/main/resources/mbg.xml b/ruoyi-generator/src/main/resources/mbg.xml
new file mode 100644
index 0000000..39f4812
--- /dev/null
+++ b/ruoyi-generator/src/main/resources/mbg.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/api/device/config.js b/ruoyi-ui/src/api/device/config.js
new file mode 100644
index 0000000..8269db4
--- /dev/null
+++ b/ruoyi-ui/src/api/device/config.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询onenet参数列表
+export function listConfig(query) {
+ return request({
+ url: '/device/config/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询onenet参数详细
+export function getConfig(id) {
+ return request({
+ url: '/device/config/' + id,
+ method: 'get'
+ })
+}
+
+// 新增onenet参数
+export function addConfig(data) {
+ return request({
+ url: '/device/config',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改onenet参数
+export function updateConfig(data) {
+ return request({
+ url: '/device/config',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除onenet参数
+export function delConfig(id) {
+ return request({
+ url: '/device/config/' + id,
+ method: 'delete'
+ })
+}
diff --git a/ruoyi-ui/src/api/device/equips.js b/ruoyi-ui/src/api/device/equips.js
new file mode 100644
index 0000000..6ddddaa
--- /dev/null
+++ b/ruoyi-ui/src/api/device/equips.js
@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 查询设备列表
+export function getApiKey() {
+ return request({
+ url: '/device/equip/getApiKey',
+ method: 'get',
+ })
+}
+
+// 查询设备列表
+export function listEquips(query) {
+ return request({
+ url: '/device/equip/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询设备列表
+export function listEquipDatas(query) {
+ return request({
+ url: '/device/equip/equipData',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询设备详细
+export function getEquips(id) {
+ return request({
+ url: '/device/equip/' + id,
+ method: 'get'
+ })
+}
+
+// 写缓存命令
+export function writeCommand(data) {
+ return request({
+ url: '/device/equip/writeCommand',
+ method: 'post',
+ data: data
+ })
+}
+
+
+
+// 删除设备
+export function delEquips(id) {
+ return request({
+ url: '/device/equip/' + id,
+ method: 'delete'
+ })
+}
diff --git a/ruoyi-ui/src/views/device/config/index.vue b/ruoyi-ui/src/views/device/config/index.vue
new file mode 100644
index 0000000..c3fdc27
--- /dev/null
+++ b/ruoyi-ui/src/views/device/config/index.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/device/equips/index.vue b/ruoyi-ui/src/views/device/equips/index.vue
new file mode 100644
index 0000000..62489ce
--- /dev/null
+++ b/ruoyi-ui/src/views/device/equips/index.vue
@@ -0,0 +1,583 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 写设备资源
+
+
+
+
+
+ 设备数据点
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 01
+ 02
+
+
+ 09
+ 0B
+
+
+
+
+
+
+
+
+ 00
+ 11
+
+
+
+
+
+
+
+
+
+ 生成校验码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+