第一次提交
This commit is contained in:
163
fastbee-service/fastbee-iot-service/pom.xml
Normal file
163
fastbee-service/fastbee-iot-service/pom.xml
Normal file
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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">
|
||||
<parent>
|
||||
<artifactId>fastbee-service</artifactId>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<version>3.8.5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>fastbee-iot-service</artifactId>
|
||||
|
||||
<description>
|
||||
设备业务模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-framework</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-quartz</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
<!-- mqtt-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
<version>1.2.5</version>
|
||||
</dependency>
|
||||
<!--AES-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>5.2.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 第三方登录模块-->
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>${justAuth.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用http接口模块-->
|
||||
<dependency>
|
||||
<groupId>com.dtflys.forest</groupId>
|
||||
<artifactId>forest-spring-boot-starter</artifactId>
|
||||
<version>${forest.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- TDengine连接 START-->
|
||||
<dependency>
|
||||
<groupId>com.taosdata.jdbc</groupId>
|
||||
<artifactId>taos-jdbcdriver</artifactId>
|
||||
<version>2.0.38</version>
|
||||
</dependency>
|
||||
<!-- TDengine连接 END-->
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<!--数据库规则配置源插件-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-rule-sql</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
<!--groovy脚本插件-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-script-groovy</artifactId>
|
||||
<version>${liteflow.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-notify-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-http</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fastbee</groupId>
|
||||
<artifactId>fastbee-ruleEngine</artifactId>
|
||||
<version>3.8.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>8.4.1.jre8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>19.3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.200</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.dtflys.forest</groupId>
|
||||
<artifactId>forest-spring-boot-starter</artifactId>
|
||||
<version>1.5.36</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
40
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IDeviceCache.java
vendored
Normal file
40
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IDeviceCache.java
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
import com.fastbee.common.core.mq.DeviceStatusBo;
|
||||
import com.fastbee.common.enums.DeviceStatus;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备缓存
|
||||
* @author bill
|
||||
*/
|
||||
public interface IDeviceCache {
|
||||
|
||||
/**
|
||||
* 更新设备状态
|
||||
* @param dto dto
|
||||
*/
|
||||
public void updateDeviceStatusCache(DeviceStatusBo dto,Device device);
|
||||
|
||||
/**
|
||||
* 获取设备在线总数
|
||||
* @return 设备在线总数
|
||||
*/
|
||||
public long deviceOnlineTotal();
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新redis缓存设备状态
|
||||
* @param serialNumbers 设备列表
|
||||
* @param status 状态
|
||||
*/
|
||||
void updateBatchDeviceStatusCache(List<String> serialNumbers, DeviceStatus status);
|
||||
|
||||
/**
|
||||
* 移除过期的设备
|
||||
*/
|
||||
public List<String> removeExpiredDevice();
|
||||
|
||||
}
|
30
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IFirmwareCache.java
vendored
Normal file
30
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IFirmwareCache.java
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
/**
|
||||
* 固件版本缓存
|
||||
* @author gsb
|
||||
* @date 2022/10/25 11:34
|
||||
*/
|
||||
public interface IFirmwareCache {
|
||||
|
||||
/**
|
||||
* 固件版本缓存
|
||||
* @param firmwareId 固件ID
|
||||
* @param urlName 升级URL
|
||||
* @return
|
||||
*/
|
||||
public void setFirmwareCache(Long firmwareId,String urlName);
|
||||
|
||||
/**
|
||||
* 获取固件版本信息
|
||||
* @param firmwareId 固件ID
|
||||
* @return 升级URL
|
||||
*/
|
||||
public String getFirmwareCache(Long firmwareId);
|
||||
|
||||
/**
|
||||
* 移除固件版本
|
||||
* @param firmwareId 固件id
|
||||
*/
|
||||
public void remove(Long firmwareId);
|
||||
}
|
49
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IModbusConfigCache.java
vendored
Normal file
49
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/IModbusConfigCache.java
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
import com.fastbee.common.core.mq.MQSendMessageBo;
|
||||
import com.fastbee.iot.domain.ModbusConfig;
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 产品对应modbus配置参数缓存
|
||||
* @author gsb
|
||||
* @date 2024/6/13 9:44
|
||||
*/
|
||||
public interface IModbusConfigCache {
|
||||
|
||||
|
||||
/**
|
||||
* 获取modbus参数 --返回 Map<String, ModbusConfig>
|
||||
* @param productId
|
||||
* @return
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:ModbusConfig
|
||||
* </p>
|
||||
*/
|
||||
Map<Integer, List<ModbusConfig>> getModbusConfigCacheByProductId(Long productId);
|
||||
|
||||
|
||||
/**
|
||||
* 缓存modbus参数-返回Map
|
||||
* @param productId
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:ModbusConfig
|
||||
* </p>
|
||||
*/
|
||||
Map<Integer, List<ModbusConfig>> setModbusConfigCacheByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 获取单个modbus参数缓存值
|
||||
* @param productId 产品id
|
||||
* @param identify 标识符
|
||||
* @return ModbusConfig
|
||||
*/
|
||||
public List<ModbusConfig> getSingleModbusConfig(Long productId, String identify);
|
||||
}
|
103
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/ITSLCache.java
vendored
Normal file
103
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/ITSLCache.java
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 物模型缓存
|
||||
* @author gsb
|
||||
* @date 2024/6/12 15:57
|
||||
*/
|
||||
public interface ITSLCache {
|
||||
|
||||
|
||||
/**
|
||||
* 获取JSON物模型 -组装的方式是为了兼容前端数据结构
|
||||
* @param productId 产品id
|
||||
* @return
|
||||
* <p>
|
||||
* {
|
||||
* "functions": [
|
||||
* ],
|
||||
* "events": [
|
||||
* ],
|
||||
* "properties": [
|
||||
* {
|
||||
* "datatype": {
|
||||
* "max": 100,
|
||||
* "min": 1,
|
||||
* "step": 1,
|
||||
* "type": "integer",
|
||||
* "unit": "流明"
|
||||
* },
|
||||
* "id": "light",
|
||||
* "isChart": 1,
|
||||
* "isHistory": 1,
|
||||
* "isMonitor": 1,
|
||||
* "isReadonly": 1,
|
||||
* "name": "光强",
|
||||
* "order": 0,
|
||||
* "regId": "light",
|
||||
* "type": 1
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* </p>
|
||||
*
|
||||
*/
|
||||
String getCacheThingsModelByProductId(Long productId);
|
||||
|
||||
|
||||
/**
|
||||
* 缓存物模型
|
||||
*
|
||||
* @param productId 产品id
|
||||
* @return <p>
|
||||
* {\"functions\":[],\"events\":[],\"properties\":[{\"datatype\":{\"max\":100,\"min\":1
|
||||
* ,\"step\":1,\"type\":\"integer\",\"unit\":\"流明\"},
|
||||
* \"id\":\"light\",\"isChart\":1,\"isHistory\":1,\"isMonitor\":1,\"isReadonly\":1,
|
||||
* \"name\":\"光强\",\"order\":0,\"regId\":\"light\",\"type\":1}]}
|
||||
* </p>
|
||||
*/
|
||||
public String setCacheThingsModelByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 获取map物模型 --返回 Map<String, PropertyDto>
|
||||
* @param productId
|
||||
* @return
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:PropertyDto
|
||||
* </p>
|
||||
*/
|
||||
Map<String, ThingsModelValueItem> getCacheThMapByProductId(Long productId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取List集合物模型
|
||||
*/
|
||||
List<ThingsModelValueItem> getThingsModelList(Long productId);
|
||||
|
||||
/**
|
||||
* 缓存物模型-返回Map
|
||||
* @param productId
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:PropertyDto
|
||||
* </p>
|
||||
*/
|
||||
public Map<String, ThingsModelValueItem> setCacheThMapByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 获取单个物模型缓存值
|
||||
* @param productId 产品id
|
||||
* @param identify 标识符
|
||||
* @return PropertyDto
|
||||
*/
|
||||
public ThingsModelValueItem getSingleThingModels(Long productId, String identify);
|
||||
|
||||
}
|
40
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/ITSLValueCache.java
vendored
Normal file
40
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/ITSLValueCache.java
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
import com.fastbee.iot.model.ThingsModels.ValueItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gsb
|
||||
* @date 2024/3/22 16:37
|
||||
*/
|
||||
public interface ITSLValueCache {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取Redis缓存的设备物模型值
|
||||
*
|
||||
* @param productId 产品ID
|
||||
* @param deviceNumber 设备编号
|
||||
* @return
|
||||
*/
|
||||
public List<ValueItem> getCacheDeviceStatus(Long productId, String deviceNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 缓存设备物模型值到redis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<ValueItem> addCacheDeviceStatus(Long productId, String serialNumber);
|
||||
|
||||
/**
|
||||
* 获取单个物模型的值
|
||||
* @param productId 产品id
|
||||
* @param: deviceNumber 设备编号
|
||||
* @param: identifier 物模型标识
|
||||
* @return java.lang.String
|
||||
*/
|
||||
String getCacheIdentifierValue(Long productId, String serialNumber, String identifier);
|
||||
}
|
25
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/SceneModelTagCache.java
vendored
Normal file
25
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/SceneModelTagCache.java
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
package com.fastbee.iot.cache;
|
||||
|
||||
import com.fastbee.iot.model.scenemodel.SceneModelTagCacheVO;
|
||||
|
||||
/**
|
||||
* @author gsb
|
||||
* @date 2024/3/22 16:37
|
||||
*/
|
||||
public interface SceneModelTagCache {
|
||||
|
||||
/**
|
||||
* 缓存场景运算型变量值
|
||||
* @param sceneModelId 场景id
|
||||
* @param: value 值
|
||||
* @return void
|
||||
*/
|
||||
void addSceneModelTagValue(Long sceneModelId, SceneModelTagCacheVO sceneModelTagCacheVO);
|
||||
|
||||
/**
|
||||
* 获取场景运算型变量值
|
||||
* @param sceneModelTagId 场景变量id
|
||||
* @return java.lang.String
|
||||
*/
|
||||
SceneModelTagCacheVO getSceneModelTagValue(Long sceneModelId, Long sceneModelTagId);
|
||||
}
|
131
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/DeviceCacheImpl.java
vendored
Normal file
131
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/DeviceCacheImpl.java
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
package com.fastbee.iot.cache.impl;
|
||||
|
||||
import com.fastbee.common.core.mq.DeviceStatusBo;
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.common.enums.DeviceStatus;
|
||||
import com.fastbee.common.exception.ServiceException;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import com.fastbee.iot.cache.IDeviceCache;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.service.IDeviceService;
|
||||
import com.fastbee.iot.service.ISubGatewayService;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author bill
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DeviceCacheImpl implements IDeviceCache {
|
||||
|
||||
@Value("${server.device.platform.expried:120}")
|
||||
private Integer expireTime;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private IDeviceService deviceService;
|
||||
|
||||
|
||||
/**
|
||||
* 更新设备状态
|
||||
* 如果设备状态保持不变,更新redis设备最新在线时间
|
||||
* 如果设备状态更改,更新redis同时,更新MySQL数据库设备状态
|
||||
*
|
||||
* @param dto dto
|
||||
*/
|
||||
@Override
|
||||
public void updateDeviceStatusCache(DeviceStatusBo dto,Device device) {
|
||||
|
||||
Optional.ofNullable(device).orElseThrow(() -> new ServiceException("设备不存在" + "[{" + dto.getSerialNumber() + "}]"));
|
||||
if (dto.getStatus() == DeviceStatus.ONLINE) {
|
||||
/*redis设备在线列表*/
|
||||
redisCache.zSetAdd(RedisKeyBuilder.buildDeviceOnlineListKey(), dto.getSerialNumber(), DateUtils.getTimestampSeconds());
|
||||
device.setStatus(DeviceStatus.ONLINE.getType());
|
||||
} else {
|
||||
/*在redis设备在线列表移除设备*/
|
||||
redisCache.zRem(RedisKeyBuilder.buildDeviceOnlineListKey(), dto.getSerialNumber());
|
||||
//更新一下mysql的设备状态为离线
|
||||
device.setStatus(DeviceStatus.OFFLINE.getType());
|
||||
}
|
||||
device.setUpdateTime(DateUtils.getNowDate());
|
||||
deviceService.updateDeviceStatusAndLocation(device, dto.getIp());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备在线总数
|
||||
*
|
||||
* @return 设备在线总数
|
||||
*/
|
||||
@Override
|
||||
public long deviceOnlineTotal() {
|
||||
return redisCache.zSize(RedisKeyBuilder.buildDeviceOnlineListKey());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量更新redis缓存设备状态
|
||||
*
|
||||
* @param serialNumbers 设备列表
|
||||
* @param status 状态
|
||||
*/
|
||||
@Override
|
||||
public void updateBatchDeviceStatusCache(List<String> serialNumbers, DeviceStatus status) {
|
||||
if (CollectionUtils.isEmpty(serialNumbers)) {
|
||||
return;
|
||||
}
|
||||
for (String serialNumber : serialNumbers) {
|
||||
DeviceStatusBo statusBo = new DeviceStatusBo();
|
||||
statusBo.setStatus(status);
|
||||
statusBo.setSerialNumber(serialNumber);
|
||||
//this.updateDeviceStatusCache(statusBo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时移除过期的设备
|
||||
*/
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public List<String> removeExpiredDevice() {
|
||||
List<String> serialNumberList = new ArrayList<String>();
|
||||
try {
|
||||
String cacheKey = RedisKeyBuilder.buildDeviceOnlineListKey();
|
||||
long n = DateUtils.getTimestampSeconds();
|
||||
long time = n - expireTime * 1000;
|
||||
Set<String> serialNumbers = redisCache.zRangeByScore(cacheKey, 0, time);
|
||||
redisCache.zRemBySocre(cacheKey, 0, time);
|
||||
if (CollectionUtils.isEmpty(serialNumbers)) {
|
||||
return serialNumberList;
|
||||
}
|
||||
return serialNumberList;
|
||||
} catch (Exception e) {
|
||||
log.warn("=>移除超时设备异常", e);
|
||||
return serialNumberList;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统停止时,更新所有设备为离线状态
|
||||
*/
|
||||
@PreDestroy
|
||||
public void resetDeviceStatus(){
|
||||
deviceService.reSetDeviceStatus();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.fastbee.iot.cache.impl;
|
||||
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.iot.cache.IFirmwareCache;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 固件版本缓存
|
||||
* @author gsb
|
||||
* @date 2022/10/25 11:37
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class FirmwareCacheImpl implements IFirmwareCache {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
/**
|
||||
* 固件版本缓存
|
||||
* @param firmwareId 固件ID
|
||||
* @param urlName 升级URL
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void setFirmwareCache(Long firmwareId,String urlName){
|
||||
String cachedKey = RedisKeyBuilder.buildFirmwareCachedKey(firmwareId);
|
||||
redisCache.setCacheObject(cachedKey,urlName,60*60*12, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取固件版本信息
|
||||
* @param firmwareId 固件ID
|
||||
* @return 升级URL
|
||||
*/
|
||||
@Override
|
||||
public String getFirmwareCache(Long firmwareId){
|
||||
String cachedKey = RedisKeyBuilder.buildFirmwareCachedKey(firmwareId);
|
||||
return redisCache.getCacheObject(cachedKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除固件版本
|
||||
* @param firmwareId 固件id
|
||||
*/
|
||||
@Override
|
||||
public void remove(Long firmwareId){
|
||||
String cachedKey = RedisKeyBuilder.buildFirmwareCachedKey(firmwareId);
|
||||
redisCache.deleteObject(cachedKey);
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.iot.cache.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fastbee.common.core.device.DeviceAndProtocol;
|
||||
import com.fastbee.common.core.mq.MQSendMessageBo;
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.iot.cache.IModbusConfigCache;
|
||||
import com.fastbee.iot.cache.ITSLCache;
|
||||
import com.fastbee.iot.domain.ModbusConfig;
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem;
|
||||
import com.fastbee.iot.service.IDeviceService;
|
||||
import com.fastbee.iot.service.IModbusConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author gsb
|
||||
* @date 2024/6/13 9:45
|
||||
*/
|
||||
@Service
|
||||
public class ModbusConfigCacheImpl implements IModbusConfigCache {
|
||||
|
||||
@Resource
|
||||
private IModbusConfigService modbusConfigService;
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
/**
|
||||
* 获取modbus参数 --返回 Map<String, ModbusConfig>
|
||||
* @param productId
|
||||
* @return
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:ModbusConfig
|
||||
* </p>
|
||||
*/
|
||||
@Override
|
||||
public Map<Integer, List<ModbusConfig>> getModbusConfigCacheByProductId(Long productId){
|
||||
Map<Integer, List<ModbusConfig>> resultMap = new HashMap<>();
|
||||
String modbusKey = RedisKeyBuilder.buildModbusKey(productId);
|
||||
Map<String,String> map = redisCache.hashEntity(modbusKey);
|
||||
if (!CollectionUtils.isEmpty(map)){
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
List<ModbusConfig> modbusConfigList = JSON.parseArray(entry.getValue(), ModbusConfig.class);
|
||||
resultMap.put(Integer.parseInt(entry.getKey()), modbusConfigList);
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
return setModbusConfigCacheByProductId(productId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存modbus参数-返回Map
|
||||
* @param productId
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:ModbusConfig
|
||||
* </p>
|
||||
*/
|
||||
@Override
|
||||
public Map<Integer, List<ModbusConfig>> setModbusConfigCacheByProductId(Long productId){
|
||||
Map<String,String> resultMap = new HashMap<>();
|
||||
ModbusConfig modbusConfig = new ModbusConfig();
|
||||
modbusConfig.setProductId(productId);
|
||||
List<ModbusConfig> modbusConfigList = modbusConfigService.selectShortListByProductId(modbusConfig);
|
||||
Map<Integer, List<ModbusConfig>> listMap = modbusConfigList.stream().collect(Collectors.groupingBy(ModbusConfig::getAddress));
|
||||
for (Map.Entry<Integer, List<ModbusConfig>> entry : listMap.entrySet()) {
|
||||
List<ModbusConfig> value = entry.getValue();
|
||||
String valueStr = JSONObject.toJSONString(value);
|
||||
resultMap.put(entry.getKey()+"", valueStr);
|
||||
}
|
||||
String modbusKey = RedisKeyBuilder.buildModbusKey(productId);
|
||||
redisCache.hashPutAll(modbusKey, resultMap);
|
||||
return listMap;
|
||||
}
|
||||
/**
|
||||
* 获取单个modbus参数缓存值
|
||||
* @param productId 产品id
|
||||
* @param address 标识符
|
||||
* @return ModbusConfig
|
||||
*/
|
||||
@Override
|
||||
public List<ModbusConfig> getSingleModbusConfig(Long productId, String address){
|
||||
String modbusKey = RedisKeyBuilder.buildModbusKey(productId);
|
||||
String cacheMapValue = redisCache.getCacheMapValue(modbusKey, address);
|
||||
if (!StringUtils.isEmpty(cacheMapValue)){
|
||||
return JSON.parseArray(cacheMapValue, ModbusConfig.class);
|
||||
}
|
||||
ModbusConfig modbusConfig = new ModbusConfig();
|
||||
modbusConfig.setProductId(productId);
|
||||
modbusConfig.setAddress(Integer.parseInt(address));
|
||||
List<ModbusConfig> modbusConfigList = modbusConfigService.selectShortListByProductId(modbusConfig);
|
||||
if (!CollectionUtils.isEmpty(modbusConfigList)){
|
||||
setModbusConfigCacheByProductId(productId);
|
||||
}
|
||||
return modbusConfigList;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.fastbee.iot.service.cache.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.iot.cache.SceneModelTagCache;
|
||||
import com.fastbee.iot.model.scenemodel.SceneModelTagCacheVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 物模型缓存和物模型值缓存
|
||||
* @author gsb
|
||||
* @date 2024/3/22 16:37
|
||||
*/
|
||||
@Service
|
||||
public class SceneModelTagCacheImpl implements SceneModelTagCache {
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
|
||||
|
||||
@Override
|
||||
public void addSceneModelTagValue(Long sceneModelId, SceneModelTagCacheVO sceneModelTagCacheVO) {
|
||||
String key = RedisKeyBuilder.buildSceneModelTagCacheKey(sceneModelId);
|
||||
redisCache.setHashValue(key, sceneModelTagCacheVO.getId().toString(), JSON.toJSONString(sceneModelTagCacheVO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SceneModelTagCacheVO getSceneModelTagValue(Long sceneModelId, Long sceneModelTagId) {
|
||||
String key = RedisKeyBuilder.buildSceneModelTagCacheKey(sceneModelId);
|
||||
return JSONObject.parseObject(redisCache.getCacheMapValue(key, sceneModelTagId.toString()), SceneModelTagCacheVO.class);
|
||||
}
|
||||
}
|
305
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/TSLCacheImpl.java
vendored
Normal file
305
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/TSLCacheImpl.java
vendored
Normal file
@ -0,0 +1,305 @@
|
||||
package com.fastbee.iot.cache.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.common.enums.ThingsModelType;
|
||||
import com.fastbee.common.utils.SecurityUtils;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.iot.cache.ITSLCache;
|
||||
import com.fastbee.iot.domain.ModbusConfig;
|
||||
import com.fastbee.iot.domain.Product;
|
||||
import com.fastbee.iot.domain.ThingsModel;
|
||||
import com.fastbee.iot.mapper.ProductMapper;
|
||||
import com.fastbee.iot.model.ThingsModelItem.Datatype;
|
||||
import com.fastbee.iot.model.ThingsModels.PropertyDto;
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem;
|
||||
import com.fastbee.iot.service.IModbusConfigService;
|
||||
import com.fastbee.iot.service.IThingsModelService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.fastbee.common.constant.Constants.EN_US;
|
||||
import static com.fastbee.common.constant.Constants.ZH_CN;
|
||||
|
||||
/**
|
||||
* 物模型缓存
|
||||
*
|
||||
* @author gsb
|
||||
* @date 2024/6/12 15:58
|
||||
*/
|
||||
@Service
|
||||
public class TSLCacheImpl implements ITSLCache {
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
@Resource
|
||||
private ProductMapper productMapper;
|
||||
@Resource
|
||||
private IThingsModelService thingsModelService;
|
||||
@Resource
|
||||
private IModbusConfigService modbusConfigService;
|
||||
|
||||
/**
|
||||
* 根据产品ID获取JSON物模型 -组装的方式是为了兼容前端数据结构
|
||||
*
|
||||
* @param productId
|
||||
* @return <p>
|
||||
* {
|
||||
* "functions": [
|
||||
* ],
|
||||
* "events": [
|
||||
* ],
|
||||
* "properties": [
|
||||
* {
|
||||
* "datatype": {
|
||||
* "max": 100,
|
||||
* "min": 1,
|
||||
* "step": 1,
|
||||
* "type": "integer",
|
||||
* "unit": "流明"
|
||||
* },
|
||||
* "id": "light",
|
||||
* "isChart": 1,
|
||||
* "isHistory": 1,
|
||||
* "isMonitor": 1,
|
||||
* "isReadonly": 1,
|
||||
* "name": "光强",
|
||||
* "order": 0,
|
||||
* "regId": "light",
|
||||
* "type": 1
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* </p>
|
||||
*/
|
||||
@Override
|
||||
public String getCacheThingsModelByProductId(Long productId) {
|
||||
assert !Objects.isNull(productId) : "产品id为空";
|
||||
// redis获取物模型
|
||||
Map<String, Object> map = redisCache.getCacheMap(RedisKeyBuilder.buildTSLCacheKey(productId));
|
||||
if (!CollectionUtils.isEmpty(map)) {
|
||||
//兼容原页面物模型的数据格式
|
||||
Map<String, List<PropertyDto>> listMap = map.values().stream().map(v -> JSON.parseObject(v.toString(), PropertyDto.class))
|
||||
.collect(Collectors.groupingBy(dto -> ThingsModelType.getName(dto.getType())));
|
||||
if (listMap != null) {
|
||||
for (List<PropertyDto> dtoList : listMap.values()) {
|
||||
for (PropertyDto dto : dtoList) {
|
||||
convertModelName(dto, SecurityUtils.getLanguage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return JSON.toJSONString(listMap);
|
||||
}
|
||||
return setCacheThingsModelByProductId(productId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 缓存物模型 -返回JSON字符串
|
||||
*
|
||||
* @param productId
|
||||
* @return <p>
|
||||
* {\"functions\":[],\"events\":[],\"properties\":[{\"datatype\":{\"max\":100,\"min\":1
|
||||
* ,\"step\":1,\"type\":\"integer\",\"unit\":\"流明\"},
|
||||
* \"id\":\"light\",\"isChart\":1,\"isHistory\":1,\"isMonitor\":1,\"isReadonly\":1,
|
||||
* \"name\":\"光强\",\"order\":0,\"regId\":\"light\",\"type\":1}]}
|
||||
* </p>
|
||||
*/
|
||||
public String setCacheThingsModelByProductId(Long productId) {
|
||||
Map<String, String> thingsModelMap = setThingModelAndModbusConfig(productId);
|
||||
/*组装成原格式数据*/
|
||||
Map<String, List<ThingsModelValueItem>> result = thingsModelMap.values().stream().map(x -> JSON.parseObject(x, ThingsModelValueItem.class))
|
||||
.collect(Collectors.groupingBy(dto -> ThingsModelType.getName(dto.getType())));
|
||||
if (result != null) {
|
||||
for (List<ThingsModelValueItem> itemList : result.values()) {
|
||||
for (ThingsModelValueItem item : itemList) {
|
||||
convertModelName(item, SecurityUtils.getLanguage());
|
||||
}
|
||||
}
|
||||
}
|
||||
String jsonString = JSON.toJSONString(result);
|
||||
Product product = new Product();
|
||||
product.setProductId(productId);
|
||||
product.setThingsModelsJson(jsonString);
|
||||
productMapper.updateThingsModelJson(product);
|
||||
return jsonString;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取map物模型
|
||||
* @param productId
|
||||
* @return
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:PropertyDto
|
||||
* </p>
|
||||
*/
|
||||
public Map<String, ThingsModelValueItem> getCacheThMapByProductId(Long productId) {
|
||||
assert !Objects.isNull(productId) : "产品id为空";
|
||||
// redis获取物模型
|
||||
Map<String, Object> map = redisCache.getCacheMap(RedisKeyBuilder.buildTSLCacheKey(productId));
|
||||
if (!CollectionUtils.isEmpty(map)) {
|
||||
Map<String, ThingsModelValueItem> itemMap = map.values().stream().map(v -> JSON.parseObject(v.toString(), ThingsModelValueItem.class)).collect(
|
||||
Collectors.toMap(ThingsModelValueItem::getId, Function.identity()));
|
||||
for (ThingsModelValueItem item : itemMap.values()) {
|
||||
convertModelName(item, SecurityUtils.getLanguage());
|
||||
}
|
||||
return itemMap;
|
||||
}
|
||||
return setCacheThMapByProductId(productId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取List集合物模型
|
||||
*/
|
||||
@Override
|
||||
public List<ThingsModelValueItem> getThingsModelList(Long productId){
|
||||
Map<String, ThingsModelValueItem> thingsModelMap = this.getCacheThMapByProductId(productId);
|
||||
if (thingsModelMap != null) {
|
||||
for (ThingsModelValueItem item : thingsModelMap.values()) {
|
||||
convertModelName(item, SecurityUtils.getLanguage());
|
||||
}
|
||||
}
|
||||
return new ArrayList<>(thingsModelMap.values());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 缓存物模型-返回Map
|
||||
* @param productId
|
||||
* <p>
|
||||
* 返回key-value
|
||||
* key: 物模型标识符
|
||||
* value:PropertyDto
|
||||
* </p>
|
||||
*/
|
||||
public Map<String, ThingsModelValueItem> setCacheThMapByProductId(Long productId) {
|
||||
Map<String, String> thingsModelMap = setThingModelAndModbusConfig(productId);
|
||||
Map<String, ThingsModelValueItem> itemMap = thingsModelMap.values().stream().map(value -> JSON.parseObject(value, ThingsModelValueItem.class)).collect(Collectors.toMap(ThingsModelValueItem::getId, Function.identity()));
|
||||
if (itemMap != null) {
|
||||
for (ThingsModelValueItem item : itemMap.values()) {
|
||||
convertModelName(item, SecurityUtils.getLanguage());
|
||||
}
|
||||
}
|
||||
return itemMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单个物模型缓存值
|
||||
* @param productId 产品id
|
||||
* @param identify 标识符
|
||||
* @return PropertyDto
|
||||
*/
|
||||
@Override
|
||||
public ThingsModelValueItem getSingleThingModels(Long productId, String identify){
|
||||
String cacheKey = RedisKeyBuilder.buildTSLCacheKey(productId);
|
||||
String value = redisCache.getCacheMapValue(cacheKey, identify);
|
||||
if (StringUtils.isEmpty(value)) {return null;}
|
||||
ThingsModelValueItem item = JSONObject.parseObject(value,ThingsModelValueItem.class);
|
||||
convertModelName(item, SecurityUtils.getLanguage());
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 整合物模型 & 整合modbus配置参数 & redis缓存
|
||||
*
|
||||
* @param productId
|
||||
*/
|
||||
private Map<String, String> setThingModelAndModbusConfig(Long productId) {
|
||||
// 数据库查询物模型集合
|
||||
ThingsModel model = new ThingsModel();
|
||||
model.setProductId(productId);
|
||||
model.setLimitValue(SecurityUtils.getLanguage());
|
||||
List<ThingsModel> thingsModels = thingsModelService.selectThingsModelList(model);
|
||||
//modbus配置参数整合到物模型
|
||||
ModbusConfig config = new ModbusConfig();
|
||||
config.setProductId(productId);
|
||||
List<ModbusConfig> modbusConfigList = modbusConfigService.selectShortListByProductId(config);
|
||||
if (!CollectionUtils.isEmpty(modbusConfigList)) {
|
||||
Map<String, ModbusConfig> modbusMap = modbusConfigList.stream().collect(Collectors.toMap(ModbusConfig::getIdentifier, Function.identity()));
|
||||
for (ThingsModel thingsModel : thingsModels) {
|
||||
if (modbusMap.containsKey(thingsModel.getIdentifier())) {
|
||||
ModbusConfig modbusConfig = modbusMap.get(thingsModel.getIdentifier());
|
||||
thingsModel.setModbusConfig(modbusConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
//List -> MAP
|
||||
Map<String, String> thingsModelMap = thingsModels.stream().collect(Collectors.toMap(ThingsModel::getIdentifier,
|
||||
thingsModel -> {
|
||||
//转换数据,减少不必要数据
|
||||
ThingsModelValueItem dto = new ThingsModelValueItem();
|
||||
BeanUtils.copyProperties(thingsModel, dto);
|
||||
dto.setDatatype(JSONObject.parseObject(thingsModel.getSpecs(), Datatype.class))
|
||||
.setId(thingsModel.getIdentifier())
|
||||
.setName(thingsModel.getModelName())
|
||||
.setName_zh_CN(thingsModel.getModelName_zh_CN())
|
||||
.setName_en_US(thingsModel.getModelName_en_US())
|
||||
.setOrder(thingsModel.getModelOrder())
|
||||
.setModelId(thingsModel.getModelId())
|
||||
.setConfig(thingsModel.getModbusConfig());
|
||||
return JSONObject.toJSONString(dto);
|
||||
}));
|
||||
|
||||
/*缓存到redis*/
|
||||
String cacheKey = RedisKeyBuilder.buildTSLCacheKey(productId);
|
||||
//先删除缓存
|
||||
if (redisCache.containsKey(cacheKey)) {
|
||||
redisCache.deleteObject(cacheKey);
|
||||
}
|
||||
redisCache.hashPutAll(cacheKey, thingsModelMap);
|
||||
return thingsModelMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将物模型名称转换为对应语言
|
||||
* @param item
|
||||
* @param language
|
||||
*/
|
||||
private static void convertModelName(ThingsModelValueItem item, String language) {
|
||||
switch (language) {
|
||||
case EN_US:
|
||||
if (StringUtils.isNotEmpty(item.getName_en_US())){
|
||||
item.setName(item.getName_en_US());
|
||||
}
|
||||
break;
|
||||
case ZH_CN:
|
||||
if (StringUtils.isNotEmpty(item.getName_zh_CN())){
|
||||
item.setName(item.getName_zh_CN());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将物模型名称转换为对应语言
|
||||
* @param item
|
||||
* @param language
|
||||
*/
|
||||
private static void convertModelName(PropertyDto item, String language) {
|
||||
switch (language) {
|
||||
case EN_US:
|
||||
item.setName(item.getName_en_US());
|
||||
break;
|
||||
case ZH_CN:
|
||||
item.setName(item.getName_zh_CN());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
142
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/TSLValueCacheImpl.java
vendored
Normal file
142
fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/cache/impl/TSLValueCacheImpl.java
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
package com.fastbee.iot.cache.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fastbee.common.core.redis.RedisCache;
|
||||
import com.fastbee.common.core.redis.RedisKeyBuilder;
|
||||
import com.fastbee.common.enums.DataEnum;
|
||||
import com.fastbee.iot.cache.ITSLCache;
|
||||
import com.fastbee.iot.cache.ITSLValueCache;
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem;
|
||||
import com.fastbee.iot.model.ThingsModels.ValueItem;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 物模型值缓存
|
||||
*
|
||||
* @author gsb
|
||||
* @date 2024/3/22 16:37
|
||||
*/
|
||||
@Service
|
||||
public class TSLValueCacheImpl implements ITSLValueCache {
|
||||
|
||||
@Resource
|
||||
private RedisCache redisCache;
|
||||
@Resource
|
||||
private ITSLCache itslCache;
|
||||
|
||||
|
||||
/**
|
||||
* 获取Redis缓存的设备物模型值
|
||||
*
|
||||
* @param productId 产品ID
|
||||
* @param deviceNumber 设备编号
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ValueItem> getCacheDeviceStatus(Long productId, String deviceNumber) {
|
||||
String key = RedisKeyBuilder.buildTSLVCacheKey(productId, deviceNumber);
|
||||
Map<String, String> map = redisCache.hashEntity(key);
|
||||
List<ValueItem> valueList = new ArrayList<>();
|
||||
if (map == null || map.size() == 0) {
|
||||
// 缓存设备状态(物模型值)到redis
|
||||
valueList = addCacheDeviceStatus(productId, deviceNumber);
|
||||
} else {
|
||||
// 获取redis缓存的物模型值
|
||||
valueList = map.values().stream().map(s -> JSONObject.parseObject(s, ValueItem.class))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
return valueList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 缓存设备物模型值到redis
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ValueItem> addCacheDeviceStatus(Long productId, String serialNumber) {
|
||||
List<ValueItem> resultList = new ArrayList<>();
|
||||
// 获取物模型值
|
||||
List<ThingsModelValueItem> valueList = itslCache.getThingsModelList(productId);
|
||||
// redis存储设备默认状态 键:产品ID_设备编号
|
||||
String key = RedisKeyBuilder.buildTSLVCacheKey(productId, serialNumber);
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
for (ThingsModelValueItem item : valueList) {
|
||||
ValueItem valueItem = new ValueItem();
|
||||
valueItem.setId(item.getId());
|
||||
valueItem.setValue("");
|
||||
valueItem.setShadow("");
|
||||
DataEnum dataType = DataEnum.convert(item.getDatatype().getType());
|
||||
if (dataType.equals(DataEnum.ARRAY) || dataType.equals(DataEnum.OBJECT)) {
|
||||
//数组和对象类型额外处理
|
||||
this.handleOtherType(maps, item, dataType, valueItem);
|
||||
} else {
|
||||
maps.put(item.getId(), JSONObject.toJSONString(valueItem));
|
||||
}
|
||||
resultList.add(valueItem);
|
||||
}
|
||||
redisCache.hashPutAll(key, maps);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCacheIdentifierValue(Long productId, String serialNumber, String identifier) {
|
||||
String key = RedisKeyBuilder.buildTSLVCacheKey(productId, serialNumber);
|
||||
return JSONObject.parseObject(redisCache.getCacheMapValue(key, identifier)).get("value").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数组和对象类型额外处理
|
||||
* @param maps
|
||||
* @param item
|
||||
* @param dataType
|
||||
* @param valueItem
|
||||
*/
|
||||
private void handleOtherType(Map<String, String> maps, ThingsModelValueItem item, DataEnum dataType, ValueItem valueItem) {
|
||||
List<ThingsModelValueItem> params = item.getDatatype().getParams();
|
||||
switch (dataType) {
|
||||
case ARRAY:
|
||||
// 数组元素赋值(英文逗号分割的字符串,包含简单类型数组和对象类型数组,数组元素ID格式:array_01_humidity)
|
||||
StringBuilder defaultValue = new StringBuilder(" ");
|
||||
if (item.getDatatype().getArrayType().equals("object")) {
|
||||
for (int i = 0; i < item.getDatatype().getArrayCount(); i++) {
|
||||
// 默认值需要保留为空格,便于解析字符串为数组
|
||||
defaultValue.append(", ");
|
||||
}
|
||||
for (ThingsModelValueItem param : params) {
|
||||
valueItem.setValue(defaultValue.toString());
|
||||
valueItem.setShadow(defaultValue.toString());
|
||||
valueItem.setName(param.getName());
|
||||
valueItem.setId(param.getId());
|
||||
maps.put(param.getId(), JSONObject.toJSONString(valueItem));
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < item.getDatatype().getArrayCount(); i++) {
|
||||
defaultValue.append(", ");
|
||||
}
|
||||
valueItem.setValue(defaultValue.toString());
|
||||
valueItem.setShadow(defaultValue.toString());
|
||||
valueItem.setName(item.getName());
|
||||
valueItem.setId(item.getId());
|
||||
maps.put(item.getId(), JSONObject.toJSONString(valueItem));
|
||||
}
|
||||
break;
|
||||
case OBJECT:
|
||||
for (ThingsModelValueItem param : params) {
|
||||
valueItem.setName(param.getName());
|
||||
valueItem.setId(param.getId());
|
||||
maps.put(param.getId(), JSONObject.toJSONString(valueItem));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.fastbee.iot.convert;
|
||||
|
||||
import com.fastbee.iot.domain.DeviceRecord;
|
||||
import com.fastbee.iot.model.DeviceRecordVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 设备记录转换工具类
|
||||
* @author admin
|
||||
* @date 2024-07-19 16:14
|
||||
* @version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceRecordConvert {
|
||||
|
||||
DeviceRecordConvert INSTANCE = Mappers.getMapper(DeviceRecordConvert.class);
|
||||
|
||||
/**
|
||||
* @description: 单个实体类转换
|
||||
* @param: deviceRecord 设备记录
|
||||
* @return: com.fastbee.iot.model.DeviceRecordVO
|
||||
*/
|
||||
DeviceRecordVO convertDeviceRecordVO(DeviceRecord deviceRecord);
|
||||
|
||||
/**
|
||||
* @description: 集合转换
|
||||
* @param: deviceRecordList 设备记录集合
|
||||
* @return: java.util.List<com.fastbee.iot.model.DeviceRecordVO>
|
||||
*/
|
||||
List<DeviceRecordVO> convertDeviceRecordVOList(List<DeviceRecord> deviceRecordList);
|
||||
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.notify.domain.NotifyTemplate;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备告警对象 iot_alert
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
@ApiModel(value = "Alert", description = "设备告警实体 iot_alert")
|
||||
public class Alert extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 告警ID
|
||||
*/
|
||||
@ApiModelProperty("告警ID")
|
||||
private Long alertId;
|
||||
|
||||
/**
|
||||
* 告警名称
|
||||
*/
|
||||
@ApiModelProperty("告警名称")
|
||||
@Excel(name = "告警名称")
|
||||
private String alertName;
|
||||
|
||||
/**
|
||||
* 告警级别(1=提醒通知,2=轻微问题,3=严重警告)
|
||||
*/
|
||||
@ApiModelProperty("告警级别(1=提醒通知,2=轻微问题,3=严重警告)")
|
||||
@Excel(name = "告警级别", readConverterExp = "1==提醒通知,2=轻微问题,3=严重警告")
|
||||
private Long alertLevel;
|
||||
|
||||
/**
|
||||
* 告警状态(1-启动,2-停止)
|
||||
*/
|
||||
@Excel(name = "告警状态", readConverterExp = "1=-启动,2-停止")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 通知方式 格式:"1,2,3"
|
||||
*/
|
||||
@Excel(name = "通知方式")
|
||||
private String notify;
|
||||
|
||||
private List<Scene> scenes;
|
||||
|
||||
private List<NotifyTemplate> notifyTemplateList;
|
||||
|
||||
/** 租户id */
|
||||
private Long tenantId;
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(Long tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public String getTenantName() {
|
||||
return tenantName;
|
||||
}
|
||||
|
||||
public void setTenantName(String tenantName) {
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
/** 租户名称 */
|
||||
private String tenantName;
|
||||
|
||||
public List<NotifyTemplate> getNotifyTemplateList() {
|
||||
return notifyTemplateList;
|
||||
}
|
||||
|
||||
public void setNotifyTemplateList(List<NotifyTemplate> notifyTemplateList) {
|
||||
this.notifyTemplateList = notifyTemplateList;
|
||||
}
|
||||
|
||||
public List<Scene> getScenes() {
|
||||
return scenes;
|
||||
}
|
||||
|
||||
public void setScenes(List<Scene> scenes) {
|
||||
this.scenes = scenes;
|
||||
}
|
||||
|
||||
public Long getAlertId() {
|
||||
return alertId;
|
||||
}
|
||||
|
||||
public void setAlertId(Long alertId) {
|
||||
this.alertId = alertId;
|
||||
}
|
||||
|
||||
public String getAlertName() {
|
||||
return alertName;
|
||||
}
|
||||
|
||||
public void setAlertName(String alertName) {
|
||||
this.alertName = alertName;
|
||||
}
|
||||
|
||||
public Long getAlertLevel() {
|
||||
return alertLevel;
|
||||
}
|
||||
|
||||
public void setAlertLevel(Long alertLevel) {
|
||||
this.alertLevel = alertLevel;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getNotify() {
|
||||
return notify;
|
||||
}
|
||||
|
||||
public void setNotify(String notify) {
|
||||
this.notify = notify;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("alertId", getAlertId())
|
||||
.append("alertName", getAlertName())
|
||||
.append("alertLevel", getAlertLevel())
|
||||
.append("status", getStatus())
|
||||
.append("notify", getNotify())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备告警对象 iot_alert_log
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "AlertLog", description = "设备告警日志实体 iot_alert_log")
|
||||
public class AlertLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 告警ID */
|
||||
@ApiModelProperty("告警ID")
|
||||
private Long alertLogId;
|
||||
|
||||
/** 告警名称 */
|
||||
@ApiModelProperty("告警名称")
|
||||
@Excel(name = "告警名称")
|
||||
private String alertName;
|
||||
|
||||
/** 告警级别(1=提醒通知,2=轻微问题,3=严重警告,4=场景联动) */
|
||||
@ApiModelProperty("告警级别(1=提醒通知,2=轻微问题,3=严重警告,4=场景联动)")
|
||||
@Excel(name = "告警级别", readConverterExp = "1==提醒通知,2=轻微问题,3=严重警告,4=场景联动")
|
||||
private Long alertLevel;
|
||||
|
||||
/** 处理状态(1=不需要处理,2=未处理,3=已处理) */
|
||||
@ApiModelProperty("处理状态(1=不需要处理,2=未处理,3=已处理)")
|
||||
@Excel(name = "处理状态(1=不需要处理,2=未处理,3=已处理)")
|
||||
private Integer status;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 告警详情 */
|
||||
@ApiModelProperty("告警详情")
|
||||
private String detail;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String deviceName;
|
||||
|
||||
private Long deviceId;
|
||||
private Long sceneId;
|
||||
private String sceneName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date beginTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 告警通知模版关联对象 iot_alert_notify_template
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-01-29
|
||||
*/
|
||||
public class AlertNotifyTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 告警id */
|
||||
@Excel(name = "告警id")
|
||||
private Long alertId;
|
||||
|
||||
/** 通知模版id */
|
||||
@Excel(name = "通知模版id")
|
||||
private Long notifyTemplateId;
|
||||
|
||||
public void setAlertId(Long alertId)
|
||||
{
|
||||
this.alertId = alertId;
|
||||
}
|
||||
|
||||
public Long getAlertId()
|
||||
{
|
||||
return alertId;
|
||||
}
|
||||
public void setNotifyTemplateId(Long notifyTemplateId)
|
||||
{
|
||||
this.notifyTemplateId = notifyTemplateId;
|
||||
}
|
||||
|
||||
public Long getNotifyTemplateId()
|
||||
{
|
||||
return notifyTemplateId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("alertId", getAlertId())
|
||||
.append("notifyTemplateId", getNotifyTemplateId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备告警对象 iot_alert_scene
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
|
||||
public class AlertScene extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 告警ID
|
||||
*/
|
||||
@ApiModelProperty("告警ID")
|
||||
private Long alertId;
|
||||
|
||||
/**
|
||||
* 场景ID
|
||||
*/
|
||||
@ApiModelProperty("场景ID")
|
||||
private Long sceneId;
|
||||
|
||||
public Long getAlertId() {
|
||||
return alertId;
|
||||
}
|
||||
|
||||
public void setAlertId(Long alertId) {
|
||||
this.alertId = alertId;
|
||||
}
|
||||
|
||||
public Long getSceneId() {
|
||||
return sceneId;
|
||||
}
|
||||
|
||||
public void setSceneId(Long sceneId) {
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 数据桥接对象 bridge
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-06-06
|
||||
*/
|
||||
@Data
|
||||
public class Bridge extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id唯一标识 */
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "桥接配置信息")
|
||||
private String configJson;
|
||||
|
||||
/** 连接器名称 */
|
||||
@Excel(name = "连接器名称")
|
||||
private String name;
|
||||
|
||||
/** 是否生效(0-不生效,1-生效) */
|
||||
@Excel(name = "是否生效", readConverterExp = "0=-不生效,1-生效")
|
||||
private String enable;
|
||||
|
||||
/** 状态(1-未连接,2-连接中) */
|
||||
@Excel(name = "状态", readConverterExp = "0=-未连接,1-连接中")
|
||||
private String status;
|
||||
|
||||
/** 桥接类型(3=Http推送,4=Mqtt桥接,5=数据库存储) */
|
||||
@Excel(name = "桥接类型(3=Http推送,4=Mqtt桥接,5=数据库存储)")
|
||||
private Integer type;
|
||||
|
||||
/** 桥接方向(1=输入,2=输出) */
|
||||
@Excel(name = "桥接方向(1=输入,2=输出)")
|
||||
private Integer direction;
|
||||
|
||||
@Excel(name = "桥接路由(mqtt topic,http url)")
|
||||
private String route;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
@ -0,0 +1,167 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 产品分类对象 iot_category
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@ApiModel(value = "Category", description = "产品分类对象 iot_category")
|
||||
public class Category extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 产品分类ID */
|
||||
@ApiModelProperty("产品分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/** 产品分类名称 */
|
||||
@ApiModelProperty("产品分类名称")
|
||||
@Excel(name = "产品分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 是否系统通用(0-否,1-是) */
|
||||
@ApiModelProperty("是否系统通用(0-否,1-是)")
|
||||
@Excel(name = "是否系统通用", readConverterExp = "0=-否,1-是")
|
||||
private Integer isSys;
|
||||
|
||||
/** 显示顺序 */
|
||||
@ApiModelProperty("显示顺序")
|
||||
@Excel(name = "显示顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
@ApiModelProperty("是否显示上级品类")
|
||||
private Boolean showSenior;
|
||||
|
||||
@ApiModelProperty("是否是总账号")
|
||||
private Boolean isAdmin;
|
||||
|
||||
@ApiModelProperty("机构ID")
|
||||
private Long deptId;
|
||||
|
||||
public Boolean getShowSenior() {
|
||||
return showSenior;
|
||||
}
|
||||
|
||||
public void setShowSenior(Boolean showSenior) {
|
||||
this.showSenior = showSenior;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Boolean getAdmin() {
|
||||
return isAdmin;
|
||||
}
|
||||
|
||||
public void setAdmin(Boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
public void setIsSys(Integer isSys)
|
||||
{
|
||||
this.isSys = isSys;
|
||||
}
|
||||
public Integer getIsSys()
|
||||
{
|
||||
return isSys;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("isSys", getIsSys())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 指令偏好设置对象 command_preferences
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
@ApiModel(value = "CommandPreferences", description = "指令偏好设置 command_preferences")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommandPreferences extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 指令id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 指令名称
|
||||
*/
|
||||
@Excel(name = "指令名称")
|
||||
@ApiModelProperty("指令名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 指令
|
||||
*/
|
||||
@Excel(name = "指令")
|
||||
@ApiModelProperty("指令")
|
||||
private String command;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号")
|
||||
@ApiModelProperty("设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,185 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备对象 iot_device
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "Device", description = "设备对象 iot_device")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
public class Device extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@ApiModelProperty("产品名称")
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 固件版本 */
|
||||
@ApiModelProperty("固件版本")
|
||||
@Excel(name = "固件版本")
|
||||
private BigDecimal firmwareVersion;
|
||||
|
||||
/** 设备类型(1-直连设备、2-网关设备、3-监控设备) */
|
||||
@ApiModelProperty("设备类型(1-直连设备、2-网关设备、3-监控设备 4-网关子设备)")
|
||||
private Integer deviceType;
|
||||
|
||||
/** 设备状态(1-未激活,2-禁用,3-在线,4-离线) */
|
||||
@ApiModelProperty("设备状态(1-未激活,2-禁用,3-在线,4-离线)")
|
||||
@Excel(name = "设备状态")
|
||||
private Integer status;
|
||||
|
||||
/** wifi信号强度(信号极好4格[-55— 0],信号好3格[-70— -55],信号一般2格[-85— -70],信号差1格[-100— -85]) */
|
||||
@ApiModelProperty("wifi信号强度(信号极好4格[-55— 0],信号好3格[-70— -55],信号一般2格[-85— -70],信号差1格[-100— -85])")
|
||||
@Excel(name = "wifi信号强度")
|
||||
private Integer rssi;
|
||||
|
||||
/** 设备影子 */
|
||||
@ApiModelProperty("是否启用设备影子(0=禁用,1=启用)")
|
||||
private Integer isShadow;
|
||||
|
||||
/** 设备所在地址 */
|
||||
@ApiModelProperty("设备所在地址")
|
||||
@Excel(name = "设备所在地址")
|
||||
private String networkAddress;
|
||||
|
||||
/** 设备入网IP */
|
||||
@ApiModelProperty("设备入网IP")
|
||||
@Excel(name = "设备入网IP")
|
||||
private String networkIp;
|
||||
|
||||
/** 设备经度 */
|
||||
@ApiModelProperty("设备经度")
|
||||
@Excel(name = "设备经度")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/** 设备纬度 */
|
||||
@ApiModelProperty("设备纬度")
|
||||
@Excel(name = "设备纬度")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/** 激活时间 */
|
||||
@ApiModelProperty("激活时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date activeTime;
|
||||
|
||||
/** 子设备网关编号 */
|
||||
@ApiModelProperty("子设备网关编号")
|
||||
@Excel(name = "网关设备编号(子设备使用)")
|
||||
private String gwDevCode;
|
||||
|
||||
/** 物模型值 */
|
||||
@ApiModelProperty("物模型值")
|
||||
@Excel(name = "物模型")
|
||||
private String thingsModelValue;
|
||||
|
||||
/** 图片地址 */
|
||||
@ApiModelProperty("图片地址")
|
||||
private String imgUrl;
|
||||
|
||||
/** 是否自定义位置 **/
|
||||
@ApiModelProperty("定位方式(1=ip自动定位,2=设备定位,3=自定义)")
|
||||
private Integer locationWay;
|
||||
|
||||
/** 设备摘要 **/
|
||||
@ApiModelProperty("设备摘要")
|
||||
private String summary;
|
||||
|
||||
/** 分组ID,用于分组查询 **/
|
||||
@ApiModelProperty("分组ID,用于分组查询")
|
||||
private Long groupId;
|
||||
|
||||
/** 是否设备所有者,用于查询 **/
|
||||
@ApiModelProperty("是否设备所有者,用于查询")
|
||||
private Integer isOwner;
|
||||
/**子设备数量*/
|
||||
@ApiModelProperty("子设备数量")
|
||||
private Integer subDeviceCount;
|
||||
/**是否是模拟设备*/
|
||||
@ApiModelProperty("是否是模拟设备")
|
||||
private Integer isSimulate;
|
||||
/**子设备地址*/
|
||||
@ApiModelProperty("子设备地址")
|
||||
private Integer slaveId;
|
||||
/**设备传输协议*/
|
||||
@ApiModelProperty("设备传输协议")
|
||||
private String transport;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("机构id")
|
||||
private Long deptId;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("是否显示下级")
|
||||
private Boolean showChild;
|
||||
|
||||
private List<Device> subDeviceList;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 关联组态,来源产品
|
||||
*/
|
||||
private String guid;
|
||||
|
||||
private List<SipRelation> sipRelationList;
|
||||
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备告警用户对象 iot_device_alert_user
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-15
|
||||
*/
|
||||
@Data
|
||||
public class DeviceAlertUser
|
||||
{
|
||||
|
||||
/** 设备id */
|
||||
private Long deviceId;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备分组对象 iot_device_group
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@ApiModel(value = "DeviceGroup", description = "设备分组对象 iot_device_group")
|
||||
public class DeviceGroup
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分组ID */
|
||||
@ApiModelProperty("分组ID")
|
||||
private Long groupId;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
public Long getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,325 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.annotation.Excel.ColumnType;
|
||||
import com.fastbee.common.constant.ScheduleConstants;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import com.fastbee.common.utils.StringUtils;
|
||||
import com.fastbee.quartz.util.CronUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备定时任务
|
||||
*
|
||||
* @author kerwincui
|
||||
*/
|
||||
@ApiModel(value = "DeviceJob", description = "设备定时任务 iot_device_job")
|
||||
public class DeviceJob extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty("任务ID")
|
||||
@Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
|
||||
private Long jobId;
|
||||
|
||||
/** 任务名称 */
|
||||
@ApiModelProperty("任务名称")
|
||||
@Excel(name = "任务名称")
|
||||
private String jobName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 设备id */
|
||||
@ApiModelProperty("设备id")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 执行动作 */
|
||||
@ApiModelProperty("执行动作")
|
||||
private String actions;
|
||||
|
||||
/** 告警触发器 */
|
||||
@ApiModelProperty("告警触发器")
|
||||
private String alertTrigger;
|
||||
|
||||
/** 任务组名 */
|
||||
@ApiModelProperty("任务组名")
|
||||
@Excel(name = "任务组名")
|
||||
private String jobGroup;
|
||||
|
||||
/** cron执行表达式 */
|
||||
@ApiModelProperty("cron执行表达式")
|
||||
@Excel(name = "执行表达式 ")
|
||||
private String cronExpression;
|
||||
|
||||
/** cron计划策略 */
|
||||
@ApiModelProperty(value = "cron执行表达式", notes = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行")
|
||||
@Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行")
|
||||
private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
|
||||
|
||||
/** 是否并发执行(0允许 1禁止) */
|
||||
@ApiModelProperty(value = "是否并发执行", notes = "0=允许,1=禁止")
|
||||
@Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止")
|
||||
private String concurrent;
|
||||
|
||||
/** 任务状态(0正常 1暂停) */
|
||||
@ApiModelProperty("任务状态(0正常 1暂停)")
|
||||
@Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
|
||||
private String status;
|
||||
|
||||
/** 是否详细corn表达式 */
|
||||
@ApiModelProperty("是否详细corn表达式")
|
||||
private Integer isAdvance;
|
||||
|
||||
/** 定时类型(1=设备定时,2=设备告警,3=场景联动) */
|
||||
@ApiModelProperty(value = "定时类型", notes = "(1=设备定时,2=设备告警,3=场景联动)")
|
||||
@Excel(name = "定时类型", readConverterExp = "1==设备定时,2=设备告警,3=场景联动")
|
||||
private Integer jobType;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@ApiModelProperty("产品名称")
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 场景联动ID */
|
||||
@ApiModelProperty("场景联动ID")
|
||||
@Excel(name = "场景联动ID")
|
||||
private Long sceneId;
|
||||
|
||||
/** 告警ID */
|
||||
@ApiModelProperty("告警ID")
|
||||
@Excel(name = "告警ID")
|
||||
private Long alertId;
|
||||
|
||||
/**
|
||||
* 执行其他模块主键ID
|
||||
* 通过jobType区分
|
||||
* */
|
||||
@ApiModelProperty("执行其他模块主键ID")
|
||||
@Excel(name = "执行其他模块主键ID")
|
||||
private Long datasourceId;
|
||||
|
||||
|
||||
public Long getDatasourceId() {
|
||||
return datasourceId;
|
||||
}
|
||||
|
||||
public void setDatasourceId(Long datasourceId) {
|
||||
this.datasourceId = datasourceId;
|
||||
}
|
||||
|
||||
public String getAlertTrigger() {
|
||||
return alertTrigger;
|
||||
}
|
||||
|
||||
public void setAlertTrigger(String alertTrigger) {
|
||||
this.alertTrigger = alertTrigger;
|
||||
}
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getSerialNumber() {
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber) {
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public Integer getIsAdvance() {
|
||||
return isAdvance;
|
||||
}
|
||||
|
||||
public void setIsAdvance(Integer isAdvance) {
|
||||
this.isAdvance = isAdvance;
|
||||
}
|
||||
|
||||
public Integer getJobType() {
|
||||
return jobType;
|
||||
}
|
||||
|
||||
public void setJobType(Integer jobType) {
|
||||
this.jobType = jobType;
|
||||
}
|
||||
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public Long getSceneId() {
|
||||
return sceneId;
|
||||
}
|
||||
|
||||
public void setSceneId(Long sceneId) {
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
|
||||
public Long getAlertId() {
|
||||
return alertId;
|
||||
}
|
||||
|
||||
public void setAlertId(Long alertId) {
|
||||
this.alertId = alertId;
|
||||
}
|
||||
|
||||
public Long getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(Long jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
@NotBlank(message = "任务名称不能为空")
|
||||
@Size(min = 0, max = 64, message = "任务名称不能超过64个字符")
|
||||
public String getJobName()
|
||||
{
|
||||
return jobName;
|
||||
}
|
||||
|
||||
public void setJobName(String jobName)
|
||||
{
|
||||
this.jobName = jobName;
|
||||
}
|
||||
|
||||
public String getJobGroup()
|
||||
{
|
||||
return jobGroup;
|
||||
}
|
||||
|
||||
public void setJobGroup(String jobGroup)
|
||||
{
|
||||
this.jobGroup = jobGroup;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public void setActions(String actions) {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
@NotBlank(message = "Cron执行表达式不能为空")
|
||||
@Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符")
|
||||
public String getCronExpression()
|
||||
{
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression(String cronExpression)
|
||||
{
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date getNextValidTime()
|
||||
{
|
||||
if (StringUtils.isNotEmpty(cronExpression))
|
||||
{
|
||||
return CronUtils.getNextExecution(cronExpression);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getMisfirePolicy()
|
||||
{
|
||||
return misfirePolicy;
|
||||
}
|
||||
|
||||
public void setMisfirePolicy(String misfirePolicy)
|
||||
{
|
||||
this.misfirePolicy = misfirePolicy;
|
||||
}
|
||||
|
||||
public String getConcurrent()
|
||||
{
|
||||
return concurrent;
|
||||
}
|
||||
|
||||
public void setConcurrent(String concurrent)
|
||||
{
|
||||
this.concurrent = concurrent;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("jobId", getJobId())
|
||||
.append("jobName", getJobName())
|
||||
.append("jobGroup", getJobGroup())
|
||||
.append("cronExpression", getCronExpression())
|
||||
.append("nextValidTime", getNextValidTime())
|
||||
.append("misfirePolicy", getMisfirePolicy())
|
||||
.append("concurrent", getConcurrent())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,256 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备日志对象 iot_device_log
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
|
||||
@ApiModel(value = "DeviceLog", description = "设备日志对象 iot_device_log")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "时间戳")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date ts;
|
||||
/** 设备日志ID */
|
||||
@ApiModelProperty("设备日志ID")
|
||||
private Long logId;
|
||||
|
||||
/** 类型(1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线,7=运算数据上报) */
|
||||
@ApiModelProperty(value = "类型", notes = "1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线,7=运算数据上报")
|
||||
@Excel(name = "类型", readConverterExp = "1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线,7=运算数据上报")
|
||||
private Integer logType;
|
||||
|
||||
/** 日志值 */
|
||||
@ApiModelProperty("日志值")
|
||||
@Excel(name = "日志值")
|
||||
private String logValue;
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("物模型名称")
|
||||
@Excel(name = "物模型名称")
|
||||
private String modelName;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 标识符 */
|
||||
@ApiModelProperty("标识符")
|
||||
@Excel(name = "标识符")
|
||||
private String identity;
|
||||
|
||||
/** 是否监测数据(1=是,0=否) */
|
||||
@ApiModelProperty("是否监测数据(1=是,0=否)")
|
||||
@Excel(name = "是否监测数据", readConverterExp = "1=是,0=否")
|
||||
private Integer isMonitor;
|
||||
|
||||
/** 模式 */
|
||||
@ApiModelProperty(value = "模式", notes = "1=影子模式,2=在线模式,3=其他")
|
||||
@Excel(name = "模式", readConverterExp = "1=影子模式,2=在线模式,3=其他")
|
||||
private Integer mode;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户昵称 */
|
||||
@ApiModelProperty("用户昵称")
|
||||
@Excel(name = "用户昵称")
|
||||
private String userName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 查询用的开始时间 */
|
||||
@ApiModelProperty("查询用的开始时间")
|
||||
private String beginTime;
|
||||
|
||||
/** 查询用的结束时间 */
|
||||
@ApiModelProperty("查询用的结束时间")
|
||||
private String endTime;
|
||||
|
||||
/** 查询的总数 */
|
||||
@ApiModelProperty("查询的总数")
|
||||
private int total;
|
||||
|
||||
/*消息ID,或消息流水号*/
|
||||
@ApiModelProperty("消息ID,或消息流水号")
|
||||
private String serNo;
|
||||
|
||||
private String specs;
|
||||
|
||||
private DataType dataType;
|
||||
|
||||
private Integer slaveId;
|
||||
/**
|
||||
* 计算公式
|
||||
*/
|
||||
private String formula;
|
||||
|
||||
private Integer isParams;
|
||||
|
||||
/*是否历史存储*/
|
||||
private Integer isHistory;
|
||||
|
||||
private Integer operation;
|
||||
|
||||
|
||||
private List<String> identityList;
|
||||
|
||||
|
||||
@ApiModel
|
||||
public static class DataType{
|
||||
private String type;
|
||||
private String falseText;
|
||||
private String trueText;
|
||||
private Integer maxLength;
|
||||
private String arrayType;
|
||||
private String unit;
|
||||
private BigDecimal min;
|
||||
private BigDecimal max;
|
||||
private BigDecimal step;
|
||||
private List<EnumItem> enumList;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getFalseText() {
|
||||
return falseText;
|
||||
}
|
||||
|
||||
public void setFalseText(String falseText) {
|
||||
this.falseText = falseText;
|
||||
}
|
||||
|
||||
public String getTrueText() {
|
||||
return trueText;
|
||||
}
|
||||
|
||||
public void setTrueText(String trueText) {
|
||||
this.trueText = trueText;
|
||||
}
|
||||
|
||||
public Integer getMaxLength() {
|
||||
return maxLength;
|
||||
}
|
||||
|
||||
public void setMaxLength(Integer maxLength) {
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
|
||||
public String getArrayType() {
|
||||
return arrayType;
|
||||
}
|
||||
|
||||
public void setArrayType(String arrayType) {
|
||||
this.arrayType = arrayType;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public BigDecimal getMin() {
|
||||
return min;
|
||||
}
|
||||
|
||||
public void setMin(BigDecimal min) {
|
||||
this.min = min;
|
||||
}
|
||||
|
||||
public BigDecimal getMax() {
|
||||
return max;
|
||||
}
|
||||
|
||||
public void setMax(BigDecimal max) {
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public BigDecimal getStep() {
|
||||
return step;
|
||||
}
|
||||
|
||||
public void setStep(BigDecimal step) {
|
||||
this.step = step;
|
||||
}
|
||||
|
||||
public List<EnumItem> getEnumList() {
|
||||
return enumList;
|
||||
}
|
||||
|
||||
public void setEnumList(List<EnumItem> enumList) {
|
||||
this.enumList = enumList;
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModel
|
||||
public static class EnumItem
|
||||
{
|
||||
private String text;
|
||||
private String value;
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 设备记录对象 iot_device_record
|
||||
*
|
||||
* @author zhangzhiyi
|
||||
* @date 2024-07-16
|
||||
*/
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("iot_device_record")
|
||||
public class DeviceRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 操作者机构id */
|
||||
@Excel(name = "操作者机构id")
|
||||
private Long operateDeptId;
|
||||
|
||||
/** 目标机构id */
|
||||
@Excel(name = "目标机构id")
|
||||
private Long targetDeptId;
|
||||
|
||||
/** 产品id */
|
||||
@Excel(name = "产品id")
|
||||
private Long productId;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备记录类型(1-导入记录;2-回收记录;3-分配记录;4-分配详细记录) */
|
||||
@Excel(name = "设备记录类型", readConverterExp = "1=-导入记录;2-回收记录;3-分配记录;4-分配详细记录")
|
||||
private Integer type;
|
||||
|
||||
/** 分配类型(1-选择分配;2-导入分配) */
|
||||
@Excel(name = "分配类型", readConverterExp = "1=-选择分配;2-导入分配")
|
||||
private Integer distributeType;
|
||||
|
||||
/** 总数 */
|
||||
@Excel(name = "总数")
|
||||
private Integer total;
|
||||
|
||||
/** 成功数量 */
|
||||
@Excel(name = "成功数量")
|
||||
private Integer successQuantity;
|
||||
|
||||
/** 失败数量 */
|
||||
@Excel(name = "失败数量")
|
||||
private Integer failQuantity;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 租户id */
|
||||
@Excel(name = "租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 逻辑删除标识 */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 父id */
|
||||
@Excel(name = "父id")
|
||||
private Long parentId;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
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;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* 设备分享对象 iot_device_share
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceShare extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备id */
|
||||
@ApiModelProperty("设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
/** 手机 */
|
||||
@Excel(name = "手机")
|
||||
private String phonenumber;
|
||||
|
||||
/** 用户物模型权限,多个以英文逗号分隔 */
|
||||
@Excel(name = "用户物模型权限,多个以英文逗号分隔")
|
||||
private String perms;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("标识是否是拥有者")
|
||||
private Integer isOwner;
|
||||
|
||||
@Transient
|
||||
private String userName;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* 设备用户对象 iot_device_user
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "DeviceUser", description = "设备用户对象 iot_device_user")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class DeviceUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 固件ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 手机号码 */
|
||||
@ApiModelProperty("手机号码")
|
||||
private String phonenumber;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
@Transient
|
||||
private String userName;
|
||||
|
||||
}
|
@ -0,0 +1,249 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gsb
|
||||
* @date 2023/3/28 16:25
|
||||
*/
|
||||
@ApiModel(value = "EventLog", description = "事件日志对象 iot_event_log")
|
||||
public class EventLog extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备日志ID */
|
||||
@ApiModelProperty("设备日志ID")
|
||||
private Long logId;
|
||||
|
||||
/** 标识符 */
|
||||
@ApiModelProperty("标识符")
|
||||
@Excel(name = "标识符")
|
||||
private String identity;
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("物模型名称")
|
||||
@Excel(name = "物模型名称")
|
||||
private String modelName;
|
||||
|
||||
/** 类型(3=事件上报,5=设备上线,6=设备离线) */
|
||||
@ApiModelProperty(value = "类型", notes = "3==事件上报,5=设备上线,6=设备离线")
|
||||
@Excel(name = "类型", readConverterExp = "3==事件上报,5=设备上线,6=设备离线")
|
||||
private Integer logType;
|
||||
|
||||
/** 日志值 */
|
||||
@ApiModelProperty("日志值")
|
||||
@Excel(name = "日志值")
|
||||
private String logValue;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 是否监测数据(1=是,0=否) */
|
||||
@ApiModelProperty(value = "是否监测数据", notes = "(1=是,0=否)")
|
||||
@Excel(name = "是否监测数据", readConverterExp = "1==是,0=否")
|
||||
private Integer isMonitor;
|
||||
|
||||
/** 模式(1=影子模式,2=在线模式,3=其他) */
|
||||
@ApiModelProperty(value = "模式", notes = "(1=影子模式,2=在线模式,3=其他)")
|
||||
@Excel(name = "模式(1=影子模式,2=在线模式,3=其他)")
|
||||
private Integer mode;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户昵称 */
|
||||
@ApiModelProperty("用户昵称")
|
||||
@Excel(name = "用户昵称")
|
||||
private String userName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
private List<String> identityList;
|
||||
|
||||
public List<String> getIdentityList() {
|
||||
return identityList;
|
||||
}
|
||||
|
||||
public void setIdentityList(List<String> identityList) {
|
||||
this.identityList = identityList;
|
||||
}
|
||||
|
||||
public void setLogId(Long logId)
|
||||
{
|
||||
this.logId = logId;
|
||||
}
|
||||
|
||||
public Long getLogId()
|
||||
{
|
||||
return logId;
|
||||
}
|
||||
public void setIdentity(String identity)
|
||||
{
|
||||
this.identity = identity;
|
||||
}
|
||||
|
||||
public String getIdentity()
|
||||
{
|
||||
return identity;
|
||||
}
|
||||
public void setModelName(String modelName)
|
||||
{
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
public String getModelName()
|
||||
{
|
||||
return modelName;
|
||||
}
|
||||
public void setLogType(Integer logType)
|
||||
{
|
||||
this.logType = logType;
|
||||
}
|
||||
|
||||
public Integer getLogType()
|
||||
{
|
||||
return logType;
|
||||
}
|
||||
public void setLogValue(String logValue)
|
||||
{
|
||||
this.logValue = logValue;
|
||||
}
|
||||
|
||||
public String getLogValue()
|
||||
{
|
||||
return logValue;
|
||||
}
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setIsMonitor(Integer isMonitor)
|
||||
{
|
||||
this.isMonitor = isMonitor;
|
||||
}
|
||||
|
||||
public Integer getIsMonitor()
|
||||
{
|
||||
return isMonitor;
|
||||
}
|
||||
public void setMode(Integer mode)
|
||||
{
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
public Integer getMode()
|
||||
{
|
||||
return mode;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("logId", getLogId())
|
||||
.append("identity", getIdentity())
|
||||
.append("modelName", getModelName())
|
||||
.append("logType", getLogType())
|
||||
.append("logValue", getLogValue())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("isMonitor", getIsMonitor())
|
||||
.append("mode", getMode())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,197 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 产品固件对象 iot_firmware
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@ApiModel(value = "Firmware", description = "产品固件对象 iot_firmware")
|
||||
public class Firmware extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 固件ID */
|
||||
@ApiModelProperty("固件ID")
|
||||
private Long firmwareId;
|
||||
|
||||
/** 固件名称 */
|
||||
@ApiModelProperty(value = "固件名称")
|
||||
private String firmwareName;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty(value = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@ApiModelProperty(value = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty(value = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 是否系统通用(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否系统通用")
|
||||
private Integer isSys;
|
||||
|
||||
/** 是否最新版(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否系统通用")
|
||||
private Integer isLatest;
|
||||
|
||||
/** 固件版本 */
|
||||
@ApiModelProperty(value = "固件版本")
|
||||
private BigDecimal version;
|
||||
|
||||
/** 文件路径 */
|
||||
@ApiModelProperty(value = "文件路径")
|
||||
private String filePath;
|
||||
|
||||
/*固件序列号*/
|
||||
@ApiModelProperty("固件序列号")
|
||||
private String seqNo;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("逻辑删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public String getSeqNo() {
|
||||
return seqNo;
|
||||
}
|
||||
|
||||
public void setSeqNo(String seqNo) {
|
||||
this.seqNo = seqNo;
|
||||
}
|
||||
|
||||
public Integer getIsLatest() {
|
||||
return isLatest;
|
||||
}
|
||||
|
||||
public void setIsLatest(Integer isLatest) {
|
||||
this.isLatest = isLatest;
|
||||
}
|
||||
|
||||
public void setFirmwareId(Long firmwareId)
|
||||
{
|
||||
this.firmwareId = firmwareId;
|
||||
}
|
||||
|
||||
public Long getFirmwareId()
|
||||
{
|
||||
return firmwareId;
|
||||
}
|
||||
public void setFirmwareName(String firmwareName)
|
||||
{
|
||||
this.firmwareName = firmwareName;
|
||||
}
|
||||
|
||||
public String getFirmwareName()
|
||||
{
|
||||
return firmwareName;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
public void setIsSys(Integer isSys)
|
||||
{
|
||||
this.isSys = isSys;
|
||||
}
|
||||
|
||||
public Integer getIsSys()
|
||||
{
|
||||
return isSys;
|
||||
}
|
||||
public void setVersion(BigDecimal version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public BigDecimal getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
public void setFilePath(String filePath)
|
||||
{
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFilePath()
|
||||
{
|
||||
return filePath;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("firmwareId", getFirmwareId())
|
||||
.append("firmwareName", getFirmwareName())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("isSys", getIsSys())
|
||||
.append("version", getVersion())
|
||||
.append("filePath", getFilePath())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 固件升级任务对象 iot_firmware_task
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-24
|
||||
*/
|
||||
@ApiModel(value = "FirmwareTask", description = "固件升级任务对象 iot_firmware_task")
|
||||
public class FirmwareTask extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 任务名称 */
|
||||
@ApiModelProperty("任务名称")
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/** 关联固件ID */
|
||||
@ApiModelProperty("关联固件ID")
|
||||
@Excel(name = "关联固件ID")
|
||||
private Long firmwareId;
|
||||
|
||||
/** 1:指定设备 2:产品级别 */
|
||||
@ApiModelProperty("1:指定设备 2:产品级别")
|
||||
@Excel(name = "1:产品固件版本 2:指定设备")
|
||||
private Long upgradeType;
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("任务描述")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String taskDesc;
|
||||
|
||||
/** 选中的设备总数 */
|
||||
@ApiModelProperty("选中的设备总数")
|
||||
@Excel(name = "选中的设备总数")
|
||||
private Long deviceAmount;
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("逻辑删除")
|
||||
private Long delFlag;
|
||||
|
||||
/** 预定时间升级 */
|
||||
@ApiModelProperty("预定时间升级")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预定时间升级", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date bookTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskName(String taskName)
|
||||
{
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getTaskName()
|
||||
{
|
||||
return taskName;
|
||||
}
|
||||
public void setFirmwareId(Long firmwareId)
|
||||
{
|
||||
this.firmwareId = firmwareId;
|
||||
}
|
||||
|
||||
public Long getFirmwareId()
|
||||
{
|
||||
return firmwareId;
|
||||
}
|
||||
public void setUpgradeType(Long upgradeType)
|
||||
{
|
||||
this.upgradeType = upgradeType;
|
||||
}
|
||||
|
||||
public Long getUpgradeType()
|
||||
{
|
||||
return upgradeType;
|
||||
}
|
||||
public void setTaskDesc(String taskDesc)
|
||||
{
|
||||
this.taskDesc = taskDesc;
|
||||
}
|
||||
|
||||
public String getTaskDesc()
|
||||
{
|
||||
return taskDesc;
|
||||
}
|
||||
public void setDeviceAmount(Long deviceAmount)
|
||||
{
|
||||
this.deviceAmount = deviceAmount;
|
||||
}
|
||||
|
||||
public Long getDeviceAmount()
|
||||
{
|
||||
return deviceAmount;
|
||||
}
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setBookTime(Date bookTime)
|
||||
{
|
||||
this.bookTime = bookTime;
|
||||
}
|
||||
|
||||
public Date getBookTime()
|
||||
{
|
||||
return bookTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("taskName", getTaskName())
|
||||
.append("firmwareId", getFirmwareId())
|
||||
.append("upgradeType", getUpgradeType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("taskDesc", getTaskDesc())
|
||||
.append("deviceAmount", getDeviceAmount())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("bookTime", getBookTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 固件升级任务详细对象 iot_firmware_task_detail
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-24
|
||||
*/
|
||||
@ApiModel(value = "FirmwareTaskDetail", description = "固件升级任务详细对象 iot_firmware_task_detail")
|
||||
public class FirmwareTaskDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** $column.columnComment */
|
||||
@ApiModelProperty("任务ID")
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long taskId;
|
||||
|
||||
/** 设备编码 */
|
||||
@ApiModelProperty("设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String serialNumber;
|
||||
|
||||
/** 0:等待升级 1:已发送设备 2:设备收到 3:升级成功 4:升级失败 */
|
||||
@ApiModelProperty(value = "状态", notes = "0:等待升级 1:已发送设备 2:设备收到 3:升级成功 4:升级失败")
|
||||
@Excel(name = "0:等待升级 1:已发送设备 2:设备收到 3:升级成功 4:升级失败")
|
||||
private Integer upgradeStatus;
|
||||
|
||||
/** 描述 */
|
||||
@ApiModelProperty("描述")
|
||||
@Excel(name = "描述")
|
||||
private String detailMsg;
|
||||
|
||||
/** 消息ID */
|
||||
@ApiModelProperty("消息ID")
|
||||
@Excel(name = "消息ID")
|
||||
private String messageId;
|
||||
/*任务名称*/
|
||||
@ApiModelProperty("任务名称")
|
||||
private String taskName;
|
||||
/**固件名称*/
|
||||
@ApiModelProperty("固件名称")
|
||||
private String firmwareName;
|
||||
/**固件版本*/
|
||||
@ApiModelProperty("固件版本")
|
||||
private String version;
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getFirmwareName() {
|
||||
return firmwareName;
|
||||
}
|
||||
|
||||
public void setFirmwareName(String firmwareName) {
|
||||
this.firmwareName = firmwareName;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public Integer getUpgradeStatus() {
|
||||
return upgradeStatus;
|
||||
}
|
||||
|
||||
public void setUpgradeStatus(Integer upgradeStatus) {
|
||||
this.upgradeStatus = upgradeStatus;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg)
|
||||
{
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public String getDetailMsg()
|
||||
{
|
||||
return detailMsg;
|
||||
}
|
||||
public void setMessageId(String messageId)
|
||||
{
|
||||
this.messageId = messageId;
|
||||
}
|
||||
|
||||
public String getMessageId()
|
||||
{
|
||||
return messageId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("taskId", getTaskId())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("upgradeStatus", getUpgradeStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("detailMsg", getDetailMsg())
|
||||
.append("messageId", getMessageId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备服务下发日志对象 iot_function_log
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-22
|
||||
*/
|
||||
@ApiModel(value = "FunctionLog", description = "设备服务下发日志对象 iot_function_log")
|
||||
@Data
|
||||
public class FunctionLog
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备日志ID */
|
||||
@ApiModelProperty("设备日志ID")
|
||||
private Long id;
|
||||
|
||||
/** 标识符 */
|
||||
@ApiModelProperty("标识符")
|
||||
@Excel(name = "标识符")
|
||||
private String identify;
|
||||
|
||||
/** 仅用于查询时筛选条件 */
|
||||
private String prefixIdentify;
|
||||
|
||||
@ApiModelProperty("物模型名称")
|
||||
private String modelName;
|
||||
|
||||
|
||||
/** 类型(1=服务下发,2=属性获取,3.OTA升级) */
|
||||
@ApiModelProperty(value = "类型", notes = "(1=服务下发,2=属性获取,3.OTA升级,4=场景变量下发)")
|
||||
@Excel(name = "类型", readConverterExp = "1==服务下发,2=属性获取,3.OTA升级,4=场景变量下发")
|
||||
private Integer funType;
|
||||
|
||||
/** 日志值 */
|
||||
@ApiModelProperty("日志值")
|
||||
@Excel(name = "日志值")
|
||||
private String funValue;
|
||||
/**
|
||||
* 显示值
|
||||
*/
|
||||
@ApiModelProperty("显示值")
|
||||
private String showValue;
|
||||
|
||||
/** 消息id */
|
||||
@ApiModelProperty("消息id")
|
||||
@Excel(name = "消息id")
|
||||
private String messageId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 模式(1=影子模式,2=在线模式,3=其他) */
|
||||
@ApiModelProperty(value = "模式", notes = "(1=影子模式,2=在线模式,3=其他)")
|
||||
@Excel(name = "模式(1=影子模式,2=在线模式,3=其他)")
|
||||
private Integer mode;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 下发结果描述 */
|
||||
@ApiModelProperty("下发结果描述")
|
||||
@Excel(name = "下发结果描述")
|
||||
private String resultMsg;
|
||||
|
||||
/** 下发结果代码 */
|
||||
@ApiModelProperty("下发结果代码")
|
||||
@Excel(name = "下发结果代码")
|
||||
private Integer resultCode;
|
||||
|
||||
/**
|
||||
* 设备回复时间
|
||||
*/
|
||||
@ApiModelProperty("设备回复时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date replyTime;
|
||||
|
||||
/** 创建者 */
|
||||
@ApiModelProperty("创建者")
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date beginTime;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
private List<Long> list;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
private List<String> identifyList;
|
||||
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 项目对象 iot_goview_project
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-10-27
|
||||
*/
|
||||
@ApiModel(value = "GoviewProject", description = "项目对象 iot_goview_project")
|
||||
public class GoviewProject extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@ApiModelProperty("主键ID")
|
||||
private String id;
|
||||
|
||||
/** 项目名称 */
|
||||
@ApiModelProperty("项目名称")
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 项目状态[-1未发布,1发布] */
|
||||
@ApiModelProperty(value = "项目状态", notes = "[-1未发布,1发布]")
|
||||
@Excel(name = "项目状态[0未发布,1发布]")
|
||||
private Integer state;
|
||||
|
||||
/** 删除状态[1删除,-1未删除] */
|
||||
@ApiModelProperty("删除状态")
|
||||
private Long delFlag;
|
||||
|
||||
/** 首页图片 */
|
||||
@ApiModelProperty("首页图片")
|
||||
@Excel(name = "首页图片")
|
||||
private String indexImage;
|
||||
|
||||
/** 项目介绍 */
|
||||
@ApiModelProperty("项目介绍")
|
||||
@Excel(name = "项目介绍")
|
||||
private String remarks;
|
||||
|
||||
/** 租户id */
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
private String tenantName;
|
||||
|
||||
public Long getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(Long tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public String getTenantName() {
|
||||
return tenantName;
|
||||
}
|
||||
|
||||
public void setTenantName(String tenantName) {
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProjectName(String projectName)
|
||||
{
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getProjectName()
|
||||
{
|
||||
return projectName;
|
||||
}
|
||||
public void setState(Integer state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Integer getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
public void setIndexImage(String indexImage)
|
||||
{
|
||||
this.indexImage = indexImage;
|
||||
}
|
||||
|
||||
public String getIndexImage()
|
||||
{
|
||||
return indexImage;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectName", getProjectName())
|
||||
.append("state", getState())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("indexImage", getIndexImage())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目数据关联对象 iot_goview_project_data
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-10-27
|
||||
*/
|
||||
@ApiModel(value = "GoviewProjectData", description = "项目数据关联对象 iot_goview_project_data")
|
||||
public class GoviewProjectData extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@ApiModelProperty("主键ID")
|
||||
private String id;
|
||||
|
||||
/** 项目id */
|
||||
@ApiModelProperty("项目id")
|
||||
private String projectId;
|
||||
|
||||
/** 存储数据 */
|
||||
@ApiModelProperty("存储数据")
|
||||
private byte[] content;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProjectId(String projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public byte[] getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(byte[] content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("content", getContent())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getDataToStr() {
|
||||
byte[] bs = getContent();
|
||||
String str = "二进制转换错误";
|
||||
str = new String(bs);
|
||||
return str;
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备分组对象 iot_group
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@ApiModel(value = "Group", description = "设备分组对象 iot_group")
|
||||
public class Group extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分组ID */
|
||||
@ApiModelProperty("分组ID")
|
||||
private Long groupId;
|
||||
|
||||
/** 分组名称 */
|
||||
@ApiModelProperty("分组名称")
|
||||
@Excel(name = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
/** 分组排序 */
|
||||
@ApiModelProperty("分组排序")
|
||||
@Excel(name = "分组排序")
|
||||
private Long groupOrder;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户昵称 */
|
||||
@ApiModelProperty("用户昵称")
|
||||
@Excel(name = "用户昵称")
|
||||
private String userName;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
public void setGroupOrder(Long groupOrder)
|
||||
{
|
||||
this.groupOrder = groupOrder;
|
||||
}
|
||||
|
||||
public Long getGroupOrder()
|
||||
{
|
||||
return groupOrder;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("groupId", getGroupId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("groupOrder", getGroupOrder())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* http桥接配置对象 http_client
|
||||
*
|
||||
* @author gx_magx_ma
|
||||
* @date 2024-05-29
|
||||
*/
|
||||
@Data
|
||||
public class HttpClient extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 请求方法 */
|
||||
@Excel(name = "请求方法")
|
||||
private String method;
|
||||
|
||||
/** 桥接地址 */
|
||||
@Excel(name = "桥接地址")
|
||||
private String hostUrl;
|
||||
|
||||
/** 请求头 */
|
||||
@Excel(name = "请求头")
|
||||
private String requestHeaders;
|
||||
|
||||
/** 请求参数 */
|
||||
@Excel(name = "请求参数")
|
||||
private String requestQuerys;
|
||||
|
||||
/** 请求体 */
|
||||
@Excel(name = "请求体")
|
||||
private String requestBody;
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import com.fastbee.common.core.protocol.modbus.ModbusCode;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* modbus配置对象 iot_modbus_config
|
||||
** @date 2024-05-22
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ModbusConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 业务id */
|
||||
private Long id;
|
||||
|
||||
/**所属产品id*/
|
||||
@ApiModelProperty(value = "所属产品id")
|
||||
private Long productId;
|
||||
|
||||
/**从机地址*/
|
||||
@ApiModelProperty(value = "从机地址")
|
||||
private Integer slave;
|
||||
/** 关联属性 */
|
||||
@ApiModelProperty(value = "关联属性")
|
||||
private String identifier;
|
||||
|
||||
/** 寄存器地址 */
|
||||
@ApiModelProperty(value = "寄存器地址")
|
||||
private Integer address;
|
||||
|
||||
/** 是否只读(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否只读(0-否,1-是)")
|
||||
private Integer isReadonly;
|
||||
|
||||
/** modbus数据类型 */
|
||||
@ApiModelProperty(value = "modbus数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 读取个数 */
|
||||
@ApiModelProperty(value = "读取个数")
|
||||
private Integer quantity;
|
||||
|
||||
/** 寄存器类型 1-IO寄存器 2-数据寄存器 */
|
||||
@ApiModelProperty(value = "寄存器类型 1-IO寄存器 2-数据寄存器")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "BIT位")
|
||||
private Integer bitOrder;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
private ModbusCode modbusCode;
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 轮训任务列对象 iot_modbus_job
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-07-05
|
||||
*/
|
||||
@ApiModel(value = "ModbusJob", description = "轮训任务列 iot_modbus_job")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ModbusJob extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
|
||||
@ApiModelProperty("任务名")
|
||||
private String jobName;
|
||||
/**
|
||||
* 子设备id
|
||||
*/
|
||||
@Excel(name = "子设备id")
|
||||
@ApiModelProperty("子设备id")
|
||||
private Long subDeviceId;
|
||||
|
||||
/**
|
||||
* 子设备编号
|
||||
*/
|
||||
@Excel(name = "子设备编号")
|
||||
@ApiModelProperty("子设备编号")
|
||||
private String subSerialNumber;
|
||||
|
||||
/**
|
||||
* 指令
|
||||
*/
|
||||
@Excel(name = "指令")
|
||||
@ApiModelProperty("指令")
|
||||
private String command;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@Excel(name = "任务id")
|
||||
@ApiModelProperty("任务id")
|
||||
private Long jobId;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1暂停)
|
||||
*/
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=暂停")
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("设备类型")
|
||||
private Integer deviceType;
|
||||
|
||||
private List<String> subDeviceList;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品modbus配置参数对象 iot_modbus_params
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-31
|
||||
*/
|
||||
@ApiModel(value = "ModbusParams", description = "产品modbus配置参数 iot_modbus_params")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ModbusParams extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品id
|
||||
*/
|
||||
@Excel(name = "产品id")
|
||||
@ApiModelProperty("产品id")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 是否启动云端轮训(1-云端轮训,2-边缘采集)
|
||||
*/
|
||||
@Excel(name = "是否启动云端轮训(1-云端轮训,2-边缘采集)")
|
||||
@ApiModelProperty("是否启动云端轮训(1-云端轮训,2-边缘采集)")
|
||||
private Integer pollType;
|
||||
|
||||
/**
|
||||
* 默认的子设备地址
|
||||
*/
|
||||
@Excel(name = "默认的子设备地址")
|
||||
@ApiModelProperty("默认的子设备地址")
|
||||
private Integer slaveId;
|
||||
|
||||
@ApiModelProperty("批量读取的个数,默认32")
|
||||
private Integer pollLength = 32;
|
||||
|
||||
/**
|
||||
* 子设备状态判断方式 1-设备数据 2- 网关
|
||||
*/
|
||||
@Excel(name = "子设备状态判断方式 1-设备数据 2- 网关")
|
||||
@ApiModelProperty("子设备状态判断方式 1-设备数据 2- 网关")
|
||||
private Integer statusDeter;
|
||||
|
||||
/**
|
||||
* 设备数据来判断子设备状态的时长(s)
|
||||
*/
|
||||
@Excel(name = "设备数据来判断子设备状态的时长(s)")
|
||||
@ApiModelProperty("设备数据来判断子设备状态的时长(s)")
|
||||
private String deterTimer;
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* mqtt桥接配置表对象 mqtt_client
|
||||
*
|
||||
* @author gx_ma
|
||||
* @date 2024-06-03
|
||||
*/
|
||||
@Data
|
||||
public class MqttClient
|
||||
{
|
||||
/** 连接器名称 */
|
||||
@Excel(name = "连接器名称")
|
||||
private String name;
|
||||
|
||||
/** MQTT服务地址(broker.emqx.io:1883) */
|
||||
@Excel(name = "MQTT服务地址", readConverterExp = "b=roker.emqx.io:1883")
|
||||
private String hostUrl;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 数据源配置对象 multiple_data_source
|
||||
*
|
||||
* @author gx_ma
|
||||
* @date 2024-06-17
|
||||
*/
|
||||
@Data
|
||||
public class MultipleDataSource extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 数据源 */
|
||||
@Excel(name = "数据源")
|
||||
private String databaseSource;
|
||||
|
||||
/** sql语句 */
|
||||
@Excel(name = "sql语句")
|
||||
private String sql;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 数据库名称 */
|
||||
@Excel(name = "数据库名称")
|
||||
private String dataBaseName;
|
||||
|
||||
/** 连接地址 */
|
||||
@Excel(name = "连接地址")
|
||||
private String host;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
|
||||
}
|
@ -0,0 +1,195 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 新闻资讯对象 news
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-04-09
|
||||
*/
|
||||
@ApiModel(value = "News", description = "新闻资讯对象 news")
|
||||
public class News extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 新闻ID */
|
||||
@ApiModelProperty("新闻ID")
|
||||
private Long newsId;
|
||||
|
||||
/** 标题 */
|
||||
@ApiModelProperty("标题")
|
||||
@Excel(name = "标题")
|
||||
private String title;
|
||||
|
||||
/** 内容 */
|
||||
@ApiModelProperty("内容")
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
/** 图片 */
|
||||
@ApiModelProperty("图片")
|
||||
@Excel(name = "图片")
|
||||
private String imgUrl;
|
||||
|
||||
/** 置顶 */
|
||||
@ApiModelProperty("是否置顶")
|
||||
@Excel(name = "置顶")
|
||||
private Integer isTop;
|
||||
|
||||
/** 广告 */
|
||||
@ApiModelProperty("广告")
|
||||
@Excel(name = "广告")
|
||||
private Integer isBanner;
|
||||
|
||||
/** 分类ID */
|
||||
@ApiModelProperty("分类ID")
|
||||
@Excel(name = "分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/** 分类名称 */
|
||||
@ApiModelProperty("分类名称")
|
||||
@Excel(name = "分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 发布 */
|
||||
@ApiModelProperty("新闻状态(0-未发布,1-已发布)")
|
||||
@Excel(name = "发布")
|
||||
private Integer status;
|
||||
|
||||
/** 作者 */
|
||||
@ApiModelProperty("作者")
|
||||
@Excel(name = "作者")
|
||||
private String author;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public void setNewsId(Long newsId)
|
||||
{
|
||||
this.newsId = newsId;
|
||||
}
|
||||
|
||||
public Long getNewsId()
|
||||
{
|
||||
return newsId;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
public void setImgUrl(String imgUrl)
|
||||
{
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl()
|
||||
{
|
||||
return imgUrl;
|
||||
}
|
||||
public void setIsTop(Integer isTop)
|
||||
{
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public Integer getIsTop()
|
||||
{
|
||||
return isTop;
|
||||
}
|
||||
public void setIsBanner(Integer isBanner)
|
||||
{
|
||||
this.isBanner = isBanner;
|
||||
}
|
||||
|
||||
public Integer getIsBanner()
|
||||
{
|
||||
return isBanner;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAuthor(String author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("newsId", getNewsId())
|
||||
.append("title", getTitle())
|
||||
.append("content", getContent())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.append("isTop", getIsTop())
|
||||
.append("isBanner", getIsBanner())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("status", getStatus())
|
||||
.append("author", getAuthor())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 新闻分类对象 news_category
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-04-09
|
||||
*/
|
||||
@ApiModel(value = "NewsCategory", description = "新闻分类对象 news_category")
|
||||
public class NewsCategory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分类ID */
|
||||
@ApiModelProperty("分类ID")
|
||||
@Excel(name = "分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/** 分类名字 */
|
||||
@ApiModelProperty("分类名字")
|
||||
@Excel(name = "分类名字")
|
||||
private String categoryName;
|
||||
|
||||
/** 显示顺序 */
|
||||
@ApiModelProperty("显示顺序")
|
||||
@Excel(name = "显示顺序")
|
||||
private Integer orderNum;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.enums.DataEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 指令权限控制对象 order_control
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-07-01
|
||||
*/
|
||||
@ApiModel(value = "OrderControl", description = "指令权限控制 order_control")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OrderControl extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@Excel(name = "租户id")
|
||||
@ApiModelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 逗号分隔
|
||||
*/
|
||||
@Excel(name = "逗号分隔")
|
||||
@ApiModelProperty("逗号分隔")
|
||||
private String selectOrder;
|
||||
|
||||
/**
|
||||
* 是否生效 0-否 1-是
|
||||
*/
|
||||
@Excel(name = "是否生效 0-否 1-是")
|
||||
@ApiModelProperty("是否生效 0-否 1-是")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 被限制的用户id
|
||||
*/
|
||||
@Excel(name = "被限制的用户id")
|
||||
@ApiModelProperty("被限制的用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@Excel(name = "设备id")
|
||||
@ApiModelProperty("设备id")
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 可操作次数
|
||||
*/
|
||||
@Excel(name = "可操作次数")
|
||||
@ApiModelProperty("可操作次数")
|
||||
private Integer count;
|
||||
|
||||
@ApiModelProperty("文件")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
private String imgUrl;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
private String modelNames;
|
||||
|
||||
private String deviceName;
|
||||
|
||||
private String userName;
|
||||
}
|
||||
|
@ -0,0 +1,405 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* 产品对象 iot_product
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@ApiModel(value = "Product", description = "产品对象 iot_product")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Product extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@ApiModelProperty("产品名称")
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 产品分类ID */
|
||||
@ApiModelProperty("产品分类ID")
|
||||
@Excel(name = "产品分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
/** 产品分类名称 */
|
||||
@ApiModelProperty("产品分类名称")
|
||||
@Excel(name = "产品分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 是否私有产品(0-否,1-是)私有下级不能共享 */
|
||||
@ApiModelProperty(value = "是否私有产品", notes = "(0-否,1-是)")
|
||||
@Excel(name = "是否私有产品", readConverterExp = "0-否,1-是")
|
||||
private Integer isSys;
|
||||
|
||||
/** 是否启用授权码(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否启用授权码", notes = "(0-否,1-是)")
|
||||
@Excel(name = "是否启用授权码", readConverterExp = "0=-否,1-是")
|
||||
private Integer isAuthorize;
|
||||
|
||||
/** mqtt账号 */
|
||||
@ApiModelProperty("mqtt账号")
|
||||
private String mqttAccount;
|
||||
|
||||
/** mqtt密码 */
|
||||
@ApiModelProperty("mqtt密码")
|
||||
private String mqttPassword;
|
||||
|
||||
/** 产品秘钥 */
|
||||
@ApiModelProperty("产品秘钥")
|
||||
private String mqttSecret;
|
||||
|
||||
/*产品协议编号*/
|
||||
@ApiModelProperty("产品协议编号")
|
||||
private String protocolCode;
|
||||
|
||||
/*产品支持的传输协议,多个的选一个即可*/
|
||||
@ApiModelProperty("产品支持的传输协议,多个的选一个即可")
|
||||
private String transport;
|
||||
|
||||
/** 是否自定义位置 **/
|
||||
@ApiModelProperty("定位方式(1=ip自动定位,2=设备定位,3=自定义)")
|
||||
private Integer locationWay;
|
||||
|
||||
public String getTransport() {
|
||||
return transport;
|
||||
}
|
||||
|
||||
public void setTransport(String transport) {
|
||||
this.transport = transport;
|
||||
}
|
||||
|
||||
public String getProtocolCode() {
|
||||
return protocolCode;
|
||||
}
|
||||
|
||||
public void setProtocolCode(String protocolCode) {
|
||||
this.protocolCode = protocolCode;
|
||||
}
|
||||
|
||||
public String getMqttSecret() {
|
||||
return mqttSecret;
|
||||
}
|
||||
|
||||
public void setMqttSecret(String mqttSecret) {
|
||||
this.mqttSecret = mqttSecret;
|
||||
}
|
||||
|
||||
/** 状态(1-未发布,2-已发布,不能修改) */
|
||||
@ApiModelProperty(value = "状态", notes = "(1-未发布,2-已发布,不能修改)")
|
||||
@Excel(name = "状态", readConverterExp = "1==未发布,2=已发布,不能修改")
|
||||
private Integer status;
|
||||
|
||||
/** 设备类型(1-直连设备、2-网关子设备、3-网关设备) */
|
||||
@ApiModelProperty(value = "设备类型", notes = "(1-直连设备、2-网关子设备、3-网关设备、4-网关子设备)")
|
||||
@Excel(name = "设备类型", readConverterExp = "1=直连设备、2=网关设备、3=监控设备、4-网关子设备")
|
||||
private Integer deviceType;
|
||||
|
||||
/** 联网方式(1=-wifi、2-蜂窝(2G/3G/4G/5G)、3-以太网、4-其他) */
|
||||
@ApiModelProperty(value = "联网方式", notes = "(1=-wifi、2-蜂窝(2G/3G/4G/5G)、3-以太网、4-其他)")
|
||||
@Excel(name = "联网方式", readConverterExp = "1=-wifi、2=蜂窝(2G/3G/4G/5G)、3=以太网、4=其他")
|
||||
private Integer networkMethod;
|
||||
|
||||
/** 认证方式(1-账号密码、2-证书、3-Http) */
|
||||
@ApiModelProperty(value = "认证方式", notes = "(1-账号密码、2-证书、3-Http)")
|
||||
@Excel(name = "认证方式", readConverterExp = "1=账号密码、2=证书、3=Http")
|
||||
private Integer vertificateMethod;
|
||||
|
||||
/** 图片地址 */
|
||||
@ApiModelProperty("图片地址")
|
||||
private String imgUrl;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty(value = "删除标志", notes = "(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
/** 物模型Json **/
|
||||
@ApiModelProperty("物模型Json")
|
||||
private String thingsModelsJson;
|
||||
|
||||
/**采集点模板id*/
|
||||
@ApiModelProperty("采集点模板id")
|
||||
private Long templateId;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("是否显示上级")
|
||||
private Boolean showSenior;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("机构ID")
|
||||
private Long deptId;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty("是否属于本机构 1-是,0-否")
|
||||
private Integer isOwner;
|
||||
|
||||
@Transient
|
||||
private Boolean isAdmin;
|
||||
|
||||
@ApiModelProperty("关联组态guId")
|
||||
private String guid;
|
||||
|
||||
/**
|
||||
* 组态主键id
|
||||
*/
|
||||
@ApiModelProperty("关联组态id")
|
||||
private Long scadaId;
|
||||
|
||||
public Long getScadaId() {
|
||||
return scadaId;
|
||||
}
|
||||
|
||||
public void setScadaId(Long scadaId) {
|
||||
this.scadaId = scadaId;
|
||||
}
|
||||
|
||||
public String getGuid() {
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid) {
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public Boolean getAdmin() {
|
||||
return isAdmin;
|
||||
}
|
||||
|
||||
public void setAdmin(Boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
|
||||
public Integer getIsOwner() {
|
||||
return isOwner;
|
||||
}
|
||||
|
||||
public void setIsOwner(Integer isOwner) {
|
||||
this.isOwner = isOwner;
|
||||
}
|
||||
|
||||
public Boolean getShowSenior() {
|
||||
return showSenior;
|
||||
}
|
||||
|
||||
public void setShowSenior(Boolean showSenior) {
|
||||
this.showSenior = showSenior;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Integer getLocationWay() {
|
||||
return locationWay;
|
||||
}
|
||||
|
||||
public void setLocationWay(Integer locationWay) {
|
||||
this.locationWay = locationWay;
|
||||
}
|
||||
|
||||
public Long getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(Long templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getThingsModelsJson() {
|
||||
return thingsModelsJson;
|
||||
}
|
||||
|
||||
public void setThingsModelsJson(String thingsModelsJson) {
|
||||
this.thingsModelsJson = thingsModelsJson;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
|
||||
public void setIsSys(Integer isSys)
|
||||
{
|
||||
this.isSys = isSys;
|
||||
}
|
||||
public Integer getIsSys()
|
||||
{
|
||||
return isSys;
|
||||
}
|
||||
|
||||
public void setIsAuthorize(Integer isAuthorize) {this.isAuthorize = isAuthorize;}
|
||||
public Integer getIsAuthorize() {return isAuthorize;}
|
||||
|
||||
public void setMqttAccount(String mqttAccount)
|
||||
{
|
||||
this.mqttAccount = mqttAccount;
|
||||
}
|
||||
public String getMqttAccount()
|
||||
{
|
||||
return mqttAccount;
|
||||
}
|
||||
|
||||
public void setMqttPassword(String mqttPassword)
|
||||
{
|
||||
this.mqttPassword = mqttPassword;
|
||||
}
|
||||
public String getMqttPassword()
|
||||
{
|
||||
return mqttPassword;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDeviceType(Integer deviceType)
|
||||
{
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public Integer getDeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
public void setNetworkMethod(Integer networkMethod)
|
||||
{
|
||||
this.networkMethod = networkMethod;
|
||||
}
|
||||
|
||||
public Integer getNetworkMethod()
|
||||
{
|
||||
return networkMethod;
|
||||
}
|
||||
public void setVertificateMethod(Integer vertificateMethod)
|
||||
{
|
||||
this.vertificateMethod = vertificateMethod;
|
||||
}
|
||||
|
||||
public Integer getVertificateMethod()
|
||||
{
|
||||
return vertificateMethod;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("isSys", getIsSys())
|
||||
.append("isAuthorize", getIsAuthorize())
|
||||
.append("status", getStatus())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("networkMethod", getNetworkMethod())
|
||||
.append("vertificateMethod", getVertificateMethod())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 产品授权码对象 iot_product_authorize
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-04-11
|
||||
*/
|
||||
@ApiModel(value = "ProductAuthorize", description = "产品授权码对象 iot_product_authorize")
|
||||
public class ProductAuthorize extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 授权码ID */
|
||||
@ApiModelProperty("授权码ID")
|
||||
private Long authorizeId;
|
||||
|
||||
/** 授权码 */
|
||||
@ApiModelProperty("授权码")
|
||||
@Excel(name = "授权码")
|
||||
private String authorizeCode;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户名称 */
|
||||
@ApiModelProperty("用户名称")
|
||||
@Excel(name = "用户名称")
|
||||
private String userName;
|
||||
|
||||
/** 状态(1-未发布,2-已发布,不能修改) */
|
||||
@ApiModelProperty(value = "状态", notes = "(1-未发布,2-已发布,不能修改)")
|
||||
@Excel(name = "状态", readConverterExp = "1=未使用,2=已使用")
|
||||
private Integer status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
public ProductAuthorize() {
|
||||
}
|
||||
|
||||
public ProductAuthorize(String authorizeCode, Long productId) {
|
||||
this.authorizeCode = authorizeCode;
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAuthorizeId(Long authorizeId)
|
||||
{
|
||||
this.authorizeId = authorizeId;
|
||||
}
|
||||
|
||||
public Long getAuthorizeId()
|
||||
{
|
||||
return authorizeId;
|
||||
}
|
||||
public void setAuthorizeCode(String authorizeCode)
|
||||
{
|
||||
this.authorizeCode = authorizeCode;
|
||||
}
|
||||
|
||||
public String getAuthorizeCode()
|
||||
{
|
||||
return authorizeCode;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("authorizeId", getAuthorizeId())
|
||||
.append("authorizeCode", getAuthorizeCode())
|
||||
.append("productId", getProductId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 协议管理model
|
||||
* @author gsb
|
||||
* @date 2022/10/19 15:35
|
||||
*/
|
||||
@ApiModel(value = "Protocol", description = "协议管理对象 iot_protocol")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Protocol {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
/*协议编码*/
|
||||
@ApiModelProperty("协议编码")
|
||||
private String protocolCode;
|
||||
/*协议名称*/
|
||||
@ApiModelProperty("协议名称")
|
||||
private String protocolName;
|
||||
/*协议jar包,js包 c程序上传地址*/
|
||||
@ApiModelProperty("协议jar包,js包 c程序上传地址")
|
||||
private String protocolFileUrl;
|
||||
/*协议类型 0:未知 1:jar 2:js 3:C*/
|
||||
@ApiModelProperty("协议类型 0:未知 1:jar 2:js 3:C")
|
||||
private Integer protocolType;
|
||||
/*协议文件摘要(文件的md5)*/
|
||||
@ApiModelProperty("协议文件摘要(文件的md5)")
|
||||
private String jarSign;
|
||||
/*创建时间*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
/*更新时间*/
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
/*0:草稿 1:启用 2:停用*/
|
||||
@ApiModelProperty("0:草稿 1:启用 2:停用")
|
||||
private Integer protocolStatus;
|
||||
/*'0:正常 1:删除*/
|
||||
@ApiModelProperty("'0:正常 1:删除")
|
||||
private Integer delFlag;
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景联动对象 iot_scene
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
@Data
|
||||
public class Scene extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景ID */
|
||||
private Long sceneId;
|
||||
|
||||
private Long recoverId;
|
||||
|
||||
/** 场景名称 */
|
||||
@Excel(name = "场景名称")
|
||||
private String sceneName;
|
||||
|
||||
/** 规则名称 */
|
||||
private String chainName;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户名称 */
|
||||
@Excel(name = "用户名称")
|
||||
private String userName;
|
||||
|
||||
/** 执行条件(1=或、任一条件,2=且、所有条件,3=非,不满足) */
|
||||
@Excel(name = "执行条件", readConverterExp = "1==或、任一条件,2=且、所有条件,3=非,不满足")
|
||||
private Integer cond;
|
||||
|
||||
/** 静默周期(分钟) */
|
||||
@Excel(name = "静默周期", readConverterExp = "分=钟")
|
||||
private Integer silentPeriod;
|
||||
|
||||
/** 执行方式(1=串行,顺序执行,2=并行,同时执行) */
|
||||
@Excel(name = "执行方式", readConverterExp = "1==串行,顺序执行,2=并行,同时执行")
|
||||
private Integer executeMode;
|
||||
|
||||
/** 延时执行(秒钟) */
|
||||
@Excel(name = "延时执行", readConverterExp = "秒=钟")
|
||||
private Integer executeDelay;
|
||||
|
||||
@Excel(name = "延时匹配", readConverterExp = "秒=钟")
|
||||
private Integer checkDelay;
|
||||
|
||||
/** 是否包含告警推送(1=包含,2=不包含) */
|
||||
@Excel(name = "是否包含告警推送", readConverterExp = "1==包含,2=不包含")
|
||||
private Integer hasAlert;
|
||||
|
||||
/** 场景状态(1-启动,2-停止) */
|
||||
@Excel(name = "场景状态", readConverterExp = "1=-启动,2-停止")
|
||||
private Integer enable;
|
||||
|
||||
/** 规则数据 */
|
||||
@Excel(name = "规则数据")
|
||||
private String elData;
|
||||
|
||||
/** 应用名称 */
|
||||
@Excel(name = "应用名称")
|
||||
private String applicationName;
|
||||
|
||||
/** 接收的触发器列表 */
|
||||
private List<SceneScript> triggers;
|
||||
|
||||
/** 接收的执行动作列表 */
|
||||
private List<SceneScript> actions;
|
||||
|
||||
/**
|
||||
* 执行动作数量
|
||||
*/
|
||||
private Integer actionCount = 0;
|
||||
|
||||
/**
|
||||
* 是否是终端用户 1-是;0-否
|
||||
*/
|
||||
private Integer terminalUser;
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 场景设备对象 iot_scene_device
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
public class SceneDevice
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景设备ID */
|
||||
private Long sceneDeviceId;
|
||||
|
||||
/** 设备编号(产品触发的没有设备编号) */
|
||||
@Excel(name = "设备编号", readConverterExp = "产=品触发的没有设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 产品ID */
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品ID */
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 场景脚本ID */
|
||||
@Excel(name = "场景脚本ID")
|
||||
private String scriptId;
|
||||
|
||||
/** 场景ID */
|
||||
@Excel(name = "场景ID")
|
||||
private Long sceneId;
|
||||
|
||||
/** 触发源(1=设备触发,3=产品触发) */
|
||||
@Excel(name = "触发源", readConverterExp = "1==设备触发,3=产品触发")
|
||||
private Integer source;
|
||||
|
||||
/** 类型(2=触发器,3=执行动作) */
|
||||
private Integer type;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public void setSceneDeviceId(Long sceneDeviceId)
|
||||
{
|
||||
this.sceneDeviceId = sceneDeviceId;
|
||||
}
|
||||
|
||||
public Long getSceneDeviceId()
|
||||
{
|
||||
return sceneDeviceId;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setScriptId(String scriptId)
|
||||
{
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
public String getScriptId()
|
||||
{
|
||||
return scriptId;
|
||||
}
|
||||
public void setSceneId(Long sceneId)
|
||||
{
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
|
||||
public Long getSceneId()
|
||||
{
|
||||
return sceneId;
|
||||
}
|
||||
public void setSource(Integer source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Integer getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sceneDeviceId", getSceneDeviceId())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("productId", getProductId())
|
||||
.append("scriptId", getScriptId())
|
||||
.append("sceneId", getSceneId())
|
||||
.append("source", getSource())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.iot.model.scenemodel.CusDeviceVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景管理对象 scene_model
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-20
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@ApiModel(value = "SceneModel", description = "场景管理")
|
||||
public class SceneModel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景管理id */
|
||||
private Long sceneModelId;
|
||||
|
||||
/** 所属租户id */
|
||||
@ApiModelProperty(value = "所属租户id")
|
||||
private Long tenantId;
|
||||
|
||||
/** 场景管理名称 */
|
||||
@ApiModelProperty(value = "场景管理名称")
|
||||
private String sceneModelName;
|
||||
|
||||
/** 场景状态 0-停用 1-启用 */
|
||||
@ApiModelProperty(value = "场景状态 0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
/** 关联的组态id */
|
||||
@ApiModelProperty(value = "关联的组态id")
|
||||
private String guid;
|
||||
|
||||
/** 场景描述 */
|
||||
@ApiModelProperty(value = "场景描述")
|
||||
private String desc;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 场景图片
|
||||
*/
|
||||
@ApiModelProperty(value = "场景图片")
|
||||
private String imgUrl;
|
||||
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 关联设备数
|
||||
*/
|
||||
private Integer deviceTotal;
|
||||
|
||||
/**
|
||||
* 关联设备名称
|
||||
*/
|
||||
private List<CusDeviceVO> cusDeviceList;
|
||||
|
||||
/**
|
||||
* 关联设备类型
|
||||
*/
|
||||
private List<SceneModelDevice> sceneModelDeviceList;
|
||||
/**
|
||||
* 关联的监控设备
|
||||
*/
|
||||
private List<SipRelation> sipRelationList;
|
||||
|
||||
/**
|
||||
* 组态id
|
||||
*/
|
||||
private Long scadaId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("sceneModelId", getSceneModelId())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("sceneModelName", getSceneModelName())
|
||||
.append("status", getStatus())
|
||||
.append("guid", getGuid())
|
||||
.append("desc", getDesc())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 scene_model_data
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "SceneModelData", description = "场景变量")
|
||||
public class SceneModelData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 场景管理id */
|
||||
@ApiModelProperty(value = "场景管理id")
|
||||
private Long sceneModelId;
|
||||
|
||||
/** 场景关联数据来源id */
|
||||
@ApiModelProperty(value = "场景关联数据来源id")
|
||||
private Long sceneModelDeviceId;
|
||||
|
||||
/** 来源类型(0设备 1录入型 2运算型) */
|
||||
@ApiModelProperty(value = "来源类型(0设备 1录入型 2运算型)")
|
||||
private Integer variableType;
|
||||
|
||||
/** 数据源id */
|
||||
@ApiModelProperty(value = "物模型或变量id")
|
||||
private Long datasourceId;
|
||||
|
||||
/** 启用(0未启用 1启用) */
|
||||
@ApiModelProperty(value = "启用", notes = "0=未启用,1=启用")
|
||||
private Integer enable;
|
||||
|
||||
/** 删除标志(0代表存在 1代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 物模型或变量名称
|
||||
*/
|
||||
@ApiModelProperty(value = "变量名称")
|
||||
private String sourceName;
|
||||
|
||||
/**
|
||||
* 标识符
|
||||
*/
|
||||
@ApiModelProperty(value = "变量标识符")
|
||||
private String identifier;
|
||||
|
||||
/**
|
||||
* 物模型类型
|
||||
*/
|
||||
@ApiModelProperty(value = "物模型类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 关联设备名称
|
||||
*/
|
||||
private String sceneModelDeviceName;
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 场景管理关联设备对象 scene_model_device
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "SceneModelDevice", description = "场景关联设备")
|
||||
public class SceneModelDevice extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 场景id */
|
||||
@ApiModelProperty(value = "场景id")
|
||||
private Long sceneModelId;
|
||||
|
||||
/** 关联设备id */
|
||||
@ApiModelProperty(value = "关联设备id")
|
||||
private Long cusDeviceId;
|
||||
|
||||
/** 排序 */
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 类型(0设备 1录入型 2运算型) */
|
||||
@ApiModelProperty(value = "类型", notes = "0=设备,1=录入型,2=运算型")
|
||||
private Integer variableType;
|
||||
|
||||
/** 全部启用(0否 1是) */
|
||||
@ApiModelProperty(value = "全部启用", notes = "0=否,1=是")
|
||||
private Integer allEnable;
|
||||
|
||||
/** 名称 */
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 产品id
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String serialNumber;
|
||||
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景录入型变量对象 scene_model_tag
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModel(value = "SceneModelTag", description = "场景录入运算变量")
|
||||
public class SceneModelTag extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 场景id */
|
||||
@ApiModelProperty(value = "场景id")
|
||||
private Long sceneModelId;
|
||||
|
||||
/** 录入型变量名 */
|
||||
@ApiModelProperty(value = "录入型变量名")
|
||||
private String name;
|
||||
|
||||
/** 单位 */
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 数据类型 */
|
||||
@ApiModelProperty(value = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 默认值 */
|
||||
@ApiModelProperty(value = "默认值")
|
||||
private String defaultValue;
|
||||
|
||||
/** 是否只读 0-否 1-是 */
|
||||
@ApiModelProperty(value = "是否只读 0-否 1-是")
|
||||
private Integer isReadonly;
|
||||
|
||||
/** 存储方式 0-不存储 1-存储 */
|
||||
@ApiModelProperty(value = "存储方式 0-不存储 1-存储")
|
||||
private Integer storage;
|
||||
|
||||
/** 变量类型 1-运算型变量 2-输入型变量 */
|
||||
@ApiModelProperty(value = "变量类型 1-设备物模型 2-运算型变量 3-输入型变量")
|
||||
private Integer variableType;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 周期执行(0未执行 1执行) */
|
||||
@ApiModelProperty(value = "周期执行", notes = "0=未执行,1=执行")
|
||||
private Integer cycleExecuted;
|
||||
|
||||
/** 计算公式 ${id} + ${id} */
|
||||
@ApiModelProperty(value = "计算公式 ${id} + ${id}")
|
||||
private String formule;
|
||||
|
||||
/** 显示的计算公式 A+B */
|
||||
@ApiModelProperty(value = "显示的计算公式 A+B")
|
||||
private String aliasFormule;
|
||||
|
||||
/** 时间周期方式 1-周期计算 2-自定义时间段 */
|
||||
@ApiModelProperty(value = "时间周期方式 1-周期计算 2-自定义时间段")
|
||||
private Integer cycleType;
|
||||
|
||||
/** 时间周期内容 */
|
||||
@ApiModelProperty(value = "时间周期内容")
|
||||
private String cycle;
|
||||
|
||||
/**
|
||||
* 场景关联设备id
|
||||
*/
|
||||
private Long sceneModelDeviceId;
|
||||
|
||||
/**
|
||||
* 变量运算
|
||||
*/
|
||||
private List<SceneTagPoints> tagPointsList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 启用
|
||||
*/
|
||||
private Integer enable;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sceneModelId", getSceneModelId())
|
||||
.append("name", getName())
|
||||
.append("unit", getUnit())
|
||||
.append("dataType", getDataType())
|
||||
.append("defaultValue", getDefaultValue())
|
||||
.append("isReadonly", getIsReadonly())
|
||||
.append("storage", getStorage())
|
||||
.append("variableType", getVariableType())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("cycleExecuted", getCycleExecuted())
|
||||
.append("formule", getFormule())
|
||||
.append("aliasFormule", getAliasFormule())
|
||||
.append("cycleType", getCycleType())
|
||||
.append("cycle", getCycle())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,283 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景脚本对象 iot_scene_script
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
@ApiModel(value = "SceneScript", description = "场景脚本")
|
||||
public class SceneScript
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 场景脚本ID */
|
||||
private String scriptId;
|
||||
|
||||
/** 脚本ID */
|
||||
@Excel(name = "场景ID")
|
||||
private Long sceneId;
|
||||
|
||||
/** 触发源(1=设备触发,2=定时触发,3=产品触发,4=执行告警) */
|
||||
@Excel(name = "触发源", readConverterExp = "1=设备触发,2=定时触发,3=产品触发,4=执行告警")
|
||||
private Integer source;
|
||||
|
||||
/** 脚本用途(1=数据流,2=触发器,3=执行动作) */
|
||||
private Integer scriptPurpose;
|
||||
|
||||
/** 物模型标识符 */
|
||||
private String id;
|
||||
|
||||
/** 物模型名称 */
|
||||
@Excel(name = "物模型名称")
|
||||
private String name;
|
||||
|
||||
/** 物模型值 */
|
||||
@Excel(name = "物模型值")
|
||||
private String value;
|
||||
|
||||
/** 操作符 */
|
||||
@Excel(name = "操作符")
|
||||
private String operator;
|
||||
|
||||
/** 物模型类别(1=属性,2=功能,3=事件,4=设备升级,5=设备上线,6=设备下线) */
|
||||
@Excel(name = "物模型类别", readConverterExp = "1==属性,2=功能,3=事件,4=设备升级,5=设备上线,6=设备下线")
|
||||
private Integer type;
|
||||
|
||||
/** 设备数量 */
|
||||
@Excel(name = "设备数量")
|
||||
private Integer deviceCount;
|
||||
|
||||
/** 任务ID */
|
||||
@Excel(name = "任务ID")
|
||||
private Long jobId;
|
||||
|
||||
/** cron执行表达式 */
|
||||
@Excel(name = "cron执行表达式")
|
||||
private String cronExpression;
|
||||
|
||||
/** 是否详细corn表达式(1=是,0=否) */
|
||||
@Excel(name = "是否详细corn表达式", readConverterExp = "1==是,0=否")
|
||||
private Integer isAdvance;
|
||||
|
||||
/** 父物模id */
|
||||
@Excel(name = "父物模id")
|
||||
private String parentId;
|
||||
|
||||
/** 父物模名称 */
|
||||
@Excel(name = "父物模名称")
|
||||
private String parentName;
|
||||
|
||||
/** 数组索引 */
|
||||
@Excel(name = "数组索引")
|
||||
private String arrayIndex;
|
||||
|
||||
/** 数组索引名称(前端展示使用) */
|
||||
@Excel(name = "数组索引名称", readConverterExp = "前=端展示使用")
|
||||
private String arrayIndexName;
|
||||
|
||||
/** 产品ID*/
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称*/
|
||||
private String productName;
|
||||
|
||||
/** 设备编号,仅用于传递*/
|
||||
private String[] deviceNums;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
public String getScriptId() {
|
||||
return scriptId;
|
||||
}
|
||||
|
||||
public void setScriptId(String scriptId) {
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
public Long getSceneId() {
|
||||
return sceneId;
|
||||
}
|
||||
|
||||
public void setSceneId(Long sceneId) {
|
||||
this.sceneId = sceneId;
|
||||
}
|
||||
|
||||
public Integer getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(Integer source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getDeviceCount() {
|
||||
return deviceCount;
|
||||
}
|
||||
|
||||
public void setDeviceCount(Integer deviceCount) {
|
||||
this.deviceCount = deviceCount;
|
||||
}
|
||||
|
||||
public Long getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(Long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getCronExpression() {
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression(String cronExpression) {
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public Integer getIsAdvance() {
|
||||
return isAdvance;
|
||||
}
|
||||
|
||||
public void setIsAdvance(Integer isAdvance) {
|
||||
this.isAdvance = isAdvance;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public String getArrayIndex() {
|
||||
return arrayIndex;
|
||||
}
|
||||
|
||||
public void setArrayIndex(String arrayIndex) {
|
||||
this.arrayIndex = arrayIndex;
|
||||
}
|
||||
|
||||
public String getArrayIndexName() {
|
||||
return arrayIndexName;
|
||||
}
|
||||
|
||||
public void setArrayIndexName(String arrayIndexName) {
|
||||
this.arrayIndexName = arrayIndexName;
|
||||
}
|
||||
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String[] getDeviceNums() {
|
||||
return deviceNums;
|
||||
}
|
||||
|
||||
public void setDeviceNums(String[] deviceNums) {
|
||||
this.deviceNums = deviceNums;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Integer getScriptPurpose() {
|
||||
return scriptPurpose;
|
||||
}
|
||||
|
||||
public void setScriptPurpose(Integer scriptPurpose) {
|
||||
this.scriptPurpose = scriptPurpose;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 运算型变量点对象 scene_tag_points
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class SceneTagPoints extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 运算型变量点id */
|
||||
private Long id;
|
||||
|
||||
/** 变量点名称 */
|
||||
@ApiModelProperty(value = "变量点名称")
|
||||
private String name;
|
||||
|
||||
/** 点别名,如 A */
|
||||
@ApiModelProperty(value = "点别名,如 A")
|
||||
private String alias;
|
||||
|
||||
/** 关联的变量id */
|
||||
@ApiModelProperty(value = "关联的变量id")
|
||||
private Long tagId;
|
||||
|
||||
/** 统计方式 ,用字典定义,暂时是”原值“ */
|
||||
@ApiModelProperty(value = "统计方式 ,用字典定义,暂时是”原值“")
|
||||
private Integer operation;
|
||||
|
||||
/** 数据来源方式 1-设备物模型 2-录入型变量 3-运算型变量 */
|
||||
@ApiModelProperty(value = "数据来源方式 1-设备物模型 2-录入型变量 3-运算型变量")
|
||||
private Integer variableType;
|
||||
|
||||
/** 场景变量id */
|
||||
@ApiModelProperty(value = "场景变量id")
|
||||
private Long sceneModelDataId;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 场景关联设备id
|
||||
*/
|
||||
private Long sceneModelDeviceId;
|
||||
|
||||
/**
|
||||
* 场景关联设备名称
|
||||
*/
|
||||
private String sceneModelDeviceName;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("alias", getAlias())
|
||||
.append("tagId", getTagId())
|
||||
.append("operation", getOperation())
|
||||
.append("variableType", getVariableType())
|
||||
.append("sceneModelDataId", getSceneModelDataId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规则引擎脚本对象 rule_script
|
||||
*
|
||||
* @author lizhuangpeng
|
||||
* @date 2023-07-01
|
||||
*/
|
||||
@Data
|
||||
public class Script extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 脚本ID */
|
||||
@Excel(name = "脚本ID")
|
||||
private String scriptId;
|
||||
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
|
||||
/** 用名称 */
|
||||
private String userName;
|
||||
|
||||
/** 应用名 */
|
||||
@Excel(name = "应用名")
|
||||
private String applicationName;
|
||||
|
||||
/** 脚本名 */
|
||||
@Excel(name = "脚本名")
|
||||
private String scriptName;
|
||||
|
||||
/** 脚本数据 */
|
||||
@Excel(name = "脚本数据")
|
||||
private String scriptData;
|
||||
|
||||
/** 脚本类型:script=普通脚本,switch_script=选择脚本,boolean_script=条件脚本,for_script=数量循环脚本 */
|
||||
@Excel(name = "脚本类型")
|
||||
private String scriptType;
|
||||
|
||||
/** 场景ID */
|
||||
private Long sceneId;
|
||||
|
||||
/** 脚本类型(1=设备上报,2=平台下发,3=设备上线,4=设备离线,5=http桥接数据,6=mqtt桥接数据) */
|
||||
private Integer scriptEvent;
|
||||
|
||||
/** 脚本动作(1=消息重发,2=消息通知,3=Http推送,4=Mqtt桥接,5=数据库存储) */
|
||||
private Integer scriptAction;
|
||||
|
||||
/** 脚本用途(1=数据流,2=触发器,3=执行动作) */
|
||||
private Integer scriptPurpose;
|
||||
|
||||
/** 脚本执行顺序,值越大优先级越高 */
|
||||
private Integer scriptOrder;
|
||||
|
||||
/** 脚本语言(groovy | qlexpress | js | python | lua | aviator) */
|
||||
@Excel(name = "脚本语言", readConverterExp = "groovy,qlexpress,js,python,lua,aviator")
|
||||
private String scriptLanguage;
|
||||
|
||||
/** 产品ID */
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
|
||||
private String productName;
|
||||
|
||||
/**是否生效*/
|
||||
private Integer enable;
|
||||
|
||||
private Long bridgeId;
|
||||
|
||||
private String bridgeName;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import com.fastbee.common.core.mq.message.MqttBo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 模拟设备日志对象 iot_simulate_log
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-04-06
|
||||
*/
|
||||
@ApiModel(value = "SimulateLog", description = "模拟设备日志对象 iot_simulate_log")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SimulateLog extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long logId;
|
||||
|
||||
/** 云端发送指令 */
|
||||
@ApiModelProperty("云端发送指令")
|
||||
@Excel(name = "云端发送指令")
|
||||
private String sendData;
|
||||
|
||||
/** 设备回复 */
|
||||
@ApiModelProperty("设备回复")
|
||||
@Excel(name = "设备回复")
|
||||
private String callbackData;
|
||||
|
||||
/** 设备ID */
|
||||
@ApiModelProperty("设备ID")
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@ApiModelProperty("设备名称")
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备编号 */
|
||||
@ApiModelProperty("设备编号")
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
private MqttBo send;
|
||||
private MqttBo receive;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 监控设备关联对象 iot_sip_relation
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-06-06
|
||||
*/
|
||||
@ApiModel(value = "SipRelation", description = "监控设备关联 iot_sip_relation")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SipRelation extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 监控设备编号
|
||||
*/
|
||||
@Excel(name = "监控设备编号")
|
||||
@ApiModelProperty("监控设备编号")
|
||||
private String channelId;
|
||||
|
||||
@ApiModelProperty("通道名称")
|
||||
@Excel(name = "通道名称")
|
||||
private String channelName;
|
||||
|
||||
@ApiModelProperty("产品型号")
|
||||
@Excel(name = "产品型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 关联的设备id
|
||||
*/
|
||||
@Excel(name = "关联的设备id")
|
||||
@ApiModelProperty("关联的设备id")
|
||||
private Long reDeviceId;
|
||||
|
||||
/**
|
||||
* 关联的场景id
|
||||
*/
|
||||
@Excel(name = "关联的场景id")
|
||||
@ApiModelProperty("关联的场景id")
|
||||
private Long reSceneModelId;
|
||||
|
||||
@ApiModelProperty("监控设备id")
|
||||
private Long deviceId;
|
||||
|
||||
@ApiModelProperty("sip设备编号")
|
||||
private String deviceSipId;
|
||||
|
||||
@ApiModelProperty("通道状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -0,0 +1,189 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 第三方登录平台控制对象 iot_social_platform
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-04-11
|
||||
*/
|
||||
@ApiModel(value = "SocialPlatform", description = "第三方登录平台控制对象 iot_social_platform")
|
||||
public class SocialPlatform extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 第三方登录平台主键
|
||||
*/
|
||||
@ApiModelProperty("第三方登录平台主键")
|
||||
private Long socialPlatformId;
|
||||
|
||||
/**
|
||||
* 第三方登录平台
|
||||
*/
|
||||
@ApiModelProperty("第三方登录平台")
|
||||
@Excel(name = "第三方登录平台")
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* 0、内部上线 1、上线 2、下线
|
||||
*/
|
||||
@ApiModelProperty("0、内部上线 1、上线 2、下线")
|
||||
@Excel(name = "0、内部上线 1、上线 2、下线")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 第三方平台申请Id
|
||||
*/
|
||||
@ApiModelProperty("第三方平台申请Id")
|
||||
@Excel(name = "第三方平台申请Id")
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
* 第三方平台密钥
|
||||
*/
|
||||
@ApiModelProperty("第三方平台密钥")
|
||||
@Excel(name = "第三方平台密钥")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 用户认证后跳转地址
|
||||
*/
|
||||
@ApiModelProperty("用户认证后跳转地址")
|
||||
@Excel(name = "用户认证后跳转地址")
|
||||
private String redirectUri;
|
||||
|
||||
/**
|
||||
* 删除标记位(0代表存在,2代表删除)
|
||||
*/
|
||||
@ApiModelProperty("删除标记位(0代表存在,2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 绑定注册登录uri
|
||||
*/
|
||||
@ApiModelProperty("绑定注册登录uri")
|
||||
@Excel(name = "绑定注册登录uri")
|
||||
private String bindUri;
|
||||
|
||||
/**
|
||||
* 跳转登录uri
|
||||
*/
|
||||
@ApiModelProperty("跳转登录uri")
|
||||
@Excel(name = "跳转登录uri")
|
||||
private String redirectLoginUri;
|
||||
|
||||
/**
|
||||
* 错误提示uri
|
||||
*/
|
||||
@ApiModelProperty("错误提示uri")
|
||||
@Excel(name = "错误提示uri")
|
||||
private String errorMsgUri;
|
||||
|
||||
public Long getSocialPlatformId() {
|
||||
return socialPlatformId;
|
||||
}
|
||||
|
||||
public void setSocialPlatformId(Long socialPlatformId) {
|
||||
this.socialPlatformId = socialPlatformId;
|
||||
}
|
||||
|
||||
public String getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public void setPlatform(String platform) {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getSecretKey() {
|
||||
return secretKey;
|
||||
}
|
||||
|
||||
public void setSecretKey(String secretKey) {
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
|
||||
public String getRedirectUri() {
|
||||
return redirectUri;
|
||||
}
|
||||
|
||||
public void setRedirectUri(String redirectUri) {
|
||||
this.redirectUri = redirectUri;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getBindUri() {
|
||||
return bindUri;
|
||||
}
|
||||
|
||||
public void setBindUri(String bindUri) {
|
||||
this.bindUri = bindUri;
|
||||
}
|
||||
|
||||
public String getRedirectLoginUri() {
|
||||
return redirectLoginUri;
|
||||
}
|
||||
|
||||
public void setRedirectLoginUri(String redirectLoginUri) {
|
||||
this.redirectLoginUri = redirectLoginUri;
|
||||
}
|
||||
|
||||
public String getErrorMsgUri() {
|
||||
return errorMsgUri;
|
||||
}
|
||||
|
||||
public void setErrorMsgUri(String errorMsgUri) {
|
||||
this.errorMsgUri = errorMsgUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("socialPlatformId", getSocialPlatformId())
|
||||
.append("platform", getPlatform())
|
||||
.append("status", getStatus())
|
||||
.append("clientId", getClientId())
|
||||
.append("secretKey", getSecretKey())
|
||||
.append("redirectUri", getRedirectUri())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.append("bindUri", getBindUri())
|
||||
.append("redirectLoginUri", getRedirectLoginUri())
|
||||
.append("errorMsgUri", getErrorMsgUri())
|
||||
.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 用户第三方用户信息对象 iot_social_user
|
||||
*
|
||||
* @author json
|
||||
* @date 2022-04-18
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "SocialUser", description = "用户第三方用户信息对象 iot_social_user")
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
public class SocialUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 第三方系统用户表主键 */
|
||||
@ApiModelProperty("第三方系统用户表主键")
|
||||
private Long socialUserId;
|
||||
|
||||
/** 第三方系统的唯一ID */
|
||||
@ApiModelProperty("第三方系统的唯一ID")
|
||||
@Excel(name = "第三方系统的唯一ID")
|
||||
private String uuid;
|
||||
|
||||
/** 第三方用户来源 */
|
||||
@ApiModelProperty("第三方用户来源")
|
||||
@Excel(name = "第三方用户来源")
|
||||
private String source;
|
||||
|
||||
/** 用户的授权令牌 */
|
||||
@ApiModelProperty("用户的授权令牌")
|
||||
@Excel(name = "用户的授权令牌")
|
||||
private String accessToken;
|
||||
|
||||
/** 第三方用户的授权令牌的有效期(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "第三方用户的授权令牌的有效期", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "第三方用户的授权令牌的有效期", readConverterExp = "部=分平台可能没有")
|
||||
private Long expireIn;
|
||||
|
||||
/** 刷新令牌(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "刷新令牌", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "刷新令牌(部分平台可能没有)")
|
||||
private String refreshToken;
|
||||
|
||||
/** 第三方用户的 open id(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "第三方用户的 open id", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "第三方用户的 open id", readConverterExp = "部=分平台可能没有")
|
||||
private String openId;
|
||||
|
||||
/** 第三方用户的 ID(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "第三方用户的 ID", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "第三方用户的 ID(部分平台可能没有)")
|
||||
private String uid;
|
||||
|
||||
/** 个别平台的授权信息(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "个别平台的授权信息", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "个别平台的授权信息", readConverterExp = "部=分平台可能没有")
|
||||
private String accessCode;
|
||||
|
||||
/** 第三方用户的 union id(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "第三方用户的 union id", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "第三方用户的 union id(部分平台可能没有)")
|
||||
private String unionId;
|
||||
|
||||
/** 第三方用户授予的权限(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "第三方用户授予的权限", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "第三方用户授予的权限(部分平台可能没有)")
|
||||
private String scope;
|
||||
|
||||
/** 个别平台的授权信息(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "个别平台的授权信息", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "个别平台的授权信息", readConverterExp = "部=分平台可能没有")
|
||||
private String tokenType;
|
||||
|
||||
/** id token(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "id token", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "id token", readConverterExp = "部=分平台可能没有")
|
||||
private String idToken;
|
||||
|
||||
/** 小米平台用户的附带属性(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "小米平台用户的附带属性", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "小米平台用户的附带属性", readConverterExp = "部=分平台可能没有")
|
||||
private String macAlgorithm;
|
||||
|
||||
/** 小米平台用户的附带属性(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "小米平台用户的附带属性", notes = "(部分平台可能没有) ")
|
||||
@Excel(name = "小米平台用户的附带属性(部分平台可能没有)")
|
||||
private String macKey;
|
||||
|
||||
/** 用户的授权code(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "用户的授权code", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "用户的授权code", readConverterExp = "部=分平台可能没有")
|
||||
private String code;
|
||||
|
||||
/** Twitter平台用户的附带属性(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "Twitter平台用户的附带属性", notes = "(部分平台可能没有) ")
|
||||
@Excel(name = "Twitter平台用户的附带属性(部分平台可能没有)")
|
||||
private String oauthToken;
|
||||
|
||||
/** Twitter平台用户的附带属性(部分平台可能没有) */
|
||||
@ApiModelProperty(value = "Twitter平台用户的附带属性", notes = "(部分平台可能没有)")
|
||||
@Excel(name = "Twitter平台用户的附带属性(部分平台可能没有)")
|
||||
private String oauthTokenSecret;
|
||||
|
||||
/** 删除标记位(0代表存在,2代表删除) */
|
||||
@ApiModelProperty("删除标记位")
|
||||
private String delFlag;
|
||||
|
||||
/** 绑定状态(0:未绑定,1:绑定) */
|
||||
@ApiModelProperty(value = "绑定状态", notes = "(0:未绑定,1:绑定)")
|
||||
@Excel(name = "绑定状态(0:未绑定,1:绑定)")
|
||||
private String status;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long sysUserId;
|
||||
|
||||
/** 用户名 */
|
||||
@ApiModelProperty("用户名")
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
|
||||
/** 用户昵称 */
|
||||
@ApiModelProperty("用户昵称")
|
||||
@Excel(name = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
/** 用户头像 */
|
||||
@ApiModelProperty("用户头像")
|
||||
@Excel(name = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
/** 用户性别 */
|
||||
@ApiModelProperty("用户性别")
|
||||
@Excel(name = "用户性别")
|
||||
private Integer gender;
|
||||
/** 三方登录具体来源 */
|
||||
@ApiModelProperty("三方登录具体来源")
|
||||
@Excel(name = "三方登录具体来源")
|
||||
private String sourceClient;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("socialUserId", getSocialUserId())
|
||||
.append("uuid", getUuid())
|
||||
.append("source", getSource())
|
||||
.append("accessToken", getAccessToken())
|
||||
.append("expireIn", getExpireIn())
|
||||
.append("refreshToken", getRefreshToken())
|
||||
.append("openId", getOpenId())
|
||||
.append("uid", getUid())
|
||||
.append("accessCode", getAccessCode())
|
||||
.append("unionId", getUnionId())
|
||||
.append("scope", getScope())
|
||||
.append("tokenType", getTokenType())
|
||||
.append("idToken", getIdToken())
|
||||
.append("macAlgorithm", getMacAlgorithm())
|
||||
.append("macKey", getMacKey())
|
||||
.append("code", getCode())
|
||||
.append("oauthToken", getOauthToken())
|
||||
.append("oauthTokenSecret", getOauthTokenSecret())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("status", getStatus())
|
||||
.append("sysUserId", getSysUserId())
|
||||
.append("username", getUsername())
|
||||
.append("nickname", getNickname())
|
||||
.append("avatar", getAvatar())
|
||||
.append("gender", getGender())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 网关与子设备关联对象 iot_gateway
|
||||
*
|
||||
* @author gsb
|
||||
* @date 2024-05-27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SubGateway extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 业务id */
|
||||
private Long id;
|
||||
|
||||
/** 网关设备id */
|
||||
@Excel(name = "网关设备id")
|
||||
@ApiModelProperty("网关设备id")
|
||||
private Long gwDeviceId;
|
||||
|
||||
/** 子设备id */
|
||||
@Excel(name = "子设备id")
|
||||
@ApiModelProperty("子设备id")
|
||||
private Long subDeviceId;
|
||||
|
||||
/** 从机地址 */
|
||||
@Excel(name = "从机地址")
|
||||
@ApiModelProperty("从机地址")
|
||||
private Integer slaveId;
|
||||
/**
|
||||
* 子设备名称
|
||||
*/
|
||||
private String subDeviceName;
|
||||
/**
|
||||
* 子设备编号
|
||||
*/
|
||||
private String subDeviceNo;
|
||||
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物模型对象 iot_things_model
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-01-14
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "ThingsModel", description = "物模型对象 iot_things_model")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
public class ThingsModel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 物模型ID */
|
||||
@ApiModelProperty("物模型ID")
|
||||
private Long modelId;
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("物模型名称")
|
||||
@Excel(name = "物模型名称" ,prompt = "必填")
|
||||
private String modelName;
|
||||
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("中文物模型名称_中文")
|
||||
private String modelName_zh_CN;
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("英文物模型名称")
|
||||
private String modelName_en_US;
|
||||
|
||||
/** 产品ID */
|
||||
@ApiModelProperty("产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@ApiModelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 标识符,产品下唯一 */
|
||||
@ApiModelProperty("标识符,产品下唯一")
|
||||
@Excel(name = "标识符",prompt = "modbus不填默认为寄存器地址")
|
||||
private String identifier;
|
||||
|
||||
/** 模型类别(1-属性,2-功能,3-事件) */
|
||||
@ApiModelProperty(value = "模型类别", notes = "(1-属性,2-功能,3-事件)")
|
||||
@Excel(name = "模型类别", readConverterExp = "1=属性,2=功能,3=事件,4=属性和功能",
|
||||
prompt ="1=属性,2-功能,3-事件")
|
||||
private Integer type;
|
||||
|
||||
/** 计算公式 */
|
||||
@ApiModelProperty("计算公式")
|
||||
@Excel(name = "计算公式",prompt = "选填,例如:%s*10,%s是占位符")
|
||||
private String formula;
|
||||
|
||||
/** 数据定义 */
|
||||
//@Excel(name = "数据定义")
|
||||
@ApiModelProperty("数据定义")
|
||||
private String specs;
|
||||
|
||||
/** 是否图表显示(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否图表显示", notes = "(0-否,1-是)")
|
||||
@Excel(name = "是否图表显示", readConverterExp = "0=否,1=是")
|
||||
private Integer isChart;
|
||||
|
||||
/** 是否历史存储(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否历史存储", notes = "(0-否,1-是)")
|
||||
@Excel(name = "是否历史存储", readConverterExp = "0=否,1=是")
|
||||
private Integer isHistory;
|
||||
|
||||
/** 是否实时监测(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否实时监测", notes = "(0-否,1-是) ")
|
||||
@Excel(name = "是否实时监测", readConverterExp = "0=否,1=是")
|
||||
private Integer isMonitor;
|
||||
|
||||
/** 是否分享设备权限(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否分享设备权限", notes = "(0-否,1-是) ")
|
||||
private Integer isSharePerm;
|
||||
|
||||
/** 是否分享设备权限(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否分享设备权限", notes = "(0-否,1-是) ")
|
||||
@Excel(name = "是否分享设备权限", readConverterExp = "0=否,1=是")
|
||||
private Integer isApp;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志")
|
||||
private String delFlag;
|
||||
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 数据类型(integer、decimal、string、bool、array、enum) */
|
||||
@ApiModelProperty(value = "数据类型", notes = "(integer、decimal、string、bool、array、enum)")
|
||||
@Excel(name = "数据类型", prompt = "integer、decimal、string、bool、array、enum")
|
||||
private String datatype;
|
||||
|
||||
@Excel(name = "有效值范围")
|
||||
private String limitValue;
|
||||
|
||||
/** 是否只读数据(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否只读数据", notes = "(0-否,1-是)")
|
||||
@Excel(name = "是否只读", readConverterExp = "0=否,1=是",prompt = "0=否,1=是")
|
||||
private Integer isReadonly;
|
||||
|
||||
|
||||
private Integer modelOrder;
|
||||
|
||||
private ModbusConfig modbusConfig;
|
||||
|
||||
@Deprecated
|
||||
private String language;
|
||||
|
||||
private List<String> modelIdList;
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 通用物模型对象 iot_things_model_template
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-01-15
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ThingsModelJsonTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 物模型ID */
|
||||
private Long templateId;
|
||||
|
||||
/** 物模型名称 */
|
||||
@Excel(name = "物模型名称",prompt = "必填")
|
||||
private String templateName;
|
||||
|
||||
/** 标识符,产品下唯一 */
|
||||
@Excel(name = "标识符",prompt = "modbus不填,默认为寄存器地址")
|
||||
private String identifier;
|
||||
|
||||
/** 模型类别(1-属性,2-功能,3-事件) */
|
||||
@Excel(name = "模型类别", readConverterExp = "1=属性,2=功能,3=事件",prompt ="1=属性,2=功能,3=事件")
|
||||
private Integer type;
|
||||
|
||||
/** 数据类型(integer、decimal、string、bool、array、enum) */
|
||||
@Excel(name = "数据类型", prompt = "integer、decimal、string、bool、array、enum")
|
||||
private String datatype;
|
||||
|
||||
/** 计算公式 */
|
||||
@Excel(name = "计算公式",prompt = "选填,例如:%s*10,%s是占位符")
|
||||
private String formula;
|
||||
|
||||
@Excel(name = "有效值范围")
|
||||
private String limitValue;
|
||||
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 是否只读数据(0-否,1-是) */
|
||||
@Excel(name = "是否只读",readConverterExp = "0=否,1=是",prompt = "0=否,1=是")
|
||||
private Integer isReadonly;
|
||||
|
||||
/** 是否历史存储(0-否,1-是) */
|
||||
@Excel(name = "是否历史存储(0-否,1-是)")
|
||||
private Integer isHistory;
|
||||
|
||||
/** 是否首页显示(0-否,1-是) */
|
||||
@Excel(name = "是否首页显示", readConverterExp = "0=否,1=是")
|
||||
private Integer isChart;
|
||||
|
||||
/** 是否实时监测(0-否,1-是) */
|
||||
@Excel(name = "是否实时监测", readConverterExp = "0=否,1=是")
|
||||
private Integer isMonitor;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 通用物模型对象 iot_things_model_template
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-01-15
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "ThingsModelTemplate", description = "通用物模型对象 iot_things_model_template")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
public class ThingsModelTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 物模型ID */
|
||||
@ApiModelProperty("物模型ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 物模型名称 */
|
||||
@ApiModelProperty("物模型名称")
|
||||
@Excel(name = "物模型名称" ,prompt = "必填")
|
||||
private String templateName;
|
||||
|
||||
/** 租户ID */
|
||||
@ApiModelProperty("租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@ApiModelProperty("租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 标识符,产品下唯一 */
|
||||
@ApiModelProperty("标识符,产品下唯一")
|
||||
@Excel(name = "标识符",prompt = "modbus不填,默认为寄存器地址")
|
||||
private String identifier;
|
||||
|
||||
/** 模型类别(1-属性,2-功能,3-事件) */
|
||||
@ApiModelProperty(value = "模型类别", notes = "(1-属性,2-功能,3-事件)")
|
||||
@Excel(name = "模型类别", readConverterExp = "1=属性,2=功能,3=事件",prompt ="1=属性,2-功能,3-事件")
|
||||
private Integer type;
|
||||
|
||||
/** 计算公式 */
|
||||
@ApiModelProperty("计算公式")
|
||||
@Excel(name = "计算公式",prompt = "选填,例如:%s*10,%s是占位符")
|
||||
private String formula;
|
||||
|
||||
/** 数据定义 */
|
||||
@ApiModelProperty("数据定义")
|
||||
private String specs;
|
||||
|
||||
/** 是否系统通用(0-否,1-是) */
|
||||
@ApiModelProperty("是否系统通用(0-否,1-是)")
|
||||
private Integer isSys;
|
||||
|
||||
|
||||
/** 是否图表显示(0-否,1-是) */
|
||||
@ApiModelProperty("是否图表显示(0-否,1-是)")
|
||||
//@Excel(name = "是否图表显示", readConverterExp = "0=否,1=是")
|
||||
private Integer isChart;
|
||||
|
||||
/** 是否历史存储(0-否,1-是) */
|
||||
@ApiModelProperty("是否历史存储(0-否,1-是)")
|
||||
@Excel(name = "是否历史存储", readConverterExp = "0=否,1=是")
|
||||
private Integer isHistory;
|
||||
|
||||
/** 是否实时监测(0-否,1-是) */
|
||||
@ApiModelProperty("是否实时监测(0-否,1-是)")
|
||||
private Integer isMonitor;
|
||||
|
||||
/** 是否分享设备权限(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否分享设备权限", notes = "(0-否,1-是) ")
|
||||
private Integer isSharePerm;
|
||||
|
||||
|
||||
/** 是否分享设备权限(0-否,1-是) */
|
||||
@ApiModelProperty(value = "是否分享设备权限", notes = "(0-否,1-是) ")
|
||||
@Excel(name = "是否分享设备权限", readConverterExp = "0=否,1=是")
|
||||
private Integer isApp;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ApiModelProperty("删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 数据类型(integer、decimal、string、bool、array、enum) */
|
||||
@ApiModelProperty(value = "数据类型", notes = "(integer、decimal、string、bool、array、enum)")
|
||||
@Excel(name = "数据类型", prompt = "integer、decimal、string、bool、array、enum")
|
||||
private String datatype;
|
||||
|
||||
@ApiModelProperty("有效值范围")
|
||||
@Excel(name = "有效值范围")
|
||||
private String limitValue;
|
||||
|
||||
/** 是否只读数据(0-否,1-是) */
|
||||
@ApiModelProperty("是否只读数据(0-否,1-是)")
|
||||
@Excel(name = "是否只读", readConverterExp = "0=否,1=是",prompt = "0=否,1=是")
|
||||
private Integer isReadonly;
|
||||
|
||||
private Integer modelOrder;
|
||||
|
||||
private String language;
|
||||
|
||||
/**
|
||||
* 同一租户或用户为true
|
||||
*/
|
||||
private Boolean owner;
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
public class UserSocialProfile {
|
||||
/**
|
||||
* 第三方系统用户表主键
|
||||
*/
|
||||
private Long socialUserId;
|
||||
|
||||
/**
|
||||
* 第三方用户来源
|
||||
*/
|
||||
@Excel(name = "第三方用户来源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@Excel(name = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
@Excel(name = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 绑定状态(0:未绑定,1:绑定)
|
||||
*/
|
||||
@Excel(name = "绑定状态(0:未绑定,1:绑定)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 第三方具体来源
|
||||
*/
|
||||
private String sourceClient;
|
||||
|
||||
public String getSourceClient() {
|
||||
return sourceClient;
|
||||
}
|
||||
|
||||
public void setSourceClient(String sourceClient) {
|
||||
this.sourceClient = sourceClient;
|
||||
}
|
||||
|
||||
public Long getSocialUserId() {
|
||||
return socialUserId;
|
||||
}
|
||||
|
||||
public void setSocialUserId(Long socialUserId) {
|
||||
this.socialUserId = socialUserId;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("socialUserId", getSocialUserId())
|
||||
.append("source", getSource())
|
||||
.append("status", getStatus())
|
||||
.append("username", getUsername())
|
||||
.append("nickname", getNickname())
|
||||
.append("avatar", getAvatar())
|
||||
.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package com.fastbee.iot.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 界面可视化配置对象 iot_view_config
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-11-15
|
||||
*/
|
||||
public class ViewConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 可视化配置ID */
|
||||
private Long viewId;
|
||||
|
||||
/** 可视化配置数据 */
|
||||
@Excel(name = "可视化配置数据")
|
||||
private String viewData;
|
||||
|
||||
/** 产品ID */
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 产品名称 */
|
||||
@Excel(name = "产品名称")
|
||||
private String productName;
|
||||
|
||||
/** 租户ID */
|
||||
@Excel(name = "租户ID")
|
||||
private Long tenantId;
|
||||
|
||||
/** 租户名称 */
|
||||
@Excel(name = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setViewId(Long viewId)
|
||||
{
|
||||
this.viewId = viewId;
|
||||
}
|
||||
|
||||
public Long getViewId()
|
||||
{
|
||||
return viewId;
|
||||
}
|
||||
public void setViewData(String viewData)
|
||||
{
|
||||
this.viewData = viewData;
|
||||
}
|
||||
|
||||
public String getViewData()
|
||||
{
|
||||
return viewData;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setTenantName(String tenantName)
|
||||
{
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantName()
|
||||
{
|
||||
return tenantName;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("viewId", getViewId())
|
||||
.append("viewData", getViewData())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.fastbee.iot.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum DeviceType {
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(0, "未知"),
|
||||
/**
|
||||
* 直连设备
|
||||
*/
|
||||
DIRECT_DEVICE(1, "直连设备"),
|
||||
/**
|
||||
* 网关设备
|
||||
*/
|
||||
GATEWAY(2, "网关设备"),
|
||||
/**
|
||||
* 监控设备
|
||||
*/
|
||||
CAMERA(3, "监控设备"),
|
||||
/**
|
||||
* 网关子设备
|
||||
*/
|
||||
SUB_GATEWAY(4,"网关子设备");
|
||||
|
||||
private int code;
|
||||
private String desc;
|
||||
|
||||
public static DeviceType transfer(Integer code){
|
||||
for (DeviceType value : DeviceType.values()) {
|
||||
if (value.code == code){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return DeviceType.DIRECT_DEVICE;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.AlertLog;
|
||||
import com.fastbee.iot.model.DeviceAlertCount;
|
||||
import com.fastbee.iot.model.AlertCountVO;
|
||||
import com.fastbee.iot.model.param.DataCenterParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备告警Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
@Repository
|
||||
public interface AlertLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备告警
|
||||
*
|
||||
* @param alertLogId 设备告警主键
|
||||
* @return 设备告警
|
||||
*/
|
||||
public AlertLog selectAlertLogByAlertLogId(Long alertLogId);
|
||||
|
||||
/**
|
||||
* 查询设备告警列表
|
||||
*
|
||||
* @param alertLog 设备告警
|
||||
* @return 设备告警集合
|
||||
*/
|
||||
public List<AlertLog> selectAlertLogList(AlertLog alertLog);
|
||||
|
||||
/**
|
||||
* 查询设备告警列表总数
|
||||
*
|
||||
* @param alertLog 设备告警
|
||||
* @return 设备告警集合
|
||||
*/
|
||||
public Long selectAlertLogListCount(AlertLog alertLog);
|
||||
|
||||
public List<DeviceAlertCount> selectDeviceAlertCount();
|
||||
public DeviceAlertCount selectDeviceAlertCountBySN(String serialNumber);
|
||||
public List<DeviceAlertCount> selectSceneAlertCount();
|
||||
public DeviceAlertCount selectSceneAlertCountBySceneId(String sceneId);
|
||||
/**
|
||||
* 新增设备告警
|
||||
*
|
||||
* @param alertLog 设备告警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertLog(AlertLog alertLog);
|
||||
|
||||
/**
|
||||
* 新增设备告警
|
||||
*
|
||||
* @param alertLogList 设备告警集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlertLogBatch(List<AlertLog> alertLogList);
|
||||
|
||||
/**
|
||||
* 修改设备告警
|
||||
*
|
||||
* @param alertLog 设备告警
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlertLog(AlertLog alertLog);
|
||||
public int updateAlertLogStatus(AlertLog alertLog);
|
||||
/**
|
||||
* 删除设备告警
|
||||
*
|
||||
* @param alertLogId 设备告警主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertLogByAlertLogId(Long alertLogId);
|
||||
|
||||
/**
|
||||
* 根据设备编号删除设备告警
|
||||
*
|
||||
* @param serialNumber 设备告警主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertLogBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 批量删除设备告警
|
||||
*
|
||||
* @param alertLogIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertLogByAlertLogIds(Long[] alertLogIds);
|
||||
|
||||
/**
|
||||
* 统计告警处理信息
|
||||
* @param dataCenterParam 传参
|
||||
* @return com.fastbee.iot.model.AlertCountVO
|
||||
*/
|
||||
List<AlertCountVO> countAlertProcess(DataCenterParam dataCenterParam);
|
||||
|
||||
/**
|
||||
* 统计告警级别信息
|
||||
* @param dataCenterParam 传参
|
||||
* @return com.fastbee.iot.model.AlertCountVO
|
||||
*/
|
||||
List<AlertCountVO> countAlertLevel(DataCenterParam dataCenterParam);
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Alert;
|
||||
import com.fastbee.iot.domain.AlertNotifyTemplate;
|
||||
import com.fastbee.iot.domain.AlertScene;
|
||||
import com.fastbee.iot.domain.Scene;
|
||||
import com.fastbee.iot.model.AlertSceneSendVO;
|
||||
import com.fastbee.notify.domain.NotifyTemplate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备告警Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
@Repository
|
||||
public interface AlertMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备告警
|
||||
*
|
||||
* @param alertId 设备告警主键
|
||||
* @return 设备告警
|
||||
*/
|
||||
public Alert selectAlertByAlertId(Long alertId);
|
||||
|
||||
/**
|
||||
* 查询设备告警列表
|
||||
*
|
||||
* @param alert 设备告警
|
||||
* @return 设备告警集合
|
||||
*/
|
||||
public List<Alert> selectAlertList(Alert alert);
|
||||
|
||||
/**
|
||||
* 获取告警关联的场景列表
|
||||
* @param alertId
|
||||
* @return
|
||||
*/
|
||||
public List<Scene> selectScenesByAlertId(Long alertId);
|
||||
|
||||
/**
|
||||
* 新增设备告警
|
||||
*
|
||||
* @param alert 设备告警
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAlert(Alert alert);
|
||||
|
||||
/**
|
||||
* 修改设备告警
|
||||
*
|
||||
* @param alert 设备告警
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAlert(Alert alert);
|
||||
|
||||
/**
|
||||
* 删除设备告警
|
||||
*
|
||||
* @param alertId 设备告警主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertByAlertId(Long alertId);
|
||||
|
||||
/**
|
||||
* 批量删除设备告警
|
||||
*
|
||||
* @param alertIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAlertByAlertIds(Long[] alertIds);
|
||||
|
||||
/**
|
||||
* 修改设备告警状态
|
||||
* @param alertId 告警id
|
||||
* @param status 状态
|
||||
* @return 结果
|
||||
*/
|
||||
int updateAlertStatus(@Param("alertId") Long alertId, @Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* 批量插入告警场景
|
||||
* @param alerts
|
||||
* @return
|
||||
*/
|
||||
public int insertAlertSceneList(List<AlertScene> alerts);
|
||||
|
||||
/**
|
||||
* 根据告警ID批量删除告警场景
|
||||
* @param alertIds
|
||||
* @return
|
||||
*/
|
||||
public int deleteAlertSceneByAlertIds(Long[] alertIds);
|
||||
|
||||
/**
|
||||
* 根据场景ID批量删除告警场景
|
||||
* @param sceneIds
|
||||
* @return
|
||||
*/
|
||||
public int deleteAlertSceneBySceneIds(Long[] sceneIds);
|
||||
|
||||
/**
|
||||
* 批量插入告警通知模版
|
||||
* @param alertNotifyTemplateList
|
||||
* @return
|
||||
*/
|
||||
public int insertAlertNotifyTemplateList(List<AlertNotifyTemplate> alertNotifyTemplateList);
|
||||
|
||||
/**
|
||||
* 根据告警ID批量删除告警场景
|
||||
* @param alertIds
|
||||
* @return
|
||||
*/
|
||||
public int deleteAlertNotifyTemplateByAlertIds(Long[] alertIds);
|
||||
|
||||
/**
|
||||
* 查询告警通知模版
|
||||
* @param alertId 告警id
|
||||
* @return java.util.List<com.fastbee.iot.domain.AlertNotifyTemplate>
|
||||
*/
|
||||
List<AlertNotifyTemplate> selectAlertNotifyTemplateList(Long alertId);
|
||||
|
||||
/**
|
||||
* 获取告警关联的通知模版列表
|
||||
* @param alertId 告警id
|
||||
* @return
|
||||
*/
|
||||
public List<NotifyTemplate> selectNotifyTemplateListByAlertId(Long alertId);
|
||||
|
||||
/**
|
||||
* 获取场景关联的告警列表
|
||||
* @param sceneId 场景id
|
||||
* @return java.util.List<com.fastbee.iot.domain.AlertScene>
|
||||
*/
|
||||
List<AlertScene> selectAlertSceneListBySceneId(Long sceneId);
|
||||
|
||||
/**
|
||||
* 获取场景告警通知参数
|
||||
*
|
||||
* @param sceneId 场景id
|
||||
* @return 设备告警集合
|
||||
*/
|
||||
List<AlertSceneSendVO> listByAlertIds(Long sceneId);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.Bridge;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 数据桥接Mapper接口
|
||||
*
|
||||
* @author zhuangpeng.li
|
||||
* @date 2024-06-06
|
||||
*/
|
||||
@Repository
|
||||
public interface BridgeMapper
|
||||
{
|
||||
/**
|
||||
* 查询数据桥接
|
||||
*
|
||||
* @param id 数据桥接主键
|
||||
* @return 数据桥接
|
||||
*/
|
||||
public Bridge selectBridgeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询数据桥接列表
|
||||
*
|
||||
* @param bridge 数据桥接
|
||||
* @return 数据桥接集合
|
||||
*/
|
||||
public List<Bridge> selectBridgeList(Bridge bridge);
|
||||
|
||||
/**
|
||||
* 新增数据桥接
|
||||
*
|
||||
* @param bridge 数据桥接
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBridge(Bridge bridge);
|
||||
|
||||
/**
|
||||
* 修改数据桥接
|
||||
*
|
||||
* @param bridge 数据桥接
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBridge(Bridge bridge);
|
||||
|
||||
/**
|
||||
* 删除数据桥接
|
||||
*
|
||||
* @param id 数据桥接主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBridgeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除数据桥接
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBridgeByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Category;
|
||||
import com.fastbee.iot.model.IdAndName;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品分类Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface CategoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品分类
|
||||
*
|
||||
* @param categoryId 产品分类主键
|
||||
* @return 产品分类
|
||||
*/
|
||||
public Category selectCategoryByCategoryId(Long categoryId);
|
||||
|
||||
/**
|
||||
* 查询产品分类列表
|
||||
*
|
||||
* @param category 产品分类
|
||||
* @return 产品分类集合
|
||||
*/
|
||||
public List<Category> selectCategoryList(Category category);
|
||||
|
||||
/**
|
||||
* 查询产品简短分类列表
|
||||
*
|
||||
* @return 产品分类集合
|
||||
*/
|
||||
public List<IdAndName> selectCategoryShortList(Category category);
|
||||
|
||||
/**
|
||||
* 新增产品分类
|
||||
*
|
||||
* @param category 产品分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCategory(Category category);
|
||||
|
||||
/**
|
||||
* 修改产品分类
|
||||
*
|
||||
* @param category 产品分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCategory(Category category);
|
||||
|
||||
/**
|
||||
* 删除产品分类
|
||||
*
|
||||
* @param categoryId 产品分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryByCategoryId(Long categoryId);
|
||||
|
||||
/**
|
||||
* 批量删除产品分类
|
||||
*
|
||||
* @param categoryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryByCategoryIds(Long[] categoryIds);
|
||||
|
||||
/**
|
||||
* 分类下的产品数量
|
||||
*
|
||||
* @param categoryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int productCountInCategorys(Long[] categoryIds);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.CommandPreferences;
|
||||
|
||||
/**
|
||||
* 指令偏好设置Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-06-29
|
||||
*/
|
||||
public interface CommandPreferencesMapper
|
||||
{
|
||||
/**
|
||||
* 查询指令偏好设置
|
||||
*
|
||||
* @param id 指令偏好设置主键
|
||||
* @return 指令偏好设置
|
||||
*/
|
||||
public CommandPreferences selectCommandPreferencesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询指令偏好设置列表
|
||||
*
|
||||
* @param commandPreferences 指令偏好设置
|
||||
* @return 指令偏好设置集合
|
||||
*/
|
||||
public List<CommandPreferences> selectCommandPreferencesList(CommandPreferences commandPreferences);
|
||||
|
||||
/**
|
||||
* 新增指令偏好设置
|
||||
*
|
||||
* @param commandPreferences 指令偏好设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommandPreferences(CommandPreferences commandPreferences);
|
||||
|
||||
/**
|
||||
* 修改指令偏好设置
|
||||
*
|
||||
* @param commandPreferences 指令偏好设置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommandPreferences(CommandPreferences commandPreferences);
|
||||
|
||||
/**
|
||||
* 删除指令偏好设置
|
||||
*
|
||||
* @param id 指令偏好设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommandPreferencesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除指令偏好设置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommandPreferencesByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.DeviceAlertUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备告警用户Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-15
|
||||
*/
|
||||
public interface DeviceAlertUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备告警用户
|
||||
*
|
||||
* @param deviceId 设备告警用户主键
|
||||
* @return 设备告警用户
|
||||
*/
|
||||
public DeviceAlertUser selectDeviceAlertUserByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备告警用户列表
|
||||
*
|
||||
* @param deviceAlertUser 设备告警用户
|
||||
* @return 设备告警用户集合
|
||||
*/
|
||||
public List<DeviceAlertUser> selectDeviceAlertUserList(DeviceAlertUser deviceAlertUser);
|
||||
|
||||
/**
|
||||
* 新增设备告警用户
|
||||
*
|
||||
* @param deviceAlertUser 设备告警用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceAlertUser(DeviceAlertUser deviceAlertUser);
|
||||
|
||||
/**
|
||||
* 修改设备告警用户
|
||||
*
|
||||
* @param deviceAlertUser 设备告警用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceAlertUser(DeviceAlertUser deviceAlertUser);
|
||||
|
||||
/**
|
||||
* 删除设备告警用户
|
||||
*
|
||||
* @param deviceId 设备告警用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceAlertUserByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 批量删除设备告警用户
|
||||
*
|
||||
* @param deviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceAlertUserByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 删除设备告警用户
|
||||
* @param deviceId 设备id
|
||||
* @param: userId 用户id
|
||||
* @return int
|
||||
*/
|
||||
int deleteByDeviceIdAndUserId(@Param("deviceId") Long deviceId, @Param("userId") Long userId);
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.DeviceJob;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 调度任务信息 数据层
|
||||
*
|
||||
* @author kerwincui
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceJobMapper
|
||||
{
|
||||
/**
|
||||
* 查询调度任务日志集合
|
||||
*
|
||||
* @param job 调度信息
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<DeviceJob> selectJobList(DeviceJob job);
|
||||
|
||||
/**
|
||||
* 根据设备Ids查询调度任务日志集合
|
||||
*
|
||||
* @param deviceIds 设备ID数组
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<DeviceJob> selectShortJobListByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 根据告警Ids查询调度任务日志集合
|
||||
*
|
||||
* @param alertIds 告警ID数组
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<DeviceJob> selectShortJobListByAlertIds(Long[] alertIds);
|
||||
|
||||
/**
|
||||
* 根据场景Ids查询调度任务日志集合
|
||||
*
|
||||
* @param sceneIds 场景ID数组
|
||||
* @return 操作日志集合
|
||||
*/
|
||||
public List<DeviceJob> selectShortJobListBySceneIds(Long[] sceneIds);
|
||||
|
||||
/**
|
||||
* 查询所有调度任务
|
||||
*
|
||||
* @return 调度任务列表
|
||||
*/
|
||||
public List<DeviceJob> selectJobAll();
|
||||
|
||||
/**
|
||||
* 通过调度ID查询调度任务信息
|
||||
*
|
||||
* @param jobId 调度ID
|
||||
* @return 角色对象信息
|
||||
*/
|
||||
public DeviceJob selectJobById(Long jobId);
|
||||
|
||||
/**
|
||||
* 通过调度ID删除调度任务信息
|
||||
*
|
||||
* @param jobId 调度ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobById(Long jobId);
|
||||
|
||||
/**
|
||||
* 批量删除调度任务信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据设备Ids批量删除调度任务信息
|
||||
*
|
||||
* @param deviceIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 根据告警Ids批量删除调度任务信息
|
||||
*
|
||||
* @param alertIds 需要删除的告警IDs
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobByAlertIds(Long[] alertIds);
|
||||
|
||||
/**
|
||||
* 根据场景联动Ids批量删除调度任务信息
|
||||
*
|
||||
* @param sceneIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobBySceneIds(Long[] sceneIds);
|
||||
|
||||
/**
|
||||
* 修改调度任务信息
|
||||
*
|
||||
* @param job 调度任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJob(DeviceJob job);
|
||||
|
||||
/**
|
||||
* 新增调度任务信息
|
||||
*
|
||||
* @param job 调度任务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJob(DeviceJob job);
|
||||
|
||||
/**
|
||||
* 批量查询定时任务
|
||||
* @param datasourceIds 源数据id集合
|
||||
* @param: jobType 定时任务类型
|
||||
* @return java.util.List<com.fastbee.iot.domain.DeviceJob>
|
||||
*/
|
||||
List<DeviceJob> selectListByJobTypeAndDatasourceIds(@Param("datasourceIds") Long[] datasourceIds, @Param("jobType") int jobType);
|
||||
|
||||
/**
|
||||
* 批量删除定时任务
|
||||
* @param datasourceIds 源数据id集合
|
||||
* @param: jobType 类型
|
||||
* @return int
|
||||
*/
|
||||
int deleteJobByJobTypeAndDatasourceIds(@Param("datasourceIds") Long[] datasourceIds, @Param("jobType") int jobType);
|
||||
|
||||
/**
|
||||
* 根据条件批量删除定时任务
|
||||
*/
|
||||
void deleteJobByJobTypeAndDeviceId(@Param("deviceId") Long deviceId, @Param("jobType") int jobType);
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.DeviceLog;
|
||||
import com.fastbee.iot.model.DeviceStatistic;
|
||||
import com.fastbee.iot.model.HistoryModel;
|
||||
import com.fastbee.iot.model.MonitorModel;
|
||||
import com.fastbee.iot.model.ThingsModelLogCountVO;
|
||||
import com.fastbee.iot.model.param.DataCenterParam;
|
||||
import com.fastbee.iot.tdengine.service.model.TdLogDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备日志Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-01-13
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备日志
|
||||
*
|
||||
* @param logId 设备日志主键
|
||||
* @return 设备日志
|
||||
*/
|
||||
public DeviceLog selectDeviceLogByLogId(Long logId);
|
||||
|
||||
/**
|
||||
* 查询日志分类总数
|
||||
*
|
||||
* @return 设备日志
|
||||
*/
|
||||
public DeviceStatistic selectCategoryLogCount(Device device);
|
||||
|
||||
/**
|
||||
* 查询设备日志列表
|
||||
*
|
||||
* @param deviceLog 设备日志
|
||||
* @return 设备日志集合
|
||||
*/
|
||||
public List<DeviceLog> selectDeviceLogList(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 查询设备监测数据
|
||||
*
|
||||
* @param deviceLog 设备日志
|
||||
* @return 设备日志集合
|
||||
*/
|
||||
public List<MonitorModel> selectMonitorList(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 新增设备日志
|
||||
*
|
||||
* @param deviceLog 设备日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceLog(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 批量保存图片
|
||||
*/
|
||||
public int saveBatch(@Param("list") List<DeviceLog> list);
|
||||
|
||||
/**
|
||||
* 修改设备日志
|
||||
*
|
||||
* @param deviceLog 设备日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceLog(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 删除设备日志
|
||||
*
|
||||
* @param logId 设备日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceLogByLogId(Long logId);
|
||||
|
||||
/**
|
||||
* 批量删除设备日志
|
||||
*
|
||||
* @param logIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceLogByLogIds(Long[] logIds);
|
||||
|
||||
/**
|
||||
* 根据设备Ids批量删除设备日志
|
||||
*
|
||||
* @param deviceNumber 需要删除的数据设备Id
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceLogByDeviceNumber(String deviceNumber);
|
||||
|
||||
/**
|
||||
* 查询历史数据
|
||||
*/
|
||||
public List<HistoryModel> selectHistoryList(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 查询物模型历史数据
|
||||
* @param deviceLog 设备日志
|
||||
* @return java.util.List<com.fastbee.iot.model.HistoryModel>
|
||||
*/
|
||||
List<HistoryModel> listHistory(DeviceLog deviceLog);
|
||||
|
||||
List<HistoryModel> listhistoryGroupByCreateTime(DeviceLog deviceLog);
|
||||
|
||||
DeviceLog selectLastReport(DeviceLog deviceLog);
|
||||
/**
|
||||
* 场景统计变量历史值
|
||||
* @param deviceLog 实体类
|
||||
* @return java.lang.String
|
||||
*/
|
||||
List<String> selectStatsValue(DeviceLog deviceLog);
|
||||
|
||||
/**
|
||||
* 统计设备物模型指令下发数量
|
||||
* @param dataCenterParam 传参
|
||||
* @return com.fastbee.common.core.domain.AjaxResult
|
||||
*/
|
||||
List<ThingsModelLogCountVO> countThingsModelInvoke(DataCenterParam dataCenterParam);
|
||||
}
|
@ -0,0 +1,366 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.common.core.device.DeviceAndProtocol;
|
||||
import com.fastbee.common.core.thingsModel.ThingsModelValuesInput;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.DeviceGroup;
|
||||
import com.fastbee.iot.model.*;
|
||||
import com.fastbee.iot.model.ThingsModels.ThingsModelValuesOutput;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 设备Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public Device selectDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备和产品总数
|
||||
*
|
||||
* @return 设备
|
||||
*/
|
||||
public DeviceStatistic selectDeviceProductAlertCount(Long deptId);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询设备
|
||||
*
|
||||
* @param serialNumber 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public Device selectDeviceBySerialNumber(String serialNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 根据设备编号查询设备数量
|
||||
*
|
||||
* @param serialNumber 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public int selectDeviceCountBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询简介设备
|
||||
*
|
||||
* @param serialNumber 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public Device selectShortDeviceBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询设备认证信息
|
||||
*
|
||||
* @param model 设备编号和产品ID
|
||||
* @return 设备
|
||||
*/
|
||||
public ProductAuthenticateModel selectProductAuthenticate(AuthenticateInputModel model);
|
||||
|
||||
/**
|
||||
* 查询设备和运行状态
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public DeviceShortOutput selectDeviceRunningStatusByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备的物模型值
|
||||
*
|
||||
* @param serialNumber 设备编号
|
||||
* @return 设备
|
||||
*/
|
||||
public ThingsModelValuesOutput selectDeviceThingsModelValueBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 修改设备的物模型值
|
||||
*
|
||||
* @param input 设备ID和物模型值
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceThingsModelValue(ThingsModelValuesInput input);
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<Device> selectDeviceList(Device device);
|
||||
|
||||
/**
|
||||
* 查询未分配授权码设备列表
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<Device> selectUnAuthDeviceList(Device device);
|
||||
|
||||
/**
|
||||
* 查询分组可添加设备分页列表
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<Device> selectDeviceListByGroup(Device device);
|
||||
|
||||
/**
|
||||
* 查询设备简短列表
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<DeviceShortOutput> selectDeviceShortList(Device device);
|
||||
|
||||
/**
|
||||
* 查询所有设备简短列表
|
||||
*
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<DeviceAllShortOutput> selectAllDeviceShortList(Device device);
|
||||
|
||||
/**
|
||||
* 根据产品ID查询产品下所有设备的编号
|
||||
*
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<String> selectSerialNumberByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 获取产品下面的设备数量
|
||||
*
|
||||
* @param productId 产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int selectDeviceCountByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDevice(Device device);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDevice(Device device);
|
||||
|
||||
/**
|
||||
* 更新设备状态
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceStatus(Device device);
|
||||
|
||||
/**
|
||||
* 更新固件版本
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
public int updateDeviceFirmwareVersion(Device device);
|
||||
|
||||
/**
|
||||
* 通过设备编号修改设备
|
||||
*
|
||||
* @param device 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceBySerialNumber(Device device);
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @param deviceId 设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param deviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 查询设备序列号的数量
|
||||
* @param deviceNum
|
||||
* @return
|
||||
*/
|
||||
public int getDeviceNumCount(String deviceNum);
|
||||
|
||||
/**
|
||||
* 根据设备IDS删除设备分组
|
||||
* @param userDeviceGroupIdModel
|
||||
* @return
|
||||
*/
|
||||
public int deleteDeviceGroupByDeviceId(UserIdDeviceIdModel userDeviceGroupIdModel);
|
||||
|
||||
/**
|
||||
* 重置设备状态
|
||||
* @return 结果
|
||||
*/
|
||||
public int resetDeviceStatus(String deviceNum);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询协议编码
|
||||
* @param serialNumber 设备编号
|
||||
* @return
|
||||
*/
|
||||
public DeviceAndProtocol selectProtocolBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 查询产品下所有设备,返回设备编号
|
||||
* @param productId 产品id
|
||||
* @return
|
||||
*/
|
||||
public List<Device> selectDevicesByProductId(@Param("productId") Long productId,@Param("hasSub") Integer hasSub);
|
||||
|
||||
/**
|
||||
* 批量更新设备上线
|
||||
* @param devices 设备ids
|
||||
*/
|
||||
public void batchChangeOnline(List<String> devices);
|
||||
|
||||
/**
|
||||
* 批量更新设备下线
|
||||
* @param devices 设备ids
|
||||
*/
|
||||
public void batchChangeOffline(List<String> devices);
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备MQTT连接参数
|
||||
* @param deviceId 设备id
|
||||
* @return
|
||||
*/
|
||||
DeviceMqttVO selectMqttConnectData(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询告警日志相关联信息
|
||||
* @param deviceNumbers 设备编号集合
|
||||
* @return
|
||||
*/
|
||||
List<DeviceRelateAlertLogVO> selectDeviceBySerialNumbers(@Param("deviceNumbers") Set<String> deviceNumbers);
|
||||
|
||||
/**
|
||||
* 查询告警日志相关联信息
|
||||
* @param deviceNumber 设备编号
|
||||
* @return
|
||||
*/
|
||||
DeviceRelateAlertLogVO selectRelateAlertLogBySerialNumber(String deviceNumber);
|
||||
|
||||
/**
|
||||
* 根据产品ID获取产品下所有编号
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
public String[] getDeviceNumsByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询设备状态
|
||||
* @param deviceNumbers 设备编号集合
|
||||
* @return
|
||||
*/
|
||||
public List<DeviceNumberStatus> selectDeviceStatusByNumbers(String[] deviceNumbers);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 重置设备状态
|
||||
*/
|
||||
public void reSetDeviceStatus();
|
||||
|
||||
/**
|
||||
* 获取所有已经激活并不是禁用的设备
|
||||
* @return
|
||||
*/
|
||||
List<DeviceStatusVO> selectDeviceActive();
|
||||
|
||||
/**
|
||||
* 批量添加设备
|
||||
* @param deviceList 设备集合
|
||||
* @return void
|
||||
*/
|
||||
int insertBatchDevice(@Param("deviceList") List<Device> deviceList);
|
||||
|
||||
/**
|
||||
* 批量校验设备
|
||||
* @param serialNumberList
|
||||
* @return java.util.List<java.lang.String>
|
||||
*/
|
||||
List<String> checkExistBySerialNumbers(@Param("serialNumberList") List<String> serialNumberList);
|
||||
|
||||
/**
|
||||
* 更新设备绑定机构
|
||||
* @param tenantId 机构管理员id
|
||||
* @param: userName 管理员名称
|
||||
* @param: deviceIdList 设备id集合
|
||||
* @return int
|
||||
*/
|
||||
int updateTenantIdByDeptIds(@Param("tenantId") Long tenantId, @Param("tenantName") String tenantName, @Param("deviceIdList") List<Long> deviceIdList);
|
||||
|
||||
/**
|
||||
* 查询终端用户设备简短列表,主页列表数据
|
||||
*/
|
||||
List<DeviceShortOutput> listTerminalUser(Device device);
|
||||
|
||||
List<Device> listTerminalUserByGroup(Device device);
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
* @param tenantId
|
||||
* @return int
|
||||
*/
|
||||
int countByTenantId(Long tenantId);
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @param: deviceIdList 设备id集合
|
||||
* @return: java.util.List<com.fastbee.iot.domain.Device>
|
||||
*/
|
||||
List<Device> selectDeviceListByDeviceIds(@Param("deviceIdList") List<Long> deviceIdList);
|
||||
/**
|
||||
* 根据监控设备channelId获取设备
|
||||
* @param channelId
|
||||
* @return
|
||||
*/
|
||||
Device selectDeviceByChannelId(String channelId);
|
||||
|
||||
/**
|
||||
* 查询设备状态以及传输协议
|
||||
* @param serialNumber
|
||||
* @return
|
||||
*/
|
||||
DeviceStatusVO selectDeviceStatusAndTransportStatus(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据分组id集合查询设备分组
|
||||
*
|
||||
* @param groupIds 设备分组主键
|
||||
* @return 设备分组
|
||||
*/
|
||||
List<DeviceGroup> listDeviceGroupByGroupIds(List<Long> groupIds);
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fastbee.framework.mybatis.mapper.BaseMapperX;
|
||||
import com.fastbee.iot.domain.DeviceRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 设备记录Mapper接口
|
||||
*
|
||||
* @author zhangzhiyi
|
||||
* @date 2024-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceRecordMapper extends BaseMapperX<DeviceRecord>
|
||||
{
|
||||
/**
|
||||
* 查询设备记录
|
||||
*
|
||||
* @param id 设备记录主键
|
||||
* @return 设备记录
|
||||
*/
|
||||
public DeviceRecord selectDeviceRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备记录列表
|
||||
*
|
||||
* @param deviceRecord 设备记录
|
||||
* @return 设备记录集合
|
||||
*/
|
||||
public List<DeviceRecord> selectDeviceRecordList(DeviceRecord deviceRecord);
|
||||
|
||||
/**
|
||||
* 新增设备记录
|
||||
*
|
||||
* @param deviceRecord 设备记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceRecord(DeviceRecord deviceRecord);
|
||||
|
||||
/**
|
||||
* 修改设备记录
|
||||
*
|
||||
* @param deviceRecord 设备记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceRecord(DeviceRecord deviceRecord);
|
||||
|
||||
/**
|
||||
* 删除设备记录
|
||||
*
|
||||
* @param id 设备记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除设备记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceRecordByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fastbee.common.core.domain.entity.SysUser;
|
||||
import com.fastbee.iot.domain.DeviceShare;
|
||||
import com.fastbee.iot.domain.DeviceUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 设备分享Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-04-03
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceShareMapper
|
||||
{
|
||||
/**
|
||||
* 根据用户id、设备Id获取分享详情
|
||||
* @param deviceId
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
DeviceShare selectDeviceShareByDeviceIdAndUserId(@Param("deviceId") Long deviceId, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询设备分享
|
||||
*
|
||||
* @param deviceId 设备分享主键
|
||||
* @return 设备分享
|
||||
*/
|
||||
public List<DeviceShare> selectDeviceShareByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备分享列表
|
||||
*
|
||||
* @param deviceShare 设备分享
|
||||
* @return 设备分享集合
|
||||
*/
|
||||
public List<DeviceShare> selectDeviceShareList(DeviceShare deviceShare);
|
||||
|
||||
/**
|
||||
* 新增设备分享
|
||||
*
|
||||
* @param deviceShare 设备分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceShare(DeviceShare deviceShare);
|
||||
|
||||
/**
|
||||
* 修改设备分享
|
||||
*
|
||||
* @param deviceShare 设备分享
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceShare(DeviceShare deviceShare);
|
||||
|
||||
/**
|
||||
* 删除设备分享
|
||||
*
|
||||
* @param deviceId 设备分享主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceShareByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 批量删除设备分享
|
||||
*
|
||||
* @param deviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceShareByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 查询分享设备用户
|
||||
*
|
||||
* @param deviceUser 设备分享
|
||||
* @return 设备用户集合
|
||||
*/
|
||||
public SysUser selectShareUser(DeviceShare share);
|
||||
|
||||
/**
|
||||
* 删除分享设备
|
||||
* @param deviceShare
|
||||
* @return int
|
||||
*/
|
||||
int deleteDeviceShareByDeviceIdAndUserId(DeviceShare deviceShare);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fastbee.common.core.domain.entity.SysUser;
|
||||
import com.fastbee.iot.domain.DeviceUser;
|
||||
import com.fastbee.iot.model.UserIdDeviceIdModel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 设备用户Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface DeviceUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备用户
|
||||
*
|
||||
* @param deviceId 设备用户主键
|
||||
* @return 设备用户
|
||||
*/
|
||||
public DeviceUser selectDeviceUserByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备用户列表
|
||||
*
|
||||
* @param deviceUser 设备用户
|
||||
* @return 设备用户集合
|
||||
*/
|
||||
public List<DeviceUser> selectDeviceUserList(DeviceUser deviceUser);
|
||||
|
||||
/**
|
||||
* 查询设备分享用户
|
||||
*
|
||||
* @param deviceUser 设备用户
|
||||
* @return 设备用户集合
|
||||
*/
|
||||
public SysUser selectShareUser(DeviceUser deviceUser);
|
||||
|
||||
/**
|
||||
* 新增设备用户
|
||||
*
|
||||
* @param deviceUser 设备用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceUser(DeviceUser deviceUser);
|
||||
|
||||
/**
|
||||
* 修改设备用户
|
||||
*
|
||||
* @param deviceUser 设备用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeviceUser(DeviceUser deviceUser);
|
||||
|
||||
/**
|
||||
* 删除设备用户
|
||||
*
|
||||
* @param UserIdDeviceIdModel 用户ID和设备ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceUserByDeviceId(UserIdDeviceIdModel UserIdDeviceIdModel);
|
||||
|
||||
/**
|
||||
* 批量删除设备用户
|
||||
*
|
||||
* @param deviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeviceUserByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 批量添加设备用户
|
||||
* @param deviceUsers 设备用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeviceUserList(List<DeviceUser> deviceUsers);
|
||||
|
||||
/**
|
||||
* 根据deviceId 和 userId 查询
|
||||
* @param deviceId 设备id
|
||||
* @param userId 用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public DeviceUser selectDeviceUserByDeviceIdAndUserId(@Param("deviceId") Long deviceId, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 根据deviceId 和 userId 删除设备用户,不包含设备所有者
|
||||
*/
|
||||
public int deleteDeviceUser(DeviceUser deviceUser);
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.EventLog;
|
||||
import com.fastbee.iot.model.HistoryModel;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 事件日志Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-03-28
|
||||
*/
|
||||
@Repository
|
||||
public interface EventLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询事件日志
|
||||
*
|
||||
* @param logId 事件日志主键
|
||||
* @return 事件日志
|
||||
*/
|
||||
public EventLog selectEventLogByLogId(Long logId);
|
||||
|
||||
/**
|
||||
* 查询事件日志列表
|
||||
*
|
||||
* @param eventLog 事件日志
|
||||
* @return 事件日志集合
|
||||
*/
|
||||
public List<EventLog> selectEventLogList(EventLog eventLog);
|
||||
|
||||
/**
|
||||
* 新增事件日志
|
||||
*
|
||||
* @param eventLog 事件日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEventLog(EventLog eventLog);
|
||||
|
||||
/**
|
||||
* 批量存储事件日志
|
||||
* @param list
|
||||
*/
|
||||
public void insertBatch(List<EventLog> list);
|
||||
|
||||
/**
|
||||
* 修改事件日志
|
||||
*
|
||||
* @param eventLog 事件日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEventLog(EventLog eventLog);
|
||||
|
||||
/**
|
||||
* 删除事件日志
|
||||
*
|
||||
* @param logId 事件日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEventLogByLogId(Long logId);
|
||||
|
||||
/**
|
||||
* 根据设备编号删除事件日志
|
||||
*
|
||||
* @param serialNumber 设备编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEventLogBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 批量删除事件日志
|
||||
*
|
||||
* @param logIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEventLogByLogIds(Long[] logIds);
|
||||
|
||||
/**
|
||||
* 查询物模型历史数据
|
||||
* @param eventLog 事件日志
|
||||
* @return java.util.List<com.fastbee.iot.model.HistoryModel>
|
||||
*/
|
||||
List<HistoryModel> listHistory(EventLog eventLog);
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.Firmware;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 产品固件Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface FirmwareMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品固件
|
||||
*
|
||||
* @param firmwareId 产品固件主键
|
||||
* @return 产品固件
|
||||
*/
|
||||
public Firmware selectFirmwareByFirmwareId(Long firmwareId);
|
||||
|
||||
/**
|
||||
* 查询设备最新固件
|
||||
*
|
||||
* @param deviceId 产品固件主键
|
||||
* @return 产品固件
|
||||
*/
|
||||
public Firmware selectLatestFirmware(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询产品固件列表
|
||||
*
|
||||
* @param firmware 产品固件
|
||||
* @return 产品固件集合
|
||||
*/
|
||||
public List<Firmware> selectFirmwareList(Firmware firmware);
|
||||
|
||||
/**
|
||||
* 新增产品固件
|
||||
*
|
||||
* @param firmware 产品固件
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFirmware(Firmware firmware);
|
||||
|
||||
/**
|
||||
* 修改产品固件
|
||||
*
|
||||
* @param firmware 产品固件
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFirmware(Firmware firmware);
|
||||
|
||||
/**
|
||||
* 删除产品固件
|
||||
*
|
||||
* @param firmwareId 产品固件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareByFirmwareId(Long firmwareId);
|
||||
|
||||
/**
|
||||
* 批量删除产品固件
|
||||
*
|
||||
* @param firmwareIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareByFirmwareIds(Long[] firmwareIds);
|
||||
|
||||
/**
|
||||
* 排除此固件id,其他设置为非最新版本
|
||||
* @param firmware
|
||||
* @return
|
||||
*/
|
||||
public int updateOrtherFirmwareIsLast(Firmware firmware);
|
||||
|
||||
/**
|
||||
* 查询待升级固件版本列表
|
||||
* @param firmware
|
||||
* @return
|
||||
*/
|
||||
List<Firmware> selectUpGradeVersionList(Firmware firmware);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.FirmwareTaskDetail;
|
||||
import com.fastbee.iot.model.FirmwareTaskDetailInput;
|
||||
import com.fastbee.iot.model.FirmwareTaskDetailOutput;
|
||||
import com.fastbee.iot.model.FirmwareTaskDeviceStatistic;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 固件升级任务详细Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-24
|
||||
*/
|
||||
@Repository
|
||||
public interface FirmwareTaskDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询固件升级任务详细
|
||||
*
|
||||
* @param id 固件升级任务详细主键
|
||||
* @return 固件升级任务详细
|
||||
*/
|
||||
public FirmwareTaskDetail selectFirmwareTaskDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 查询固件升级任务详细列表
|
||||
*
|
||||
* @param firmwareTaskDetail 固件升级任务详细
|
||||
* @return 固件升级任务详细集合
|
||||
*/
|
||||
public List<FirmwareTaskDetail> selectFirmwareTaskDetailList(FirmwareTaskDetail firmwareTaskDetail);
|
||||
|
||||
/**
|
||||
* 根据固件id查询下属设备列表
|
||||
* @param firmwareTaskDetailInput
|
||||
* @return
|
||||
*/
|
||||
public List<FirmwareTaskDetailOutput> selectFirmwareTaskDetailListByFirmwareId(FirmwareTaskDetailInput firmwareTaskDetailInput);
|
||||
|
||||
/**
|
||||
* 查询固件升级任务详细列表-关联出固件信息
|
||||
*
|
||||
* @param firmwareTaskDetail 固件升级任务详细
|
||||
* @return 固件升级任务详细集合
|
||||
*/
|
||||
public List<FirmwareTaskDetail> selectFirmwareALLDetailList(FirmwareTaskDetail firmwareTaskDetail);
|
||||
|
||||
/**
|
||||
* 新增固件升级任务详细
|
||||
*
|
||||
* @param firmwareTaskDetail 固件升级任务详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);
|
||||
|
||||
/**
|
||||
* 修改固件升级任务详细
|
||||
*
|
||||
* @param firmwareTaskDetail 固件升级任务详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFirmwareTaskDetail(FirmwareTaskDetail firmwareTaskDetail);
|
||||
|
||||
/**
|
||||
* 删除固件升级任务详细
|
||||
*
|
||||
* @param id 固件升级任务详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareTaskDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除固件升级任务详细
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareTaskDetailByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量插入任务明细
|
||||
* @param detailList
|
||||
* @return
|
||||
*/
|
||||
public int insertBatchFirmwareTaskDetail(List<FirmwareTaskDetail> detailList);
|
||||
|
||||
/**
|
||||
* 固件升级设备统计
|
||||
* @param firmwareTaskDetailInput
|
||||
* @return
|
||||
*/
|
||||
public List<FirmwareTaskDeviceStatistic> deviceStatistic(FirmwareTaskDetailInput firmwareTaskDetailInput);
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.FirmwareTask;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 固件升级任务Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-24
|
||||
*/
|
||||
@Repository
|
||||
public interface FirmwareTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询固件升级任务
|
||||
*
|
||||
* @param id 固件升级任务主键
|
||||
* @return 固件升级任务
|
||||
*/
|
||||
public FirmwareTask selectFirmwareTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 根据任务名称查询固件升级任务总数
|
||||
*
|
||||
* @param taskName 固件升级任务名称
|
||||
* @return 固件升级任务
|
||||
*/
|
||||
public int selectCountFirmwareTaskByTaskName(String taskName);
|
||||
|
||||
/**
|
||||
* 查询固件升级任务列表
|
||||
*
|
||||
* @param firmwareTask 固件升级任务
|
||||
* @return 固件升级任务集合
|
||||
*/
|
||||
public List<FirmwareTask> selectFirmwareTaskList(FirmwareTask firmwareTask);
|
||||
|
||||
/**
|
||||
* 新增固件升级任务
|
||||
*
|
||||
* @param firmwareTask 固件升级任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFirmwareTask(FirmwareTask firmwareTask);
|
||||
|
||||
/**
|
||||
* 修改固件升级任务
|
||||
*
|
||||
* @param firmwareTask 固件升级任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFirmwareTask(FirmwareTask firmwareTask);
|
||||
|
||||
/**
|
||||
* 删除固件升级任务
|
||||
*
|
||||
* @param id 固件升级任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除固件升级任务
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFirmwareTaskByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.FunctionLog;
|
||||
import com.fastbee.iot.model.HistoryModel;
|
||||
import com.fastbee.iot.model.ThingsModelLogCountVO;
|
||||
import com.fastbee.iot.model.param.DataCenterParam;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 设备服务下发日志Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-10-22
|
||||
*/
|
||||
@Repository
|
||||
public interface FunctionLogMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备服务下发日志
|
||||
*
|
||||
* @param id 设备服务下发日志主键
|
||||
* @return 设备服务下发日志
|
||||
*/
|
||||
public FunctionLog selectFunctionLogById(Long id);
|
||||
|
||||
/**
|
||||
* 查询设备服务下发日志列表
|
||||
*
|
||||
* @param functionLog 设备服务下发日志
|
||||
* @return 设备服务下发日志集合
|
||||
*/
|
||||
public List<FunctionLog> selectFunctionLogList(FunctionLog functionLog);
|
||||
|
||||
/**
|
||||
* 新增设备服务下发日志
|
||||
*
|
||||
* @param functionLog 设备服务下发日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertFunctionLog(FunctionLog functionLog);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param list
|
||||
*/
|
||||
public void insertBatch(List<FunctionLog> list);
|
||||
|
||||
/**
|
||||
* 修改设备服务下发日志
|
||||
*
|
||||
* @param functionLog 设备服务下发日志
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateFunctionLog(FunctionLog functionLog);
|
||||
|
||||
/**
|
||||
* 删除设备服务下发日志
|
||||
*
|
||||
* @param id 设备服务下发日志主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFunctionLogById(Long id);
|
||||
|
||||
/**
|
||||
* 根据设备编号删除设备服务下发日志
|
||||
*
|
||||
* @param serialNumber 设备编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFunctionLogBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据标识符前缀和设备编号批量删除日志
|
||||
*
|
||||
* @param
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFunctionLogByPreIdentify(FunctionLog functionLog);
|
||||
|
||||
/**
|
||||
* 批量删除设备服务下发日志
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteFunctionLogByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量更新日志状态值
|
||||
* @param log 参数
|
||||
*/
|
||||
public void updateFuncLogBatch(FunctionLog log);
|
||||
|
||||
/**
|
||||
* 根据消息id更新指令下发状态
|
||||
* @param log
|
||||
*/
|
||||
public void updateByMessageId(FunctionLog log);
|
||||
|
||||
/**
|
||||
* 查询物模型历史数据
|
||||
* @param functionLog 功能日志
|
||||
* @return java.util.List<com.fastbee.iot.model.HistoryModel>
|
||||
*/
|
||||
List<HistoryModel> listHistory(FunctionLog functionLog);
|
||||
|
||||
/**
|
||||
* 统计设备物模型指令下发数量
|
||||
* @param dataCenterParam 传参
|
||||
* @return com.fastbee.common.core.domain.AjaxResult
|
||||
*/
|
||||
List<ThingsModelLogCountVO> countThingsModelInvoke(DataCenterParam dataCenterParam);
|
||||
|
||||
/**
|
||||
* 根据消息id获取指令日志
|
||||
* @param messageId
|
||||
* @return
|
||||
*/
|
||||
FunctionLog selectLogByMessageId(String messageId);
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.GoviewProjectData;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目数据关联Mapper接口
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-10-27
|
||||
*/
|
||||
@Repository
|
||||
public interface GoviewProjectDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目数据关联
|
||||
*
|
||||
* @param id 项目数据关联主键
|
||||
* @return 项目数据关联
|
||||
*/
|
||||
public GoviewProjectData selectGoviewProjectDataById(String id);
|
||||
|
||||
/**
|
||||
* 查询项目数据关联列表
|
||||
*
|
||||
* @param goviewProjectData 项目数据关联
|
||||
* @return 项目数据关联集合
|
||||
*/
|
||||
public List<GoviewProjectData> selectGoviewProjectDataList(GoviewProjectData goviewProjectData);
|
||||
|
||||
/**
|
||||
* 新增项目数据关联
|
||||
*
|
||||
* @param goviewProjectData 项目数据关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGoviewProjectData(GoviewProjectData goviewProjectData);
|
||||
|
||||
/**
|
||||
* 修改项目数据关联
|
||||
*
|
||||
* @param goviewProjectData 项目数据关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGoviewProjectData(GoviewProjectData goviewProjectData);
|
||||
|
||||
/**
|
||||
* 删除项目数据关联
|
||||
*
|
||||
* @param id 项目数据关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGoviewProjectDataById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除项目数据关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGoviewProjectDataByIds(String[] ids);
|
||||
|
||||
GoviewProjectData selectGoviewProjectDataByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 根据sql获取组件数据接口
|
||||
* @param sql sql
|
||||
* @return 组件数据
|
||||
*/
|
||||
List<LinkedHashMap> executeSql(String sql);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.GoviewProject;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 项目Mapper接口
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-10-27
|
||||
*/
|
||||
@Repository
|
||||
public interface GoviewProjectMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目
|
||||
*
|
||||
* @param id 项目主键
|
||||
* @return 项目
|
||||
*/
|
||||
public GoviewProject selectGoviewProjectById(String id);
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
*
|
||||
* @param goviewProject 项目
|
||||
* @return 项目集合
|
||||
*/
|
||||
public List<GoviewProject> selectGoviewProjectList(GoviewProject goviewProject);
|
||||
|
||||
/**
|
||||
* 新增项目
|
||||
*
|
||||
* @param goviewProject 项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGoviewProject(GoviewProject goviewProject);
|
||||
|
||||
/**
|
||||
* 修改项目
|
||||
*
|
||||
* @param goviewProject 项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGoviewProject(GoviewProject goviewProject);
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
*
|
||||
* @param id 项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGoviewProjectById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除项目
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGoviewProjectByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.fastbee.iot.domain.Group;
|
||||
import com.fastbee.iot.model.DeviceGroupInput;
|
||||
import com.fastbee.iot.model.IdOutput;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 设备分组Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface GroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备分组
|
||||
*
|
||||
* @param groupId 设备分组主键
|
||||
* @return 设备分组
|
||||
*/
|
||||
public Group selectGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 通过分组ID查询关联的设备ID数组
|
||||
* @param groupId
|
||||
* @return
|
||||
*/
|
||||
public List<IdOutput> selectDeviceIdsByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 查询设备分组列表
|
||||
*
|
||||
* @param group 设备分组
|
||||
* @return 设备分组集合
|
||||
*/
|
||||
public List<Group> selectGroupList(Group group);
|
||||
|
||||
/**
|
||||
* 新增设备分组
|
||||
*
|
||||
* @param group 设备分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGroup(Group group);
|
||||
|
||||
/**
|
||||
* 分组下批量增加设备分组
|
||||
* @param input
|
||||
* @return
|
||||
*/
|
||||
public int insertDeviceGroups(DeviceGroupInput input);
|
||||
|
||||
/**
|
||||
* 修改设备分组
|
||||
*
|
||||
* @param group 设备分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGroup(Group group);
|
||||
|
||||
/**
|
||||
* 删除设备分组
|
||||
*
|
||||
* @param groupId 设备分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 批量删除分组
|
||||
*
|
||||
* @param groupIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
/**
|
||||
* 批量删除设备分组
|
||||
* @param groupIds
|
||||
* @return
|
||||
*/
|
||||
public int deleteDeviceGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
/**
|
||||
* 根据用户Id查询分组列表
|
||||
* @param userId 用户id
|
||||
* @return 分组列表
|
||||
*/
|
||||
List<Group> selectGroupListByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询设备分组 根据分组Id
|
||||
*
|
||||
* @return 分组列表
|
||||
*/
|
||||
List<Group> listAllByIdList(Set<Long> groupIds);
|
||||
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.ModbusConfig;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* modbus配置Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-22
|
||||
*/
|
||||
public interface ModbusConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询modbus配置
|
||||
*
|
||||
* @param id modbus配置主键
|
||||
* @return modbus配置
|
||||
*/
|
||||
public ModbusConfig selectModbusConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询modbus配置列表
|
||||
*
|
||||
* @param modbusConfig modbus配置
|
||||
* @return modbus配置集合
|
||||
*/
|
||||
public List<ModbusConfig> selectModbusConfigList(ModbusConfig modbusConfig);
|
||||
|
||||
/**
|
||||
* 新增modbus配置
|
||||
*
|
||||
* @param modbusConfig modbus配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertModbusConfig(ModbusConfig modbusConfig);
|
||||
|
||||
/**
|
||||
* 修改modbus配置
|
||||
*
|
||||
* @param modbusConfig modbus配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateModbusConfig(ModbusConfig modbusConfig);
|
||||
|
||||
/**
|
||||
* 批量添加modbus配置
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertModbusConfigBatch(List<ModbusConfig> list);
|
||||
|
||||
/**
|
||||
* 批量更新modbus配置
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateModbusConfigBatch(List<ModbusConfig> list);
|
||||
|
||||
/**
|
||||
* 删除modbus配置
|
||||
*
|
||||
* @param id modbus配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除modbus配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据产品id和标识符获取modbus配置
|
||||
* @param productId
|
||||
* @param identity
|
||||
* @return
|
||||
*/
|
||||
public ModbusConfig selectByIdentify(@Param("productId") Long productId, @Param("identity") String identity);
|
||||
|
||||
/**
|
||||
* 获取modbus配置简要字段
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
public List<ModbusConfig> selectShortListByProductId(ModbusConfig config);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.ModbusJob;
|
||||
|
||||
/**
|
||||
* 轮训任务列Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-07-05
|
||||
*/
|
||||
public interface ModbusJobMapper
|
||||
{
|
||||
/**
|
||||
* 查询轮训任务列
|
||||
*
|
||||
* @param taskId 轮训任务列主键
|
||||
* @return 轮训任务列
|
||||
*/
|
||||
public ModbusJob selectModbusJobByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 查询轮训任务列列表
|
||||
*
|
||||
* @param modbusJob 轮训任务列
|
||||
* @return 轮训任务列集合
|
||||
*/
|
||||
public List<ModbusJob> selectModbusJobList(ModbusJob modbusJob);
|
||||
|
||||
/**
|
||||
* 新增轮训任务列
|
||||
*
|
||||
* @param modbusJob 轮训任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertModbusJob(ModbusJob modbusJob);
|
||||
|
||||
/**
|
||||
* 修改轮训任务列
|
||||
*
|
||||
* @param modbusJob 轮训任务列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateModbusJob(ModbusJob modbusJob);
|
||||
|
||||
/**
|
||||
* 删除轮训任务列
|
||||
*
|
||||
* @param taskId 轮训任务列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusJobByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 批量删除轮训任务列
|
||||
*
|
||||
* @param taskIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusJobByTaskIds(Long[] taskIds);
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.ModbusParams;
|
||||
|
||||
/**
|
||||
* 产品modbus配置参数Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-05-31
|
||||
*/
|
||||
public interface ModbusParamsMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品modbus配置参数
|
||||
*
|
||||
* @param id 产品modbus配置参数主键
|
||||
* @return 产品modbus配置参数
|
||||
*/
|
||||
public ModbusParams selectModbusParamsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产品modbus配置参数列表
|
||||
*
|
||||
* @param modbusParams 产品modbus配置参数
|
||||
* @return 产品modbus配置参数集合
|
||||
*/
|
||||
public List<ModbusParams> selectModbusParamsList(ModbusParams modbusParams);
|
||||
|
||||
/**
|
||||
* 新增产品modbus配置参数
|
||||
*
|
||||
* @param modbusParams 产品modbus配置参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertModbusParams(ModbusParams modbusParams);
|
||||
|
||||
/**
|
||||
* 修改产品modbus配置参数
|
||||
*
|
||||
* @param modbusParams 产品modbus配置参数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateModbusParams(ModbusParams modbusParams);
|
||||
|
||||
/**
|
||||
* 删除产品modbus配置参数
|
||||
*
|
||||
* @param id 产品modbus配置参数主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusParamsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除产品modbus配置参数
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteModbusParamsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据产品io获取modbus配置
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
ModbusParams getModbusParamsByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 根据设备id获取modbus配置
|
||||
* @param deviceId
|
||||
* @return
|
||||
*/
|
||||
ModbusParams getModbusParamsByDeviceId(Long deviceId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.MqttClient;
|
||||
|
||||
/**
|
||||
* mqtt桥接配置表Mapper接口
|
||||
*
|
||||
* @author gx_ma
|
||||
* @date 2024-06-03
|
||||
*/
|
||||
public interface MqttClientMapper
|
||||
{
|
||||
/**
|
||||
* 查询mqtt桥接配置表
|
||||
*
|
||||
* @param id mqtt桥接配置表主键
|
||||
* @return mqtt桥接配置表
|
||||
*/
|
||||
public MqttClient selectMqttClientById(Long id);
|
||||
|
||||
/**
|
||||
* 查询mqtt桥接配置表列表
|
||||
*
|
||||
* @param mqttClient mqtt桥接配置表
|
||||
* @return mqtt桥接配置表集合
|
||||
*/
|
||||
public List<MqttClient> selectMqttClientList(MqttClient mqttClient);
|
||||
|
||||
/**
|
||||
* 新增mqtt桥接配置表
|
||||
*
|
||||
* @param mqttClient mqtt桥接配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMqttClient(MqttClient mqttClient);
|
||||
|
||||
/**
|
||||
* 修改mqtt桥接配置表
|
||||
*
|
||||
* @param mqttClient mqtt桥接配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMqttClient(MqttClient mqttClient);
|
||||
|
||||
/**
|
||||
* 删除mqtt桥接配置表
|
||||
*
|
||||
* @param id mqtt桥接配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMqttClientById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除mqtt桥接配置表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMqttClientByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.NewsCategory;
|
||||
import com.fastbee.iot.model.IdAndName;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 新闻分类Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-04-09
|
||||
*/
|
||||
@Repository
|
||||
public interface NewsCategoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询新闻分类
|
||||
*
|
||||
* @param categoryId 新闻分类主键
|
||||
* @return 新闻分类
|
||||
*/
|
||||
public NewsCategory selectNewsCategoryByCategoryId(Long categoryId);
|
||||
|
||||
/**
|
||||
* 查询新闻分类列表
|
||||
*
|
||||
* @param newsCategory 新闻分类
|
||||
* @return 新闻分类集合
|
||||
*/
|
||||
public List<NewsCategory> selectNewsCategoryList(NewsCategory newsCategory);
|
||||
|
||||
/**
|
||||
* 查询新闻分类简短列表
|
||||
*
|
||||
* @return 新闻分类集合
|
||||
*/
|
||||
public List<IdAndName> selectNewsCategoryShortList();
|
||||
|
||||
/**
|
||||
* 新增新闻分类
|
||||
*
|
||||
* @param newsCategory 新闻分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNewsCategory(NewsCategory newsCategory);
|
||||
|
||||
/**
|
||||
* 修改新闻分类
|
||||
*
|
||||
* @param newsCategory 新闻分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNewsCategory(NewsCategory newsCategory);
|
||||
|
||||
/**
|
||||
* 删除新闻分类
|
||||
*
|
||||
* @param categoryId 新闻分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewsCategoryByCategoryId(Long categoryId);
|
||||
|
||||
/**
|
||||
* 批量删除新闻分类
|
||||
*
|
||||
* @param categoryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewsCategoryByCategoryIds(Long[] categoryIds);
|
||||
|
||||
/**
|
||||
* 分类下的新闻数量
|
||||
*
|
||||
* @param categoryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int newsCountInCategorys(Long[] categoryIds);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.News;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 新闻资讯Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2022-04-09
|
||||
*/
|
||||
@Repository
|
||||
public interface NewsMapper
|
||||
{
|
||||
/**
|
||||
* 查询新闻资讯
|
||||
*
|
||||
* @param newsId 新闻资讯主键
|
||||
* @return 新闻资讯
|
||||
*/
|
||||
public News selectNewsByNewsId(Long newsId);
|
||||
|
||||
/**
|
||||
* 查询新闻资讯列表
|
||||
*
|
||||
* @param news 新闻资讯
|
||||
* @return 新闻资讯集合
|
||||
*/
|
||||
public List<News> selectNewsList(News news);
|
||||
|
||||
/**
|
||||
* 查询置顶新闻资讯列表
|
||||
*
|
||||
* @return 新闻资讯集合
|
||||
*/
|
||||
public List<News> selectTopNewsList();
|
||||
|
||||
/**
|
||||
* 新增新闻资讯
|
||||
*
|
||||
* @param news 新闻资讯
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNews(News news);
|
||||
|
||||
/**
|
||||
* 修改新闻资讯
|
||||
*
|
||||
* @param news 新闻资讯
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNews(News news);
|
||||
|
||||
/**
|
||||
* 删除新闻资讯
|
||||
*
|
||||
* @param newsId 新闻资讯主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewsByNewsId(Long newsId);
|
||||
|
||||
/**
|
||||
* 批量删除新闻资讯
|
||||
*
|
||||
* @param newsIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNewsByNewsIds(Long[] newsIds);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.OrderControl;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 指令权限控制Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-07-01
|
||||
*/
|
||||
public interface OrderControlMapper
|
||||
{
|
||||
/**
|
||||
* 查询指令权限控制
|
||||
*
|
||||
* @param id 指令权限控制主键
|
||||
* @return 指令权限控制
|
||||
*/
|
||||
public OrderControl selectOrderControlById(Long id);
|
||||
|
||||
/**
|
||||
* 查询指令权限控制列表
|
||||
*
|
||||
* @param orderControl 指令权限控制
|
||||
* @return 指令权限控制集合
|
||||
*/
|
||||
public List<OrderControl> selectOrderControlList(OrderControl orderControl);
|
||||
|
||||
/**
|
||||
* 新增指令权限控制
|
||||
*
|
||||
* @param orderControl 指令权限控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderControl(OrderControl orderControl);
|
||||
|
||||
/**
|
||||
* 修改指令权限控制
|
||||
*
|
||||
* @param orderControl 指令权限控制
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderControl(OrderControl orderControl);
|
||||
|
||||
/**
|
||||
* 删除指令权限控制
|
||||
*
|
||||
* @param id 指令权限控制主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderControlById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除指令权限控制
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderControlByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据用户id获取
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<OrderControl> selectByUserId(@Param("userId") Long userId,@Param("deviceId") Long deviceId);
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.iot.domain.ProductAuthorize;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 产品授权码Mapper接口
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-04-11
|
||||
*/
|
||||
@Repository
|
||||
public interface ProductAuthorizeMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品授权码
|
||||
*
|
||||
* @param authorizeId 产品授权码主键
|
||||
* @return 产品授权码
|
||||
*/
|
||||
public ProductAuthorize selectProductAuthorizeByAuthorizeId(Long authorizeId);
|
||||
|
||||
/**
|
||||
* 查询产品授权码列表
|
||||
*
|
||||
* @param productAuthorize 产品授权码
|
||||
* @return 产品授权码集合
|
||||
*/
|
||||
public List<ProductAuthorize> selectProductAuthorizeList(ProductAuthorize productAuthorize);
|
||||
|
||||
/**
|
||||
* 新增产品授权码
|
||||
*
|
||||
* @param productAuthorize 产品授权码
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductAuthorize(ProductAuthorize productAuthorize);
|
||||
|
||||
/**
|
||||
* 修改产品授权码
|
||||
*
|
||||
* @param productAuthorize 产品授权码
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductAuthorize(ProductAuthorize productAuthorize);
|
||||
|
||||
/**
|
||||
* 删除产品授权码
|
||||
*
|
||||
* @param authorizeId 产品授权码主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAuthorizeByAuthorizeId(Long authorizeId);
|
||||
|
||||
/**
|
||||
* 批量删除产品授权码
|
||||
*
|
||||
* @param authorizeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAuthorizeByAuthorizeIds(Long[] authorizeIds);
|
||||
|
||||
/**
|
||||
* 通过产品ID批量删除产品授权码
|
||||
*
|
||||
* @param productIds 产品ID数组
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAuthorizeByProductIds(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 批量新增产品授权码
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public int insertBatchAuthorize(List<ProductAuthorize> list);
|
||||
|
||||
/**
|
||||
* 根据授权码查询一条未绑定的授权码
|
||||
* @param authorize
|
||||
* @return
|
||||
*/
|
||||
ProductAuthorize selectFirstAuthorizeByAuthorizeCode(ProductAuthorize authorize);
|
||||
|
||||
/**
|
||||
* 根据产品id查询产品授权码
|
||||
* @param productId 产品id
|
||||
* @return
|
||||
*/
|
||||
List<ProductAuthorize> selectProductAuthorizeListByProductId(Long productId);
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Product;
|
||||
import com.fastbee.iot.model.ChangeProductStatusModel;
|
||||
import com.fastbee.iot.model.IdAndName;
|
||||
import com.fastbee.iot.model.ProductCode;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2021-12-16
|
||||
*/
|
||||
@Repository
|
||||
public interface ProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品
|
||||
*
|
||||
* @param productId 产品主键
|
||||
* @return 产品
|
||||
*/
|
||||
public Product selectProductByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 查询产品列表
|
||||
*
|
||||
* @param product 产品
|
||||
* @return 产品集合
|
||||
*/
|
||||
public List<Product> selectProductList(Product product);
|
||||
|
||||
/**
|
||||
* 查询产品简短列表
|
||||
*
|
||||
* @param product 产品
|
||||
* @return 产品集合
|
||||
*/
|
||||
public List<IdAndName> selectProductShortList(Product product);
|
||||
|
||||
/**
|
||||
* 新增产品
|
||||
*
|
||||
* @param product 产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProduct(Product product);
|
||||
|
||||
/**
|
||||
* 修改产品
|
||||
*
|
||||
* @param product 产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProduct(Product product);
|
||||
|
||||
/**
|
||||
* 更新产品状态,1-未发布,2-已发布
|
||||
*
|
||||
* @param model
|
||||
* @return 结果
|
||||
*/
|
||||
public int changeProductStatus(ChangeProductStatusModel model);
|
||||
|
||||
/**
|
||||
* 修改物模型JSON
|
||||
*
|
||||
* @param product 产品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateThingsModelJson(Product product);
|
||||
|
||||
/**
|
||||
* 删除产品
|
||||
*
|
||||
* @param productId 产品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 批量删除产品
|
||||
*
|
||||
* @param productIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductByProductIds(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 批量删除产品物模型
|
||||
*
|
||||
* @param productIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductThingsModelByProductIds(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 产品下的固件数量
|
||||
* @param productIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int firmwareCountInProducts(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 产品下的设备数量
|
||||
* @param productIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deviceCountInProducts(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 产品下的物模型数量
|
||||
* @param productId 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int thingsCountInProduct(Long productId);
|
||||
|
||||
/**
|
||||
* 产品下的物模型标识符重复数
|
||||
* @param productId 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int thingsRepeatCountInProduct(Long productId);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询产品信息
|
||||
* @param serialNumber 设备编号
|
||||
* @return 结果
|
||||
*/
|
||||
public Product getProductBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据设备编号查询协议编号
|
||||
* @param serialNumber 设备编号
|
||||
* @return 协议编号
|
||||
*/
|
||||
public ProductCode getProtocolBySerialNumber(String serialNumber);
|
||||
|
||||
/**
|
||||
* 根据产品id获取协议编号
|
||||
* @param productId 产品id
|
||||
* @return 协议编号
|
||||
*/
|
||||
public String getProtocolByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 根据模板id查询所有使用的产品
|
||||
* @param templeId 模板id
|
||||
* @return
|
||||
*/
|
||||
public List<Product> selectByTempleId(Long templeId);
|
||||
|
||||
/**
|
||||
* 查询产品图片
|
||||
* @param productId 产品id
|
||||
* @return java.lang.String
|
||||
*/
|
||||
String selectImgUrlByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 查询终端用户产品
|
||||
* @param product
|
||||
* @return java.util.List<com.fastbee.iot.domain.Product>
|
||||
*/
|
||||
List<Product> selectTerminalUserProduct(Product product);
|
||||
|
||||
|
||||
/**
|
||||
* 根据产品id获取关联组态guid
|
||||
* @param productId
|
||||
* @return guid
|
||||
*/
|
||||
String selectGuidByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 查询组态信息
|
||||
* @param guidList 组态id集合
|
||||
* @return java.util.List<com.fastbee.iot.domain.Product>
|
||||
*/
|
||||
List<Product> selectListScadaIdByGuidS(@Param("guidList") List<String> guidList);
|
||||
/**
|
||||
* @description:
|
||||
* @param: productIdList 产品id集合
|
||||
* @return: java.util.List<com.fastbee.iot.domain.Product>
|
||||
*/
|
||||
List<Product> selectProductListByProductIds(@Param("productIdList") List<Long> productIdList);
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Protocol;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 协议管理Mapper
|
||||
* @author gsb
|
||||
* @date 2022/10/19 15:46
|
||||
*/
|
||||
@Repository
|
||||
public interface ProtocolMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 查询协议
|
||||
*
|
||||
* @param id 协议主键
|
||||
* @return 协议
|
||||
*/
|
||||
public Protocol selectProtocolById(Long id);
|
||||
|
||||
/**
|
||||
* 查询协议列表
|
||||
*
|
||||
* @param protocol 协议
|
||||
* @return 协议集合
|
||||
*/
|
||||
public List<Protocol> selectProtocolList(Protocol protocol);
|
||||
|
||||
/**
|
||||
* 新增协议
|
||||
*
|
||||
* @param protocol 协议
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProtocol(Protocol protocol);
|
||||
|
||||
/**
|
||||
* 修改协议
|
||||
*
|
||||
* @param protocol 协议
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProtocol(Protocol protocol);
|
||||
|
||||
/**
|
||||
* 删除协议
|
||||
*
|
||||
* @param id 协议主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProtocolById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除协议
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProtocolByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取所有唯一协议
|
||||
* @param protocol
|
||||
* @return
|
||||
*/
|
||||
public List<Protocol> selectByUnion(Protocol protocol);
|
||||
|
||||
/**
|
||||
* 获取所有可用协议
|
||||
* @param status
|
||||
* @param delFlag
|
||||
* @return
|
||||
*/
|
||||
public List<Protocol> selectAll(@Param("status") Integer status, @Param("delFlag") Integer delFlag);
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.fastbee.iot.mapper;
|
||||
|
||||
import com.fastbee.iot.domain.Scene;
|
||||
import com.fastbee.iot.domain.SceneDevice;
|
||||
import com.fastbee.iot.model.SceneDeviceBindVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景设备Mapper接口
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@Repository
|
||||
public interface SceneDeviceMapper
|
||||
{
|
||||
/**
|
||||
* 查询场景设备
|
||||
*
|
||||
* @param sceneDeviceId 场景设备主键
|
||||
* @return 场景设备
|
||||
*/
|
||||
public SceneDevice selectSceneDeviceBySceneDeviceId(Long sceneDeviceId);
|
||||
|
||||
/**
|
||||
* 查询场景设备列表
|
||||
*
|
||||
* @param sceneDevice 场景设备
|
||||
* @return 场景设备集合
|
||||
*/
|
||||
public List<SceneDevice> selectSceneDeviceList(SceneDevice sceneDevice);
|
||||
|
||||
/**
|
||||
* 新增场景设备
|
||||
*
|
||||
* @param sceneDevice 场景设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSceneDevice(SceneDevice sceneDevice);
|
||||
|
||||
/**
|
||||
* 修改场景设备
|
||||
*
|
||||
* @param sceneDevice 场景设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSceneDevice(SceneDevice sceneDevice);
|
||||
|
||||
/**
|
||||
* 删除场景设备
|
||||
*
|
||||
* @param sceneDeviceId 场景设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneDeviceBySceneDeviceId(Long sceneDeviceId);
|
||||
|
||||
/**
|
||||
* 批量删除场景设备
|
||||
*
|
||||
* @param sceneDeviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneDeviceBySceneDeviceIds(Long[] sceneDeviceIds);
|
||||
|
||||
/**
|
||||
* 批量删除场景设备
|
||||
*
|
||||
* @param sceneIds 需要删除的数据场景ID集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneDeviceBySceneIds(Long[] sceneIds);
|
||||
|
||||
/**
|
||||
* 批量新增场景脚本
|
||||
*
|
||||
* @param sceneDeviceList 场景联动触发器集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSceneDeviceList(List<SceneDevice> sceneDeviceList);
|
||||
|
||||
/**
|
||||
* 查询设备关联的场景列表
|
||||
*
|
||||
* @param sceneDevice 场景设备
|
||||
* @return 场景设备集合
|
||||
*/
|
||||
public List<Scene> selectTriggerDeviceRelateScenes(SceneDevice sceneDevice);
|
||||
|
||||
/**
|
||||
* 查询场景联动绑定产品
|
||||
* @param productIds 产品id数组
|
||||
* @return java.util.List<com.fastbee.iot.model.SceneDeviceBindVO>
|
||||
*/
|
||||
List<SceneDeviceBindVO> listSceneProductBind(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 查询场景联动绑定设备
|
||||
* @param serialNumber 设备编号
|
||||
* @return java.util.List<com.fastbee.iot.model.SceneDeviceBindVO>
|
||||
*/
|
||||
List<SceneDeviceBindVO> listSceneDeviceBind(String serialNumber);
|
||||
|
||||
/**
|
||||
* 查询设备用户对应的场景
|
||||
* @param serialNumber 设备编号
|
||||
* @param: userIdList
|
||||
* @return java.lang.Long[]
|
||||
*/
|
||||
Long[] listSceneIdByDeviceIdAndUserId(@Param("serialNumber") String serialNumber, @Param("userIdList") List<Long> userIdList);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user