From 1e362f233b51c13cba6cab6e8109b9ec8960868f Mon Sep 17 00:00:00 2001 From: gx_ma <1773945958@qq.com> Date: Thu, 5 Mar 2026 16:32:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=92=8C?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fastbee/common/utils/DateUtils.java | 10 ++ .../utils/collection/CollectionUtils.java | 36 ++++ .../data/controller/DeviceController.java | 61 +++++++ .../datacenter/DataCenterController.java | 69 +++++++ .../com/fastbee/iot/domain/DeviceLog.java | 6 + .../fastbee/iot/mapper/DeviceLogMapper.java | 19 +- .../fastbee/iot/mapper/FunctionLogMapper.java | 21 +++ .../fastbee/iot/mapper/IotDbLogMapper.java | 13 ++ .../fastbee/iot/mapper/TDDeviceLogMapper.java | 12 ++ .../fastbee/iot/model/DataCenterParam.java | 29 +++ .../fastbee/iot/model/DeviceHistoryParam.java | 45 +++++ .../com/fastbee/iot/model/FunctionLogVO.java | 129 +++++++++++++ .../iot/model/ThingsModelLogCountVO.java | 19 ++ .../fastbee/iot/model/dto/ThingsModelDTO.java | 99 ++++++++++ .../iot/service/DataCenterService.java | 36 ++++ .../iot/service/IDeviceLogService.java | 16 ++ .../fastbee/iot/service/IDeviceService.java | 4 + .../iot/service/IFunctionLogService.java | 18 ++ .../service/impl/DataCenterServiceImpl.java | 145 +++++++++++++++ .../service/impl/DeviceLogServiceImpl.java | 13 ++ .../iot/service/impl/DeviceServiceImpl.java | 20 +++ .../service/impl/FunctionLogServiceImpl.java | 32 ++++ .../fastbee/iot/tsdb/service/ILogService.java | 15 +- .../tsdb/service/impl/InfluxLogService.java | 169 +++++++++++++++++- .../tsdb/service/impl/IotDbLogService.java | 16 +- .../service/impl/MySqlLogServiceImpl.java | 31 +++- .../service/impl/TdengineLogServiceImpl.java | 18 +- .../resources/mapper/iot/DeviceLogMapper.xml | 38 ++++ .../mapper/iot/FunctionLogMapper.xml | 36 ++++ .../resources/mapper/iot/IotDbLogMapper.xml | 40 ++++- .../mapper/iot/TDDeviceLogMapper.xml | 49 ++++- springboot/sql/dameng/fastbee-v2.1.sql | 3 + springboot/sql/fastbee.sql | 3 + springboot/sql/oracle/fastbee-v2.1.sql | 3 + springboot/sql/postgres/fastbee-v2.1.sql | 3 + springboot/sql/sqlserver/fastbee-v2.1.sql | 2 +- 36 files changed, 1254 insertions(+), 24 deletions(-) create mode 100644 springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/datacenter/DataCenterController.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DataCenterParam.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DeviceHistoryParam.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/FunctionLogVO.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/ThingsModelLogCountVO.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/dto/ThingsModelDTO.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/DataCenterService.java create mode 100644 springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DataCenterServiceImpl.java diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DateUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DateUtils.java index cb132ad7..6b1039f1 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DateUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DateUtils.java @@ -230,4 +230,14 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils System.out.println(s1); } + + /** + * 日期去除毫秒 + * @param time 时间 + * @return java.util.Date + */ + public static Date dateRemoveMs(Date time) { + String s = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, time); + return DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, s); + } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/collection/CollectionUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/collection/CollectionUtils.java index 6194100b..f3aab88d 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/collection/CollectionUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/collection/CollectionUtils.java @@ -229,4 +229,40 @@ public class CollectionUtils { public static Collection singleton(T deptId) { return deptId == null ? Collections.emptyList() : Collections.singleton(deptId); } + + /** + * 开始分页 + * + * @param list 传入的list集合 + * @param pageNum 页码 + * @param pageSize 每页多少条数据 + * @return + */ + public static List startPage(List list, Integer pageNum, + Integer pageSize) { + if (list == null) { + return null; + } + if (list.size() == 0) { + return null; + } + Integer count = list.size(); // 记录总数 + Integer pageCount = 0; // 页数 + if (count % pageSize == 0) { + pageCount = count / pageSize; + } else { + pageCount = count / pageSize + 1; + } + int fromIndex = 0; // 开始索引 + int toIndex = 0; // 结束索引 + if (!pageNum.equals(pageCount)) { + fromIndex = (pageNum - 1) * pageSize; + toIndex = fromIndex + pageSize; + } else { + fromIndex = (pageNum - 1) * pageSize; + toIndex = count; + } + List pageList = list.subList(fromIndex, toIndex); + return pageList; + } } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java index 838b877d..8c30c6a9 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java @@ -1,24 +1,35 @@ package com.fastbee.data.controller; import com.fastbee.common.annotation.Log; +import com.fastbee.common.constant.HttpStatus; import com.fastbee.common.core.controller.BaseController; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; +import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.Device; import com.fastbee.iot.model.DeviceRelateUserInput; +import com.fastbee.iot.model.ThingsModelItem.ThingsModel; +import com.fastbee.iot.model.dto.ThingsModelDTO; import com.fastbee.iot.service.IDeviceService; import com.fastbee.mq.service.IMqttMessagePublish; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.collections4.CollectionUtils; import org.quartz.SchedulerException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import java.util.Objects; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 设备Controller @@ -262,4 +273,54 @@ public class DeviceController extends BaseController return AjaxResult.success(deviceService.getMqttConnectData(deviceId)); } + /** + * 查询变量概况 + */ + @PreAuthorize("@ss.hasPermi('iot:device:query')") + @GetMapping("/listThingsModel") + @ApiOperation("查询变量概况") + public TableDataInfo listThingsModel(Integer pageNum, Integer pageSize, Long deviceId, String modelName, Integer type, Integer isMonitor, Integer isReadonly) { + Device device = deviceService.selectDeviceByDeviceId(deviceId); + if (Objects.isNull(device)) { + return new TableDataInfo(); + } + TableDataInfo rspData = new TableDataInfo(); + rspData.setCode(HttpStatus.SUCCESS); + rspData.setMsg("查询成功"); + List thingsModelDTOList = deviceService.listThingsModel(deviceId); + if (CollectionUtils.isEmpty(thingsModelDTOList)) { + rspData.setRows(thingsModelDTOList); + rspData.setTotal(thingsModelDTOList.size()); + return rspData; + } + List> predicateList = new ArrayList<>(); + if (StringUtils.isNotEmpty(modelName)) { + predicateList.add(o -> o.getName().contains(modelName)); + } + if (null != type) { + predicateList.add(o -> Objects.equals(o.getType(), type)); + } + if (null != isMonitor) { + predicateList.add(o -> Objects.equals(isMonitor, o.getIsMonitor())); + } + if (null != isReadonly) { + predicateList.add(o -> Objects.equals(isReadonly, o.getIsReadonly())); + predicateList.add(o -> !Objects.equals(3, o.getType())); + } + Stream stream = thingsModelDTOList.stream(); + for (Predicate predicate : predicateList) { + stream = stream.filter(predicate); + } + List filterList = stream.collect(Collectors.toList()); + filterList.sort(Comparator.comparing(ThingsModel::getOrder).reversed().thenComparing(ThingsModel::getId)); + if (CollectionUtils.isNotEmpty(filterList)) { + List resultList = com.fastbee.common.utils.collection.CollectionUtils.startPage(filterList, pageNum, pageSize); + rspData.setRows(resultList); + } else { + rspData.setRows(new ArrayList<>()); + } + rspData.setTotal(filterList.size()); + return rspData; + } + } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/datacenter/DataCenterController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/datacenter/DataCenterController.java new file mode 100644 index 00000000..bfc801d8 --- /dev/null +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/datacenter/DataCenterController.java @@ -0,0 +1,69 @@ +package com.fastbee.data.controller.datacenter; + +import com.alibaba.fastjson2.JSONObject; +import com.fastbee.common.core.domain.AjaxResult; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.DeviceHistoryParam; +import com.fastbee.iot.model.ThingsModelLogCountVO; +import com.fastbee.iot.service.DataCenterService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; + + + + +/** + * @author fastb + * @version 1.0 + * @description: 数据中心控制器 + * @date 2024-06-13 14:09 + */ +@Api(tags = "数据中心管理") +@RestController +@RequestMapping("/data/center") +public class DataCenterController { + + @Resource + private DataCenterService dataCenterService; + + /** + * 查询设备物模型的历史数据 + * @param deviceHistoryParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + @ApiOperation("查询设备的历史数据") + @PreAuthorize("@ss.hasPermi('dataCenter:history:list')") + @PostMapping("/deviceHistory") + public AjaxResult deviceHistory(@RequestBody DeviceHistoryParam deviceHistoryParam) + { + if (StringUtils.isEmpty(deviceHistoryParam.getSerialNumber())) { + return AjaxResult.error(MessageUtils.message("please.select.device")); + } + List jsonObject = dataCenterService.deviceHistory(deviceHistoryParam); + return AjaxResult.success(jsonObject); + } + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + @ApiOperation("统计设备物模型指令下发数量") + @PreAuthorize("@ss.hasPermi('dataCenter:analysis:list')") + @GetMapping("/countThingsModelInvoke") + public AjaxResult countThingsModelInvoke(DataCenterParam dataCenterParam) + { + if (StringUtils.isEmpty(dataCenterParam.getSerialNumber())) { + return AjaxResult.error(MessageUtils.message("please.incoming.serialNumber")); + } + List list = dataCenterService.countThingsModelInvoke(dataCenterParam); + return AjaxResult.success(list); + } + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceLog.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceLog.java index 6ef7875e..a8f906cf 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceLog.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceLog.java @@ -5,6 +5,8 @@ import com.fastbee.iot.model.ThingsModelItem.*; import com.fastbee.iot.model.ThingsModels.ThingsModelValueItemDto; 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; @@ -21,7 +23,9 @@ import java.util.List; * @author kerwincui * @date 2022-01-13 */ +@EqualsAndHashCode(callSuper = true) @ApiModel(value = "DeviceLog", description = "设备日志对象 iot_device_log") +@Data public class DeviceLog extends BaseEntity { private static final long serialVersionUID = 1L; @@ -129,6 +133,8 @@ public class DeviceLog extends BaseEntity /*是否历史存储*/ private Integer isHistory; + private List identityList; + public Integer getIsHistory() { return isHistory; } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java index b5ea300d..5ef118f8 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java @@ -2,11 +2,11 @@ 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.MonitorModel; +import com.fastbee.iot.model.*; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.Date; import java.util.List; /** @@ -94,4 +94,19 @@ public interface DeviceLogMapper */ public List selectDeviceLogList(DeviceLog deviceLog); + /** + * 查询物模型历史数据 + * @param deviceLog 设备日志 + * @return java.util.List + */ + List listHistory(DeviceLog deviceLog); + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(@Param("dataCenterParam") DataCenterParam dataCenterParam, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime); + + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/FunctionLogMapper.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/FunctionLogMapper.java index 56059e51..167bf389 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/FunctionLogMapper.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/FunctionLogMapper.java @@ -1,7 +1,13 @@ package com.fastbee.iot.mapper; +import java.util.Date; import java.util.List; import com.fastbee.iot.domain.FunctionLog; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.FunctionLogVO; +import com.fastbee.iot.model.HistoryModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; /** @@ -94,4 +100,19 @@ public interface FunctionLogMapper * @param log */ public void updateByMessageId(FunctionLog log); + + /** + * 查询物模型历史数据 + * @param functionLogVO 功能日志 + * @return java.util.List + */ + List listHistory(FunctionLogVO functionLogVO); + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(@Param("dataCenterParam") DataCenterParam dataCenterParam, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime); + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/IotDbLogMapper.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/IotDbLogMapper.java index 61e77b80..114c9c8f 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/IotDbLogMapper.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/IotDbLogMapper.java @@ -2,7 +2,10 @@ package com.fastbee.iot.mapper; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.HistoryModel; import com.fastbee.iot.model.MonitorModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -35,4 +38,14 @@ public interface IotDbLogMapper { List selectDeviceLogList(@Param("device") DeviceLog deviceLog); List selectEventLogList(@Param("device") DeviceLog deviceLog); + List listHistory(@Param("device") DeviceLog deviceLog); + + /** + * 统计设备物模型指令下发数量 + * + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(@Param("dataCenterParam") DataCenterParam dataCenterParam); + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/TDDeviceLogMapper.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/TDDeviceLogMapper.java index 4beb3629..e7d4578d 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/TDDeviceLogMapper.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/TDDeviceLogMapper.java @@ -3,8 +3,10 @@ package com.fastbee.iot.mapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; +import com.fastbee.iot.model.DataCenterParam; import com.fastbee.iot.model.HistoryModel; import com.fastbee.iot.model.MonitorModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; import com.fastbee.iot.tsdb.model.TdLogDto; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -81,4 +83,14 @@ public interface TDDeviceLogMapper { int deleteDeviceLogByDeviceNumber(@Param("database") String dbName, @Param("serialNumber") String serialNumber); + List listHistory(@Param("database") String database, @Param("device") DeviceLog deviceLog); + + /** + * 统计设备物模型指令下发数量 + * + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(@Param("database") String database, @Param("dataCenterParam") DataCenterParam dataCenterParam); + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DataCenterParam.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DataCenterParam.java new file mode 100644 index 00000000..9622d3a6 --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DataCenterParam.java @@ -0,0 +1,29 @@ +package com.fastbee.iot.model; + +import lombok.Data; + +/** + * @author fastb + * @version 1.0 + * @description: 数据中心统一传参类 + * @date 2024-06-19 17:07 + */ +@Data +public class DataCenterParam { + + /** + * 设备编号 + */ + private String serialNumber; + + /** + * 开始时间 + */ + private String beginTime; + + /** + * 结束时间 + */ + private String endTime; + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DeviceHistoryParam.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DeviceHistoryParam.java new file mode 100644 index 00000000..64d5eeac --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/DeviceHistoryParam.java @@ -0,0 +1,45 @@ +package com.fastbee.iot.model; + +import lombok.Data; + +import java.util.List; + +/** + * @author fastb + * @version 1.0 + * @description: 设备历史数据参数 + * @date 2024-06-13 15:15 + */ +@Data +public class DeviceHistoryParam { + + /** + * 设备id + */ + private Long deviceId; + + /** + * 设备编号 + */ + private String serialNumber; + + + private List identifierList; + + private String identifierStr; + + /** 查询用的开始时间 */ + private String beginTime; + + /** 查询用的结束时间 */ + private String endTime; + + @Data + public static class IdentifierVO { + + private String identifier; + + private Integer type; + + } +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/FunctionLogVO.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/FunctionLogVO.java new file mode 100644 index 00000000..a789d7e3 --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/FunctionLogVO.java @@ -0,0 +1,129 @@ +package com.fastbee.iot.model; + +import com.fastbee.common.annotation.Excel; +import com.fastbee.common.core.domain.PageEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; +import java.util.List; + + +/** + * 设备服务下发日志对象 iot_function_log + * + * @author zhuangpeng.li + * @date 2024-11-13 + */ + +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "FunctionLogVO", description = "设备服务下发日志 iot_function_log") +@Data +public class FunctionLogVO extends PageEntity { + + /** 设备功能日志ID */ + @Excel(name = "设备功能日志ID") + @ApiModelProperty("设备功能日志ID") + private Long id; + + /** 标识符 */ + @Excel(name = "标识符") + @ApiModelProperty("标识符") + private String identify; + + /** 1==服务下发,2=属性获取,3.OTA升级 */ + @Excel(name = "1==服务下发,2=属性获取,3.OTA升级") + @ApiModelProperty("1==服务下发,2=属性获取,3.OTA升级") + private Integer funType; + + /** 日志值 */ + @Excel(name = "日志值") + @ApiModelProperty("日志值") + private String funValue; + + /** 消息id */ + @Excel(name = "消息id") + @ApiModelProperty("消息id") + private String messageId; + + /** 设备名称 */ + @Excel(name = "设备名称") + @ApiModelProperty("设备名称") + private String deviceName; + + /** 设备编号 */ + @Excel(name = "设备编号") + @ApiModelProperty("设备编号") + private String serialNumber; + + /** 模式(1=影子模式,2=在线模式,3=其他) */ + @Excel(name = "模式(1=影子模式,2=在线模式,3=其他)") + @ApiModelProperty("模式(1=影子模式,2=在线模式,3=其他)") + private Integer mode; + + /** 用户id */ + @Excel(name = "用户id") + @ApiModelProperty("用户id") + private Long userId; + + /** 下发结果描述 */ + @Excel(name = "下发结果描述") + @ApiModelProperty("下发结果描述") + private String resultMsg; + + /** 下发结果代码 */ + @Excel(name = "下发结果代码") + @ApiModelProperty("下发结果代码") + private Integer resultCode; + + /** 创建者 */ + @Excel(name = "创建者") + @ApiModelProperty("创建者") + private String createBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("创建时间") + @Excel(name = "创建时间") + private Date createTime; + + /** 备注 */ + @Excel(name = "备注") + @ApiModelProperty("备注") + private String remark; + + /** 显示值 */ + @Excel(name = "显示值") + @ApiModelProperty("显示值") + private String showValue; + + /** 物模型名称 */ + @Excel(name = "物模型名称") + @ApiModelProperty("物模型名称") + private String modelName; + + /** 设备回复时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("设备回复时间") + @Excel(name = "设备回复时间") + private Date replyTime; + + /** 仅用于查询时筛选条件 */ + private String prefixIdentify; + + private String dataType; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date beginTime; + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + private List list; + + private List identifyList; + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/ThingsModelLogCountVO.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/ThingsModelLogCountVO.java new file mode 100644 index 00000000..b500aec6 --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/ThingsModelLogCountVO.java @@ -0,0 +1,19 @@ +package com.fastbee.iot.model; + +import lombok.Data; + +/** + * @author fastb + * @version 1.0 + * @description: 统计物模型日志数量 + * @date 2024-06-17 11:36 + */ +@Data +public class ThingsModelLogCountVO { + + private String identifier; + + private String modelName; + + private Integer counts; +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/dto/ThingsModelDTO.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/dto/ThingsModelDTO.java new file mode 100644 index 00000000..c9393943 --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/model/dto/ThingsModelDTO.java @@ -0,0 +1,99 @@ +package com.fastbee.iot.model.dto; + +import com.fastbee.common.core.domain.BaseEntity; +import com.fastbee.iot.model.ThingsModelItem.Datatype; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 物模型对象 iot_things_model + * + * @author kerwincui + * @date 2023-01-14 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class ThingsModelDTO extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 物模型ID */ + private Long modelId; + + /** 物模型名称 */ + private String modelName; + + /** 产品ID */ + private Long productId; + + /** 产品名称 */ + private String productName; + + /** 租户ID */ + private Long tenantId; + + /** 租户名称 */ + private String tenantName; + + /** 标识符,产品下唯一 */ + private String identifier; + + /** 模型类别(1-属性,2-功能,3-事件) */ + private Integer type; + + /** 计算公式 */ + private String formula; + + /** 数据定义 */ + private String specs; + + /** 是否图表显示(0-否,1-是) */ + private Integer isChart; + + /** 是否历史存储(0-否,1-是) */ + private Integer isHistory; + + /** 是否实时监测(0-否,1-是) */ + private Integer isMonitor; + + /** 是否分享设备权限(0-否,1-是) */ + private Integer isSharePerm; + + /** 是否分享设备权限(0-否,1-是) */ + private Integer isApp; + + private String unit; + + /** 数据定义 */ + private Datatype datatype; + + private String limitValue; + + /** 是否只读数据(0-否,1-是) */ + private Integer isReadonly; + + + private Integer modelOrder; + + private String value = ""; + + private String ts; + + private String serialNumber; + + private Boolean isShadow; + /** + * 是否可下发指令 0 -不可操作 1-可 + */ + private Integer canSend; + + private String shadow = ""; + + /** + * 所属设备名称 + */ + private String deviceName; + + private String address; + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/DataCenterService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/DataCenterService.java new file mode 100644 index 00000000..eac548ff --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/DataCenterService.java @@ -0,0 +1,36 @@ +package com.fastbee.iot.service; + +import com.alibaba.fastjson2.JSONObject; +import com.fastbee.iot.model.DeviceHistoryParam; +import com.fastbee.iot.model.HistoryModel; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.ThingsModelLogCountVO; +import java.util.List; + +/** + * 数据中心服务类 + * @author fastb + * @date 2024-06-13 15:29 + * @version 1.0 + */ +public interface DataCenterService { + + /** + * 查询设备物模型的历史数据 + * @param deviceHistoryParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List deviceHistory(DeviceHistoryParam deviceHistoryParam); + + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(DataCenterParam dataCenterParam); + + + List queryDeviceHistory(DeviceHistoryParam deviceHistoryParam); + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceLogService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceLogService.java index c7629cd0..97b725b1 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceLogService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceLogService.java @@ -1,8 +1,10 @@ package com.fastbee.iot.service; import com.fastbee.iot.domain.DeviceLog; +import com.fastbee.iot.model.DataCenterParam; import com.fastbee.iot.model.HistoryModel; import com.fastbee.iot.model.MonitorModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; import java.util.List; import java.util.Map; @@ -40,4 +42,18 @@ public interface IDeviceLogService */ public int insertDeviceLog(DeviceLog deviceLog); + /** + * 查询物模型历史数据 + * @param deviceLog 设备日志 + * @return java.util.List + */ + List listHistory(DeviceLog deviceLog); + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(DataCenterParam dataCenterParam); + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceService.java index 2ab0a189..06e52e6b 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IDeviceService.java @@ -5,9 +5,11 @@ import com.fastbee.common.core.thingsModel.ThingsModelSimpleItem; import com.fastbee.common.enums.DeviceStatus; import com.fastbee.iot.domain.Device; import com.fastbee.iot.model.*; +import com.fastbee.iot.model.ThingsModelItem.ThingsModel; import com.fastbee.iot.model.ThingsModels.ThingsModelShadow; import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem; import com.fastbee.common.core.thingsModel.ThingsModelValuesInput; +import com.fastbee.iot.model.dto.ThingsModelDTO; import org.quartz.SchedulerException; import java.util.List; @@ -273,4 +275,6 @@ public interface IDeviceService * @return */ public String[] getDeviceNumsByProductId(Long productId); + + List listThingsModel(Long deviceId); } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IFunctionLogService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IFunctionLogService.java index d701d21d..116864ad 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IFunctionLogService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/IFunctionLogService.java @@ -2,6 +2,10 @@ package com.fastbee.iot.service; import java.util.List; import com.fastbee.iot.domain.FunctionLog; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.FunctionLogVO; +import com.fastbee.iot.model.HistoryModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; /** * 设备服务下发日志Service接口 @@ -84,4 +88,18 @@ public interface IFunctionLogService * @param log */ public void updateByMessageId(FunctionLog log); + + /** + * 查询物模型历史数据 + * @param functionLogVO 功能日志 + * @return java.util.List + */ + List listHistory(FunctionLogVO functionLogVO); + + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(DataCenterParam dataCenterParam); } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DataCenterServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DataCenterServiceImpl.java new file mode 100644 index 00000000..00e0a15f --- /dev/null +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DataCenterServiceImpl.java @@ -0,0 +1,145 @@ +package com.fastbee.iot.service.impl; + + +import com.alibaba.fastjson2.JSONObject; +import com.fastbee.common.utils.DateUtils; +import com.fastbee.iot.domain.DeviceLog; +import com.fastbee.iot.model.*; +import com.fastbee.iot.model.ThingsModelItem.ThingsModel; +import com.fastbee.iot.service.*; +import com.fastbee.iot.tsdb.service.ILogService; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * @author fastb + * @version 1.0 + * @description: 数据中心服务类 + * @date 2024-06-13 15:29 + */ +@Service +public class DataCenterServiceImpl implements DataCenterService { + + @Resource + private IDeviceLogService deviceLogService; + @Resource + private IFunctionLogService functionLogService; + @Resource + private ILogService logService; + @Resource + private IDeviceService deviceService; + + + + @Override + public List deviceHistory(DeviceHistoryParam deviceHistoryParam) { + List resultList = new ArrayList<>(); + List identifierVOList = new ArrayList<>(); + if (CollectionUtils.isEmpty(deviceHistoryParam.getIdentifierList())) { + List list = deviceService.listThingsModel(deviceHistoryParam.getDeviceId()); + for (ThingsModel thingsModel : list) { + DeviceHistoryParam.IdentifierVO identifierVO = new DeviceHistoryParam.IdentifierVO(); + identifierVO.setIdentifier(thingsModel.getId()); + identifierVO.setType(thingsModel.getType()); + identifierVOList.add(identifierVO); + } + } else { + identifierVOList = deviceHistoryParam.getIdentifierList(); + } + if (CollectionUtils.isEmpty(identifierVOList)) { + return resultList; + } + List identifierList = identifierVOList.stream().map(DeviceHistoryParam.IdentifierVO::getIdentifier).collect(Collectors.toList()); + deviceHistoryParam.setIdentifierList(identifierVOList); + List historyModelList = this.queryDeviceHistory(deviceHistoryParam); + historyModelList.sort(Comparator.comparing(HistoryModel::getTime)); + return this.handleData(identifierList, historyModelList); + } + + @Override + public List queryDeviceHistory(DeviceHistoryParam deviceHistoryParam) { + List historyModelList = new ArrayList<>(); + List identifierVOList = deviceHistoryParam.getIdentifierList(); + List propertyIdentifierList = identifierVOList.stream().filter(t -> 1 == t.getType()).map(DeviceHistoryParam.IdentifierVO::getIdentifier).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(propertyIdentifierList)) { + DeviceLog deviceLog = new DeviceLog(); + deviceLog.setIdentityList(propertyIdentifierList); + deviceLog.setSerialNumber(deviceHistoryParam.getSerialNumber()); + deviceLog.setBeginTime(deviceHistoryParam.getBeginTime()); + deviceLog.setEndTime(deviceHistoryParam.getEndTime()); + List historyModelList1 = deviceLogService.listHistory(deviceLog); + historyModelList.addAll(historyModelList1); + } + List functionIdentifierList = identifierVOList.stream().filter(t -> 2 == t.getType()).map(DeviceHistoryParam.IdentifierVO::getIdentifier).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(functionIdentifierList)) { + FunctionLogVO functionLogVO = new FunctionLogVO(); + functionLogVO.setIdentifyList(functionIdentifierList); + functionLogVO.setSerialNumber(deviceHistoryParam.getSerialNumber()); + functionLogVO.setBeginTime(DateUtils.dateTime(DateUtils.YY_MM_DD_HH_MM_SS, deviceHistoryParam.getBeginTime())); + functionLogVO.setEndTime(DateUtils.dateTime(DateUtils.YY_MM_DD_HH_MM_SS, deviceHistoryParam.getEndTime())); + historyModelList.addAll(functionLogService.listHistory(functionLogVO)); + } + List eventIdentifierList = identifierVOList.stream().filter(t -> 3 == t.getType()).map(DeviceHistoryParam.IdentifierVO::getIdentifier).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(eventIdentifierList)) { + DeviceLog eventLog = new DeviceLog(); + eventLog.setIdentityList(eventIdentifierList); + eventLog.setSerialNumber(deviceHistoryParam.getSerialNumber()); + eventLog.setBeginTime(deviceHistoryParam.getBeginTime()); + eventLog.setEndTime(deviceHistoryParam.getEndTime()); + historyModelList.addAll(logService.listHistory(eventLog)); + } + return historyModelList; + } + + private List handleData(List identifierList, List historyModelList) { + List resultList = new ArrayList<>(); + if (CollectionUtils.isEmpty(historyModelList)) { + return resultList; + } + LinkedHashMap> map = historyModelList.stream() + .collect(Collectors.groupingBy(HistoryModel::getTime, LinkedHashMap::new, Collectors.toList())); +// Map oldHistoryModelMap = new HashMap<>(2); + for (Map.Entry> entry : map.entrySet()) { + JSONObject jsonObject = new JSONObject(); + List value = entry.getValue(); + Map historyModelMap = value.stream().collect(Collectors.toMap(HistoryModel::getIdentify, Function.identity(), (o, n) -> n)); + List jsonObjectList = new ArrayList<>(); + for (String identifier : identifierList) { + JSONObject jsonObject1 = new JSONObject(); + HistoryModel historyModel = historyModelMap.get(identifier); + if (null != historyModel) { +// oldHistoryModelMap.put(identifier, historyModel); + jsonObject1.put(historyModel.getIdentify(), historyModel.getValue()); + } else { +// HistoryModel oldHistoryModel = oldHistoryModelMap.get(identifier); +// if (null != oldHistoryModel) { +// jsonObject1.put(identifier, oldHistoryModel.getValue()); +// } else { +// jsonObject1.put(identifier, null); +// } + jsonObject1.put(identifier, null); + } + jsonObjectList.add(jsonObject1); + } + jsonObject.put(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, entry.getKey()), jsonObjectList); + resultList.add(jsonObject); + } + return resultList; + } + + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + List resultList = new ArrayList<>(); + resultList.addAll(deviceLogService.countThingsModelInvoke(dataCenterParam)); + resultList.addAll(functionLogService.countThingsModelInvoke(dataCenterParam)); + return resultList; + } + + + +} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceLogServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceLogServiceImpl.java index 05cccbc9..f8396807 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceLogServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceLogServiceImpl.java @@ -4,6 +4,9 @@ import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.utils.DateUtils; import com.fastbee.common.utils.SecurityUtils; import com.fastbee.iot.domain.DeviceLog; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.HistoryModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; import com.fastbee.iot.tsdb.service.ILogService; import com.fastbee.iot.model.MonitorModel; import com.fastbee.iot.service.IDeviceLogService; @@ -67,4 +70,14 @@ public class DeviceLogServiceImpl implements IDeviceLogService deviceLog.setCreateBy(loginUser.getUsername()); return logService.saveDeviceLog(deviceLog); } + + @Override + public List listHistory(DeviceLog deviceLog) { + return logService.listHistory(deviceLog); + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + return logService.countThingsModelInvoke(dataCenterParam); + } } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java index 6d807cee..466918c3 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java @@ -34,6 +34,7 @@ import com.fastbee.iot.model.ThingsModels.PropertyDto; import com.fastbee.iot.model.ThingsModels.ThingsModelShadow; import com.fastbee.iot.model.ThingsModels.ThingsModelValueItem; import com.fastbee.iot.model.ThingsModels.ValueItem; +import com.fastbee.iot.model.dto.ThingsModelDTO; import com.fastbee.iot.service.*; import com.fastbee.iot.service.cache.IDeviceCache; import com.fastbee.iot.tsdb.service.ILogService; @@ -52,6 +53,7 @@ import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.math.BigDecimal; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; import static com.fastbee.common.utils.SecurityUtils.getLoginUser; @@ -1413,4 +1415,22 @@ public class DeviceServiceImpl implements IDeviceService { return deviceMapper.getDeviceNumsByProductId(productId); } + @Override + public List listThingsModel(Long deviceId) { + Device device = deviceMapper.selectDeviceByDeviceId(deviceId); + JSONObject thingsModelObject = JSONObject.parseObject(thingsModelService.getCacheThingsModelByProductId(device.getProductId())); + JSONArray properties = thingsModelObject.getJSONArray("properties"); + JSONArray functions = thingsModelObject.getJSONArray("functions"); + List thingsModelValueItems = getCacheDeviceStatus(device.getProductId(), device.getSerialNumber()); + // 物模型转换赋值 + List thingsList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(properties)) { + thingsList.addAll(convertJsonToThingsList(properties, thingsModelValueItems, 1)); + } + if (!CollectionUtils.isEmpty(functions)) { + thingsList.addAll(convertJsonToThingsList(functions, thingsModelValueItems, 2)); + } + return thingsList; + } + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/FunctionLogServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/FunctionLogServiceImpl.java index d36a4031..324568c5 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/FunctionLogServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/FunctionLogServiceImpl.java @@ -1,7 +1,14 @@ package com.fastbee.iot.service.impl; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import com.fastbee.common.utils.DateUtils; +import com.fastbee.iot.model.DataCenterParam; +import com.fastbee.iot.model.FunctionLogVO; +import com.fastbee.iot.model.HistoryModel; +import com.fastbee.iot.model.ThingsModelLogCountVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.fastbee.iot.mapper.FunctionLogMapper; @@ -131,4 +138,29 @@ public class FunctionLogServiceImpl implements IFunctionLogService public void updateByMessageId(FunctionLog log){ functionLogMapper.updateByMessageId(log); } + + @Override + public List listHistory(FunctionLogVO functionLogVO) { + return functionLogMapper.listHistory(functionLogVO); + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + Date beginTime = null; + Date endTime = null; + if (dataCenterParam.getBeginTime() != null && dataCenterParam.getBeginTime() != "" && dataCenterParam.getEndTime() != null && dataCenterParam.getEndTime() != "") { + beginTime = parseTime(dataCenterParam.getBeginTime()); + endTime = parseTime(dataCenterParam.getEndTime()); + } + return functionLogMapper.countThingsModelInvoke(dataCenterParam, beginTime, endTime); + } + + private Date parseTime(String time) { + try { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return format.parse(time); + } catch (ParseException e) { + throw new IllegalArgumentException("时间格式错误: " + time, e); + } + } } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/ILogService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/ILogService.java index e8c92b7d..4ea3bd71 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/ILogService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/ILogService.java @@ -3,8 +3,7 @@ package com.fastbee.iot.tsdb.service; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; -import com.fastbee.iot.model.DeviceStatistic; -import com.fastbee.iot.model.MonitorModel; +import com.fastbee.iot.model.*; import com.fastbee.iot.tsdb.model.TdLogDto; import java.util.List; @@ -40,5 +39,17 @@ public interface ILogService { /** 查询物模型日志列表 **/ List selectDeviceLogList(DeviceLog deviceLog); + /** + * 查询物模型历史数据 + * @param deviceLog 设备日志 + * @return java.util.List + */ + List listHistory(DeviceLog deviceLog); + /** + * 统计设备物模型指令下发数量 + * @param dataCenterParam 传参 + * @return com.fastbee.common.core.domain.AjaxResult + */ + List countThingsModelInvoke(DataCenterParam dataCenterParam); } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/InfluxLogService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/InfluxLogService.java index c784e9a5..25ec14f5 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/InfluxLogService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/InfluxLogService.java @@ -4,9 +4,7 @@ import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.*; import com.fastbee.iot.tsdb.config.InfluxConfig; import com.fastbee.iot.tsdb.service.ILogService; import com.fastbee.iot.tsdb.model.TdLogDto; @@ -511,4 +509,169 @@ public class InfluxLogService implements ILogService { return monitorList; } + @Override + public List listHistory(DeviceLog deviceLog) { + QueryApi queryApi = influxDBClient.getQueryApi(); + + StringBuilder fluxQuery = new StringBuilder(); + fluxQuery.append("from(bucket: \"").append(influxConfig.getBucket()).append("\") "); + + // 处理时间范围 + if (deviceLog.getBeginTime() != null && !deviceLog.getBeginTime().isEmpty() + && deviceLog.getEndTime() != null && !deviceLog.getEndTime().isEmpty()) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + Date beginDate = sdf.parse(deviceLog.getBeginTime()); + Date endDate = sdf.parse(deviceLog.getEndTime()); + // 转换为RFC3339格式时间字符串 + String startRFC3339 = beginDate.toInstant().toString(); + String stopRFC3339 = endDate.toInstant().toString(); + + fluxQuery.append("|> range(start: ") + .append(startRFC3339) + .append(", stop: ") + .append(stopRFC3339) + .append(") "); + } catch (ParseException e) { + e.printStackTrace(); + // 若解析失败,可使用默认时间范围 + fluxQuery.append("|> range(start: 0) "); + } + } else { + fluxQuery.append("|> range(start: 0) "); + } + + fluxQuery.append("|> filter(fn: (r) => r._measurement == \"").append(influxConfig.getMeasurement()).append("\") "); + fluxQuery.append("|> pivot(\n" + + " rowKey:[\"_time\"], \n" + + " columnKey: [\"_field\"], \n" + + " valueColumn: \"_value\"\n" + + " )"); + + List filterConditions = new ArrayList<>(); + if (deviceLog.getSerialNumber() != null && !deviceLog.getSerialNumber().isEmpty()) { + filterConditions.add("r.serialNumber == \"" + deviceLog.getSerialNumber() + "\""); + } + if (deviceLog.getIdentityList() != null && !deviceLog.getIdentityList().isEmpty()) { + StringBuilder identityFilter = new StringBuilder("r.identify =~ /^("); + for (int i = 0; i < deviceLog.getIdentityList().size(); i++) { + if (i > 0) { + identityFilter.append("|"); + } + identityFilter.append(deviceLog.getIdentityList().get(i)); + } + identityFilter.append(")$/"); + filterConditions.add(identityFilter.toString()); + } + if (deviceLog.getLogType() != null) { + filterConditions.add("r.logType == " + deviceLog.getLogType()); + } + + if (!filterConditions.isEmpty()) { + fluxQuery.append("|> filter(fn: (r) => "); + for (int i = 0; i < filterConditions.size(); i++) { + if (i > 0) { + fluxQuery.append(" and "); + } + fluxQuery.append(filterConditions.get(i)); + } + fluxQuery.append(") "); + } + + fluxQuery.append("|> sort(columns: [\"_time\"], desc: true) "); + + // 分页处理 + int offset = (deviceLog.getPageNum() - 1) * deviceLog.getPageSize(); + fluxQuery.append("|> limit(n: ").append(deviceLog.getPageSize()).append(", offset: ").append(offset).append(") "); + + fluxQuery.append("|> keep(columns: [\"logValue\", \"_time\", \"identify\"]) "); + + List tables = queryApi.query(fluxQuery.toString()); + + List historyList = new ArrayList<>(); + for (FluxTable table : tables) { + for (FluxRecord record : table.getRecords()) { + HistoryModel historyModel = new HistoryModel(); + historyModel.setValue((String) record.getValueByKey("logValue")); + historyModel.setTime(new Date(record.getTime().getEpochSecond() * 1000)); + historyModel.setIdentify((String) record.getValueByKey("identify")); + historyList.add(historyModel); + } + } + return historyList; + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + QueryApi queryApi = influxDBClient.getQueryApi(); + + StringBuilder fluxQuery = new StringBuilder(); + fluxQuery.append("from(bucket: \"").append(influxConfig.getBucket()).append("\") "); + + // 处理时间范围 + if (dataCenterParam.getBeginTime() != null && !dataCenterParam.getBeginTime().isEmpty() + && dataCenterParam.getEndTime() != null && !dataCenterParam.getEndTime().isEmpty()) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + Date beginDate = sdf.parse(dataCenterParam.getBeginTime()); + Date endDate = sdf.parse(dataCenterParam.getEndTime()); + // 转换为RFC3339格式时间字符串 + String startRFC3339 = beginDate.toInstant().toString(); + String stopRFC3339 = endDate.toInstant().toString(); + + fluxQuery.append("|> range(start: ") + .append(startRFC3339) + .append(", stop: ") + .append(stopRFC3339) + .append(") "); + } catch (ParseException e) { + e.printStackTrace(); + // 若解析失败,可使用默认时间范围 + fluxQuery.append("|> range(start: 0) "); + } + } else { + fluxQuery.append("|> range(start: 0) "); + } + + fluxQuery.append("|> filter(fn: (r) => r._measurement == \"").append(influxConfig.getMeasurement()).append("\") "); + fluxQuery.append("|> pivot(\n" + + " rowKey:[\"_time\"], \n" + + " columnKey: [\"_field\"], \n" + + " valueColumn: \"_value\"\n" + + " )"); + fluxQuery.append("|> filter(fn: (r) => r.log_type == 2) "); + + List filterConditions = new ArrayList<>(); + if (dataCenterParam.getSerialNumber() != null && !dataCenterParam.getSerialNumber().isEmpty()) { + filterConditions.add("r.serial_number == \"" + dataCenterParam.getSerialNumber() + "\""); + } + + if (!filterConditions.isEmpty()) { + fluxQuery.append("|> filter(fn: (r) => "); + for (int i = 0; i < filterConditions.size(); i++) { + if (i > 0) { + fluxQuery.append(" and "); + } + fluxQuery.append(filterConditions.get(i)); + } + fluxQuery.append(") "); + } + fluxQuery.append("|> group() "); + int counts = 0; + List tables = queryApi.query(fluxQuery.toString()); + if (!tables.isEmpty() && !tables.get(0).getRecords().isEmpty()) { + counts = tables.get(0).getRecords().size(); + } + List resultList = new ArrayList<>(); + for (FluxTable table : tables) { + for (FluxRecord record : table.getRecords()) { + ThingsModelLogCountVO vo = new ThingsModelLogCountVO(); + vo.setIdentifier((String) record.getValueByKey("identify")); + vo.setCounts(counts); + resultList.add(vo); + } + } + return resultList; + } + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/IotDbLogService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/IotDbLogService.java index 3f80b19e..00c35b8e 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/IotDbLogService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/IotDbLogService.java @@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; import com.fastbee.iot.mapper.IotDbLogMapper; -import com.fastbee.iot.model.DeviceStatistic; -import com.fastbee.iot.model.HistoryModel; -import com.fastbee.iot.model.MonitorModel; +import com.fastbee.iot.model.*; import com.fastbee.iot.tsdb.service.ILogService; import com.fastbee.iot.tsdb.model.TdLogDto; import lombok.extern.slf4j.Slf4j; @@ -117,4 +115,16 @@ public class IotDbLogService implements ILogService { return iotDbLogMapper.selectMonitorList(deviceLog); } + @Override + public List listHistory(DeviceLog deviceLog) { + return iotDbLogMapper.listHistory(deviceLog); + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + List thingsModelLogCountVOS = iotDbLogMapper.countThingsModelInvoke(dataCenterParam); + thingsModelLogCountVOS.forEach(vo -> {vo.setCounts(thingsModelLogCountVOS.size());}); + return thingsModelLogCountVOS; + } + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/MySqlLogServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/MySqlLogServiceImpl.java index 5b8c3cfb..2f79fce8 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/MySqlLogServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/MySqlLogServiceImpl.java @@ -5,14 +5,16 @@ import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; import com.fastbee.iot.domain.EventLog; import com.fastbee.iot.mapper.EventLogMapper; -import com.fastbee.iot.model.DeviceStatistic; +import com.fastbee.iot.model.*; import com.fastbee.iot.tsdb.model.TdLogDto; import com.fastbee.iot.tsdb.service.ILogService; import com.fastbee.iot.mapper.DeviceLogMapper; -import com.fastbee.iot.model.MonitorModel; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; @Service @@ -106,4 +108,29 @@ public class MySqlLogServiceImpl implements ILogService { public List selectDeviceLogList(DeviceLog deviceLog) { return deviceLogMapper.selectDeviceLogList(deviceLog); } + + @Override + public List listHistory(DeviceLog deviceLog) { + return deviceLogMapper.listHistory(deviceLog); + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + Date beginTime = null; + Date endTime = null; + if (dataCenterParam.getBeginTime() != null && dataCenterParam.getEndTime() != null) { + beginTime = parseTime(dataCenterParam.getBeginTime()); + endTime = parseTime(dataCenterParam.getEndTime()); + } + return deviceLogMapper.countThingsModelInvoke(dataCenterParam, beginTime, endTime); + } + + private Date parseTime(String time) { + try { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return format.parse(time); + } catch (ParseException e) { + throw new IllegalArgumentException("时间格式错误: " + time, e); + } + } } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/TdengineLogServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/TdengineLogServiceImpl.java index 166e83c1..39d4be8f 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/TdengineLogServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/tsdb/service/impl/TdengineLogServiceImpl.java @@ -1,11 +1,11 @@ package com.fastbee.iot.tsdb.service.impl; import com.baomidou.dynamic.datasource.annotation.DS; +import com.fastbee.common.utils.DateUtils; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; -import com.fastbee.iot.model.DeviceStatistic; +import com.fastbee.iot.model.*; import com.fastbee.iot.tsdb.service.ILogService; -import com.fastbee.iot.model.MonitorModel; import com.fastbee.iot.mapper.TDDeviceLogMapper; import com.fastbee.iot.tsdb.model.TdLogDto; import com.fastbee.iot.util.SnowflakeIdWorker; @@ -123,4 +123,18 @@ public class TdengineLogServiceImpl implements ILogService { return tDDeviceLogMapper.deleteDeviceLogByDeviceNumber(dbName, deviceNumber); } + @Override + public List listHistory(DeviceLog deviceLog) { + List historyModelList = tDDeviceLogMapper.listHistory(dbName, deviceLog); + for (HistoryModel historyModel : historyModelList) { + historyModel.setTime(DateUtils.dateRemoveMs(historyModel.getTime())); + } + return historyModelList; + } + + @Override + public List countThingsModelInvoke(DataCenterParam dataCenterParam) { + return tDDeviceLogMapper.countThingsModelInvoke(dbName, dataCenterParam); + } + } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml index 816379b2..b5fa6726 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml @@ -194,4 +194,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc + + + + diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/FunctionLogMapper.xml b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/FunctionLogMapper.xml index 7a39efdf..b48838f6 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/FunctionLogMapper.xml +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/FunctionLogMapper.xml @@ -182,4 +182,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where message_id = #{messageId} + + + + \ No newline at end of file diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/IotDbLogMapper.xml b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/IotDbLogMapper.xml index cad5fe32..8c40e3e2 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/IotDbLogMapper.xml +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/IotDbLogMapper.xml @@ -35,9 +35,9 @@ - - - + + + create database ${database} @@ -177,6 +177,40 @@ order by time desc + + diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/TDDeviceLogMapper.xml b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/TDDeviceLogMapper.xml index 9e5a29c0..f99de1c2 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/TDDeviceLogMapper.xml +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/TDDeviceLogMapper.xml @@ -27,12 +27,11 @@ - - - - - - + + + + + @@ -173,4 +172,42 @@ order by ts desc + + + + diff --git a/springboot/sql/dameng/fastbee-v2.1.sql b/springboot/sql/dameng/fastbee-v2.1.sql index b9271a8d..58ca22c8 100644 --- a/springboot/sql/dameng/fastbee-v2.1.sql +++ b/springboot/sql/dameng/fastbee-v2.1.sql @@ -408,6 +408,9 @@ INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COM INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3059,'通道管理',3058,1,'sip','iot/sip/index',null,1,0,'C','0','0','iot:video:list','swagger','admin',TO_DATE('2024-07-15 14:43:22.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),'',null,''); INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3060,'视频配置',3058,2,'mediaServer','iot/sip/mediaServer',null,1,0,'C','0','0',null,'edit','admin',TO_DATE('2024-07-15 14:48:52.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),'',null,''); INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3062,'大屏展示',2000,6,'http://localhost/bigScreen',null,null,0,0,'M','0','0','','monitor-a','admin',TO_DATE('2025-03-19 15:07:39.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),'admin',TO_DATE('2025-03-20 22:18:42.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),''); +INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3343, '数据中心', 0, 5, 'dataCenter', NULL, NULL, 1, 0, 'M', '0', 0, '', 'bar_chart', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), ''); +INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3344, '数据分析', 3343, 2, 'analysis', 'dataCenter/analysis', NULL, 1, 0, 'C', '0', 0, 'dataCenter:analysis:list', 'custom', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), '', NULL, ''); +INSERT INTO "SYS_MENU"("MENU_ID","MENU_NAME","PARENT_ID","ORDER_NUM","PATH","COMPONENT","QUERY","IS_FRAME","IS_CACHE","MENU_TYPE","VISIBLE","STATUS","PERMS","ICON","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(3345, '历史记录', 3343, 1, 'history', 'dataCenter/history', NULL, 1, 0, 'C', '0', 0, 'dataCenter:history:list', 'excel', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), ''); SET IDENTITY_INSERT "SYS_MENU" OFF; SET IDENTITY_INSERT "SYS_NOTICE" ON; INSERT INTO "SYS_NOTICE"("NOTICE_ID","NOTICE_TITLE","NOTICE_TYPE","NOTICE_CONTENT","STATUS","CREATE_BY","CREATE_TIME","UPDATE_BY","UPDATE_TIME","REMARK") VALUES(1,'FastBeeV1.2版本发布','2',0x3C703EE8BF99E698AFE6B58BE8AF95E58685E5AEB9EFBC8CE696B0E78988E69CACE58A9FE883BDEFBC9A3C2F703E3C6F6C3E3C6C693EE694AFE68C81E5A49AE7A79FE688B73C2F6C693E3C6C693EE694AFE68C81E8AEBEE5A487E58886E4BAAB3C2F6C693E3C6C693EE694AFE68C81E697B6E5BA8FE695B0E68DAEE5BA933C2F6C693E3C6C693EE7AE80E58D95E8AEA4E8AF81E5928CE58AA0E5AF86E8AEA4E8AF81E7BB9FE4B8803C2F6C693E3C2F6F6C3E,'0','admin',TO_DATE('2021-12-15 21:36:18.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),'admin',TO_DATE('2023-09-26 21:21:30.000000000','SYYYY-MM-DD HH24:MI:SS.FF9'),'管理员'); diff --git a/springboot/sql/fastbee.sql b/springboot/sql/fastbee.sql index 91400e20..7c5f69c1 100644 --- a/springboot/sql/fastbee.sql +++ b/springboot/sql/fastbee.sql @@ -2391,6 +2391,9 @@ INSERT INTO `sys_menu` VALUES (3058, '视频中心', 0, 1, 'video', NULL, NULL, INSERT INTO `sys_menu` VALUES (3059, '通道管理', 3058, 1, 'sip', 'iot/sip/index', NULL, 1, 0, 'C', '0', '0', 'iot:video:list', 'swagger', 'admin', '2024-07-15 14:43:22', '', NULL, ''); INSERT INTO `sys_menu` VALUES (3060, '视频配置', 3058, 2, 'mediaServer', 'iot/sip/mediaServer', NULL, 1, 0, 'C', '0', '0', NULL, 'edit', 'admin', '2024-07-15 14:48:52', '', NULL, ''); INSERT INTO `sys_menu` VALUES (3062, '大屏展示', 2000, 6, 'http://localhost/bigScreen', NULL, NULL, 0, 0, 'M', '0', '0', '', 'monitor-a', 'admin', '2025-03-19 15:07:39', 'admin', '2025-03-20 22:18:42', ''); +INSERT INTO `sys_menu` VALUES (3343, '数据中心', 0, 5, 'dataCenter', NULL, NULL, 1, 0, 'M', '0', 0, '', 'bar_chart', 'admin', '2024-05-24 14:42:04', 'admin', '2025-01-11 09:33:52', ''); +INSERT INTO `sys_menu` VALUES (3344, '数据分析', 3343, 2, 'analysis', 'dataCenter/analysis', NULL, 1, 0, 'C', '0', 0, 'dataCenter:analysis:list', 'custom', 'admin', '2024-06-11 15:46:19', '', NULL, ''); +INSERT INTO `sys_menu` VALUES (3345, '历史记录', 3343, 1, 'history', 'dataCenter/history', NULL, 1, 0, 'C', '0', 0, 'dataCenter:history:list', 'excel', 'admin', '2024-05-24 14:44:58', 'admin', '2024-05-24 14:46:07', ''); -- ---------------------------- -- Table structure for sys_notice diff --git a/springboot/sql/oracle/fastbee-v2.1.sql b/springboot/sql/oracle/fastbee-v2.1.sql index ad8989d6..f6903b20 100644 --- a/springboot/sql/oracle/fastbee-v2.1.sql +++ b/springboot/sql/oracle/fastbee-v2.1.sql @@ -3308,6 +3308,9 @@ INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path" INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3059', '通道管理', '3058', '1', 'sip', 'iot/sip/index', NULL, '1', '0', 'C', '0', '0', 'iot:video:list', 'swagger', 'admin', TO_DATE('2024-07-15 14:43:22', 'SYYYY-MM-DD HH24:MI:SS'), '', NULL, ''); INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3060', '视频配置', '3058', '2', 'mediaServer', 'iot/sip/mediaServer', NULL, '1', '0', 'C', '0', '0', NULL, 'edit', 'admin', TO_DATE('2024-07-15 14:48:52', 'SYYYY-MM-DD HH24:MI:SS'), '', NULL, ''); INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3062', '大屏展示', '2000', '6', 'http://localhost/bigScreen', NULL, NULL, '0', '0', 'M', '0', '0', '', 'monitor-a', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2025-03-20 22:18:42', 'SYYYY-MM-DD HH24:MI:SS'), ''); +INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3343', '数据中心', '0', '5', 'dataCenter', NULL, NULL, '1', '0', 'M', '0', '0', '', 'bar_chart', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), ''); +INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3344', '数据分析', '3343', '2', 'analysis', 'dataCenter/analysis', NULL, '1', '0', 'C', '0', '0', 'dataCenter:analysis:list', 'custom', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), '', NULL, ''); +INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES ('3345', '历史记录', '3343', '1', 'history', 'dataCenter/history', NULL, '1', '0', 'C', '0', '0', 'dataCenter:history:list', 'excel', 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), 'admin', TO_DATE('2025-03-19 15:07:39', 'SYYYY-MM-DD HH24:MI:SS'), ''); COMMIT; COMMIT; diff --git a/springboot/sql/postgres/fastbee-v2.1.sql b/springboot/sql/postgres/fastbee-v2.1.sql index f4a6cd66..73c516cf 100644 --- a/springboot/sql/postgres/fastbee-v2.1.sql +++ b/springboot/sql/postgres/fastbee-v2.1.sql @@ -3309,6 +3309,9 @@ INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3059, '通道管理', 3058, 1, 'sip', 'iot/sip/index', NULL, 1, 0, 'C', '0', '0', 'iot:video:list', 'swagger', 'admin', '2024-07-15 14:43:22', '', NULL, ''); INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3060, '视频配置', 3058, 2, 'mediaServer', 'iot/sip/mediaServer', NULL, 1, 0, 'C', '0', '0', NULL, 'edit', 'admin', '2024-07-15 14:48:52', '', NULL, ''); INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3062, '大屏展示', 2000, 6, 'http://localhost/bigScreen', NULL, NULL, 0, 0, 'M', '0', '0', '', 'monitor-a', 'admin', '2025-03-19 15:07:39', 'admin', '2025-03-20 22:18:42', ''); +INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3343, '数据中心', 0, 5, 'dataCenter', NULL, NULL, 1, 0, 'M', '0', 0, '', 'bar_chart', 'admin', '2024-05-24 14:42:04', 'admin', '2025-01-11 09:33:52', ''); +INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3344, '数据分析', 3343, 2, 'analysis', 'dataCenter/analysis', NULL, 1, 0, 'C', '0', 0, 'dataCenter:analysis:list', 'custom', 'admin', '2024-06-11 15:46:19', '', NULL, ''); +INSERT INTO "public"."sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (3345, '历史记录', 3343, 1, 'history', 'dataCenter/history', NULL, 1, 0, 'C', '0', 0, 'dataCenter:history:list', 'excel', 'admin', '2024-05-24 14:44:58', 'admin', '2024-05-24 14:46:07', ''); COMMIT; -- ---------------------------- diff --git a/springboot/sql/sqlserver/fastbee-v2.1.sql b/springboot/sql/sqlserver/fastbee-v2.1.sql index 137b11cf..2ee4739c 100644 --- a/springboot/sql/sqlserver/fastbee-v2.1.sql +++ b/springboot/sql/sqlserver/fastbee-v2.1.sql @@ -7609,7 +7609,7 @@ GO INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'系统管理', N'0', N'4', N'system', NULL, N'', N'1', N'0', N'M', N'0', N'0', N'', N'system', N'admin', N'2021-12-15 21:36:18', N'admin', N'2023-09-16 16:42:52', N'系统管理目录'), (N'2', N'系统监控', N'0', N'5', N'monitor', NULL, N'', N'1', N'0', N'M', N'0', N'0', N'', N'monitor', N'admin', N'2021-12-15 21:36:18', N'admin', N'2023-08-24 17:21:20', N'系统监控目录'), (N'3', N'系统工具', N'0', N'6', N'tool', NULL, N'', N'1', N'0', N'M', N'0', N'0', N'', N'tool', N'admin', N'2021-12-15 21:36:18', N'admin', N'2023-08-24 17:21:28', N'系统工具目录'), (N'4', N'蜂信物联', N'0', N'10', N'http://fastbee.cn', NULL, N'', N'0', N'0', N'M', N'0', N'0', N'', N'guide', N'admin', N'2021-12-15 21:36:18', N'admin', N'2025-03-19 15:14:02', N'若依官网地址'), (N'100', N'用户管理', N'1', N'1', N'user', N'system/user/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:user:list', N'user', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'用户管理菜单'), (N'101', N'角色管理', N'1', N'2', N'role', N'system/role/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:role:list', N'peoples', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'角色管理菜单'), (N'102', N'菜单管理', N'1', N'3', N'menu', N'system/menu/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:menu:list', N'tree-table', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'菜单管理菜单'), (N'103', N'部门管理', N'1', N'4', N'dept', N'system/dept/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:dept:list', N'tree', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'部门管理菜单'), (N'104', N'岗位管理', N'1', N'5', N'post', N'system/post/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:post:list', N'post', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'岗位管理菜单'), (N'105', N'字典管理', N'1', N'6', N'dict', N'system/dict/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:dict:list', N'dict', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'字典管理菜单'), (N'106', N'参数设置', N'1', N'7', N'config', N'system/config/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:config:list', N'edit', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'参数设置菜单'), (N'107', N'通知公告', N'1', N'8', N'notice', N'system/notice/index', N'', N'1', N'0', N'C', N'0', N'0', N'system:notice:list', N'message', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'通知公告菜单'), (N'108', N'日志管理', N'1', N'9', N'log', N'', N'', N'1', N'0', N'M', N'0', N'0', N'', N'log', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'日志管理菜单'), (N'109', N'在线用户', N'2', N'1', N'online', N'monitor/online/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:online:list', N'online', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'在线用户菜单'), (N'110', N'定时任务', N'2', N'2', N'job', N'monitor/job/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:job:list', N'job', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'定时任务菜单'), (N'111', N'数据监控', N'2', N'3', N'druid', N'monitor/druid/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:druid:list', N'druid', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'数据监控菜单'), (N'112', N'服务监控', N'2', N'4', N'server', N'monitor/server/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:server:list', N'server', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'服务监控菜单'), (N'113', N'缓存监控', N'2', N'5', N'cache', N'monitor/cache/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:cache:list', N'redis', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'缓存监控菜单'), (N'114', N'表单构建', N'3', N'1', N'build', N'tool/build/index', N'', N'1', N'0', N'C', N'0', N'0', N'tool:build:list', N'build', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'表单构建菜单'), (N'115', N'代码生成', N'3', N'2', N'gen', N'tool/gen/index', N'', N'1', N'0', N'C', N'0', N'0', N'tool:gen:list', N'code', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'代码生成菜单'), (N'116', N'系统接口', N'3', N'3', N'swagger', N'tool/swagger/index', N'', N'1', N'0', N'C', N'0', N'0', N'tool:swagger:list', N'swagger', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'系统接口菜单'), (N'124', N'缓存列表', N'2', N'6', N'cacheList', N'monitor/cache/list', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:cache:list', N'redis-list', N'admin', N'2023-03-10 23:22:42', N'', NULL, N'缓存列表菜单'), (N'500', N'操作日志', N'108', N'1', N'operlog', N'monitor/operlog/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:operlog:list', N'form', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'操作日志菜单'), (N'501', N'登录日志', N'108', N'2', N'logininfor', N'monitor/logininfor/index', N'', N'1', N'0', N'C', N'0', N'0', N'monitor:logininfor:list', N'logininfor', N'admin', N'2021-12-15 21:36:18', N'', NULL, N'登录日志菜单'), (N'1001', N'用户查询', N'100', N'1', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1002', N'用户新增', N'100', N'2', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1003', N'用户修改', N'100', N'3', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1004', N'用户删除', N'100', N'4', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1005', N'用户导出', N'100', N'5', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1006', N'用户导入', N'100', N'6', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:import', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1007', N'重置密码', N'100', N'7', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:user:resetPwd', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1008', N'角色查询', N'101', N'1', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:role:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1009', N'角色新增', N'101', N'2', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:role:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1010', N'角色修改', N'101', N'3', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:role:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1011', N'角色删除', N'101', N'4', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:role:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1012', N'角色导出', N'101', N'5', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:role:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1013', N'菜单查询', N'102', N'1', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:menu:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1014', N'菜单新增', N'102', N'2', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:menu:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1015', N'菜单修改', N'102', N'3', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:menu:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1016', N'菜单删除', N'102', N'4', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:menu:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1017', N'部门查询', N'103', N'1', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dept:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1018', N'部门新增', N'103', N'2', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dept:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1019', N'部门修改', N'103', N'3', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dept:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1020', N'部门删除', N'103', N'4', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dept:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1021', N'岗位查询', N'104', N'1', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:post:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1022', N'岗位新增', N'104', N'2', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:post:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1023', N'岗位修改', N'104', N'3', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:post:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1024', N'岗位删除', N'104', N'4', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:post:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1025', N'岗位导出', N'104', N'5', N'', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:post:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1026', N'字典查询', N'105', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dict:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1027', N'字典新增', N'105', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dict:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1028', N'字典修改', N'105', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dict:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1029', N'字典删除', N'105', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dict:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1030', N'字典导出', N'105', N'5', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:dict:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1031', N'参数查询', N'106', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:config:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1032', N'参数新增', N'106', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:config:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1033', N'参数修改', N'106', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:config:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1034', N'参数删除', N'106', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:config:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1035', N'参数导出', N'106', N'5', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:config:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1036', N'公告查询', N'107', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:notice:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1037', N'公告新增', N'107', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:notice:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1038', N'公告修改', N'107', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:notice:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1039', N'公告删除', N'107', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'system:notice:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1040', N'操作查询', N'500', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:operlog:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1041', N'操作删除', N'500', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:operlog:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1042', N'日志导出', N'500', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:operlog:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1043', N'登录查询', N'501', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:logininfor:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1044', N'登录删除', N'501', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:logininfor:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1045', N'日志导出', N'501', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:logininfor:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1046', N'在线查询', N'109', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:online:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1047', N'批量强退', N'109', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:online:batchLogout', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1048', N'单条强退', N'109', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:online:forceLogout', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1049', N'任务查询', N'110', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1050', N'任务新增', N'110', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:add', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1051', N'任务修改', N'110', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1052', N'任务删除', N'110', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1053', N'状态修改', N'110', N'5', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:changeStatus', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1054', N'任务导出', N'110', N'7', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:job:export', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1055', N'生成查询', N'115', N'1', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:query', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1056', N'生成修改', N'115', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:edit', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1057', N'生成删除', N'115', N'3', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:remove', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1058', N'导入代码', N'115', N'2', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:import', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1059', N'预览代码', N'115', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:preview', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1060', N'生成代码', N'115', N'5', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'tool:gen:code', N'#', N'admin', N'2021-12-15 21:36:18', N'', NULL, N''), (N'1065', N'账户解锁', N'501', N'4', N'#', N'', N'', N'1', N'0', N'F', N'0', N'0', N'monitor:logininfor:unlock', N'#', N'admin', N'2023-03-10 23:23:04', N'', NULL, N''), (N'2000', N'设备管理', N'0', N'0', N'iot', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'iot', N'admin', N'2021-12-15 23:57:06', N'admin', N'2021-12-26 23:55:54', N''), (N'2001', N'产品分类', N'2000', N'2', N'category', N'iot/category/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:category:list', N'category', N'admin', N'2021-12-16 00:40:02', N'admin', N'2021-12-26 23:56:20', N'产品分类菜单'), (N'2002', N'产品分类查询', N'2001', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:category:query', N'#', N'admin', N'2021-12-16 00:40:02', N'', NULL, N''), (N'2003', N'产品分类新增', N'2001', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:category:add', N'#', N'admin', N'2021-12-16 00:40:02', N'', NULL, N''), (N'2004', N'产品分类修改', N'2001', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:category:edit', N'#', N'admin', N'2021-12-16 00:40:02', N'', NULL, N''), (N'2005', N'产品分类删除', N'2001', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:category:remove', N'#', N'admin', N'2021-12-16 00:40:02', N'', NULL, N''), (N'2006', N'产品分类导出', N'2001', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:category:export', N'#', N'admin', N'2021-12-16 00:40:02', N'', NULL, N''), (N'2007', N'设备管理', N'2000', N'5', N'device', N'iot/device/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:device:list', N'device', N'admin', N'2021-12-16 00:40:12', N'admin', N'2022-01-08 15:47:14', N'设备菜单'), (N'2008', N'设备查询', N'2007', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:query', N'#', N'admin', N'2021-12-16 00:40:12', N'', NULL, N''), (N'2009', N'设备新增', N'2007', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:add', N'#', N'admin', N'2021-12-16 00:40:12', N'', NULL, N''), (N'2010', N'设备修改', N'2007', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:edit', N'#', N'admin', N'2021-12-16 00:40:12', N'', NULL, N''), (N'2011', N'设备删除', N'2007', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:remove', N'#', N'admin', N'2021-12-16 00:40:12', N'', NULL, N''), (N'2012', N'设备导出', N'2007', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:export', N'#', N'admin', N'2021-12-16 00:40:12', N'', NULL, N''), (N'2019', N'设备分组', N'2000', N'4', N'group', N'iot/group/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:group:list', N'group', N'admin', N'2021-12-16 00:40:31', N'admin', N'2021-12-26 23:56:54', N'设备分组菜单'), (N'2020', N'设备分组查询', N'2019', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:query', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N'') GO -INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2021', N'设备分组新增', N'2019', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:add', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2022', N'设备分组修改', N'2019', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:edit', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2023', N'设备分组删除', N'2019', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:remove', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2024', N'设备分组导出', N'2019', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:export', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2043', N'产品管理', N'2000', N'3', N'product', N'iot/product/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:product:list', N'product', N'admin', N'2021-12-16 00:41:18', N'admin', N'2021-12-26 23:58:44', N'产品菜单'), (N'2044', N'产品查询', N'2043', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:query', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2045', N'产品新增', N'2043', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:add', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2046', N'产品修改', N'2043', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:edit', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2047', N'产品删除', N'2043', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:remove', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2048', N'产品导出', N'2043', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:export', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2049', N'通用物模型', N'2000', N'1', N'template', N'iot/template/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:template:list', N'model', N'admin', N'2021-12-16 00:41:28', N'admin', N'2021-12-26 23:56:09', N'通用物模型菜单'), (N'2050', N'通用物模型查询', N'2049', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:query', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2051', N'通用物模型新增', N'2049', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:add', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2052', N'通用物模型修改', N'2049', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:edit', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2053', N'通用物模型删除', N'2049', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:remove', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2054', N'通用物模型导出', N'2049', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:export', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2123', N'新闻分类', N'1', N'10', N'newsCategory', N'iot/newsCategory/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:newsCategory:list', N'category', N'admin', N'2022-04-11 16:47:27', N'admin', N'2022-05-12 17:20:51', N'新闻分类菜单'), (N'2124', N'新闻分类查询', N'2123', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:query', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2125', N'新闻分类新增', N'2123', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:add', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2126', N'新闻分类修改', N'2123', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:edit', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2127', N'新闻分类删除', N'2123', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:remove', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2128', N'新闻分类导出', N'2123', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:export', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2129', N'新闻资讯', N'1', N'11', N'news', N'iot/news/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:news:list', N'documentation', N'admin', N'2022-04-11 16:47:46', N'admin', N'2022-05-12 17:20:58', N'新闻资讯菜单'), (N'2130', N'新闻资讯查询', N'2129', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:query', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2131', N'新闻资讯新增', N'2129', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:add', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2132', N'新闻资讯修改', N'2129', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:edit', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2133', N'新闻资讯删除', N'2129', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:remove', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2134', N'新闻资讯导出', N'2129', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:export', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2136', N'产品授权码查询', N'2043', N'6', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:query', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:21:40', N''), (N'2137', N'产品授权码新增', N'2043', N'7', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:add', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:21:59', N''), (N'2138', N'产品授权码修改', N'2043', N'8', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:edit', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:22:08', N''), (N'2139', N'产品授权码删除', N'2043', N'9', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:remove', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:22:26', N''), (N'2140', N'产品授权码导出', N'2043', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:export', N'#', N'admin', N'2022-04-11 17:17:53', N'', NULL, N''), (N'2142', N'平台查询', N'2142', N'1', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:platform:query', N'#', N'admin', N'2022-04-11 19:10:28', N'', NULL, N''), (N'2147', N'设备分享', N'2007', N'6', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:share', N'#', N'admin', N'2022-06-10 01:08:40', N'admin', N'2022-06-10 01:10:46', N''), (N'2148', N'设备定时', N'2007', N'7', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:timer', N'#', N'admin', N'2022-06-10 01:10:30', N'', NULL, N''), (N'3031', N'Netty管理', N'0', N'3', N'netty', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'mq', N'admin', N'2022-02-26 00:42:12', N'admin', N'2023-09-26 00:11:57', N''), (N'3032', N'客户端', N'3031', N'1', N'client', N'iot/netty/clients', NULL, N'1', N'0', N'C', N'0', N'0', N'monitor:server:list', N'client', N'admin', N'2022-02-26 00:45:39', N'admin', N'2023-08-23 23:38:08', N''), (N'3033', N'事件日志', N'2000', N'1', N'log', N'iot/log/index', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:list', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N'事件日志菜单'), (N'3034', N'事件日志查询', N'3033', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:query', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3035', N'事件日志新增', N'3033', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:add', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3036', N'事件日志修改', N'3033', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:edit', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3037', N'事件日志删除', N'3033', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:remove', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3038', N'事件日志导出', N'3033', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:export', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3048', N'Mqtt统计', N'3031', N'2', N'mqtt', N'iot/netty/mqtt', NULL, N'1', N'0', N'C', N'0', N'0', N'monitor:server:list', N'monitor', N'admin', N'2023-08-23 23:40:28', N'admin', N'2023-08-23 23:40:38', N''), (N'3050', N'规则引擎', N'0', N'2', N'ruleengine', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'channel', N'admin', N'2024-04-22 16:28:15', N'admin', N'2025-03-19 15:13:50', N''), (N'3051', N'规则脚本', N'3050', N'2', N'script', N'iot/scene/script', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:script:list', N'code', N'admin', N'2024-04-22 16:30:00', N'', NULL, N''), (N'3052', N'规则脚本查询', N'3051', N'1', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:query', N'#', N'admin', N'2024-04-22 16:30:53', N'', NULL, N''), (N'3053', N'规则脚本新增', N'3051', N'2', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:add', N'#', N'admin', N'2024-04-22 16:31:28', N'', NULL, N''), (N'3054', N'规则脚本修改', N'3051', N'3', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:edit', N'#', N'admin', N'2024-04-22 16:32:04', N'', NULL, N''), (N'3056', N'规则脚本导出', N'3051', N'5', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:export', N'#', N'admin', N'2024-04-22 16:33:25', N'admin', N'2024-04-22 16:33:49', N''), (N'3057', N'规则脚本删除', N'3051', N'4', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:remove', N'#', N'admin', N'2024-04-22 16:35:01', N'', NULL, N''), (N'3058', N'视频中心', N'0', N'1', N'video', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'live', N'admin', N'2024-07-15 14:42:13', N'admin', N'2025-03-19 15:13:43', N''), (N'3059', N'通道管理', N'3058', N'1', N'sip', N'iot/sip/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:video:list', N'swagger', N'admin', N'2024-07-15 14:43:22', N'', NULL, N''), (N'3060', N'视频配置', N'3058', N'2', N'mediaServer', N'iot/sip/mediaServer', NULL, N'1', N'0', N'C', N'0', N'0', NULL, N'edit', N'admin', N'2024-07-15 14:48:52', N'', NULL, N''), (N'3062', N'大屏展示', N'2000', N'6', N'http://localhost/bigScreen', NULL, NULL, N'0', N'0', N'M', N'0', N'0', N'', N'monitor-a', N'admin', N'2025-03-19 15:07:39', N'admin', N'2025-03-20 22:18:42', N'') +INSERT INTO [dbo].[sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2021', N'设备分组新增', N'2019', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:add', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2022', N'设备分组修改', N'2019', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:edit', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2023', N'设备分组删除', N'2019', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:remove', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2024', N'设备分组导出', N'2019', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:group:export', N'#', N'admin', N'2021-12-16 00:40:31', N'', NULL, N''), (N'2043', N'产品管理', N'2000', N'3', N'product', N'iot/product/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:product:list', N'product', N'admin', N'2021-12-16 00:41:18', N'admin', N'2021-12-26 23:58:44', N'产品菜单'), (N'2044', N'产品查询', N'2043', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:query', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2045', N'产品新增', N'2043', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:add', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2046', N'产品修改', N'2043', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:edit', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2047', N'产品删除', N'2043', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:remove', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2048', N'产品导出', N'2043', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:product:export', N'#', N'admin', N'2021-12-16 00:41:18', N'', NULL, N''), (N'2049', N'通用物模型', N'2000', N'1', N'template', N'iot/template/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:template:list', N'model', N'admin', N'2021-12-16 00:41:28', N'admin', N'2021-12-26 23:56:09', N'通用物模型菜单'), (N'2050', N'通用物模型查询', N'2049', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:query', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2051', N'通用物模型新增', N'2049', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:add', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2052', N'通用物模型修改', N'2049', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:edit', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2053', N'通用物模型删除', N'2049', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:remove', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2054', N'通用物模型导出', N'2049', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:template:export', N'#', N'admin', N'2021-12-16 00:41:28', N'', NULL, N''), (N'2123', N'新闻分类', N'1', N'10', N'newsCategory', N'iot/newsCategory/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:newsCategory:list', N'category', N'admin', N'2022-04-11 16:47:27', N'admin', N'2022-05-12 17:20:51', N'新闻分类菜单'), (N'2124', N'新闻分类查询', N'2123', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:query', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2125', N'新闻分类新增', N'2123', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:add', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2126', N'新闻分类修改', N'2123', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:edit', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2127', N'新闻分类删除', N'2123', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:remove', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2128', N'新闻分类导出', N'2123', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:newsCategory:export', N'#', N'admin', N'2022-04-11 16:47:27', N'', NULL, N''), (N'2129', N'新闻资讯', N'1', N'11', N'news', N'iot/news/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:news:list', N'documentation', N'admin', N'2022-04-11 16:47:46', N'admin', N'2022-05-12 17:20:58', N'新闻资讯菜单'), (N'2130', N'新闻资讯查询', N'2129', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:query', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2131', N'新闻资讯新增', N'2129', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:add', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2132', N'新闻资讯修改', N'2129', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:edit', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2133', N'新闻资讯删除', N'2129', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:remove', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2134', N'新闻资讯导出', N'2129', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:news:export', N'#', N'admin', N'2022-04-11 16:47:46', N'', NULL, N''), (N'2136', N'产品授权码查询', N'2043', N'6', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:query', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:21:40', N''), (N'2137', N'产品授权码新增', N'2043', N'7', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:add', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:21:59', N''), (N'2138', N'产品授权码修改', N'2043', N'8', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:edit', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:22:08', N''), (N'2139', N'产品授权码删除', N'2043', N'9', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:remove', N'#', N'admin', N'2022-04-11 17:17:53', N'admin', N'2022-06-04 21:22:26', N''), (N'2140', N'产品授权码导出', N'2043', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:authorize:export', N'#', N'admin', N'2022-04-11 17:17:53', N'', NULL, N''), (N'2142', N'平台查询', N'2142', N'1', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:platform:query', N'#', N'admin', N'2022-04-11 19:10:28', N'', NULL, N''), (N'2147', N'设备分享', N'2007', N'6', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:share', N'#', N'admin', N'2022-06-10 01:08:40', N'admin', N'2022-06-10 01:10:46', N''), (N'2148', N'设备定时', N'2007', N'7', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:device:timer', N'#', N'admin', N'2022-06-10 01:10:30', N'', NULL, N''), (N'3031', N'Netty管理', N'0', N'3', N'netty', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'mq', N'admin', N'2022-02-26 00:42:12', N'admin', N'2023-09-26 00:11:57', N''), (N'3032', N'客户端', N'3031', N'1', N'client', N'iot/netty/clients', NULL, N'1', N'0', N'C', N'0', N'0', N'monitor:server:list', N'client', N'admin', N'2022-02-26 00:45:39', N'admin', N'2023-08-23 23:38:08', N''), (N'3033', N'事件日志', N'2000', N'1', N'log', N'iot/log/index', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:list', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N'事件日志菜单'), (N'3034', N'事件日志查询', N'3033', N'1', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:query', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3035', N'事件日志新增', N'3033', N'2', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:add', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3036', N'事件日志修改', N'3033', N'3', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:edit', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3037', N'事件日志删除', N'3033', N'4', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:remove', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3038', N'事件日志导出', N'3033', N'5', N'#', N'', NULL, N'1', N'0', N'F', N'0', N'0', N'iot:event:export', N'#', N'admin', N'2023-03-28 14:23:52', N'', NULL, N''), (N'3048', N'Mqtt统计', N'3031', N'2', N'mqtt', N'iot/netty/mqtt', NULL, N'1', N'0', N'C', N'0', N'0', N'monitor:server:list', N'monitor', N'admin', N'2023-08-23 23:40:28', N'admin', N'2023-08-23 23:40:38', N''), (N'3050', N'规则引擎', N'0', N'2', N'ruleengine', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'channel', N'admin', N'2024-04-22 16:28:15', N'admin', N'2025-03-19 15:13:50', N''), (N'3051', N'规则脚本', N'3050', N'2', N'script', N'iot/scene/script', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:script:list', N'code', N'admin', N'2024-04-22 16:30:00', N'', NULL, N''), (N'3052', N'规则脚本查询', N'3051', N'1', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:query', N'#', N'admin', N'2024-04-22 16:30:53', N'', NULL, N''), (N'3053', N'规则脚本新增', N'3051', N'2', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:add', N'#', N'admin', N'2024-04-22 16:31:28', N'', NULL, N''), (N'3054', N'规则脚本修改', N'3051', N'3', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:edit', N'#', N'admin', N'2024-04-22 16:32:04', N'', NULL, N''), (N'3056', N'规则脚本导出', N'3051', N'5', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:export', N'#', N'admin', N'2024-04-22 16:33:25', N'admin', N'2024-04-22 16:33:49', N''), (N'3057', N'规则脚本删除', N'3051', N'4', N'', NULL, NULL, N'1', N'0', N'F', N'0', N'0', N'iot:script:remove', N'#', N'admin', N'2024-04-22 16:35:01', N'', NULL, N''), (N'3058', N'视频中心', N'0', N'1', N'video', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'live', N'admin', N'2024-07-15 14:42:13', N'admin', N'2025-03-19 15:13:43', N''), (N'3059', N'通道管理', N'3058', N'1', N'sip', N'iot/sip/index', NULL, N'1', N'0', N'C', N'0', N'0', N'iot:video:list', N'swagger', N'admin', N'2024-07-15 14:43:22', N'', NULL, N''), (N'3060', N'视频配置', N'3058', N'2', N'mediaServer', N'iot/sip/mediaServer', NULL, N'1', N'0', N'C', N'0', N'0', NULL, N'edit', N'admin', N'2024-07-15 14:48:52', N'', NULL, N''), (N'3062', N'大屏展示', N'2000', N'6', N'http://localhost/bigScreen', NULL, NULL, N'0', N'0', N'M', N'0', N'0', N'', N'monitor-a', N'admin', N'2025-03-19 15:07:39', N'admin', N'2025-03-20 22:18:42', N''), (N'3343', N'数据中心', N'0', N'5', N'dataCenter', NULL, NULL, N'1', N'0', N'M', N'0', N'0', N'', N'bar_chart', N'admin', N'2024-05-24 14:42:04', N'admin', N'2025-01-11 09:33:52', N''), (N'3344', N'数据分析', N'3343', N'2', N'analysis', N'dataCenter/analysis', NULL, N'1', N'0', N'C', N'0', N'0', N'dataCenter:analysis:list', N'custom', N'admin', N'2024-06-11 15:46:19', N'', NULL, N''), (N'3345', N'历史记录', N'3343', N'1', N'history', N'dataCenter/history', NULL, N'1', N'0', N'C', N'0', N'0', N'dataCenter:history:list', N'excel', N'admin', N'2024-05-24 14:44:58', N'admin', N'2024-05-24 14:46:07', N'') GO COMMIT