diff --git a/manifest/docker-compose/docker-compose.yaml b/manifest/docker-compose/docker-compose.yaml new file mode 100644 index 0000000..1a1ebfd --- /dev/null +++ b/manifest/docker-compose/docker-compose.yaml @@ -0,0 +1,65 @@ +services: + redis: + image: redis:7.0.11 + container_name: redis-server + restart: always + volumes: + - "./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf" + - "./redis/data:/data" + - "./redis/logs:/logs" + command: ["redis-server","/usr/local/etc/redis/redis.conf"] + environment: + - TZ=Asia/Shanghai + ports: + - 6379:6379 + tdengine: + image: tdengine/tdengine:3.2.1.0 + container_name: tdengine-server + restart: always + environment: + - TZ=Asia/Shanghai + volumes: + - "./taos/dnode/data:/var/lib/taos" + - "./taos/dnode/log:/var/log/taos" + ports: + - 6030:6030 + - 6041:6041 + emqx: + image: emqx/emqx:5.0.26 + restart: always + container_name: emqx-server + environment: + - TZ=Asia/Shanghai + # volumes: + # - ./emqx/data:/opt/emqx/data + # - ./emqx/log:/opt/emqx/log + ports: + - 1883:1883 + - 8083:8083 + - 8084:8084 + - 8883:8883 + - 18083:18083 + mysql: + image: mysql:8.0.25 + container_name: mysql-server + restart: always + environment: + - MYSQL_ROOT_PASSWORD=DbyTYGu3s4WuAF4TTq7 + - MYSQL_DATABASE=sagoo_iot_open + - TZ=Asia/Shanghai + volumes: + - ./mysql/init:/docker-entrypoint-initdb.d + - ./mysql/data:/var/lib/mysql + - ./mysql/logs:/var/log + ports: + - "3306:3306" + nginx: + extends: + file: ./nginx/nginx.yaml + service: nginx + + sagoo-iot-open: + extends: + file: ./iot-open/iot-open.yaml + service: sagoo-iot-open + \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/Dockerfile b/manifest/docker-compose/iot-open/Dockerfile new file mode 100644 index 0000000..7460da8 --- /dev/null +++ b/manifest/docker-compose/iot-open/Dockerfile @@ -0,0 +1,24 @@ +FROM golang:alpine AS builder +RUN apk add --no-cache tzdata && \ + cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + echo "Asia/Shanghai" > /etc/timezone + +WORKDIR /opt/sagoo-iot-server/ + +COPY ./config/ /opt/sagoo-iot-server/config + +COPY ./curl.sh /opt/sagoo-iot-server/ +COPY ./entrypoint.sh /opt/sagoo-iot-server/ +COPY ./sagooiot /opt/sagoo-iot-server/ + +COPY ./entrypoint.sh /opt/sagoo-iot-server/ +RUN chmod +x /opt/sagoo-iot-server/entrypoint.sh +RUN chmod +x /opt/sagoo-iot-server/sagooiot + +COPY ./resource/public /opt/sagoo-iot-server/resource/public/ +COPY ./resource/rsa /opt/sagoo-iot-server/resource/rsa/ +COPY ./resource/app.lic /opt/sagoo-iot-server/resource + +EXPOSE 8200 + +CMD ["/bin/sh", "-c", "sleep 50 && /opt/sagoo-iot-server/entrypoint.sh"] \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/config/config.yaml b/manifest/docker-compose/iot-open/config/config.yaml new file mode 100644 index 0000000..af046f4 --- /dev/null +++ b/manifest/docker-compose/iot-open/config/config.yaml @@ -0,0 +1,134 @@ +# 系统配置 +system: + name: "sagooiot" + version: "2.0" + description: "SagooIoT Server" + enablePProf: true # 是否开启pprof + # pprofPort: "58088" # pprof端口 + ipMethod: "whois" # IP归属地解析方法,可选:cz88|whois,默认为whois + isDemo: false # 是否为演示系统 + isCluster: false # 是否为集群部署,默认为false。开启集群必须配置redis + deviceCacheData: + poolSize: 300 #设备数据缓存池连接数 + recordDuration: "20m" #设备数据缓存时长,超过时长的数据将被清除。默认为10分钟 + recordLimit: 1000 #设备数据缓存条数限制,超过条数的数据将被清除。默认为1000条 + pluginsPath: "./plugins/built" + # 文件上传设置 + upload: + path: "upload" + +#缓存 +cache: + prefix: "SagooIot_Sys:" #缓存前缀 + adapter: "redis" # 缓存驱动方式,支持:memory|redis|file,不填默认memory + fileDir: "./storage/cache" # 文件缓存路径,adapter=file时必填 + +# http服务配置 +server: + serverAgent: "SagooIOT Server" # 服务端Agent信息。 + address: ":8200" + dumpRouterMap: false + routeOverWrite: true + openapiPath: "/api.json" + swaggerPath: "/swagger" + NameToUriType: 3 + maxHeaderBytes: "20KB" + clientMaxBodySize: "50MB" + # Logging配置 + logPath: "resource/log/server" # 日志文件存储目录路径,建议使用绝对路径。默认为空,表示关闭 + logStdout: false # 日志是否输出到终端。默认为true + errorStack: true # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true + errorLogEnabled: true # 是否记录异常日志信息到日志中。默认为true + errorLogPattern: "error-{Ymd}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log" + accessLogEnabled: true # 是否记录访问日志。默认为false + accessLogPattern: "access-{Ymd}.log" # 访问日志文件格式。默认为"access-{Ymd}.log" + https: false + httpsCertFile: "" + httpsKeyFile: "" + # 静态服务配置 + indexFiles: [ "index.html"] # 自动首页静态文件检索。默认为["index.html", "index.htm"] + indexFolder: false # 当访问静态文件目录时,是否展示目录下的文件列表。默认关闭,那么请求将返回403 + serverRoot: "resource/public" # 静态文件服务的目录根路径,配置时自动开启静态文件服务。默认关闭 + searchPaths: [ "/resource/public/"] # 提供静态文件服务时额外的文件搜索路径,当根路径找不到时则按照顺序在搜索目录查找。默认关闭 + fileServerEnabled: true # 是否开启静态文件服务。默认为false + adminPprofPort: "58089" # web-admin pprof端口 +# allowedDomains: #允许跨域访问的域名列表 +# - https://example.com +# - https://www.example.com + +logger: + level : "all" + stdout: true + +#GFToken +gfToken: + timeOut: 10800 #token超时时间(秒) + maxRefresh: 5400 #token自动刷新时间(秒) + multiLogin: true #是否允许一个账号多人同时登录 + encryptKey: "49c54195e750b04e74a8429b17896586" #加密key (32位) + excludePaths: #排除不做登录验证的路由地址 + - "/api/v1/login" + - "/api/v1/sysinfo" + +# 数据库连接配置 +database: + logger: + path: "resource/log/sql" + level: "all" + stdout: false + ctxKeys: [ "RequestId" ] + default: + link: "mysql:root:DbyTYGu3s4WuAF4TTq7@tcp(mysql:3306)/sagoo_iot_open?loc=Local&parseTime=true" + debug: true #开启调试模式 + charset: "utf8mb4" #数据库编码(如: utf8/gbk/gb2312),一般设置为utf8 + dryRun: false #ORM空跑(只读不写) + maxIdle: 50 #连接池最大闲置的连接数 + maxOpen: 100 #连接池最大打开的连接数 + maxLifetime: 60 #(单位秒)连接对象可重复使用的时间长度 + +# 这个mqtt客户端主要是服务端内部处理消息使用的通道 +mqtt: + addr: emqx:1883 + # 最好带上服务名称,变成唯一id + clientId: sagooiot20230916 + deviceLiveDuration: 60 + qos: 1 + auth: + userName: xinjy + userPassWorld: 123456 + +# 时序数据库配置 +tsd: + database: "TdEngine" + tdengine: + # type: "taosRestful" #http连接方式,端口是6041 + # dsn: "root:taosdata@http(127.0.0.1:6041)/" + type: "taosWS" #http连接方式,端口是6041 + dsn: "root:taosdata@ws(tdengine:6041)/" + dbName: "sagoo_iot" + maxOpenConns: 1000 + maxIdleConns: 50 + +# Redis 配置示例 +redis: + # 单实例配置 + default: + address: redis:6379 + db: 0 + pass: FDXLK3LdGYYk9mut + minIdle: 50 #最小空闲连接数 + maxIdle: 100 #允许闲置的最大连接数 + maxActive: 16 #最大活跃连接数 + idleTimeout: "30m" #连接最大空闲时间,使用时间字符串例如30s/2m/2d + +#消息队列 +queue: + switch: true # 队列开关,可选:true|false,默认为true + driver: "redis" # 队列驱动,可选:redis|rocketmq|kafka,默认为disk + retry: 2 # 重试次数,仅rocketmq|redis支持 + groupName: "sagooiot" # mq群组名称 + redis: + address: "redis:6379" # redis服务地址,默认为127.0.0.1:6379 + db: 0 # 指定redis库 + pass: "FDXLK3LdGYYk9mut" # redis密码 + timeout: 60 \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/curl.sh b/manifest/docker-compose/iot-open/curl.sh new file mode 100755 index 0000000..63c61a8 --- /dev/null +++ b/manifest/docker-compose/iot-open/curl.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +WORKSPACE=$(cd "$(dirname "$0")" || exit; pwd) +cd "$WORKSPACE" || exit + +readonly app='sagooiot' +readonly pidfile="var/$app.pid" +readonly logfile="var/$app.log" + +mkdir -p var + +check_pid() { + if [[ -f $pidfile ]]; then + local pid=$(cat "$pidfile") + if [[ -n $pid ]]; then + local running=$(ps -p "$pid" | grep -c -v "PID TTY") + return "$running" + fi + fi + return 0 +} + +start() { + check_pid + local running=$? + if [[ $running -gt 0 ]]; then + printf "%s now is running already, pid: %s\n" "$app" "$(cat "$pidfile")" + return 1 + fi + + nohup "./$app" >> "$logfile" 2>&1 & + sleep 1 + running=$(ps -p $! | grep -c -v "PID TTY") + if [[ $running -gt 0 ]]; then + echo $! > "$pidfile" + printf "%s started... pid: %s\n" "$app" "$!" + else + printf "%s failed to start.\n" "$app" + return 1 + fi +} + +stop() { + check_pid + local running=$? + if [[ $running -gt 0 ]]; then + local pid=$(cat "$pidfile") + kill "$pid" + rm -f "$pidfile" + printf "%s stopped.\n" "$app" + else + printf "%s is not running.\n" "$app" + fi +} + +restart() { + stop + sleep 1 + start +} + +status() { + check_pid + local running=$? + if [[ $running -gt 0 ]]; then + printf "%s is started.\n" "$app" + else + printf "%s is stopped.\n" "$app" + fi +} + +tailf() { + tail -f var/* +} + +print_help() { + printf "Usage: %s {start|stop|restart|status|tail|pid}.\n" "$0" +} + +print_pid() { + cat "$pidfile" +} + +main() { + case "$1" in + "start") start ;; + "stop") stop ;; + "restart") restart ;; + "status") status ;; + "tail") tailf ;; + "pid") print_pid ;; + *) print_help ;; + esac +} + +main "$@" \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/entrypoint.sh b/manifest/docker-compose/iot-open/entrypoint.sh new file mode 100755 index 0000000..1ccb023 --- /dev/null +++ b/manifest/docker-compose/iot-open/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# 这里是其他的启动逻辑或命令 +/opt/sagoo-iot-server/sagooiot \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/iot-open.yaml b/manifest/docker-compose/iot-open/iot-open.yaml new file mode 100644 index 0000000..58bf11d --- /dev/null +++ b/manifest/docker-compose/iot-open/iot-open.yaml @@ -0,0 +1,17 @@ +services: + sagoo-iot-open: + image: sagoo-iot-open:1.0.2 + restart: always + container_name: sagoo-iot-open + build: + dockerfile: ./Dockerfile + depends_on: + - mysql + - redis + - emqx + - tdengine + ports: + - 8200:8200 + volumes: + - "./resource/public/upload_file/:/opt/sagoo-iot-server/resource/public/upload_file" + - "./resource/log/:/opt/sagoo-iot-server/resource/log" diff --git a/manifest/docker-compose/iot-open/resource/app.lic b/manifest/docker-compose/iot-open/resource/app.lic new file mode 100644 index 0000000..93557ab --- /dev/null +++ b/manifest/docker-compose/iot-open/resource/app.lic @@ -0,0 +1 @@ +QkRwkVEZyUfv8QzuNRg43+YI4KCD005A6rDwRTezAtdVa5wyZbf2eBM3bBRGmijjOyRzTsG3mARPSieqMfHvqGklCP5gvEPJXFOCQ1aysseGh+V/2vRTqPW+LwfqAiMnkWtJsjaXS5usT3yddyN0Rhu7ZIpKRhL7foUviAtIy6sDknFOxV3X3K97K6MrLp/Qp9N8Il6JjAV7s4atmLIzMz9qosX10tATDkr+L7S2rJ0rWWMGhqkj2Js5kU4iF96KgZPdFV9DJCqjpbiUrinInrzn0MJ/5OTHThdm9X9p/XCtjd+ZmYK1ka8xHVrYt5dtCg7AQ/Z4v3fQMiYkuiK7UWLVkTp7mmc5IFQ+zjHWN1pWD3qc4EI+BY3WLGgKqeC3GFPgELZ/RuBSHz5XtGsvVQ== \ No newline at end of file diff --git a/manifest/docker-compose/iot-open/resource/rsa/private.pem b/manifest/docker-compose/iot-open/resource/rsa/private.pem new file mode 100644 index 0000000..19afd29 --- /dev/null +++ b/manifest/docker-compose/iot-open/resource/rsa/private.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDCsnMIAnRpqu3z +ZjYHmqixlG/ynV0ZfagsWvWwCsnF69bdrW/txUDRThZUUl2J8NUWmy6JyH2ex+FS +nsI05mdr6s296CXNiWu0yGrKdhT5spQEECZhpXIMc6nGSnzp+GnSruqhfxih5K9h +FpVo+gUdFh5qHLR3cv6AvylGGvSTvRFkytoLfPNdu5RwzsY2JuIpsWJCWWGUaV9t +XRuY4fwtlzBbC/jQ+113jHaCKGfm+bMZ1DU4B/cPpia2xd/uIyPQfWDmy/IezXud +xI3uH2JZOtUpw0PGuXV2bgFGzEMmxZ6fCsgzVZQe6ieVsTo6ggkQ7blPe5zKbNYP +MxJbF7exAgMBAAECggEBAIdvhS98LajX26DmaA1QG6s0G8/Egd/almMMfz4Psx54 +GUapgGQBRD6VOFk91o2/Nyv7lRsJmcEbP/WuNGCCKk1az/YcCDf7MS5YAFmIXLz5 +6ZcN+PUSFszspJwocs57HHoPbW4cMHFl2E4MXLDiwy3hlhSwlSVGnB3JXJfE5n/h +2/cHSZvcErnwJhdsExp7e4RqV4h7nJBAvU1ZnJVUbzhyjyp0wY0/JLl5G2fq0qqn +wnoeQCmqioK6eXH8zrWCnhe1W4ipcPaAkMXST7YcyPLANkxvSXG2CXxb82t671Wr +NqEdHEkly4S532S5ayuuJChwIRR7woWSZ1h43SZWkQUCgYEA+x2SMIlS4fnqWzQQ +yJs5dGfgcqh5J5Kn8J7NOry74LNLf7COL+u6fUcm4rwrBr+Q3YXWrBvyqDw4LUEB +VYhtr8oHJRbYaMjFr9A14QScBhiLjCqf8tBIFQVLqPd8OqxtsN6zSAMxGj7X68xD +t7ztPLbVv8VBk0PbShCKM5o6qpMCgYEAxnvxXCZnsBvcxMbIyq0UJwgmUueUsZfM +D0WRyEgfGKMR+6AwAvVpHaPyEzErXzPlT1TnKvwpUfagfsFsJoUrhN6czey1Np8m +reBaAAXuCRuzavRy1iMjgFuKYH0wORTR3A+fD57ZdNL5VCBN9RsQJwU3JgQZMVkf +pQ6T/oYsSysCgYEApqlxpRT/FUuw5ucfXITpFQD8ThzSjBkhrOk4fItWhkN5ED41 +oEhrdUoL3N/WDpyFoQB7Aa9q1Y1iG2bRY9swMUN8inknGCRoT894cueERed0doqz +rYvey1TAalwW7zoRcxnbEyhLJoge9jiTmRaivXD7XFOmuf6HRBjGIIlz9lECgYBs +E/VbPjZbuPA/3hZb9l7w2gk0P5HCGmwtLK6zJkJ4geM65wD9u3AfibQ5Kx742iNV +TWALEf/V97txChW/6+fElAtCPlB2i7beGzompRP2tbS+2pjlbYDZVf9FhyWJD4Mu +lvr/4Hl8mZzWaDjK7I+hD7/13Wlya5tFn2iKwbjAvQKBgQCLiRluLqvhELCyP6VL +3Os3qdb8rLbgMz9ttaxsuI7wDW8g40AkU4iwxzSQRBiCGOMtQHWS3xLxHLSAjUvG +MSdanpimagZ8aHsWo5FtL/oqucHrd1qd7SUb/r/A7HhTctwrV07j+ru2kExnNIGW +/p/L0H4Yz1blO0d6L7EF+3emKA== +-----END PRIVATE KEY----- diff --git a/manifest/docker-compose/iot-open/resource/rsa/public.pem b/manifest/docker-compose/iot-open/resource/rsa/public.pem new file mode 100644 index 0000000..f6e5c20 --- /dev/null +++ b/manifest/docker-compose/iot-open/resource/rsa/public.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwrJzCAJ0aart82Y2B5qo +sZRv8p1dGX2oLFr1sArJxevW3a1v7cVA0U4WVFJdifDVFpsuich9nsfhUp7CNOZn +a+rNveglzYlrtMhqynYU+bKUBBAmYaVyDHOpxkp86fhp0q7qoX8YoeSvYRaVaPoF +HRYeahy0d3L+gL8pRhr0k70RZMraC3zzXbuUcM7GNibiKbFiQllhlGlfbV0bmOH8 +LZcwWwv40Ptdd4x2gihn5vmzGdQ1OAf3D6YmtsXf7iMj0H1g5svyHs17ncSN7h9i +WTrVKcNDxrl1dm4BRsxDJsWenwrIM1WUHuonlbE6OoIJEO25T3ucymzWDzMSWxe3 +sQIDAQAB +-----END PUBLIC KEY----- diff --git a/manifest/docker-compose/iot-open/sagooiot b/manifest/docker-compose/iot-open/sagooiot new file mode 100755 index 0000000..78d84b6 Binary files /dev/null and b/manifest/docker-compose/iot-open/sagooiot differ diff --git a/manifest/docker-compose/mysql/init/init.sql b/manifest/docker-compose/mysql/init/init.sql new file mode 100644 index 0000000..defb3bf --- /dev/null +++ b/manifest/docker-compose/mysql/init/init.sql @@ -0,0 +1,26190 @@ +/* + Navicat Premium Data Transfer + + Source Server : iot-local + Source Server Type : MySQL + Source Server Version : 80100 (8.1.0) + Source Host : 127.0.0.1:3307 + Source Schema : sagooiot-community + + Target Server Type : MySQL + Target Server Version : 80100 (8.1.0) + File Encoding : 65001 + + Date: 27/02/2024 15:04:24 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for alarm_level +-- ---------------------------- +DROP TABLE IF EXISTS `alarm_level`; +CREATE TABLE `alarm_level` ( + `level` int unsigned NOT NULL COMMENT '告警级别', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称', + PRIMARY KEY (`level`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Records of alarm_level +-- ---------------------------- +BEGIN; +INSERT INTO `alarm_level` (`level`, `name`) VALUES (1, '超紧急'); +INSERT INTO `alarm_level` (`level`, `name`) VALUES (2, '紧急'); +INSERT INTO `alarm_level` (`level`, `name`) VALUES (3, '严重'); +INSERT INTO `alarm_level` (`level`, `name`) VALUES (4, '一般'); +INSERT INTO `alarm_level` (`level`, `name`) VALUES (5, '提醒'); +COMMIT; + +-- ---------------------------- +-- Table structure for alarm_log +-- ---------------------------- +DROP TABLE IF EXISTS `alarm_log`; +CREATE TABLE `alarm_log` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '告警类型:1=规则告警,2=设备自主告警', + `rule_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '规则id', + `rule_name` varchar(255) NOT NULL DEFAULT '' COMMENT '规则名称', + `level` int unsigned NOT NULL DEFAULT '0' COMMENT '告警级别', + `data` text COMMENT '触发告警的数据', + `product_key` varchar(255) NOT NULL DEFAULT '' COMMENT '产品标识', + `device_key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '告警状态:0=未处理,1=已处理', + `created_at` datetime DEFAULT NULL COMMENT '告警时间', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '告警处理人员', + `updated_at` datetime DEFAULT NULL COMMENT '处理时间', + `content` varchar(500) NOT NULL COMMENT '处理意见', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=271061 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Records of alarm_log +-- ---------------------------- +BEGIN; +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269666, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":228.57,\"CreateTime\":1708262466},\"vb\":{\"Value\":196.58,\"CreateTime\":1708262466},\"vc\":{\"Value\":219.84,\"CreateTime\":1708262466}}', 'monipower20221103', 't202200510', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269667, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":229.76,\"CreateTime\":1708262466},\"vb\":{\"Value\":214.93,\"CreateTime\":1708262466},\"vc\":{\"Value\":216.63,\"CreateTime\":1708262466}}', 'monipower20221103', 't202200033', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269668, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":220.35,\"CreateTime\":1708262466},\"vb\":{\"Value\":217.5,\"CreateTime\":1708262466},\"vc\":{\"Value\":230.13,\"CreateTime\":1708262466}}', 'monipower20221103', 't202201949', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269669, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":221.83,\"CreateTime\":1708262466},\"vb\":{\"Value\":226.93,\"CreateTime\":1708262466},\"vc\":{\"Value\":190.31,\"CreateTime\":1708262466}}', 'monipower20221103', 't202201742', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269670, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":230.11,\"CreateTime\":1708262466},\"vb\":{\"Value\":195.23,\"CreateTime\":1708262466},\"vc\":{\"Value\":196.2,\"CreateTime\":1708262466}}', 'monipower20221103', 't202200043', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269671, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":230.22,\"CreateTime\":1708262466},\"vb\":{\"Value\":216.74,\"CreateTime\":1708262466},\"vc\":{\"Value\":210.39,\"CreateTime\":1708262466}}', 'monipower20221103', 't202201937', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269672, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":226.51,\"CreateTime\":1708262466},\"vb\":{\"Value\":195.2,\"CreateTime\":1708262466},\"vc\":{\"Value\":219.8,\"CreateTime\":1708262466}}', 'monipower20221103', 't202200044', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269673, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":223.34,\"CreateTime\":1708262466},\"vb\":{\"Value\":224.06,\"CreateTime\":1708262466},\"vc\":{\"Value\":198.68,\"CreateTime\":1708262466}}', 'monipower20221103', 't202201975', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +INSERT INTO `alarm_log` (`id`, `dept_id`, `type`, `rule_id`, `rule_name`, `level`, `data`, `product_key`, `device_key`, `status`, `created_at`, `updated_by`, `updated_at`, `content`) VALUES (269674, 6, 1, 30, '测试告警信息', 4, '{\"va\":{\"Value\":227.17,\"CreateTime\":1708262466},\"vb\":{\"Value\":203.22,\"CreateTime\":1708262466},\"vc\":{\"Value\":191.44,\"CreateTime\":1708262466}}', 'monipower20221103', 't202200431', 0, '2024-02-18 21:21:07', 0, '2024-02-18 21:21:07', ''); +COMMIT; + +-- ---------------------------- +-- Table structure for alarm_rule +-- ---------------------------- +DROP TABLE IF EXISTS `alarm_rule`; +CREATE TABLE `alarm_rule` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '告警规则名称', + `level` int unsigned NOT NULL DEFAULT '4' COMMENT '告警级别,默认:4(一般)', + `product_key` varchar(255) NOT NULL DEFAULT '' COMMENT '产品标识', + `device_key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `trigger_mode` tinyint(1) NOT NULL DEFAULT '1' COMMENT '触发方式:1=设备触发,2=定时触发', + `trigger_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '触发类型:1=上线,2=离线,3=属性上报, 4=事件上报', + `event_key` varchar(255) NOT NULL DEFAULT '' COMMENT '事件标识', + `trigger_condition` text COMMENT '触发条件', + `action` text COMMENT '执行动作', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态:0=未启用,1=已启用', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Records of alarm_rule +-- ---------------------------- +BEGIN; +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 0, '测试', 1, '25', '15', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0},{\"key\":\"sysReportTime\",\"operator\":\"ne\",\"value\":[\"2\"],\"andOr\":1}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[]}]}', 0, 1, 0, 1, '2022-11-13 12:27:24', '2022-11-13 12:27:24', '2022-11-13 05:06:00'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (2, 0, '测试测试测试12', 3, 'monipower20221103', 't20221333', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"vc\",\"operator\":\"gt\",\"value\":[\"160\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0g4d0couk3cgkrqft200fm009z\",\"addressee\":[\"xinjy@qq.com\"]},{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"13700005102\"]}]}', 0, 1, 1, 0, '2022-11-13 13:00:05', '2023-12-08 23:08:44', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (3, 0, 'axtest', 2, '25', '15', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"2022-11-14:10\"],\"andOr\":0},{\"key\":\"\",\"operator\":\"\",\"value\":[],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[]}]}', 0, 6, 0, 0, '2022-11-14 09:26:49', '2023-10-06 10:42:05', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (4, 0, 'test2', 4, '25', '14', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[]}]}', 0, 1, 0, 1, '2022-11-14 11:20:40', '2023-10-05 18:31:58', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (5, 0, 'test3', 3, 'aoxiang_gw', 'aoxiang_d_gw', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"\",\"operator\":\"\",\"value\":[],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"13700005102\"]}]}', 0, 1, 10, 0, '2022-11-14 11:21:44', '2023-11-30 11:45:54', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (6, 0, '北门电表=', 2, 'monipower20221103', 't20221222', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"va\",\"operator\":\"gt\",\"value\":[\"200\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"xhpeng11@163.com\"]}]}', 0, 6, 1, 0, '2022-11-14 14:49:51', '2023-10-06 10:42:03', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (7, 0, '测试名称测试名称测试名称测试名称测试名称', 3, 'ww202211', 'w88991111', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[]}]}', 0, 1, 0, 1, '2022-11-17 14:10:12', '2022-11-17 14:10:12', '2022-11-19 01:40:01'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (8, 0, '测试', 2, 'monipower20221103', 't20221333', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"va\",\"operator\":\"gt\",\"value\":[\"60\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[]}]}', 0, 1, 1, 0, '2022-12-05 17:26:51', '2023-10-07 21:00:09', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (9, 0, '1221', 1, 'monipower20221103', 't20221333', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"va\",\"operator\":\"gt\",\"value\":[\"150\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"\",\"addressee\":[\"11\"]},{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"\",\"addressee\":[\"111\"]}]}', 0, 1, 1, 0, '2022-12-05 17:33:47', '2023-10-06 10:41:58', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (10, 0, '测试', 1, 'monipower20221103', 't20221222', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"va\",\"operator\":\"gt\",\"value\":[\"180\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"15163999200\"]}]}', 0, 1, 1, 1, '2022-12-05 17:36:41', '2022-12-07 07:46:07', '2022-12-08 12:40:10'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (11, 0, '2222', 1, 'ww202211', 'w88991111', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"\",\"addressee\":[\"1111\"]},{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0ari0coq6cnpy9w5z400j0k7dm\",\"noticeTemplate\":\"\",\"addressee\":[\"222\"]}]}', 0, 1, 0, 1, '2022-12-05 17:45:54', '2022-12-05 17:45:54', '2022-12-08 12:40:04'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (12, 0, '123123', 1, 'ww202211', 'w88991111', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"\",\"addressee\":[\"11\"]},{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0ari0coq6cnpy9w5z400j0k7dm\",\"noticeTemplate\":\"\",\"addressee\":[\"111\"]}]}', 0, 1, 0, 0, '2022-12-05 17:47:24', '2023-03-02 12:55:07', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (13, 0, '测试1', 1, 'ww202211', 'w88991111', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"11\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"\",\"addressee\":[\"111\"]}]}', 0, 1, 0, 1, '2022-12-05 17:50:37', '2022-12-05 17:50:37', '2022-12-08 12:39:56'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (14, 0, '冲冲冲', 1, 'ww202211', 'w88991111', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"1vfwi9pb2p0coqh3cc49od4400nvviwj\",\"addressee\":\"111\"},{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0ari0coq6cnpy9w5z400j0k7dm\",\"noticeTemplate\":\"tu0rkg06g30coqhxytbh8ly500ybwlre\",\"addressee\":[\"222\"]}]}', 0, 1, 0, 1, '2022-12-05 17:53:24', '2022-12-05 17:53:24', '2022-12-07 04:45:12'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (15, 0, 'test11', 1, 'ww202211', 'w88991111', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"11\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0ari0coq6cnpy9w5z400j0k7dm\",\"noticeTemplate\":\"tu0rkg06g30coqhxytbh8ly500ybwlre\",\"addressee\":[\"2222\"]},{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0g4d0couk3cgkrqft200fm009z\",\"addressee\":[\"2222\"]}]}', 0, 1, 1, 1, '2022-12-07 12:50:57', '2022-12-07 13:06:20', '2022-12-08 12:39:50'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (16, 0, '测试多号码', 1, 'ww202211', 'w88991111', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"work_weixin\",\"noticeConfig\":\"tu0rkg0en80coq6dc5v5ppy1000ecyo1\",\"noticeTemplate\":\"1vfwi9pb2p0coqh3cc49od4400nvviwj\",\"addressee\":[\"1\",\"2\"]},{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0g4d0couk3cgkrqft200fm009z\",\"addressee\":[\"3\",\"4\",\"7\"]}]}', 0, 1, 1, 1, '2022-12-07 14:22:28', '2022-12-07 14:28:51', '2022-12-08 12:39:45'); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (17, 0, '测试事件上报', 2, 'zkcdgw', 't2023013101', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"CPU_System_Utilization_rate\",\"operator\":\"gt\",\"value\":[\"0.2\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"xinjy@qq.com\"]}]}', 0, 6, 1, 0, '2023-01-18 09:50:44', '2023-04-13 09:29:12', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (18, 0, '告警规则1--', 4, 'aoxiang', 'device1', 2, 4, 'aaa', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"a\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"13612345678\"]}]}', 0, 0, 1, 1, '2023-04-24 15:04:06', '2023-09-25 08:54:51', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (19, 0, 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2ODU2NzA2MzksInVzZXJuYW1lIjoiemhhaXl1amluIn0.xAW8hsN74vWnW6DlL0FWE5rcGBA0tMlyB6VfhaHUY5M', 2, 'aoxiangTest1', 'aoxiangTest11', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"ne\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"123123\",\"12344\"]},{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"123123\",\"12312313\"]}]}', 0, 10, 1, 0, '2023-06-02 09:32:57', '2023-09-20 11:47:43', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (20, 0, '测试1', 2, 'aoxiang_gw', 'aoxiang_d_gw', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"0\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 10, 1, 0, '2023-06-08 19:29:40', '2023-11-21 14:34:15', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (21, 0, 'yukai_ceshi', 2, 'aoxiang_gw', 'aoxiang_d_gw', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"2\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"1111@qq.com\"]},{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"11111\"]}]}', 0, 1, 1, 0, '2023-09-20 11:47:13', '2023-10-06 10:41:56', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (22, 0, '100000', 2, 'aoxiang_gw', 'aoxiang_d_gw', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"101\"],\"andOr\":0},{\"key\":\"sysReportTime\",\"operator\":\"gte\",\"value\":[\"101\"],\"andOr\":1}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"11111@qq.com\"]}]}', 0, 1, 1, 0, '2023-09-20 13:51:51', '2023-09-20 13:51:58', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (23, 0, '0925test111', 1, 'w20230811a', 'w2023080711', 1, 4, 'thing1', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0},{\"key\":\"b10001\",\"operator\":\"lt\",\"value\":[\"2\"],\"andOr\":2}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"11111@qq.com\"]}]}', 0, 1, 1, 0, '2023-09-25 08:56:14', '2023-12-08 23:07:47', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (24, 0, '0925_yukaiceshi', 1, 'w20230811a', 'w2023080711', 1, 4, 'thing1', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"mail\",\"noticeConfig\":\"tu0rkg0g4d0couk34jdudr7100b5f41f\",\"noticeTemplate\":\"tu0rkg0ijj0cozi9ct6u7jr500vs6shu\",\"addressee\":[\"1111@qq.com\"]}]}', 0, 1, 1, 0, '2023-09-25 08:57:07', '2023-10-30 21:52:20', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (25, 0, 'test333', 2, 'test-http', 'httpdevice', 1, 4, 'testevent', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"eq\",\"value\":[\"1\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 1, 0, 0, '2023-09-25 09:38:55', '2024-02-13 23:36:34', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (26, 0, 'test', 4, 'test-http', 'httpdevice', 1, 4, 'testevent', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"\",\"operator\":\"\",\"value\":[],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 1, 1, 0, '2023-10-16 15:17:58', '2023-10-16 15:28:47', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (27, 6, '电表上线测试', 4, 'monipower20221103', 't20221333', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"0\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 1, 1, 0, '2023-10-27 16:08:55', '2023-11-24 12:08:33', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (28, 6, '电表下线测试', 4, 'monipower20221103', 't20221333', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"0\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 1, 1, 0, '2023-10-27 16:10:27', '2023-10-30 21:55:05', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (29, 6, '11111111111111111111333333', 3, 'qmw_ice104', 'all', 1, 2, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"0\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"wework\",\"noticeConfig\":\"dzy2sv05g80cwkq8tkcuk5q1zews1n6e\",\"noticeTemplate\":\"dzy2sv05g80cwkqwyleqf6d2owg7p6ii\",\"addressee\":[\"设备离线\"]}]}', 0, 1, 1, 1, '2023-10-29 15:27:48', '2024-02-13 23:39:56', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (30, 6, '测试告警信息', 5, 'monipower20221103', 'all', 1, 3, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"va\",\"operator\":\"gt\",\"value\":[\"220\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"sms\",\"noticeConfig\":\"tu0rkg0hq90cojuowfh931wi00vbhnck\",\"noticeTemplate\":\"tu0rkg018o0colupp3s7vyv900vk3s6n\",\"addressee\":[\"13700005102\"]}]}', 0, 1, 1, 0, '2023-10-29 15:32:34', '2024-02-18 21:27:37', NULL); +INSERT INTO `alarm_rule` (`id`, `dept_id`, `name`, `level`, `product_key`, `device_key`, `trigger_mode`, `trigger_type`, `event_key`, `trigger_condition`, `action`, `status`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (31, 6, 'test11', 2, 'test-http', 'all', 1, 1, '', '{\"triggerCondition\":[{\"filters\":[{\"key\":\"sysReportTime\",\"operator\":\"gt\",\"value\":[\"0\"],\"andOr\":0}],\"andOr\":0}]}', '{\"action\":[{\"sendGateway\":\"\",\"noticeConfig\":\"\",\"noticeTemplate\":\"\",\"addressee\":[\"\"]}]}', 0, 1, 1, 1, '2023-10-29 17:15:20', '2023-12-13 10:20:57', '2024-02-01 21:50:41'); +COMMIT; + +-- ---------------------------- +-- Table structure for casbin_rule +-- ---------------------------- +DROP TABLE IF EXISTS `casbin_rule`; +CREATE TABLE `casbin_rule` ( + `ptype` varchar(10) DEFAULT NULL, + `v0` varchar(256) DEFAULT NULL, + `v1` varchar(256) DEFAULT NULL, + `v2` varchar(256) DEFAULT NULL, + `v3` varchar(256) DEFAULT NULL, + `v4` varchar(256) DEFAULT NULL, + `v5` varchar(256) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Records of casbin_rule +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for dev_device +-- ---------------------------- +DROP TABLE IF EXISTS `dev_device`; +CREATE TABLE `dev_device` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `name` varchar(255) DEFAULT NULL COMMENT '设备名称', + `product_id` int unsigned NOT NULL DEFAULT '0' COMMENT '所属产品', + `desc` varchar(255) DEFAULT NULL COMMENT '描述', + `metadata_table` tinyint NOT NULL DEFAULT '0' COMMENT '是否生成物模型子表:0=否,1=是', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态:0=未启用,1=离线,2=在线', + `online_timeout` int DEFAULT NULL COMMENT '设备在线超时设置,单位:秒', + `registry_time` datetime DEFAULT NULL COMMENT '激活时间', + `last_online_time` datetime DEFAULT NULL COMMENT '最后上线时间', + `version` varchar(255) NOT NULL DEFAULT '' COMMENT '固件版本号', + `tunnel_id` int NOT NULL DEFAULT '0' COMMENT 'tunnelId', + `lng` varchar(100) DEFAULT NULL COMMENT '经度', + `lat` varchar(100) DEFAULT NULL COMMENT '纬度', + `address` varchar(255) DEFAULT NULL COMMENT '详细地址', + `auth_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '认证方式(1=Basic,2=AccessToken,3=证书)', + `auth_user` varchar(255) DEFAULT NULL COMMENT '认证用户', + `auth_passwd` varchar(255) DEFAULT NULL COMMENT '认证密码', + `access_token` varchar(255) DEFAULT NULL COMMENT 'AccessToken', + `certificate_id` int NOT NULL DEFAULT '0' COMMENT '证书ID', + `extension_info` text COMMENT '设备扩展信息', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + `product_key` varchar(255) NOT NULL COMMENT '产品key', + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_key` (`key`(191)) +) ENGINE=InnoDB AUTO_INCREMENT=10054 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备'; + +-- ---------------------------- +-- Records of dev_device +-- ---------------------------- +BEGIN; +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (7, 0, 'k213213', '设备名称', 18, '备注备注备注', 0, 0, NULL, NULL, NULL, '固件版本号', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 1, 10, '2022-08-15 19:51:01', '2023-06-19 11:34:27', '2023-06-19 11:34:32', 'dianji'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (9, 0, 'device1', '翱翔测试设备', 22, '', 0, 0, NULL, NULL, NULL, '1.1.1', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 6, '2022-09-16 18:39:49', '2022-11-24 15:50:47', '2023-03-23 16:04:47', 'aoxiang'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (10, 0, 'w42134342', '角度传感设备', 23, '', 0, 0, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 0, '2022-09-17 15:37:55', '2024-01-17 15:17:54', NULL, 'wt61np'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (11, 0, 'testshebei', '设备测试', 22, '', 0, 0, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 6, '2022-09-20 09:24:02', '2022-11-24 15:50:42', '2023-03-23 16:05:00', 'aoxiang'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (12, 0, 't20221103', '测试电表设备', 24, '', 1, 1, NULL, NULL, '2024-01-17 15:15:46', '', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 0, '2022-11-03 16:46:48', '2024-01-17 15:19:44', NULL, 'monipower20221103'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (13, 0, 'w88991111', '办公室环境监测设备', 25, '', 1, 1, NULL, NULL, '2024-01-17 15:30:45', '', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 0, '2022-11-04 09:14:01', '2024-01-17 15:31:38', NULL, 'ww202211'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (14, 0, 't20221222', '北门电表02', 24, '', 1, 1, 30, '2024-01-31 19:45:38', '2024-02-07 07:53:52', '', 0, NULL, NULL, '', 0, '', '', '', 0, NULL, 0, 1, 0, '2022-11-04 15:49:17', '2024-02-07 07:53:52', NULL, 'monipower20221103'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (15, 0, 't20221333', '南门电表03', 24, '', 1, 2, 30, NULL, '2024-01-17 15:30:12', '', 0, NULL, NULL, '', 0, '', '', '', 0, NULL, 0, 1, 0, '2022-11-04 15:49:48', '2024-01-17 15:30:41', NULL, 'monipower20221103'); +INSERT INTO `dev_device` (`id`, `dept_id`, `key`, `name`, `product_id`, `desc`, `metadata_table`, `status`, `online_timeout`, `registry_time`, `last_online_time`, `version`, `tunnel_id`, `lng`, `lat`, `address`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `extension_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`, `product_key`) VALUES (16, 0, 'tgn22021201', '室内测温插座001', 25, '', 0, 0, NULL, NULL, NULL, '', 0, NULL, NULL, NULL, 0, NULL, NULL, NULL, 0, NULL, 1, 1, 1, '2022-12-12 15:39:55', '2024-01-17 15:17:30', '2024-01-31 08:30:05', 'ww202211'); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_device_gateway +-- ---------------------------- +DROP TABLE IF EXISTS `dev_device_gateway`; +CREATE TABLE `dev_device_gateway` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `gateway_key` varchar(255) NOT NULL DEFAULT '' COMMENT '网关标识', + `sub_key` varchar(255) NOT NULL DEFAULT '' COMMENT '子设备标识', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='网关子设备绑定关系'; + +-- ---------------------------- +-- Records of dev_device_gateway +-- ---------------------------- +BEGIN; +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'aoxiang_d_gw', 'aoxiang_d_sub', 0, 0, 1, '2023-03-27 17:19:51', '2023-03-27 17:19:51', '2023-05-22 11:57:09'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (2, 'aoxiang_d_gw', 'aoxiang_d_sub', 0, 0, 1, '2023-03-27 17:40:06', '2023-03-27 17:40:06', '2023-05-22 11:57:09'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (3, 'aoxiang_d_gw', 'test_001', 1, 0, 1, '2023-05-22 11:55:54', '2023-05-22 11:55:54', '2023-08-13 21:37:14'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (4, 'aoxiang_d_gw', 'aoxiang_d_sub', 1, 0, 1, '2023-05-22 11:55:54', '2023-05-22 11:55:54', '2023-05-22 11:57:09'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (5, 'aoxiang_d_gw', 'aoxiang_d_sub', 1, 0, 0, '2023-05-22 11:57:17', '2023-05-22 11:57:17', NULL); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (6, 'aoxiang_d_gw', 'test__01', 1, 0, 1, '2023-05-22 11:57:17', '2023-05-22 11:57:17', '2023-08-13 21:37:18'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (7, 'aoxiang_d_gw', 'test_001', 1, 0, 1, '2023-05-22 11:57:27', '2023-05-22 11:57:27', '2023-08-13 21:37:14'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (8, 'opengwtest001', 'aoxiang_test111', 1, 0, 0, '2023-08-12 17:13:20', '2023-08-12 17:13:20', '2023-08-12 19:18:36'); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (9, 'aoxiang_d_gw', 'opengwsonpw20230314', 1, 0, 0, '2023-08-13 21:37:37', '2023-08-13 21:37:37', NULL); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (10, 't20221103', 'qwertyuio', 1, 0, 0, '2023-11-25 22:17:50', '2023-11-25 22:17:50', NULL); +INSERT INTO `dev_device_gateway` (`id`, `gateway_key`, `sub_key`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (11, '12233313123', 'test_chen', 1, 0, 1, '2023-12-06 15:42:03', '2023-12-06 15:42:03', '2023-12-06 15:42:17'); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_device_tag +-- ---------------------------- +DROP TABLE IF EXISTS `dev_device_tag`; +CREATE TABLE `dev_device_tag` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `device_id` int unsigned NOT NULL DEFAULT '0' COMMENT '设备ID', + `device_key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `key` varchar(255) DEFAULT NULL COMMENT '标签标识', + `name` varchar(255) DEFAULT NULL COMMENT '标签名称', + `value` varchar(255) DEFAULT NULL COMMENT '标签值', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3 COMMENT='设备标签'; + +-- ---------------------------- +-- Records of dev_device_tag +-- ---------------------------- +BEGIN; +INSERT INTO `dev_device_tag` (`id`, `dept_id`, `device_id`, `device_key`, `key`, `name`, `value`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 0, 3, 'device-3', 'tag-1', '长度', '100', 0, 0, 0, '2022-08-11 16:52:28', '2022-08-11 17:08:32', NULL); +INSERT INTO `dev_device_tag` (`id`, `dept_id`, `device_id`, `device_key`, `key`, `name`, `value`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (9, 0, 25, 'aoxiang_d_sub', 'bbba', '长度', '101', 0, 0, 0, '2023-05-21 11:42:42', '2023-05-21 11:42:42', NULL); +INSERT INTO `dev_device_tag` (`id`, `dept_id`, `device_id`, `device_key`, `key`, `name`, `value`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (11, 0, 24, 'aoxiang_d_gw', 'key111', 'test', '111', 1, 0, 0, '2023-05-21 12:04:44', '2023-05-21 12:04:44', NULL); +INSERT INTO `dev_device_tag` (`id`, `dept_id`, `device_id`, `device_key`, `key`, `name`, `value`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (13, 0, 27, 'testlatlang', 'sdf', 'name', 'value', 1, 0, 0, '2023-05-21 23:10:01', '2023-05-21 23:10:01', NULL); +INSERT INTO `dev_device_tag` (`id`, `dept_id`, `device_id`, `device_key`, `key`, `name`, `value`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (14, 0, 26, 'aoxiangTest11', 'test_tag_1', 'test_tag_1', 'test_tag_1', 1, 0, 0, '2023-05-30 14:54:10', '2023-05-30 14:54:10', NULL); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_device_tree +-- ---------------------------- +DROP TABLE IF EXISTS `dev_device_tree`; +CREATE TABLE `dev_device_tree` ( + `id` int NOT NULL AUTO_INCREMENT, + `info_id` int NOT NULL DEFAULT '0' COMMENT '设备树信息ID', + `parent_info_id` int NOT NULL DEFAULT '0' COMMENT '父ID', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备树'; + +-- ---------------------------- +-- Records of dev_device_tree +-- ---------------------------- +BEGIN; +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (1, 1, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (2, 2, 6); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (3, 3, 1); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (6, 7, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (7, 9, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (10, 12, 6); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (11, 13, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (16, 18, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (25, 27, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (28, 30, 0); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (29, 31, 30); +INSERT INTO `dev_device_tree` (`id`, `info_id`, `parent_info_id`) VALUES (30, 32, 30); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_device_tree_info +-- ---------------------------- +DROP TABLE IF EXISTS `dev_device_tree_info`; +CREATE TABLE `dev_device_tree_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称', + `code` varchar(100) NOT NULL DEFAULT '' COMMENT '编码', + `device_key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `company` varchar(255) DEFAULT NULL COMMENT '所属公司', + `area` varchar(255) DEFAULT NULL COMMENT '区域', + `address` varchar(255) DEFAULT NULL COMMENT '地址', + `lng` varchar(100) DEFAULT NULL COMMENT '经度', + `lat` varchar(100) DEFAULT NULL COMMENT '纬度', + `contact` varchar(100) DEFAULT NULL COMMENT '联系人', + `phone` varchar(15) DEFAULT NULL COMMENT '联系电话', + `start_date` date DEFAULT NULL COMMENT '服务周期:开始日期', + `end_date` date DEFAULT NULL COMMENT '服务周期:截止日期', + `image` varchar(255) DEFAULT NULL COMMENT '图片', + `duration` int DEFAULT NULL COMMENT '时间窗口值', + `time_unit` tinyint(1) DEFAULT NULL COMMENT '时间单位:1=秒,2=分钟,3=小时,4=天', + `template` varchar(255) NOT NULL DEFAULT 'default' COMMENT '页面模板,默认:default', + `category` varchar(255) NOT NULL DEFAULT '' COMMENT '分类', + `types` varchar(255) NOT NULL DEFAULT '' COMMENT '类型', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备树信息'; + +-- ---------------------------- +-- Records of dev_device_tree_info +-- ---------------------------- +BEGIN; +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 0, '设备树bbb', 'kwonhs03gv0csogea95xivt100g9vj4p', 't20221333', '这里是所属公司XXX', '7', '沈阳市浑南区XXXX大桥', '133.123123', '42.123123', '张三', '13333333333', '2023-05-17', '2025-05-17', '', 1, 3, 'default', 'default', '热水', 0, 1, 0, '2023-05-17 17:42:58', '2023-12-21 22:37:15', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (2, 0, '设备树aaa', 'kwonhs03gv0csogea95xivt100g9vj4a', '', '', '', '地址', '', '', '联系人', '', '2023-05-17', '2025-05-17', '', 0, 0, '', '', '', 0, 1, 0, '2023-05-17 17:42:58', '2023-06-08 22:08:01', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (3, 0, '设备树ccc', 'kwonhs03gv0csogea95xivt100g9vj4c', 'opengwsonpw20230314', '', '', '地址', '', '', '联系人', '', '2023-06-12', '2023-06-21', '', 0, 0, 'default', 'default', '', 0, 1, 0, '2023-05-17 17:42:58', '2023-06-20 22:13:26', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (5, 0, '123', 'tu0rkg07mo0cssvs4q5aipim00otwykl', '', NULL, NULL, '123', '123', '123', '123', '123', NULL, NULL, '', NULL, NULL, '', '', '', 1, 0, 1, '2023-05-22 22:37:00', '2023-05-22 22:37:00', '2023-05-23 14:48:42'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (6, 0, 'test123', 'tu0rkg0a0w0cstgfz973rq63ymkggmh1', '', NULL, NULL, 'test123', '121', '123', '123', '213', NULL, NULL, '', NULL, NULL, '', '', '', 1, 0, 1, '2023-05-23 14:48:31', '2023-05-23 14:48:31', '2023-05-23 14:49:13'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (7, 0, 'tes123', 'tu0rkg0a0w0cstgugm4lu0p3yrt2gdmw', 'aoxiangTest11', '', '', 'tes123', '12', '123', '12', '13123', '2023-05-16', '2023-05-23', '', 0, 0, '', '', '', 1, 1, 0, '2023-05-23 15:07:26', '2023-06-20 22:13:31', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (9, 0, '设备树aaaa', 'i83px90j020csv77mfhhnotr00dcsife', '', '', '', '地址', '', '', '联系人', '', '2023-11-01', '2023-11-30', '', 1, 3, 'default', '', '', 0, 1, 0, '2023-05-25 15:59:46', '2023-11-19 06:54:27', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (10, 0, 'tew123', 'tu0rkg09fl0ct1inulap4vm400dbvtaw', '', NULL, NULL, '123', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-06-02 02:14:09', '2023-06-02 02:14:09', '2023-06-02 02:14:14'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (11, 0, '123', 'tu0rkg0kh00ct2pk8u0w35z600nrafb0', '', '', '', '123', '', '123', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-06-03 11:51:15', '2023-06-03 11:51:48', '2023-06-03 11:53:10'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (12, 0, '123', 'tu0rkg04ov0ct7bte5rhk012w023bsgj', '', '', '', '123', '123', '123', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 0, '2023-06-08 22:08:16', '2023-06-08 22:08:37', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (13, 0, 'test123', 'fjq2k505ez0cti8k7kflkqsh00w4yykc', '', NULL, NULL, '123', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 0, '2023-06-21 17:54:32', '2023-06-21 17:54:32', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (14, 0, '123', 'dzy2sv055r0cumcszaxkyca1b0flni9n', '', '', '', '12', '', '1', '', '1', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-08-07 21:40:42', '2023-08-07 21:41:07', '2023-08-07 21:54:16'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (15, 0, '设备数1221311', 'dzy2sv09nx0cw5by4gikfxa840x732ls', '13900001', '', '', '11', '', '1', '1', '1', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-10-11 12:37:02', '2023-10-27 20:54:37', '2023-11-13 22:43:22'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (16, 6, '设备数ccc1', 'dzy2sv0az80cweomctlim196j15c2dbd', 'w2023080711', '', '', '辽宁省沈阳市', '', '', '2', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-10-22 12:26:54', '2023-11-17 20:57:06', '2023-11-17 23:43:28'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (17, 6, '设备A', 'dzy2sv012s0cwgn9y59nikstn2pb6w1d', '', NULL, NULL, '辽宁沈阳', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-10-24 19:49:00', '2023-10-24 19:49:00', '2023-10-24 19:50:12'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (18, 6, '设备AAB', 'dzy2sv012s0cwgncrtc5wartq9shywb9', 'aoxiang_d_gw', '555', '7', '辽宁沈阳市', '444.66', '888.554', 'Llily', '024-84956765', '2023-11-01', '2023-11-03', '', 0, 0, 'default', 'default', '', 1, 1, 0, '2023-10-24 19:52:41', '2023-11-20 14:47:24', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (19, 6, '111', 'dzy2sv012s0cwgnk80s09chtykm7pshe', '', NULL, NULL, '111', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-10-24 20:02:25', '2023-10-24 20:02:25', '2023-10-24 20:19:18'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (20, 6, '222', 'dzy2sv012s0cwgnkb4paj2ptym2709mg', '', NULL, NULL, '222', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-10-24 20:02:32', '2023-10-24 20:02:32', '2023-10-24 20:17:29'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (21, 6, '222', 'dzy2sv012s0cwgnke4hmknqtyqd11rym', 'SBBS1', '', '', '333', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-10-24 20:02:39', '2023-10-24 20:07:49', '2023-10-24 20:17:07'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (22, 6, '444', 'dzy2sv012s0cwgnp9bdi8n5u3u6egyj5', '', '', '', '444', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-10-24 20:09:00', '2023-10-24 20:09:50', '2023-10-27 20:48:40'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (23, 6, '222', 'dzy2sv012s0cwgnw10em9fdub6yvo8tb', '', NULL, NULL, '222', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-10-24 20:17:50', '2023-10-24 20:17:50', '2023-10-24 20:19:13'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (24, 6, '22222', 'dzy2sv012s0cwgnw5d0yshwubaf1vvix', '', NULL, NULL, '22222', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-10-24 20:18:00', '2023-10-24 20:18:00', '2023-10-24 20:18:09'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (25, 6, 'A区', 'dzy2sv0i1k0cwj8ny7iaaor4hfi58n7b', '', '', '11', 'A省A市A区', '东经165度', '北纬46度', 'Lily King', '024-76567897', NULL, NULL, '', 0, 0, 'default', 'default', '', 1, 1, 1, '2023-10-27 21:00:01', '2023-10-27 21:00:17', '2023-11-17 09:57:58'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (26, 6, '123', '11tnudac9k0cwxrjtpdxunnarp2tkky8', '', NULL, NULL, '123', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-11-13 22:45:18', '2023-11-13 22:45:18', '2023-11-13 22:45:25'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (27, 6, 'SBBS1', '11tnudac9k0cx0322k9d66jqtmqhzyw8', '', '', '', '辽宁省沈阳市', '123.45', '123.67', '', '', '2023-11-01', '2023-11-30', '', 0, 0, '', '', '', 1, 1, 0, '2023-11-16 16:11:40', '2023-11-16 16:54:08', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (28, 6, '111', '11tnudac9k0cx17b99vexyix9360tg0s', '', NULL, NULL, '1123', '', '', '', '', NULL, NULL, '', 0, 0, '', '', '', 1, 0, 1, '2023-11-17 23:44:24', '2023-11-17 23:44:24', '2023-11-17 23:44:30'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (29, 6, '11121111', '11tnudac9k0cx17bonwqezbx9ejwef3r', '', '', '11', '111', '12', '', '12', '', NULL, NULL, '', 0, 0, '', '', '', 1, 1, 1, '2023-11-17 23:44:58', '2023-11-17 23:47:18', '2023-11-20 14:46:20'); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (30, 6, '停车场设备A区', '11tnuda5af0cx43oi480tczo07o3jxv9', '', '', '0', '辽宁省沈阳市', '', '', '', '', NULL, NULL, '', 0, 0, '', 'default', '', 1, 1, 0, '2023-11-21 09:31:37', '2023-11-21 09:31:45', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (31, 6, 'A区三楼变电器', '11tnuda5af0cx43p6hf5ykpo16hhp2zg', '', NULL, NULL, '辽宁省沈阳市', '', '', '', '', NULL, NULL, '', 0, 0, '', 'default', '', 1, 0, 0, '2023-11-21 09:32:31', '2023-11-21 09:32:31', NULL); +INSERT INTO `dev_device_tree_info` (`id`, `dept_id`, `name`, `code`, `device_key`, `company`, `area`, `address`, `lng`, `lat`, `contact`, `phone`, `start_date`, `end_date`, `image`, `duration`, `time_unit`, `template`, `category`, `types`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (32, 6, 'A区一楼变电站', '11tnuda5af0cx43pmk80z77o1gykbuf1', '', '', '', '辽宁省沈阳市', '', '', '', '', '2023-11-21', '2023-11-22', '', 0, 0, 'default', 'default', '', 1, 1, 0, '2023-11-21 09:33:06', '2023-11-21 09:37:21', NULL); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_product +-- ---------------------------- +DROP TABLE IF EXISTS `dev_product`; +CREATE TABLE `dev_product` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `key` varchar(255) NOT NULL DEFAULT '' COMMENT '产品标识', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称', + `category_id` int unsigned NOT NULL DEFAULT '0' COMMENT '所属品类', + `message_protocol` varchar(255) DEFAULT '' COMMENT '消息协议', + `transport_protocol` varchar(255) DEFAULT '' COMMENT '传输协议: MQTT,COAP,UDP', + `protocol_id` int unsigned NOT NULL DEFAULT '0' COMMENT '协议id', + `device_type` varchar(255) DEFAULT '' COMMENT '设备类型: 网关,设备,子设备', + `desc` varchar(255) DEFAULT NULL COMMENT '描述', + `icon` varchar(1000) DEFAULT NULL COMMENT '图片地址', + `metadata` mediumtext COMMENT '物模型', + `metadata_table` tinyint NOT NULL DEFAULT '0' COMMENT '是否生成物模型表:0=否,1=是', + `policy` varchar(255) NOT NULL DEFAULT '' COMMENT '采集策略', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '发布状态:0=未发布,1=已发布', + `auth_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '认证方式(1=Basic,2=AccessToken,3=证书)', + `auth_user` varchar(255) DEFAULT NULL COMMENT '认证用户', + `auth_passwd` varchar(255) DEFAULT NULL COMMENT '认证密码', + `access_token` varchar(255) DEFAULT NULL COMMENT 'AccessToken', + `certificate_id` int NOT NULL DEFAULT '0' COMMENT '证书ID', + `script_info` text COMMENT '脚本信息', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='产品表'; + +-- ---------------------------- +-- Records of dev_product +-- ---------------------------- +BEGIN; +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (18, 0, 'dianji', '电机', 22, 'modbus', 'tcp-server', 0, '网关', '水房电机', 'http://101.200.198.249:8899/upload_file/2022-08-23/cmd37oai1w9scjl2co.png', '{\"key\":\"dianji\",\"name\":\"电机\",\"properties\":[{\"key\":\"property_99\",\"name\":\"属性-9\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"maxLength\":22},\"desc\":\"描述\"},{\"key\":\"property_98\",\"name\":\"属性-9\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"maxLength\":22},\"desc\":\"描述\"},{\"key\":\"property_97\",\"name\":\"属性-9\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"maxLength\":22},\"desc\":\"描述\"},{\"key\":\"property_96\",\"name\":\"属性-9\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"maxLength\":22},\"desc\":\"描述\"},{\"key\":\"property_95\",\"name\":\"属性-9\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"maxLength\":22},\"desc\":\"描述\"},{\"key\":\"aaaaddd\",\"name\":\"ddd\",\"accessMode\":0,\"valueType\":{\"type\":\"object\",\"properties\":[{\"key\":\"ccxcx\",\"name\":\"xx\",\"valueType\":{\"type\":\"int\",\"unit\":\"x\"},\"desc\":\"\"},{\"key\":\"ccxcx\",\"name\":\"dda\",\"valueType\":{\"type\":\"long\",\"unit\":\"ss\"},\"desc\":\"\"}]},\"desc\":\"\"}],\"functions\":[{\"key\":\"CLOSE\",\"name\":\"关机\",\"inputs\":[{\"key\":\"AA\",\"name\":\"AA\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"\"}],\"events\":null,\"tags\":[]}', 1, '', 0, 0, '', '', '', 0, '', 1, 10, 1, '2022-08-16 08:50:40', '2024-01-30 22:16:23', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (20, 0, 'hhdhhsj', '测试', 22, 'modbus', 'tcp-client', 0, '设备', '', '', '{\"key\":\"hhdhhsj\",\"name\":\"测试\",\"properties\":[{\"key\":\"csss\",\"name\":\"测试\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"1\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"test2311\",\"name\":\"tttt\",\"inputs\":[{\"key\":\"aaa2123\",\"name\":\"321\",\"valueType\":{\"type\":\"string\",\"maxLength\":1,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"111\"},{\"key\":\"qq12323\",\"name\":\"213123\",\"valueType\":{\"type\":\"int\",\"max\":1,\"min\":2,\"unit\":\"3\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"4\"}],\"outputs\":[],\"desc\":\"\"}],\"events\":null,\"tags\":null}', 1, '', 0, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 1, '2022-09-14 09:12:02', '2023-09-19 18:05:03', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (22, 0, 'aoxiang', '翱翔测试产品', 22, 'modbus', 'tcp-server', 0, '设备', '', '', '{\"key\":\"aoxiang\",\"name\":\"翱翔测试产品\",\"properties\":[{\"key\":\"pr1\",\"name\":\"属性1\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"个\"},\"desc\":\"\"},{\"key\":\"pr2\",\"name\":\"属性2\",\"accessMode\":1,\"valueType\":{\"type\":\"string\",\"maxLength\":200},\"desc\":\"\"},{\"key\":\"cesgi\",\"name\":\"测试1\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"1\"},\"desc\":\"\"}],\"functions\":null,\"events\":[{\"key\":\"aaa\",\"name\":\"aaa\",\"level\":1,\"outputs\":[{\"key\":\"a\",\"name\":\"a\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"b\",\"name\":\"b\",\"valueType\":{\"type\":\"string\"},\"desc\":\"\"},{\"key\":\"c\",\"name\":\"c\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"}],\"tags\":[{\"key\":\"author\",\"name\":\"作者\",\"accessMode\":1,\"valueType\":{\"type\":\"string\",\"maxLength\":50},\"desc\":\"\"}]}', 1, '', 0, 0, '', '', '', 0, '', 1, 10, 1, '2022-09-16 18:35:51', '2024-01-30 22:16:54', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (23, 0, 'wt61np', '物联姿态传感器', 9, 'WT61NP', 'udp', 0, '设备', '', 'http://zhgy.sagoo.cn:8899/upload_file/2022-09-17/cmy7zn612zvc9r60cr.jpg', '{\"key\":\"wt61np\",\"name\":\"WT61NP物联姿态传感器\",\"properties\":[{\"key\":\"ax\",\"name\":\"X轴\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":5,\"unit\":\"度\"},\"desc\":\"滚转角\"},{\"key\":\"ay\",\"name\":\"Y轴\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":5,\"unit\":\"度\"},\"desc\":\"俯仰角\"},{\"key\":\"az\",\"name\":\"Z轴\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":5,\"unit\":\"度\"},\"desc\":\"偏航角\"},{\"key\":\"t1\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"度\"},\"desc\":\"温度\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 0, NULL, NULL, NULL, 0, NULL, 1, 1, 1, '2022-09-17 07:39:26', '2024-01-30 22:17:04', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (24, 0, 'monipower20221103', '模拟测试电表2022', 9, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"monipower20221103\",\"name\":\"模拟测试电表2022\",\"properties\":[{\"key\":\"va\",\"name\":\"A相电压\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vb\",\"name\":\"B相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vc\",\"name\":\"C相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"ia\",\"name\":\"A相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ib\",\"name\":\"A相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ic\",\"name\":\"C相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"vab\",\"name\":\"AB相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vbc\",\"name\":\"BC线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vca\",\"name\":\"CA线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"pa\",\"name\":\"A相有功功率\\t\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pb\",\"name\":\"B相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pc\",\"name\":\"C相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"testobject\",\"name\":\"测试属性\",\"accessMode\":0,\"valueType\":{\"type\":\"object\",\"properties\":[{\"key\":\"testobj1\",\"name\":\"测试结构体参数1\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}]},\"desc\":\"测试\"}],\"functions\":[{\"key\":\"openclose\",\"name\":\"open\",\"inputs\":[{\"key\":\"channel1\",\"name\":\"通道1\",\"valueType\":{\"type\":\"boolean\",\"trueText\":\"1\",\"falseText\":\"2\",\"trueValue\":true},\"desc\":\"22\"},{\"key\":\"channel2\",\"name\":\"通道2\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"resp\",\"name\":\"resp\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"},{\"key\":\"openchannel\",\"name\":\"测试\",\"inputs\":[{\"key\":\"channel3\",\"name\":\"channel3\",\"valueType\":{\"type\":\"string\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"channel4\",\"name\":\"channel4\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"ceshi\",\"name\":\"测试\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"},{\"key\":\"setStatus\",\"name\":\"设置开关状态\",\"inputs\":[{\"key\":\"status\",\"name\":\"状态\",\"valueType\":{\"type\":\"boolean\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"outputs\":[{\"key\":\"resSratus\",\"name\":\"返回状态\",\"valueType\":{\"type\":\"boolean\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"h11\",\"name\":\"h11111\",\"level\":1,\"outputs\":[],\"desc\":\"111\"}],\"tags\":[{\"key\":\"aa111\",\"name\":\"a11\\\"\\u003e\\u003c/div\\u003e\\u003cscript\\u003ealert(\'xss\')\\u003c/script\\u003e//\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":1000},\"desc\":\"111111\"}]}', 1, '', 1, 1, '', '', '', 0, '', 1, 1, 0, '2022-11-03 16:45:50', '2024-01-31 10:06:51', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (25, 0, 'ww202211', '室内环境监测设备01', 9, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"ww202211\",\"name\":\"室内环境监测设备01\",\"properties\":[{\"key\":\"t\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"度\"},\"desc\":\"adminthinglinks\"},{\"key\":\"h\",\"name\":\"湿度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"湿度\"},\"desc\":\"\"},{\"key\":\"pa\",\"name\":\"气压\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"s111\",\"name\":\"111\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"t1\",\"name\":\"t1\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"V\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"A\",\"name\":\"1\",\"inputs\":[],\"outputs\":[],\"desc\":\"\"}],\"events\":null,\"tags\":null}', 1, '', 1, 0, NULL, NULL, NULL, 0, NULL, 1, 1, 0, '2022-11-04 09:11:44', '2023-08-24 14:46:36', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (26, 0, 'tgnsncw', '设备-编辑', 31, 'WT61NP', 'tcp', 0, '设备', '编辑-描述', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-04-25/cs5ons7ftd8az5n9fj.png', '{\"key\":\"tgnsncw\",\"name\":\"室内测温插座\",\"properties\":[{\"key\":\"signal\",\"name\":\"信号质量\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"1:低;2:中;3:高\"},{\"key\":\"battery\",\"name\":\"电池质量\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"1:低;2:中;3:高\"},{\"key\":\"temperature\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":1,\"unit\":\"℃\"},\"desc\":\"\"},{\"key\":\"humidity\",\"name\":\"湿度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":1,\"unit\":\"%rh\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 0, '', '', '', 0, '', 1, 10, 1, '2022-12-12 15:38:51', '2024-01-30 22:16:31', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (28, 0, 'test230109', 'test', 31, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"test230109\",\"name\":\"test\",\"properties\":[{\"key\":\"va\",\"name\":\"电量\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 0, NULL, NULL, NULL, 0, NULL, 6, 0, 6, '2023-01-09 11:07:15', '2023-01-09 11:35:21', '2023-01-09 11:35:30'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (29, 0, 'pcm350tcp', '中电350智能电表', 9, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"pcm350tcp\",\"name\":\"中电350智能电表\",\"properties\":[{\"key\":\"va\",\"name\":\"A相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vb\",\"name\":\"B相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vc\",\"name\":\"C相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"ia\",\"name\":\"A相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ib\",\"name\":\"B相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ic\",\"name\":\"C相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"pjxd\",\"name\":\"平均项电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":0},\"desc\":\"\"},{\"key\":\"pjxdl\",\"name\":\"平均项电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"vab\",\"name\":\"AB线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vbc\",\"name\":\"BC线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vca\",\"name\":\"CA线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"pjxxdy\",\"name\":\"平均线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"pa\",\"name\":\"A相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pb\",\"name\":\"B相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pc\",\"name\":\"C相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"sxyggl\",\"name\":\"三相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"qa\",\"name\":\"A相无功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVar\"},\"desc\":\"\"},{\"key\":\"qb\",\"name\":\"B相无功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVar\"},\"desc\":\"\"},{\"key\":\"qc\",\"name\":\"C相无功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVar\"},\"desc\":\"\"},{\"key\":\"sxwggl\",\"name\":\"三相无功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVar\"},\"desc\":\"\"},{\"key\":\"sa\",\"name\":\"A相视在功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVA\"},\"desc\":\"\"},{\"key\":\"sb\",\"name\":\"B相视在功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVA\"},\"desc\":\"\"},{\"key\":\"sc\",\"name\":\"C相视在功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVA\"},\"desc\":\"\"},{\"key\":\"s\",\"name\":\"三相视在功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVA\"},\"desc\":\"\"},{\"key\":\"pfa\",\"name\":\"A相功率因数\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"VA\"},\"desc\":\"\"},{\"key\":\"pfb\",\"name\":\"B相功率因数\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"VA\"},\"desc\":\"\"},{\"key\":\"pfc\",\"name\":\"C相功率因数\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"VA\"},\"desc\":\"\"},{\"key\":\"pf\",\"name\":\"总功率因数\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"VA\"},\"desc\":\"\"},{\"key\":\"f\",\"name\":\"频率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"Hz\"},\"desc\":\"\"},{\"key\":\"aab\",\"name\":\"A/AB电压相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"},{\"key\":\"bbc\",\"name\":\"B/BC电压相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"},{\"key\":\"cca\",\"name\":\"C/CA电压相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"},{\"key\":\"iaa\",\"name\":\"A相电流相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"},{\"key\":\"iab\",\"name\":\"B相电流相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"},{\"key\":\"iac\",\"name\":\"C相电流相角\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"rad\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 0, '', '', '', 0, '', 1, 10, 1, '2023-01-16 15:38:00', '2023-07-04 11:20:23', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (30, 0, 'zkcdgw', 'ZK智能网关产品', 9, 'SagooMqtt', 'mqtt_server', 0, '网关', '', '', '{\"key\":\"zkcdgw\",\"name\":\"ZK智能网关产品\",\"properties\":[{\"key\":\"CPU_cores\",\"name\":\"CPU核数\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"个\"},\"desc\":\"\"},{\"key\":\"CPU_System_Utilization_rate\",\"name\":\"CPU利用率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"%\"},\"desc\":\"\"},{\"key\":\"Totel_MemorySize\",\"name\":\"总内存\",\"accessMode\":1,\"valueType\":{\"type\":\"long\",\"unit\":\"k\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"shutDownGateway\",\"name\":\"关闭网关\",\"inputs\":[],\"outputs\":null,\"desc\":\"测试功能\"},{\"key\":\"testcall\",\"name\":\"测试添加\",\"inputs\":[{\"key\":\"pa\",\"name\":\"参数pa\",\"valueType\":{\"type\":\"int\",\"unit\":\"1\"},\"desc\":\"测试请求参数\"},{\"key\":\"pb\",\"name\":\"测试输入参数pb\",\"valueType\":{\"type\":\"int\",\"unit\":\"1\"},\"desc\":\"测试请求参数pb\"}],\"outputs\":[{\"key\":\"ok\",\"name\":\"是否成功的标志位\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"请求是否成功\"},{\"key\":\"desc\",\"name\":\"请求是否成功的描述\",\"valueType\":{\"type\":\"string\",\"maxLength\":64},\"desc\":\"请求成功的描述\"}],\"desc\":\"测试请求调用\"}],\"events\":[{\"key\":\"overload\",\"name\":\"网关负载过高\",\"level\":0,\"outputs\":null,\"desc\":\"\"},{\"key\":\"daSDA\",\"name\":\"ASDAadad\",\"level\":1,\"outputs\":null,\"desc\":\"sadfs\"}],\"tags\":null}', 1, '', 1, 0, '', '', '', 0, '', 1, 10, 0, '2023-01-31 16:55:18', '2023-08-17 14:15:11', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (31, 0, 'hengtongtest', '亨通测试产品', 32, 'SagooMqtt', 'mqtt_server', 0, '设备', '测试产品', '', '{\"key\":\"hengtongtest\",\"name\":\"亨通测试产品\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 0, '', '', '', 0, '', 1, 10, 1, '2023-02-21 11:19:30', '2023-08-15 11:49:44', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (32, 0, 'fade', 'fade测试', 31, 'SagooMqtt', 'tcp', 0, '设备', '测试', '', '{\"key\":\"fade\",\"name\":\"fade测试\",\"properties\":[{\"key\":\"msgType\",\"name\":\"消息类型\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"测试\"},{\"key\":\"msgId\",\"name\":\"消息id\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"ports\",\"name\":\"端口数量\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"errType\",\"name\":\"故障 类型\",\"accessMode\":1,\"valueType\":{\"type\":\"array\",\"elementType\":{\"type\":\"int\"}},\"desc\":\"\"}],\"functions\":[{\"key\":\"fade\",\"name\":\"测试勿动\",\"inputs\":[{\"key\":\"request\",\"name\":\"请求参数\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"response\",\"name\":\"响应参数\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"temp_event\",\"name\":\"温度\",\"level\":0,\"outputs\":null,\"desc\":\"\"}],\"tags\":[{\"key\":\"temp\",\"name\":\"温度\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"摄氏度\"},\"desc\":\"\"}]}', 1, '', 0, 3, 'admin', 'Zd-Gf3h8_r4', '', 0, '', 1, 1, 1, '2023-02-21 14:58:17', '2024-01-30 22:16:39', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (33, 0, 'opengw2023', 'OpenGW网关', 9, 'SagooMqtt', 'mqtt_server', 0, '网关', '', '', '{\"key\":\"opengw2023\",\"name\":\"OpenGW网关\",\"properties\":[{\"key\":\"Name\",\"name\":\"名称\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":100},\"desc\":\"\"},{\"key\":\"SN\",\"name\":\"序列号\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":100},\"desc\":\"\"},{\"key\":\"SoftVer\",\"name\":\"软件版本号\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":100},\"desc\":\"\"},{\"key\":\"MemUse\",\"name\":\"内存使用率\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"%\"},\"desc\":\"\"},{\"key\":\"DiskUse\",\"name\":\"磁盘使用率\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"%\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"kk\",\"name\":\"nnn\",\"inputs\":[],\"outputs\":[],\"desc\":\"\"}],\"events\":null,\"tags\":null}', 1, '', 1, 0, NULL, NULL, NULL, 0, NULL, 1, 0, 0, '2023-03-13 16:52:52', '2023-06-07 09:33:30', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (34, 0, 'opengwsonpw01', 'OpenGW网关电表子设备网关电表子设备', 9, 'SagooMqtt', 'mqtt_server', 0, '子设备', '', '', '{\"key\":\"opengwsonpw01\",\"name\":\"OpenGW网关电表子设备\",\"properties\":[{\"key\":\"I\",\"name\":\"电流\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"P\",\"name\":\"有功功率\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"W\"},\"desc\":\"\"},{\"key\":\"Q\",\"name\":\"无功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kVar\"},\"desc\":\"\"},{\"key\":\"S\",\"name\":\"视在功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"VA\"},\"desc\":\"\"},{\"key\":\"PF\",\"name\":\"功率因素\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"cosΦ\"},\"desc\":\"\"},{\"key\":\"U\",\"name\":\"U\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":1},\"desc\":\"\"},{\"key\":\"io\",\"name\":\"io\",\"accessMode\":0,\"valueType\":{\"type\":\"double\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"test_1\",\"name\":\"test_1\",\"inputs\":[],\"outputs\":[],\"desc\":\"\"}],\"events\":[{\"key\":\"test_0\",\"name\":\"test_0\",\"level\":1,\"outputs\":[],\"desc\":\"s\"}],\"tags\":[{\"key\":\"test\",\"name\":\"test\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}]}', 1, '', 1, 2, 'demo', 'demo123456', '', 0, '', 1, 1, 0, '2023-03-14 10:05:13', '2023-10-29 18:58:21', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (35, 0, 'aoxiang_gw', '翱翔产品网关', 31, 'modbus', 'tcp', 0, '网关', '', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-10-24/cwgnhwwcvz7zi38jra.png', '{\"key\":\"aoxiang_gw\",\"name\":\"翱翔产品网关\",\"properties\":[{\"key\":\"a\",\"name\":\"温度a\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"℃\"},\"desc\":\"老数据修改一次\"},{\"key\":\"BB\",\"name\":\"压力\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"Mpa\"},\"desc\":\"\"},{\"key\":\"dxczx\",\"name\":\"xxxxx\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"xx\"},\"desc\":\"\"},{\"key\":\"test_0815\",\"name\":\"测试属性\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"修改一次\"},{\"key\":\"yangchen\",\"name\":\"扬尘\",\"accessMode\":1,\"valueType\":{\"type\":\"string\",\"maxLength\":20},\"desc\":\"\"}],\"functions\":[{\"key\":\"aaaa\",\"name\":\"aaaa\",\"inputs\":[{\"key\":\"aaa\",\"name\":\"aaa\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"\"},{\"key\":\"GNDYBS\",\"name\":\"功能定义名称\",\"inputs\":[{\"key\":\"SRCSBS\",\"name\":\"输入参数名称\",\"valueType\":{\"type\":\"int\",\"unit\":\"浓度值\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"SCCSMC\",\"name\":\"输出参数名称\",\"valueType\":{\"type\":\"long\",\"unit\":\"浓度\"},\"desc\":\"\"}],\"desc\":\"\"}],\"events\":null,\"tags\":null}', 1, '', 1, 3, 'demo', 'demo123456', '', 7, '', 6, 1, 0, '2023-03-27 16:10:22', '2023-10-24 19:59:26', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (36, 0, 'aoxiang_sub', '翱翔子设备3', 31, 'SagooMqtt', 'mqtt_server', 0, '子设备', '', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-04-20/cs1hp5d3pulwzifbks.jpeg', '{\"key\":\"aoxiang_sub\",\"name\":\"翱翔子设备\",\"properties\":[{\"key\":\"b\",\"name\":\"b\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"kw\"},\"desc\":\"\"},{\"key\":\"c\",\"name\":\"c\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 1, '', '', '', 0, '', 6, 10, 1, '2023-03-27 16:10:59', '2023-07-19 00:16:39', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (37, 0, 'aoxiangTest1', '产品-4', 8, 'modbus', 'http', 0, '子设备', '产品描述', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-04-25/cs5g4hf7bhawgxo3di.png', '{\"key\":\"aoxiangTest1\",\"name\":\"产品-1\",\"properties\":[{\"key\":\"a\",\"name\":\"s\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"aa\",\"name\":\"aa\",\"accessMode\":0,\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"},{\"key\":\"bb\",\"name\":\"bbb\",\"accessMode\":0,\"valueType\":{\"type\":\"boolean\",\"trueText\":\"是1\",\"falseText\":\"否1\"},\"desc\":\"\"},{\"key\":\"cc\",\"name\":\"cc\",\"accessMode\":0,\"valueType\":{\"type\":\"date\",\"maxLength\":0},\"desc\":\"\"},{\"key\":\"dd\",\"name\":\"dd\",\"accessMode\":0,\"valueType\":{\"type\":\"array\",\"elementType\":{\"type\":\"\"}},\"desc\":\"dd\"},{\"key\":\"ee\",\"name\":\"ee\",\"accessMode\":0,\"valueType\":{\"type\":\"array\",\"elementType\":{\"type\":\"object\",\"properties\":[{\"key\":\"dd\",\"name\":\"dd\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"d\"}]}},\"desc\":\"\"},{\"key\":\"aaa\",\"name\":\"aaa\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"a\"},\"desc\":\"aa\"},{\"key\":\"xxcv\",\"name\":\"xcv\",\"accessMode\":0,\"valueType\":{\"type\":\"object\",\"properties\":[{\"key\":\"cz\",\"name\":\"zc\",\"valueType\":{\"type\":\"int\",\"unit\":\"aa\"},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"aaaqqaa\",\"name\":\"111\",\"accessMode\":0,\"valueType\":{\"type\":\"object\",\"properties\":[{\"key\":\"dadsa\",\"name\":\"dadsa\",\"valueType\":{\"type\":\"int\",\"unit\":\"dd\"},\"desc\":\"\"}]},\"desc\":\"232\"}],\"functions\":[{\"key\":\"testadd1\",\"name\":\"测试添加\",\"inputs\":[{\"key\":\"A\",\"name\":\"A\",\"valueType\":{\"type\":\"string\",\"maxLength\":1},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"阿斯顿发的撒上的\"},{\"key\":\"beginPlay\",\"name\":\"开始播放\",\"inputs\":[{\"key\":\"deviceNo\",\"name\":\"设备编号\",\"valueType\":{\"type\":\"string\",\"maxLength\":20},\"desc\":\"这里传设备编号\"},{\"key\":\"deviceChannel\",\"name\":\"设备通道\",\"valueType\":{\"type\":\"string\",\"maxLength\":20},\"desc\":\"设备通道\"},{\"key\":\"in_a\",\"name\":\"参数\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"enum_key\",\"name\":\"选择项\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"a\",\"text\":\"第一项\"},{\"value\":\"b\",\"text\":\"第二项\"},{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"摄像头播放\"},{\"key\":\"readdata\",\"name\":\"读实时\",\"inputs\":[{\"key\":\"no\",\"name\":\"设备编号\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"读实时指令\"}],\"events\":[{\"key\":\"AAEE\",\"name\":\"AAEE\",\"level\":0,\"outputs\":[{\"key\":\"AAEE\",\"name\":\"AAEE\",\"valueType\":{\"type\":\"int\",\"unit\":\"E\"},\"desc\":\"E\"}],\"desc\":\"\"}],\"tags\":[{\"key\":\"ee23\",\"name\":\"ee\",\"accessMode\":0,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}]}', 1, '', 0, 3, 'user23', '111', '123123', 1, 'function parse(data) {\n\n var jsonData = JSON.parse(data);\n var detectionPoint1Flow = jsonData[\"Device1\"][\"detection_point1_flow\"];\n var detectionPoint1Temperatures = jsonData[\"Device1\"][\"detection_point1_temperatures\"];\n var detectionPoint1FlowRate = jsonData[\"Device1\"][\"detection_point1_flowRate\"];\n var detectionPoint1Pressure = jsonData[\"Device1\"][\"detection_point1_pressure\"];\n\n var detectionPoint2Flow = jsonData[\"Device1\"][\"detection_point2_flow\"];\n var detectionPoint2Temperatures = jsonData[\"Device1\"][\"detection_point2_temperatures\"];\n var detectionPoint2FlowRate = jsonData[\"Device1\"][\"detection_point2_flowRate\"];\n var detectionPoint2Pressure = jsonData[\"Device1\"][\"detection_point2_pressure\"];\n\n var detectionPoint3Flow = jsonData[\"Device1\"][\"detection_point3_flow\"];\n var detectionPoint3Temperatures = jsonData[\"Device1\"][\"detection_point3_temperatures\"];\n var detectionPoint3FlowRate = jsonData[\"Device1\"][\"detection_point3_flowRate\"];\n var detectionPoint3Pressure = jsonData[\"Device1\"][\"detection_point3_pressure\"];\n \n var subCylinderTemperatures = jsonData[\"Device1\"][\"sub_cylinder_temperatures\"];\n var collectingCylinderPressure = jsonData[\"Device1\"][\"collecting_cylinder_pressure\"];\n\n var time = data[\"time\"]\n\n // 定义要生成的 JSON 数据\n var sagooIotMessage = {\n \"id\": \"123\",\n \"version\": \"1.0\",\n \"sys\": {\n \"ack\": 0\n },\n \"params\": {\n \"detection_point1_flow\": {\n \"value\": 23.6,\n \"time\": 1524448722000\n },\n \"detection_point1_temperatures\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point1_flowRate\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point1_pressure\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point2_flow\": {\n \"value\": 23.6,\n \"time\": 1524448722000\n },\n \"detection_point2_temperatures\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point2_flowRate\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point2_pressure\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point3_flow\": {\n \"value\": 23.6,\n \"time\": 1524448722000\n },\n \"detection_point3_temperatures\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point3_flowRate\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"detection_point3_pressure\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"sub_cylinder_temperatures\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n \"collecting_cylinder_pressure\": {\n \"value\": 23.6,\n \"time\":1524448722000\n },\n },\n \"method\": \"thing.event.property.post\"\n };\n\n var chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n var idLength = 16;\n var randomId = \"\";\n for (var i = 0; i < idLength; i++) {\n randomId += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n \n sagooIotMessage[\"id\"] = randomId\n \n \n\n sagooIotMessage[\"params\"][\"detection_point1_flow\"][\"value\"] = detectionPoint1Flow\n sagooIotMessage[\"params\"][\"detection_point1_flow\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point1_temperatures\"][\"value\"] = detectionPoint1Temperatures\n sagooIotMessage[\"params\"][\"detection_point1_temperatures\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point1_flowRate\"][\"value\"] = detectionPoint1FlowRate\n sagooIotMessage[\"params\"][\"detection_point1_flowRate\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point1_pressure\"][\"value\"] = detectionPoint1Pressure\n sagooIotMessage[\"params\"][\"detection_point1_pressure\"][\"time\"] = time\n\n sagooIotMessage[\"params\"][\"detection_point2_flow\"][\"value\"] = detectionPoint2Flow\n sagooIotMessage[\"params\"][\"detection_point2_flow\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point2_temperatures\"][\"value\"] = detectionPoint2Temperatures\n sagooIotMessage[\"params\"][\"detection_point2_temperatures\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point2_flowRate\"][\"value\"] = detectionPoint2FlowRate\n sagooIotMessage[\"params\"][\"detection_point2_flowRate\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point2_pressure\"][\"value\"] = detectionPoint2Pressure\n sagooIotMessage[\"params\"][\"detection_point2_pressure\"][\"time\"] = time\n\n sagooIotMessage[\"params\"][\"detection_point3_flow\"][\"value\"] = detectionPoint3Flow\n sagooIotMessage[\"params\"][\"detection_point3_flow\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point3_temperatures\"][\"value\"] = detectionPoint3Temperatures\n sagooIotMessage[\"params\"][\"detection_point3_temperatures\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point3_flowRate\"][\"value\"] = detectionPoint3FlowRate\n sagooIotMessage[\"params\"][\"detection_point3_flowRate\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"detection_point3_pressure\"][\"value\"] = detectionPoint3Pressure\n sagooIotMessage[\"params\"][\"detection_point3_pressure\"][\"time\"] = time\n\n sagooIotMessage[\"params\"][\"sub_cylinder_temperatures\"][\"value\"] = subCylinderTemperatures\n sagooIotMessage[\"params\"][\"sub_cylinder_temperatures\"][\"time\"] = time\n sagooIotMessage[\"params\"][\"collecting_cylinder_pressure\"][\"value\"] = collectingCylinderPressure\n sagooIotMessage[\"params\"][\"collecting_cylinder_pressure\"][\"time\"] = time\n\n return JSON.stringify(sagooIotMessage, null, 2);\n const now = format(new Date(), \'yyyy-MM-dd HH:mm:ss\'); \nconsole.log(now);\n \n}\n', 0, 10, 1, '2023-03-29 10:22:07', '2023-08-08 20:29:53', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (38, 0, 'test_product_2023', '测试德力信网关产品', 22, 'SagooMqtt', 'mqtt_server', 0, '网关', '', '', '{\"key\":\"test_product_2023\",\"name\":\"测试德力信网关产品\",\"properties\":[{\"key\":\"shidu\",\"name\":\"湿度\",\"accessMode\":0,\"valueType\":{\"type\":\"float\"},\"desc\":\"\"},{\"key\":\"wendu\",\"name\":\"温度\",\"accessMode\":0,\"valueType\":{\"type\":\"float\"},\"desc\":\"\"},{\"key\":\"cc\",\"name\":\"cc\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"c\"},\"desc\":\"cc\"},{\"key\":\"dd\",\"name\":\"dd\",\"accessMode\":0,\"valueType\":{\"type\":\"long\",\"unit\":\"d\"},\"desc\":\"dd\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 1, 'delixin', '6hUs*jAM', '', 0, 'function parse(data) {\n var jsonData = JSON.parse(data);\n var chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n var idLength = 16;\n var randomId = \"\";\n for (var i = 0; i < idLength; i++) {\n randomId += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n jsonData.id = randomId;\n return JSON.stringify(jsonData);\n}', 1, 1, 10, '2023-06-04 15:44:11', '2023-06-14 17:37:29', '2023-06-14 17:37:47'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (39, 0, 'w20230811a', '测试202308产品', 9, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"w20230811a\",\"name\":\"测试202308产品\",\"properties\":[{\"key\":\"t\",\"name\":\"T\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"个\"},\"desc\":\"\"},{\"key\":\"h\",\"name\":\"H\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"pa\",\"name\":\"P\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"aa\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"getvar\",\"name\":\"读设备名称\",\"inputs\":[],\"outputs\":[{\"key\":\"var123\",\"name\":\"设备名称\",\"valueType\":{\"type\":\"string\",\"maxLength\":100},\"desc\":\"\"}],\"desc\":\"\"},{\"key\":\"SetVar\",\"name\":\"设置设备名称\",\"inputs\":[{\"key\":\"var123\",\"name\":\"设备名称\",\"valueType\":{\"type\":\"string\",\"maxLength\":100},\"desc\":\"\"}],\"outputs\":[{\"key\":\"bool123\",\"name\":\"设置设备名称结果\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"thing1\",\"name\":\"事件名称\",\"level\":0,\"outputs\":[{\"key\":\"b10001\",\"name\":\"参数名称\",\"valueType\":{\"type\":\"int\",\"unit\":\"a\"},\"desc\":\"参数描述\"}],\"desc\":\"事件描述\"}],\"tags\":[{\"key\":\"a10001\",\"name\":\"名称\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"aa\"},\"desc\":\"\"}]}', 1, '', 0, 1, 'conn-equipment', 'm6C66kV!G!WZVi3x', '', 7, '', 1, 10, 1, '2023-08-07 21:01:14', '2024-01-30 22:17:39', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (40, 0, 'qmw_ice104', 'QmwICE104网关', 9, 'SagooMqtt', 'mqtt_server', 0, '网关', 'QMW的ICE104云网服务网关测试产品', '', '{\"key\":\"qmw_ice104\",\"name\":\"QmwICE104网关\",\"properties\":[{\"key\":\"GatewayVersion\",\"name\":\"网关版本\",\"accessMode\":0,\"valueType\":{\"type\":\"string\"},\"desc\":\"\"},{\"key\":\"ceshi\",\"name\":\"ceshi\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"1\"},\"desc\":\"12\"}],\"functions\":[{\"key\":\"dfsd\",\"name\":\"sdf\",\"inputs\":[{\"key\":\"dsds\",\"name\":\"zsds\",\"valueType\":{\"type\":\"int\",\"unit\":\"sdf\"},\"desc\":\"sdf\"},{\"key\":\"rrrr\",\"name\":\"444\",\"valueType\":{\"type\":\"date\",\"maxLength\":5665432},\"desc\":\"676543\"}],\"outputs\":[],\"desc\":\"sdf\"}],\"events\":[{\"key\":\"ww\",\"name\":\"ss\",\"level\":0,\"outputs\":[{\"key\":\"ww\",\"name\":\"ww\",\"valueType\":{\"type\":\"int\",\"unit\":\"ww\"},\"desc\":\"ww\"}],\"desc\":\"sdsd\"}],\"tags\":null}', 1, '', 0, 1, 'demo-equipment', 'mW*Vz_wtP3MaeEB_', '', 0, '', 1, 10, 0, '2023-08-10 15:55:07', '2024-01-31 22:14:37', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (41, 0, 'q104001', '青104子设备', 9, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"q104001\",\"name\":\"青104子设备\",\"properties\":[{\"key\":\"t\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"度\"},\"desc\":\"\"},{\"key\":\"h\",\"name\":\"湿度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"%rh\"},\"desc\":\"\"},{\"key\":\"DI\",\"name\":\"遥信\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"D\"},\"desc\":\"\"},{\"key\":\"DO1\",\"name\":\"遥控\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"DO\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"open\",\"name\":\"打开\",\"inputs\":[{\"key\":\"aaa\",\"name\":\"1\",\"valueType\":{\"type\":\"int\",\"max\":1,\"min\":2,\"unit\":\"3\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"4\"}],\"outputs\":[],\"desc\":\"\"},{\"key\":\"testParams\",\"name\":\"测试传参\",\"inputs\":[{\"key\":\"arr\",\"name\":\"数组\",\"valueType\":{\"type\":\"array\"},\"desc\":\"数组\"},{\"key\":\"e2\",\"name\":\"e2\",\"valueType\":{\"type\":\"array\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":0,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"elementType\":{\"type\":\"enum\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":0,\"elements\":[{\"value\":\"33\",\"text\":\"df\"}]}},\"desc\":\"\"},{\"key\":\"obj\",\"name\":\"对象\",\"valueType\":{\"type\":\"object\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":0,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"name\",\"name\":\"姓名\",\"valueType\":{\"type\":\"string\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":10,\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"},{\"key\":\"age\",\"name\":\"年龄\",\"valueType\":{\"type\":\"int\",\"max\":100,\"min\":1,\"decimals\":0,\"unit\":\"岁\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":0,\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"w\",\"name\":\"12\",\"valueType\":{\"type\":\"object\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":0,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"sd\",\"name\":\"12\",\"valueType\":{\"type\":\"string\",\"max\":0,\"min\":0,\"decimals\":0,\"unit\":\"\",\"trueText\":\"\",\"falseText\":\"\",\"trueValue\":false,\"falseValue\":false,\"maxLength\":12,\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"测试枚举和数组的传参\"}],\"events\":[{\"key\":\"test132\",\"name\":\"test\",\"level\":0,\"outputs\":[{\"key\":\"bbb331\",\"name\":\"2\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"5\"}],\"desc\":\"\"}],\"tags\":[{\"key\":\"TT\",\"name\":\"TTT\",\"accessMode\":1,\"valueType\":{\"type\":\"long\"},\"desc\":\"TTT\"}]}', 1, '', 0, 1, 'demo-equipment', 'mW*Vz_wtP3MaeEB_', '', 0, '1212', 1, 10, 0, '2023-08-10 16:28:27', '2024-01-31 22:03:43', NULL); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (42, 0, 'aoxiang_0810', '测试', 31, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"aoxiang_0810\",\"name\":\"测试\",\"properties\":[{\"key\":\"pro_1\",\"name\":\"测试属性-1\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"ee\"},\"desc\":\"dsfgds\"}],\"functions\":[{\"key\":\"aa\",\"name\":\"df\",\"inputs\":[{\"key\":\"fd\",\"name\":\"df\",\"valueType\":{\"type\":\"int\",\"unit\":\"df\"},\"desc\":\"df\"}],\"outputs\":[{\"key\":\"df\",\"name\":\"dfd\",\"valueType\":{\"type\":\"int\",\"unit\":\"df\"},\"desc\":\"df\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"asdf_1\",\"name\":\"asdfs_1\",\"level\":0,\"outputs\":[{\"key\":\"dd\",\"name\":\"ffd\",\"valueType\":{\"type\":\"int\",\"unit\":\"df\"},\"desc\":\"dsf\"}],\"desc\":\"撒旦法\"}],\"tags\":[{\"key\":\"sss\",\"name\":\"ss\",\"accessMode\":0,\"valueType\":{\"type\":\"int\",\"unit\":\"ss\"},\"desc\":\"sd\"}]}', 1, '', 0, 1, '', '', '', 0, '', 1, 0, 1, '2023-08-10 17:31:16', '2023-08-15 20:07:25', '2023-08-15 20:07:30'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (43, 0, 'fadetest', 'fade测试产品勿动', 31, 'SagooMqtt', 'tcp', 0, '设备', 'ce', '', '{\"key\":\"fadetest\",\"name\":\"fade测试产品勿动\",\"properties\":[{\"key\":\"dfdfdf\",\"name\":\"dfdfdfd\",\"accessMode\":1,\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 11, '', 1, 10, 10, '2023-08-24 17:59:50', '2023-08-25 10:21:59', '2023-08-25 14:05:19'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (44, 0, 'yukai_test', '产品测试', 31, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"yukai_test\",\"name\":\"产品测试\",\"properties\":null,\"functions\":[{\"key\":\"test123\",\"name\":\"test123\",\"inputs\":[{\"key\":\"teste12\",\"name\":\"2\",\"valueType\":{\"type\":\"int\",\"max\":1,\"min\":2,\"unit\":\"3\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"6\"},{\"key\":\"test321\",\"name\":\"test321\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"},{\"value\":\"4\",\"text\":\"3\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"\"},{\"key\":\"test_huixian\",\"name\":\"回显\",\"inputs\":[{\"key\":\"tt312\",\"name\":\"rere\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"4\"},{\"key\":\"teste42\",\"name\":\"12333\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"},{\"value\":\"4\",\"text\":\"3\"},{\"value\":\"6\",\"text\":\"5\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"tete123\",\"name\":\"321\",\"valueType\":{\"type\":\"int\",\"max\":1,\"min\":2,\"unit\":\"3\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"4\"},{\"key\":\"tea\",\"name\":\"2222\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"},{\"value\":\"4\",\"text\":\"3\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"aaa123\",\"name\":\"aaaa\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"2\",\"text\":\"1\"},{\"value\":\"4\",\"text\":\"3\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"fdfdf123\",\"name\":\"123\",\"valueType\":{\"type\":\"boolean\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"outputs\":[{\"key\":\"dddd333\",\"name\":\"ddd222\",\"valueType\":{\"type\":\"array\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"},{\"key\":\"testa2324\",\"name\":\"4324\",\"valueType\":{\"type\":\"array\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"elementType\":{\"type\":\"object\",\"maxLength\":213123,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"1\",\"name\":\"2\",\"valueType\":{\"type\":\"boolean\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"3123213\"},{\"key\":\"ggggg213123\",\"name\":\"hhhh21323\",\"valueType\":{\"type\":\"object\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"ss11\",\"name\":\"sss22\",\"valueType\":{\"type\":\"int\",\"max\":1,\"min\":2,\"unit\":\"ww\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"ww\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"testtttt11\",\"name\":\"teete\",\"level\":0,\"outputs\":[{\"key\":\"tetete2123\",\"name\":\"3213\",\"valueType\":{\"type\":\"long\",\"max\":1,\"min\":2,\"unit\":\"3\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"4\"},{\"key\":\"tewt333\",\"name\":\"343243\",\"valueType\":{\"type\":\"enum\",\"elements\":[{\"value\":\"34\",\"text\":\"wtete\"},{\"value\":\"34\",\"text\":\"324\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"desc\":\"\"}],\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-09-19 19:20:56', '2023-09-19 21:49:51', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (45, 0, 'test-http', 'http测试产品', 31, 'SagooMqtt', 'http', 0, '设备', '测试http消息上传', '', '{\"key\":\"test-http\",\"name\":\"http测试产品\",\"properties\":[{\"key\":\"testA\",\"name\":\"测试属性\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"S\"},\"desc\":\"定义属性\"},{\"key\":\"_11\",\"name\":\"11\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":0,\"unit\":\"S\"},\"desc\":\"111\"}],\"functions\":[{\"key\":\"_222\",\"name\":\"222\",\"inputs\":[{\"key\":\"_201\",\"name\":\"201\",\"valueType\":{\"type\":\"float\",\"max\":100,\"min\":1,\"decimals\":2,\"unit\":\"S\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"2222\"}],\"outputs\":[],\"desc\":\"222\"}],\"events\":[{\"key\":\"testevent\",\"name\":\"测试事件\",\"level\":0,\"outputs\":[{\"key\":\"eventout1\",\"name\":\"事件输出参数1\",\"valueType\":{\"type\":\"int\",\"max\":100,\"min\":0,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"测试事件输出参数1\"}],\"desc\":\"333333333333333333333333333333333333333333333333333333333333333\"}],\"tags\":[{\"key\":\"_Tag\",\"name\":\"tag100\",\"accessMode\":0,\"valueType\":{\"type\":\"double\",\"decimals\":2,\"unit\":\"kg\"},\"desc\":\"33333333333333333333333333333333333333333333333333333333333333333\"}]}', 1, '', 0, 3, '', '', '', 0, '1', 1, 1, 1, '2023-09-21 23:24:42', '2024-01-30 22:16:00', '2024-01-30 22:17:50'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (46, 0, '1', 'http测试产品2', 31, 'SagooMqtt', 'tcp', 0, '设备', '1', '', '{\"key\":\"1\",\"name\":\"http测试产品\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 1, 1, '2023-09-26 14:57:52', '2023-10-23 21:16:17', '2023-10-23 21:18:19'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (47, 0, ' ', ' ', 31, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\" \",\"name\":\" \",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-09-26 15:31:38', '2023-09-26 15:31:38', '2023-10-22 21:33:23'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (48, 0, '1212', '1212-11', 32, 'SagooMqtt', 'tcp', 0, '网关', '1', '', '{\"key\":\"1212\",\"name\":\"1\",\"properties\":[{\"key\":\"a\",\"name\":\"q\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"22\"},\"desc\":\"1\"}],\"functions\":[{\"key\":\"service1\",\"name\":\"service1\",\"inputs\":[{\"key\":\"servicep1in\",\"name\":\"servicep1in\",\"valueType\":{\"type\":\"string\",\"maxLength\":100,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"servicep1in\"}],\"outputs\":[{\"key\":\"servicep1out\",\"name\":\"servicep1out\",\"valueType\":{\"type\":\"string\",\"maxLength\":100,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"servicep1out\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"event1\",\"name\":\"event1\",\"level\":0,\"outputs\":[{\"key\":\"eventp1\",\"name\":\"eventp1\",\"valueType\":{\"type\":\"int\",\"max\":0,\"min\":10,\"unit\":\"0\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"eventp1\"}],\"desc\":\"eventp1\"}],\"tags\":[{\"key\":\"tag1\",\"name\":\"tag1\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"0\"},\"desc\":\"tag1\"}]}', 1, '', 0, 3, '', '', '', 10, '', 1, 1, 1, '2023-09-26 15:35:50', '2024-01-30 22:15:30', '2024-01-30 22:15:49'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (49, 0, 'q', 'q', 8, 'SagooMqtt', 'tcp', 0, '设备', 'q', '', '{\"key\":\"q\",\"name\":\"q\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-09-28 12:18:57', '2023-09-28 12:18:57', '2023-09-28 12:19:03'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (50, 0, '23-1017-001', '变压器', 47, 'SagooMqtt', 'mqtt_server', 0, '网关', '变压器设备', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-10-17/cwarh46m43dzjwalbe.png', '{\"key\":\"23-1017-001\",\"name\":\"变压器\",\"properties\":[{\"key\":\"a_1\",\"name\":\"aa\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"3\"},\"desc\":\"5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555\"}],\"functions\":[{\"key\":\"_11\",\"name\":\" 22\",\"inputs\":[],\"outputs\":[],\"desc\":\"11111111111111\"}],\"events\":[{\"key\":\"_2\",\"name\":\"12\",\"level\":1,\"outputs\":[{\"key\":\"_2\",\"name\":\"333\",\"valueType\":{\"type\":\"int\",\"max\":0,\"min\":12,\"unit\":\"4\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"666666666666666666666\"}],\"desc\":\"\"}],\"tags\":null}', 0, '', 0, 1, 'root', '123456', '', 0, '', 1, 10, 1, '2023-10-17 21:51:05', '2023-10-25 15:57:11', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (51, 6, '21313123', '产品12', 49, 'SagooMqtt', 'tcp', 0, '设备', '这是产品描述描述', '', '{\"key\":\"21313123\",\"name\":\"产品12\",\"properties\":[],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-10-22 11:43:33', '2023-10-22 11:45:09', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (52, 6, ' ', ' ', 50, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\" \",\"name\":\" \",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-10-22 21:33:38', '2023-10-22 21:33:38', '2023-10-22 21:34:32'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (53, 6, 'CQQ', '温湿度采集器', 50, 'SagooMqtt', 'websocket', 0, '设备', '温湿度采集器', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-10-23/cwftseck12wp6fkmiv.png', '{\"key\":\"CQQ\",\"name\":\"温湿度采集器\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-10-23 20:43:09', '2023-10-23 20:43:09', '2023-10-23 21:18:01'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (54, 6, 'QQ', '温湿度采集器', 46, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"QQ\",\"name\":\"温湿度采集器\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-10-23 21:04:38', '2023-10-23 21:04:38', '2023-10-23 21:04:51'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (55, 6, 'CQQ1', '温湿度采集器', 50, 'SagooMqtt', 'websocket', 0, '设备', '333333333333333333333333333333333333333333333', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-10-23/cwfug70n5igh8riqym.png', '{\"key\":\"CQQ1\",\"name\":\"温湿度采集器\",\"properties\":[{\"key\":\"SX1\",\"name\":\"属性1\",\"accessMode\":1,\"valueType\":{\"type\":\"timestamp\"},\"desc\":\"属性1制度timestamp\"},{\"key\":\"qwertyu\",\"name\":\" \",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"GN1\",\"name\":\"功能1\",\"inputs\":[{\"key\":\"CS1\",\"name\":\"参数1\",\"valueType\":{\"type\":\"date\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"参数1\"}],\"outputs\":[{\"key\":\"SCCS1\",\"name\":\"输出参数1\",\"valueType\":{\"type\":\"date\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"输出参数1\"}],\"desc\":\"功能1\"}],\"events\":[{\"key\":\"SJ1\",\"name\":\"事件1\",\"level\":0,\"outputs\":[{\"key\":\"CS2\",\"name\":\"参数2\",\"valueType\":{\"type\":\"date\",\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"参数2\"}],\"desc\":\"事件1\"}],\"tags\":[{\"key\":\"BQBS1\",\"name\":\"标签1\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":12},\"desc\":\"标签1\"}]}', 0, '', 0, 3, '', '', '', 10, '', 1, 1, 1, '2023-10-23 21:05:16', '2023-10-30 17:20:11', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (56, 6, 'chanpin123', '产品12', 35, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"chanpin123\",\"name\":\"产品12\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-10-30 17:07:16', '2023-10-30 17:07:16', '2023-10-30 17:07:31'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (57, 6, '1234567890', '子设备1', 50, 'SagooMqtt', 'tcp', 0, '子设备', '', '', '{\"key\":\"1234567890\",\"name\":\"子设备1\",\"properties\":[{\"key\":\"wertyuiop\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"℃\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 1, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-10-31 09:33:35', '2024-01-30 22:15:08', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (58, 6, 'qwertyu', '23456789', 50, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"qwertyu\",\"name\":\"23456789\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-11-03 11:28:31', '2023-11-03 11:28:31', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (59, 6, 'test_yukai', '测试', 50, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"test_yukai\",\"name\":\"测试\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 0, 1, '2023-11-03 14:15:10', '2023-11-03 14:15:10', '2023-11-03 14:26:13'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (60, 6, 'test_23123', 'tete', 50, 'SagooMqtt', 'tcp', 0, '设备', '', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-11-08/cwt697f4i1ojylkngo.jpg', '{\"key\":\"test_23123\",\"name\":\"tete\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 10, '', 1, 1, 1, '2023-11-03 14:26:33', '2023-11-08 13:13:24', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (61, 6, 'testament1', 'testament1产品', 49, 'SagooMqtt', 'tcp', 0, '网关', '', '', '{\"key\":\"testament1\",\"name\":\"testament1产品\",\"properties\":[],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-11-16 14:19:00', '2023-11-16 14:20:25', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (62, 6, '1233', 'tete1', 49, 'SagooMqtt', 'tcp', 0, '设备', '', 'https://zhgy.sagoo.cn/base-api/upload_file/2023-11-16/cx02cm23k7zyp8lkji.jpeg', '{\"key\":\"1233\",\"name\":\"tete\",\"properties\":[{\"key\":\"q\",\"name\":\"啊\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"o\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"open\",\"name\":\" \",\"inputs\":[{\"key\":\"q\",\"name\":\"q\",\"valueType\":{\"type\":\"int\",\"max\":32,\"min\":12,\"elements\":[{\"value\":\"\",\"text\":\"\"}],\"properties\":[{\"key\":\"\",\"name\":\"\",\"valueType\":{\"type\":\"\",\"elements\":[{\"value\":\"\",\"text\":\"\"}]},\"desc\":\"\"}]},\"desc\":\"\"}],\"outputs\":[],\"desc\":\"wertyui\"},{\"key\":\"qw\",\"name\":\" \",\"inputs\":[],\"outputs\":[],\"desc\":\" \"},{\"key\":\"qeer\",\"name\":\"qw\",\"inputs\":[],\"outputs\":[],\"desc\":\"123\"}],\"events\":[{\"key\":\"w\",\"name\":\" \",\"level\":0,\"outputs\":[],\"desc\":\"\"}],\"tags\":[{\"key\":\"werwe324234\",\"name\":\"wrwrw2wr34234\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"2\"},\"desc\":\"24424234\"}]}', 0, '', 0, 3, '', '', '', 10, '', 1, 1, 1, '2023-11-16 14:21:12', '2024-01-22 07:06:27', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (63, 6, '4G气感设备', '4G气感', 70, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"4G气感设备\",\"name\":\"4G气感\",\"properties\":null,\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 0, 1, '2023-12-21 23:14:40', '2023-12-21 23:14:40', '2023-12-21 23:16:03'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (64, 6, '4G气感', '4G气感', 70, 'SagooMqtt', 'tcp', 0, '设备', '', '', '{\"key\":\"4G气感\",\"name\":\"4G气感\",\"properties\":[{\"key\":\"inductive_status\",\"name\":\"感应头状态\",\"accessMode\":1,\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"environmentalmonitoringequipment\",\"name\":\"环境监测设备\",\"accessMode\":1,\"valueType\":{\"type\":\"int\",\"unit\":\"℃\"},\"desc\":\"对温度进行监测\"}],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 3, '', '', '', 0, '', 1, 1, 1, '2023-12-21 23:16:36', '2024-01-18 11:19:22', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (65, 6, 'voltmeter', '电压表', 36, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"voltmeter\",\"name\":\"电压表\",\"properties\":[{\"key\":\"temperature\",\"name\":\"温度\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"unit\":\"℃\"},\"desc\":\"\"},{\"key\":\"consumption\",\"name\":\"功耗\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":0,\"unit\":\"va\"},\"desc\":\"\"}],\"functions\":null,\"events\":null,\"tags\":null}', 0, '', 0, 1, '', '', '', 0, '', 1, 0, 1, '2024-01-30 11:21:56', '2024-01-30 14:04:49', '2024-01-30 22:15:20'); +INSERT INTO `dev_product` (`id`, `dept_id`, `key`, `name`, `category_id`, `message_protocol`, `transport_protocol`, `protocol_id`, `device_type`, `desc`, `icon`, `metadata`, `metadata_table`, `policy`, `status`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `script_info`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (66, 6, 'power202401', '智能电表T202401', 73, 'SagooMqtt', 'mqtt_server', 0, '设备', '', '', '{\"key\":\"power202401\",\"name\":\"智能电表T202401\",\"properties\":[{\"key\":\"va\",\"name\":\"A相电压\",\"accessMode\":0,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vb\",\"name\":\"B相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vc\",\"name\":\"C相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"ia\",\"name\":\"A相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ib\",\"name\":\"A相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"ic\",\"name\":\"C相电流\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"A\"},\"desc\":\"\"},{\"key\":\"vab\",\"name\":\"AB相电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vbc\",\"name\":\"BC线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"vca\",\"name\":\"CA线电压\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"V\"},\"desc\":\"\"},{\"key\":\"pa\",\"name\":\"A相有功功率\\t\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pb\",\"name\":\"B相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"},{\"key\":\"pc\",\"name\":\"C相有功功率\",\"accessMode\":1,\"valueType\":{\"type\":\"float\",\"decimals\":2,\"unit\":\"kW\"},\"desc\":\"\"}],\"functions\":[{\"key\":\"openclose\",\"name\":\"open\",\"inputs\":[{\"key\":\"channel1\",\"name\":\"通道1\",\"valueType\":{\"type\":\"boolean\",\"trueText\":\"1\",\"falseText\":\"2\",\"trueValue\":true},\"desc\":\"22\"},{\"key\":\"channel2\",\"name\":\"通道2\",\"valueType\":{\"type\":\"boolean\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"resp\",\"name\":\"resp\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"},{\"key\":\"openchannel\",\"name\":\"测试\",\"inputs\":[{\"key\":\"channel3\",\"name\":\"channel3\",\"valueType\":{\"type\":\"string\"},\"desc\":\"\"}],\"outputs\":[{\"key\":\"channel4\",\"name\":\"channel4\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"},{\"key\":\"ceshi\",\"name\":\"测试\",\"valueType\":{\"type\":\"int\"},\"desc\":\"\"}],\"desc\":\"\"}],\"events\":[{\"key\":\"h11\",\"name\":\"h11111\",\"level\":1,\"outputs\":[],\"desc\":\"111\"}],\"tags\":[{\"key\":\"aa111\",\"name\":\"a11\\\"\\u003e\\u003c/div\\u003e\\u003cscript\\u003ealert(\'xss\')\\u003c/script\\u003e//\",\"accessMode\":0,\"valueType\":{\"type\":\"string\",\"maxLength\":1000},\"desc\":\"111111\"}]}', 1, '', 1, 1, '', '', '', 0, '', 1, 0, 0, '2024-01-31 09:13:56', '2024-02-01 16:52:11', NULL); +COMMIT; + +-- ---------------------------- +-- Table structure for dev_product_category +-- ---------------------------- +DROP TABLE IF EXISTS `dev_product_category`; +CREATE TABLE `dev_product_category` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `parent_id` int unsigned NOT NULL DEFAULT '0' COMMENT '父ID', + `key` varchar(20) NOT NULL DEFAULT '' COMMENT '分类标识', + `name` varchar(100) NOT NULL DEFAULT '' COMMENT '分类名称', + `sort` int NOT NULL DEFAULT '0' COMMENT '排序', + `desc` varchar(255) DEFAULT NULL COMMENT '描述', + `created_by` int unsigned NOT NULL DEFAULT '0' COMMENT '创建者', + `updated_by` int unsigned NOT NULL DEFAULT '0' COMMENT '更新者', + `deleted_by` int unsigned NOT NULL DEFAULT '0' COMMENT '删除者', + `created_at` datetime DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime DEFAULT NULL COMMENT '更新时间', + `deleted_at` datetime DEFAULT NULL COMMENT '删除时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='产品分类'; + +-- ---------------------------- +-- Records of dev_product_category +-- ---------------------------- +BEGIN; +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (8, 0, 0, 'key-1', '分类-1', 666, '', 0, 1, 0, '2022-08-04 15:58:48', '2023-10-10 15:05:25', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (9, 0, 0, 'key-12', '分类-12', 66, '12', 0, 1, 0, '2022-08-04 15:59:00', '2023-10-10 15:05:13', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (10, 0, 8, 'key-2', '分类-2', 0, '', 0, 0, 0, '2022-08-04 15:59:28', '2022-08-04 15:59:28', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (11, 0, 8, 'key-3', '分类-3', 0, '', 0, 0, 0, '2022-08-04 15:59:38', '2022-08-10 18:25:48', '2022-08-10 10:30:43'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (12, 0, 10, 'key-3', '分类-3', 0, '', 0, 0, 0, '2022-08-04 15:59:49', '2022-08-04 15:59:49', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (21, 0, 10, 'string', 'string', 0, 'string', 0, 0, 0, '2022-08-11 11:18:12', '2022-08-11 11:23:50', '2022-08-11 03:24:53'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (22, 0, 9, '标识', '测试', 3, '11', 1, 1, 0, '2022-08-13 14:16:19', '2023-10-23 20:32:12', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (23, 0, 4294967295, '1111', '111', 0, '', 1, 0, 0, '2022-08-13 14:25:32', '2022-08-13 14:25:32', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (24, 0, 4294967295, '11111', '1111', 0, '', 1, 0, 0, '2022-08-13 14:25:59', '2022-08-13 14:25:59', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (25, 0, 0, '1111', '111122', 0, '', 1, 1, 0, '2022-08-13 14:26:55', '2022-08-13 14:27:57', '2022-08-13 07:19:41'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (26, 0, 0, '22', '11122111', 0, '11', 1, 0, 0, '2022-08-13 14:28:06', '2022-08-13 14:28:06', '2022-08-13 07:19:37'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (27, 0, 0, '333', '333', 0, '333', 1, 0, 0, '2022-08-13 14:28:42', '2022-08-13 15:19:31', '2022-08-13 07:19:35'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (28, 0, 0, '44', '444', 0, '', 1, 0, 1, '2022-08-13 14:29:59', '2022-08-13 14:29:59', '2022-08-13 07:03:28'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (29, 0, 0, '55', '55', 0, '', 1, 0, 1, '2022-08-13 14:30:34', '2022-08-13 14:30:34', '2022-08-13 07:03:25'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (30, 0, 0, '111', '111', 0, '', 1, 0, 1, '2022-08-15 18:13:56', '2022-08-15 18:13:56', '2022-08-15 10:14:00'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (31, 0, 22, 'test', 'test', 0, '', 1, 10, 0, '2022-09-16 18:31:33', '2023-06-19 11:13:38', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (32, 0, 8, 'sdss', '测试', 0, '', 1, 0, 0, '2022-09-16 18:34:26', '2022-09-16 18:34:26', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (33, 0, 9, 'test', '测试分类呀', 1, '', 1, 0, 1, '2023-03-28 11:12:48', '2023-03-28 11:12:48', '2023-03-28 11:13:31'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (34, 0, 33, 'test2', '测试分类2', 10, '', 1, 1, 1, '2023-03-28 11:13:09', '2023-03-28 11:13:21', '2023-03-28 11:13:29'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (35, 0, 0, '1', '分类-12', 6, '1', 1, 1, 0, '2023-10-10 15:03:18', '2023-10-10 15:05:01', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (36, 0, 0, '电', '电器设备', 1, '电器设备!!!', 1, 1, 0, '2023-10-17 20:17:32', '2023-10-17 21:42:50', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (37, 0, 36, 'Lenovo G', '联想G系列', 2, 'G 系列做工一般,外观普通。综合处理能力中等,显卡wield入门级显卡,散热不太好,但是价格便宜,满足日常用。', 1, 0, 1, '2023-10-17 20:20:13', '2023-10-17 20:20:13', '2023-10-17 20:27:40'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (38, 0, 36, 'Lenovo G', '联想G系列', 2, 'G 系列做工一般,外观普通。综合处理能力中等,显卡wield入门级显卡,散热不太好,但是价格便宜,满足日常用。', 1, 0, 1, '2023-10-17 20:20:13', '2023-10-17 20:20:13', '2023-10-17 20:27:35'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (39, 0, 36, 'Lenovo G', '联想G系列', 1, 'G 系列做工一般,外观普通。综合处理能力中等,显卡为入门级显卡,散热不太好,但是价格便宜,满足日常用。', 1, 1, 1, '2023-10-17 20:20:13', '2023-10-17 21:40:32', '2023-10-17 21:41:11'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (40, 0, 36, '小新', '联想小新系列', 1, '小新系列细节质量一般,综合处理能力中等,显卡为性能级别显卡,散热一般,但是性价比还是蛮高的,日常使用效果不错。', 1, 1, 1, '2023-10-17 20:29:12', '2023-10-17 21:26:22', '2023-10-17 21:41:06'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (41, 0, 36, 'Thinkpad', 'Thinkpad系列', 1, 'Thinkpad系列有T、W、x,这几款的外观细节都做的非常的好,大多为黑色。综合处理能力处于中等水平,显卡为性能级别显卡,散热也不错。Thinkpad系列的价格都比较高,走的是高端路线。\nThinkpad系列有T、W、x,这几款的外观细节都做的非常的好,大多为黑色。综合处理能力处于中等水平。', 1, 1, 1, '2023-10-17 21:03:37', '2023-10-17 21:29:52', '2023-10-17 21:41:02'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (42, 0, 41, 'X', 'X', 0, '', 1, 0, 1, '2023-10-17 21:30:00', '2023-10-17 21:30:00', '2023-10-17 21:36:54'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (43, 0, 41, 'W', 'W', 0, '', 1, 0, 1, '2023-10-17 21:30:32', '2023-10-17 21:30:32', '2023-10-17 21:36:52'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (44, 0, 41, 'T', 'T', 0, '', 1, 0, 1, '2023-10-17 21:30:44', '2023-10-17 21:30:44', '2023-10-17 21:36:49'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (45, 0, 0, '水', '供水设备', 3, '供水设备!!!', 1, 1, 0, '2023-10-17 21:32:12', '2023-10-17 21:42:38', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (46, 0, 47, '暖', '供暖设备', 2, '供暖设备!!!', 1, 1, 0, '2023-10-17 21:32:34', '2023-12-13 17:39:35', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (47, 0, 36, '住宅电', '住宅电器设备', 0, '住宅电器设备~~~', 1, 1, 0, '2023-10-17 21:43:38', '2023-10-27 20:15:22', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (48, 0, 36, '商用电器', '商用电器设备', 1, '商用电器设备~~~', 1, 1, 0, '2023-10-17 21:44:00', '2023-10-27 20:15:34', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (49, 0, 0, 'testKind1', '采集器', 0, 'test分类1', 10, 1, 0, '2023-10-22 01:28:27', '2023-10-23 21:13:54', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (50, 6, 49, '77', '温度采集器', 0, '', 1, 1, 0, '2023-10-22 12:21:03', '2023-11-01 14:09:04', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (51, 6, 49, ' ', ' ', 0, '', 1, 1, 1, '2023-10-22 21:35:30', '2023-10-23 20:23:39', '2023-10-23 20:23:43'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (52, 6, 0, '111', '111', 0, '', 1, 0, 1, '2023-10-23 20:12:53', '2023-10-23 20:12:53', '2023-10-23 20:23:33'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (53, 6, 0, '222', '111', 0, '', 1, 0, 1, '2023-10-23 20:13:01', '2023-10-23 20:13:01', '2023-10-23 20:23:30'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (54, 6, 0, '111', '3', 0, '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', 1, 1, 1, '2023-10-23 20:22:47', '2023-10-23 20:23:17', '2023-10-23 20:23:25'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (55, 6, 48, '333', '333', 0, '', 1, 0, 1, '2023-10-23 20:34:37', '2023-10-23 20:34:37', '2023-10-23 20:34:47'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (56, 6, 50, '1', '1', 0, '', 1, 0, 1, '2023-10-23 20:35:42', '2023-10-23 20:35:42', '2023-10-23 20:40:11'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (57, 6, 56, '2', '2', 0, '', 1, 0, 1, '2023-10-23 20:35:48', '2023-10-23 20:35:48', '2023-10-23 20:40:10'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (58, 6, 57, '3', '3', 0, '', 1, 0, 1, '2023-10-23 20:35:53', '2023-10-23 20:35:53', '2023-10-23 20:40:08'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (59, 6, 58, '4', '4', 0, '', 1, 0, 1, '2023-10-23 20:35:59', '2023-10-23 20:35:59', '2023-10-23 20:40:07'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (60, 6, 59, '5', '5', 0, '', 1, 0, 1, '2023-10-23 20:36:04', '2023-10-23 20:36:04', '2023-10-23 20:40:05'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (61, 6, 8, '12345678', '分类12', 0, '', 1, 0, 0, '2023-10-30 17:07:52', '2023-10-30 17:07:52', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (62, 6, 8, '12345678', '分类12', 0, '', 1, 0, 0, '2023-10-30 17:07:52', '2023-10-30 17:07:52', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (63, 6, 22, 'sss', 'ce', 0, '', 1, 0, 0, '2023-11-08 12:57:32', '2023-11-08 12:57:32', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (64, 6, 22, 'sss', 'ce', 0, '', 1, 1, 0, '2023-11-08 12:57:32', '2023-11-16 23:00:06', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (65, 6, 22, 'sss', 'ce', 0, '', 1, 1, 0, '2023-11-08 12:57:32', '2023-11-16 23:00:17', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (66, 6, 22, 'cece', 'cece', 0, '', 1, 0, 0, '2023-11-08 13:03:39', '2023-11-08 13:03:39', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (67, 6, 22, 'cece', 'cece', 0, '', 1, 0, 0, '2023-11-08 13:03:39', '2023-11-08 13:03:39', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (68, 6, 22, 'cececece', 'cececece', 0, '', 1, 0, 0, '2023-11-08 13:03:56', '2023-11-08 13:03:56', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (69, 6, 22, 'cecececec', 'cecececcece', 0, '', 1, 0, 0, '2023-11-08 13:04:04', '2023-11-08 13:04:04', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (70, 6, 0, 'qwertyuiop', '测试测试', 0, '', 1, 0, 0, '2023-11-16 15:01:06', '2023-11-16 15:01:06', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (71, 6, 0, 'dianliyunwei', '电力运维设备', 0, '', 1, 0, 0, '2024-01-17 15:52:00', '2024-01-17 15:52:00', NULL); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (72, 6, 71, 'peidainqishebei', '配电器设备', 0, '', 1, 0, 1, '2024-01-17 15:52:59', '2024-01-17 15:52:59', '2024-01-17 15:53:16'); +INSERT INTO `dev_product_category` (`id`, `dept_id`, `parent_id`, `key`, `name`, `sort`, `desc`, `created_by`, `updated_by`, `deleted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (73, 6, 0, 'dianliyunweishebei', '电力运维设备', 0, '', 1, 0, 0, '2024-01-17 15:58:19', '2024-01-17 15:58:19', NULL); +COMMIT; + +-- ---------------------------- +-- Table structure for network_server +-- ---------------------------- +DROP TABLE IF EXISTS `network_server`; +CREATE TABLE `network_server` ( + `id` int NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `name` varchar(50) NOT NULL, + `types` varchar(50) NOT NULL COMMENT 'tcp/udp', + `addr` varchar(50) NOT NULL, + `register` varchar(200) NOT NULL COMMENT '注册包', + `heartbeat` varchar(200) NOT NULL COMMENT '心跳包', + `protocol` varchar(200) NOT NULL COMMENT '协议', + `devices` varchar(200) NOT NULL COMMENT '默认设备', + `status` tinyint(1) NOT NULL DEFAULT '0', + `created_at` datetime DEFAULT NULL, + `updated_at` datetime DEFAULT NULL, + `create_by` int DEFAULT NULL, + `remark` varchar(200) DEFAULT NULL COMMENT '备注', + `is_tls` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '开启TLS:1=是,0=否', + `auth_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '认证方式(1=Basic,2=AccessToken,3=证书)', + `auth_user` varchar(255) DEFAULT NULL COMMENT '认证用户', + `auth_passwd` varchar(255) DEFAULT NULL COMMENT '认证密码', + `access_token` varchar(255) DEFAULT NULL COMMENT 'AccessToken', + `certificate_id` int NOT NULL DEFAULT '0' COMMENT '证书ID', + `stick` varchar(255) DEFAULT NULL COMMENT '粘包处理方式', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb3 COMMENT='网络组件服务表'; + +-- ---------------------------- +-- Records of network_server +-- ---------------------------- +BEGIN; +INSERT INTO `network_server` (`id`, `dept_id`, `name`, `types`, `addr`, `register`, `heartbeat`, `protocol`, `devices`, `status`, `created_at`, `updated_at`, `create_by`, `remark`, `is_tls`, `auth_type`, `auth_user`, `auth_passwd`, `access_token`, `certificate_id`, `stick`) VALUES (22, 0, '服务器11', 'tcp', '9000', '{\"regex\":\"^w+$\"}', '{\"enable\":false,\"hex\":\"\",\"regex\":\"^\\\\w+$\",\"text\":\"\",\"timeout\":30}', '{\"name\":\"ModbusTCP\",\"options\":{}}', '[]', 0, '2023-05-23 10:30:15', '2023-05-23 10:30:15', 0, '', 0, 0, NULL, NULL, NULL, 0, NULL); +COMMIT; + +-- ---------------------------- +-- Table structure for network_tunnel +-- ---------------------------- +DROP TABLE IF EXISTS `network_tunnel`; +CREATE TABLE `network_tunnel` ( + `id` int NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `server_id` int NOT NULL DEFAULT '0' COMMENT '服务ID', + `name` varchar(50) NOT NULL, + `types` varchar(50) NOT NULL, + `addr` varchar(50) NOT NULL, + `remote` varchar(50) NOT NULL, + `retry` varchar(200) NOT NULL COMMENT '断线重连', + `heartbeat` varchar(200) NOT NULL COMMENT '心跳包', + `serial` varchar(200) NOT NULL COMMENT '串口参数', + `protoccol` varchar(200) NOT NULL COMMENT '适配协议', + `device_key` varchar(255) NOT NULL DEFAULT '' COMMENT '设备标识', + `status` tinyint(1) NOT NULL, + `last` datetime DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + `updated_at` datetime DEFAULT NULL, + `remark` varchar(200) NOT NULL COMMENT '备注', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb3 COMMENT='网络通道表'; + +-- ---------------------------- +-- Records of network_tunnel +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for notice_config +-- ---------------------------- +DROP TABLE IF EXISTS `notice_config`; +CREATE TABLE `notice_config` ( + `id` varchar(32) NOT NULL, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `title` varchar(100) NOT NULL, + `send_gateway` varchar(200) NOT NULL, + `types` tinyint(1) NOT NULL, + `created_at` datetime NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='通知服务配置表'; + +-- ---------------------------- +-- Records of notice_config +-- ---------------------------- +BEGIN; +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('11tnuda5af0cx1zqw70fk3c2q7wmq300', 6, '1234', 'wework', 2, '2023-11-18 22:01:20'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('11tnudackp0cx49p1vay3rk43dmf6biy', 6, '关于供热通知', 'wework', 2, '2023-11-21 14:14:27'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('11tnudackp0cx49pcppk3m243k8jsedg', 6, '关于供水通知', 'wework', 1, '2023-11-21 14:14:51'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('dzy2sv02go0cwo86c5a1759ysggkyvti', 6, '1', 'wework', 1, '2023-11-02 17:40:20'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg03iz0coqyeyhni297200eh7xkf', 0, 'ereqrqe', 'dingding', 1, '2022-12-02 09:51:37'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0ari0coq6cnpy9w5z400j0k7dm', 0, '测试', 'work_weixin', 2, '2022-12-01 11:52:06'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0en80coq6dc5v5ppy1000ecyo1', 0, '测试类型', 'work_weixin', 0, '2022-12-01 11:52:59'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0g4d0couk34jdudr7100b5f41f', 0, '告警测试', 'mail', 1, '2022-12-06 15:28:34'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0hq90cojukvo1u0oyd00vawtmc', 0, 'text3', 'work_weixin', 0, '2022-11-24 01:22:37'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0hq90cojulmymp2pne00czr9m4', 0, '111', 'work_weixin', 0, '2022-11-24 01:23:36'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0hq90cojummccsd4ug00u4m7mp', 0, '11', 'work_weixin', 1, '2022-11-24 01:24:53'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0hq90cojumuehlvx0h00mlssjy', 0, '33', 'work_weixin', 2, '2022-11-24 01:25:11'); +INSERT INTO `notice_config` (`id`, `dept_id`, `title`, `send_gateway`, `types`, `created_at`) VALUES ('tu0rkg0hq90cojuowfh931wi00vbhnck', 0, '天天', 'sms', 1, '2022-11-24 01:27:52'); +COMMIT; + +-- ---------------------------- +-- Table structure for notice_info +-- ---------------------------- +DROP TABLE IF EXISTS `notice_info`; +CREATE TABLE `notice_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `config_id` varchar(32) NOT NULL, + `come_from` varchar(100) NOT NULL, + `method` varchar(30) NOT NULL, + `msg_title` varchar(100) NOT NULL, + `msg_body` varchar(300) NOT NULL, + `msg_url` varchar(200) NOT NULL, + `user_ids` varchar(500) NOT NULL, + `org_ids` varchar(500) NOT NULL, + `totag` varchar(100) NOT NULL, + `status` tinyint(1) NOT NULL, + `method_cron` varchar(50) NOT NULL, + `method_num` int NOT NULL, + `created_at` datetime NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='通知服务发送信息表'; + +-- ---------------------------- +-- Records of notice_info +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for notice_log +-- ---------------------------- +DROP TABLE IF EXISTS `notice_log`; +CREATE TABLE `notice_log` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `send_gateway` varchar(32) NOT NULL DEFAULT '' COMMENT '通知渠道', + `template_id` varchar(32) NOT NULL DEFAULT '' COMMENT '通知模板ID', + `addressee` varchar(255) NOT NULL DEFAULT '' COMMENT '收信人列表', + `title` varchar(100) NOT NULL DEFAULT '' COMMENT '通知标题', + `content` varchar(500) NOT NULL DEFAULT '' COMMENT '通知内容', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '发送状态:0=失败,1=成功', + `fail_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '失败信息', + `send_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发送时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=515500 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Records of notice_log +-- ---------------------------- +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for notice_template +-- ---------------------------- +DROP TABLE IF EXISTS `notice_template`; +CREATE TABLE `notice_template` ( + `id` varchar(32) NOT NULL, + `dept_id` int DEFAULT '0' COMMENT '部门ID', + `config_id` varchar(32) NOT NULL, + `send_gateway` varchar(32) NOT NULL, + `code` varchar(32) NOT NULL, + `title` varchar(100) NOT NULL, + `content` varchar(500) NOT NULL, + `created_at` datetime NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `config_id` (`config_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='通知模版表'; + +-- ---------------------------- +-- Records of notice_template +-- ---------------------------- +BEGIN; +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('1vfwi9pb2p0coqh3cc49od4400nvviwj', 0, 'tu0rkg0en80coq6dc5v5ppy1000ecyo1', 'work_weixin', '', '某项地ssss', 'erreeerrere222', '2022-12-01 20:08:04'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('dzy2sv05g80cwkq5oxb89631w01e83e1', 0, 'dzy2sv05g80cwkq2k6rnfx31sclq9w00', 'wework', '', ' 111', ' 22222', '2023-10-29 14:55:10'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('dzy2sv05g80cwkq72iijh6q1x7dp44y7', 6, 'dzy2sv05g80cwkq6rxbe5ef1x2pmbwti', 'wework', '', '模版111', '模版内容111111111', '2023-10-29 14:56:58'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('dzy2sv05g80cwkqwyleqf6d2owg7p6ii', 6, 'dzy2sv05g80cwkq8tkcuk5q1zews1n6e', 'wework', '', '2模版', '2模版内容', '2023-10-29 15:30:47'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('tu0rkg018o0colum0is6t5w700rkqkf0', 0, 'tu0rkg0hq90cojumuehlvx0h00mlssjy', 'work_weixin', '', '注册通知', '注册通知注册通知注册通知', '2022-11-26 09:49:26'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('tu0rkg018o0colupp3s7vyv900vk3s6n', 0, 'tu0rkg0hq90cojuowfh931wi00vbhnck', 'sms', '', '5', '6', '2022-11-26 09:54:14'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('tu0rkg06g30coqhxytbh8ly500ybwlre', 0, 'tu0rkg0ari0coq6cnpy9w5z400j0k7dm', 'work_weixin', '', '234', '234324', '2022-12-01 20:57:08'); +INSERT INTO `notice_template` (`id`, `dept_id`, `config_id`, `send_gateway`, `code`, `title`, `content`, `created_at`) VALUES ('tu0rkg0ijj0cozi9ct6u7jr500vs6shu', 0, 'tu0rkg0g4d0couk34jdudr7100b5f41f', 'mail', '', '告警邮件模板', '
配置内容配置内容
'); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (6, 'notice', 'dingding', 'AppKey: \"sdfadfasdfasdfasdfasdf\"\nAppSecret: \"ewrerwerwerrwerwerwerwer\"', 'width: 40px;
'); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (7, 'notice', 'sms', 'ProviderName: \"alisms\"\nTitle: \"阿里云\"\nRegionId: \"cn-hangzhou\"\nAccessKeyId: \"LTAI5tJ3MfwiZAZdrWEjazZH\"\nAccessSecret: \"K9DEX3QZemVbFLNYmOJsKTvZSj7Ozm\"\nSignName: \"Emporak\"\nCode: \"SMS_464050874\"', 'ProviderName 的参数为短信提供商的代码;alisms:阿里云;tencentcloud:腾讯云
'); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (10, 'notice', 'mail', 'MailHost: \"smtp.qq.com\"\nMailPort: \"465\"\nMailUser: \"xinjy@qq.com\"\nMailPass: \"zdqkqrdzplnabiig\"', ''); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (12, 'notice', 'webhook', 'webhook:\n - PayloadURL: \"http://127.0.0.1:8180/test/webhook\"\n Secret: \"aaaadfasdfasf\"\n - PayloadURL: \"http://127.0.0.1:8180/test/webhook22\"\n Secret: \"aaaadfasdfasf22\"\n - PayloadURL: \"http://127.0.0.1:8180/test/webhook33\"\n Secret: \"aaaadfasdfasf333\"', ''); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (13, 'notice', 'voice', 'wwwwww', ''); +INSERT INTO `sys_plugins_config` (`id`, `type`, `name`, `value`, `doc`) VALUES (14, 'notice', 'wework', 'Corpid: \"\"\nAgentID: \"\"\nSecret: \"\"\nToken: \"\"\nEncodingAESKey: \"\"', '
1&&(n*=Math.sqrt(f),i*=Math.sqrt(f));var d=n*n*(p*p)+i*i*(h*h),g=d?Math.sqrt((n*n*(i*i)-d)/d):1;o===a&&(g*=-1),isNaN(g)&&(g=0);var y=i?g*n*p/i:0,v=n?g*-i*h/n:0,m=(s+u)/2+Math.cos(r)*y-Math.sin(r)*v,x=(l+c)/2+Math.sin(r)*y+Math.cos(r)*v,w=[(h-y)/n,(p-v)/i],b=[(-1*h-y)/n,(-1*p-v)/i],C=ba([1,0],w),M=ba(w,b);return wa(w,b)<=-1&&(M=Math.PI),wa(w,b)>=1&&(M=0),0===a&&M>0&&(M-=2*Math.PI),1===a&&M<0&&(M+=2*Math.PI),{cx:m,cy:x,rx:Ca(t,[u,c])?0:n,ry:Ca(t,[u,c])?0:i,startAngle:C,endAngle:C+M,xRotation:r,arcFlag:o,sweepFlag:a}}function Sa(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function ka(t){t=function(t){var e=t||[];return lt(e)?e:St(e)?(ct(e=e.match(ua),(function(t,n){if((t=t.match(ca))[0].length>1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}ct(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t);for(var e=[],n=null,i=null,r=null,o=0,a=t.length,s=0;s=e&&t<=n};function Fa(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Ta(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Ea(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o a-r){var m=n?(i*v+o*y)/n:o;c(t,f,y,i,r,m,a),c(f,e,v,m,r,o,a)}else{var x=n?(r*v+a*y)/n:a;c(t,f,y,i,r,o,x),c(f,e,v,i,x,o,a)}}(0,l,t.value,e,n,i,r)},treemapDice:CA,treemapSlice:DA,treemapSliceDice:function(t,e,n,i,r){(1&t.depth?DA:CA)(t,e,n,i,r)},treemapSquarify:_A,treemapResquarify:NA},Symbol.toStringTag,{value:"Module"}));function GA(t,e){var n=t.field,i=t.fields;if(St(n))return n;if(lt(n))return n[0];if(St(i))return i;if(lt(i)&&i.length)return i[0];if(e)return e;throw new TypeError("Invalid field: it must be a string!")}function VA(t){var e,n,i=[];t&&t.each?t.each((function(t){var r,o;t.parent!==e?(e=t.parent,n=0):n+=1;var a=it(((null===(r=t.ancestors)||void 0===r?void 0:r.call(t))||[]).map((function(t){return i.find((function(e){return e.name===t.name}))||t})),(function(e){var n=e.depth;return n>0&&n=0?1:-1;return Math.pow(o,n)*a},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var i=this.exponent;return(Ks(i,t)-Ks(i,n))/(Ks(i,e)-Ks(i,n))},e}(Us),nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return j(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),i=this.formatter;return i?i(n,e):Gs(n,this.mask)},e.prototype.scale=function(e){var n=e;return(St(n)||Zt(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return Vs(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(st(e)&&Rt(e)||(this.min=this.translate(this.min)),st(n)&&Rt(n)||(this.max=this.translate(this.max)),t&&t.length){var i=[],r=Infinity,o=r,a=0;ct(t,(function(t){var e=Vs(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");r>e?(o=r,r=e):o>e&&(o=e),a0?i=dl(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,t):i<0&&(i=dl(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,t)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(l/i)*i,this.domain(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(l*i)/i,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var i,r,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];(i=e=0?1:-1;return Math.pow(t,e)*n}))})),hs("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var i=n.slice().sort((function(t,e){return t-e})),r=[],o=0;o1){p=Math.ceil(p);for(var d=0;d2){var a=r[0],s=r[r.length-1];a.get("visible")||(a.show(),Ou(t,e,!1,i)&&(o=!0)),s.get("visible")||(s.show(),Ou(t,e,!0,i)&&(o=!0))}return o}},Symbol.toStringTag,{value:"Module"}));function Nu(t,e,n,i){var r=e.getChildren();if(!r.length)return!1;if(!t&&r.length<2)return!1;var o=pu(r),a=!1;t?a=!!n&&o>n:a=o>Math.abs(r[1].attr("x")-r[0].attr("x"));a&&function(t,e){ct(t,(function(t){var n=Wl({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",n)}))}(r,i(n,o));return a}function Yu(t,e,n,i){return Nu(t,e,n,(function(){return Rt(i)?i:t?gu.verticalAxisRotate:gu.horizontalAxisRotate}))}var Gu,Vu=Object.freeze(Object.defineProperty({__proto__:null,getDefault:function(){return Yu},fixedAngle:Yu,unfixedAngle:function(t,e,n){return Nu(t,e,n,(function(e,n){if(!e)return t?gu.verticalAxisRotate:gu.horizontalAxisRotate;if(t)return-Math.acos(e/n);var i=0;return(e>n||(i=Math.asin(e/n))>Math.PI/4)&&(i=Math.PI/4),i}))}},Symbol.toStringTag,{value:"Module"})),Xu=Object.freeze(Object.defineProperty({__proto__:null,autoHide:zu,autoRotate:Vu,autoEllipsis:Bu},Symbol.toStringTag,{value:"Module"})),Hu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),i=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,n.x,i.x),o=Math.min(e.y,n.y,i.y),a=Math.max(e.x,n.x,i.maxX),s=Math.max(e.y,n.y,i.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return _t(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return _t(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),i=n.x-e.x,r=n.y-e.y;return{x:e.x+i*t,y:e.y+r*t}},e.prototype.getSideVector=function(t){var e=fi([0,0],this.getAxisVector()),n=this.get("verticalFactor");return ci([0,0],[e[1],-1*e[0]],t*n)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),i=this.isHorizontal();if(n||i){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,l=a,u=0,c=0;if(o&&(u=o.style.fontSize,c=o.spacing),l&&(l=l-s-c-u),ct(this.get("overlapOrder"),(function(n){r[n]&&e.canProcessOverlap(n)&&e.autoProcessOverlap(n,r[n],t,l)})),o&&st(o.offset)){var h=t.getCanvasBBox(),p=n?h.width:h.height;o.offset=s+p+c+u/2}}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||st(e.rotate)},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=this.isVertical(),a=!1,s=Xu[t];if(!0===e)this.get("label"),a=s.getDefault()(o,n,i);else if(at(e))a=e(o,n,i);else if(ut(e)){var l=e;s[l.type]&&(a=s[l.type](o,n,i,l.cfg))}else s[e]&&(a=s[e](o,n,i));if("autoRotate"===t){if(a){var u=n.getChildren(),c=this.get("verticalFactor");ct(u,(function(t){if("center"===t.attr("textAlign")){var e=c>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){ct(n.getChildren().slice(0),(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(Eu),Wu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,i=this.get("radius"),r=i,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,n-r],["A",i,r,0,1,1,e,n+r],["A",i,r,0,1,1,e,n-r],["Z"]];else{var l=this.getCirclePoint(o),u=this.getCirclePoint(a),c=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,n],["L",l.x,l.y],["A",i,r,0,c,h,u.x,u.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y];return ci(i,i,this.get("verticalFactor")*t/pi(i)),i},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||st(e.rotate)},e.prototype.processOverlap=function(t){var e=this,n=this.get("label"),i=this.get("title"),r=this.get("verticalLimitLength"),o=n.offset,a=r,s=0,l=0;if(i&&(s=i.style.fontSize,l=i.spacing),a&&(a=a-o-l-s),ct(this.get("overlapOrder"),(function(i){n[i]&&e.canProcessOverlap(i)&&e.autoProcessOverlap(i,n[i],t,a)})),i&&st(i.offset)){var u=t.getCanvasBBox().height;i.offset=o+u+l+s/2}},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=!1,a=Xu[t];if(i>0)if(!0===e)o=a.getDefault()(!1,n,i);else if(at(e))o=e(!1,n,i);else if(ut(e)){var s=e;a[s.type]&&(o=a[s.type](!1,n,i,s.cfg))}else a[e]&&(o=a[e](!1,n,i));if("autoRotate"===t){if(o){var l=n.getChildren(),u=this.get("verticalFactor");ct(l,(function(t){if("center"===t.attr("textAlign")){var e=u>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){ct(n.getChildren().slice(0),(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(Eu),ju=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:gu.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:gu.textColor,textAlign:"center",textBaseline:"middle",fontFamily:gu.fontFamily}},textBackground:{padding:5,style:{stroke:gu.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,i=e.autoRotate,r=e.content;if(!st(r)){var o=this.getTextPoint(),a=null;if(i)a=Wl(o,this.getRotateAngle());this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:$($($({},o),{text:r,matrix:a}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:$({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),i=this.get("textBackground");if(i&&n){var r=n.getBBox(),o=Zl(i.padding),a=i.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:$({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2],matrix:n.attr("matrix")},a)}).toBack()}},e}(cu),$u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text").position,r=Math.atan2(n.y-e.y,n.x-e.x);return"start"===i?r-Math.PI/2:r+Math.PI/2},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text");return ou(e,n,i.position,i.offset)},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(ju),qu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,i=this.getLocation(),r=i.center,o=i.radius,a=i.startAngle,s=i.endAngle,l="start"===e?a:s,u=this.getRotateAngle()-Math.PI,c=eu(r,o,l),h=Math.cos(u)*n,p=Math.sin(u)*n;return{x:c.x+h,y:c.y+p}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=null;if(r-i==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-n],["A",n,n,0,1,1,a,s+n],["A",n,n,0,1,1,a,s-n],["Z"]]}else{var l=eu(e,n,i),u=eu(e,n,r),c=Math.abs(r-i)>Math.PI?1:0,h=i>r?0:1;o=[["M",l.x,l.y],["A",n,n,0,c,h,u.x,u.y]]}return o},e}(ju),Uu=((Gu={})["g2-crosshair"]={position:"relative"},Gu["g2-crosshair-line"]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Gu["g2-crosshair-text"]={position:"absolute",color:gu.textColor,fontFamily:gu.fontFamily},Gu),Zu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'',crosshairTpl:'',textTpl:'{content}',domStyles:null,containerClassName:"g2-crosshair",defaultStyles:Uu,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=Ke(this.get("crosshairTpl"));t.appendChild(e),this.applyStyle("g2-crosshair-line",e),this.set("crosshairEl",e)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text");return ou(e,n,i.position,i.offset)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var i=this.getContainer();e=Ke(jt(this.get("textTpl"),t)),i.appendChild(e),this.applyStyle("g2-crosshair-text",e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),i=Math.min(e.x,n.x),r=Math.min(e.y,n.y);this.isVertical(e,n)?en(t,{width:"1px",height:ru(Math.abs(n.y-e.y))}):en(t,{height:"1px",width:ru(Math.abs(n.x-e.x))}),en(t,{top:ru(r),left:ru(i)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,i=this.getTextPoint();switch(e){case"center":i.x=i.x-n/2;break;case"right":i.x=i.x-n}en(t,{top:ru(i.y),left:ru(i.x)})}},e.prototype.updateInner=function(e){Vt(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(ku),Ku=Object.freeze(Object.defineProperty({__proto__:null,Line:$u,Circle:qu,Base:ju,Html:Zu},Symbol.toStringTag,{value:"Module"})),Qu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:gu.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),i=e.slice(0).reverse(),r=this.getGridPath(i,!0);return this.get("closed")?n=n.concat(r):(r[0][0]="L",(n=n.concat(r)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),i=this.get("items"),r=this.get("alternateColor"),o=null;ct(i,(function(a,s){var l=a.id||s;if(n){var u=e.getPathStyle();u=at(u)?u(a,s,i):u;var c=e.getElementId("line-"+l),h=e.getGridPath(a.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:ee({path:h},u)})}if(r&&s>0){var p=e.getElementId("region-"+l),f=s%2==0;if(St(r))f&&e.drawAlternateRegion(p,t,o.points,a.points,r);else{var d=f?r[1]:r[0];e.drawAlternateRegion(p,t,o.points,a.points,d)}}o=a}))},e.prototype.drawAlternateRegion=function(t,e,n,i,r){var o=this.getAlternatePath(n,i);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(cu);var Ju,tc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,i,r,o,a,s,l=this.getLineType(),u=this.get("closed"),c=[];if(t.length)if("circle"===l){var h=this.get("center"),p=t[0],f=(n=h.x,i=h.y,r=p.x,o=p.y,a=r-n,s=o-i,Math.sqrt(a*a+s*s)),d=e?0:1;u?(c.push(["M",h.x,h.y-f]),c.push(["A",f,f,0,0,d,h.x,h.y+f]),c.push(["A",f,f,0,0,d,h.x,h.y-f]),c.push(["Z"])):ct(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["A",f,f,0,0,d,t.x,t.y])}))}else ct(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["L",t.x,t.y])})),u&&c.push(["Z"]);return c},e}(Qu),ec=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return ct(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(Qu),nc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return $($({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),i=this.get("maxHeight"),r=e.width,o=e.height;return n&&(r=Math.min(r,n)),i&&(o=Math.min(o,i)),Jl(e.minX,e.minY,r,o)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+i})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),i=Zl(e.padding),r=$({x:0,y:0,width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:r}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),i=n.spacing,r=n.style,o=n.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:$({text:o,x:e.x,y:e.y},r)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+i})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=Zl(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(cu),ic={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},rc={fill:gu.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:gu.fontFamily,fontWeight:"normal",lineHeight:12},oc={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexo&&(o=u)}var c=this.scaleDefs,h={};rl&&(o=l),r===l&&o===l)return null;var u=t.invert(r),c=t.invert(o);if(t.isCategory){var h=t.values.indexOf(u),p=t.values.indexOf(c),f=t.values.slice(h,p+1);return function(t){return f.includes(t)}}return function(t){return t>=u&&t<=c}}!function(t){t.FILTER="brush-filter-processing",t.RESET="brush-filter-reset",t.BEFORE_FILTER="brush-filter:beforefilter",t.AFTER_FILTER="brush-filter:afterfilter",t.BEFORE_RESET="brush-filter:beforereset",t.AFTER_RESET="brush-filter:afterreset"}(ax||(ax={}));var vx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return j(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(zh(this.context)){var n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var i=this.context,r=i.view,o={view:r,event:i.event,dims:this.dims};r.emit(ax.BEFORE_FILTER,Hp.fromData(r,ax.BEFORE_FILTER,o));var a=r.getCoordinate(),s=a.invert(e),l=a.invert(t);if(this.hasDim("x")){var u=r.getXScale(),c=yx(u,"x",s,l);this.filterView(r,u.field,c)}if(this.hasDim("y")){var h=r.getYScales()[0];c=yx(h,"y",s,l);this.filterView(r,h.field,c)}this.reRender(r,{source:ax.FILTER}),r.emit(ax.AFTER_FILTER,Hp.fromData(r,ax.AFTER_FILTER,o))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(ax.BEFORE_RESET,Hp.fromData(t,ax.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:ax.RESET}),t.emit(ax.AFTER_RESET,Hp.fromData(t,ax.AFTER_RESET,{}))},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t,e){t.render(!0,e)},e}(yh),mx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.filterView=function(t,e,n){ct(Qh(t),(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){ct(Qh(t),(function(t){t.render(!0)}))},e}(vx),xx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.filter=function(){var t=Dh(this.context),e=this.context.view,n=Xh(e);if(zh(this.context)){var i=Yh(this.context,10);i&&ct(n,(function(t){i.includes(t)?t.show():t.hide()}))}else if(t){var r=t.component,o=r.get("field");if(Rh(t)){if(o){var a=r.getItemsByState("unchecked"),s=ep(e,o),l=a.map((function(t){return t.name}));ct(n,(function(t){var e=Wh(t,o),n=s.getText(e);l.indexOf(n)>=0?t.hide():t.show()}))}}else if(_h(t)){var u=Q(r.getValue(),2),c=u[0],h=u[1];ct(n,(function(t){var e=Wh(t,o);e>=c&&e<=h?t.show():t.hide()}))}}},e.prototype.clear=function(){ct(Xh(this.context.view),(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(yh),wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return j(e,t),e.prototype.filter=function(){zh(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=Yh(this.context,10);if(e){var n=t.getXScale().field,i=t.getYScales()[0].field,r=e.map((function(t){return t.getModel().data}));ct(Qh(t),(function(t){ct(Xh(t),(function(t){var e=t.getModel().data;tp(r,e,n,i)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this;ct(Qh(this.context.view),(function(e){var n=Gh(t.context,e,10),i=Xh(e);n&&ct(i,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){ct(Qh(this.context.view),(function(t){ct(Xh(t),(function(t){t.show()}))}))},e}(yh),bx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return j(e,t),e.prototype.getButtonCfg=function(){return ae(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:$({text:t.text},t.textStyle)}).getBBox(),i=Yp(t.padding),r=e.addShape({type:"rect",name:"button-rect",attrs:$({x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},t.style)});r.toBack(),e.on("mouseenter",(function(){r.attr(t.activeStyle)})),e.on("mouseleave",(function(){r.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),i=wi(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(i)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(yh),Cx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return j(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):Zh(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(yh),Mx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return j(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(Zh(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,i=wi(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(i),n.foregroundGroup.setMatrix(i),n.middleGroup.setMatrix(i)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(yh),Sx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return j(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(yh),kx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return j(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0,ct(this.dims,(function(e){var n=t.getScale(e),i=n.min,r=n.max,o=n.values;t.startCache[e]={min:i,max:r,values:o}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),i=this.context.getCurrentPoint(),r=n.invert(e),o=n.invert(i),a=o.x-r.x,s=o.y-r.y,l=this.context.view;ct(this.dims,(function(e){t.translateDim(e,{x:-1*a,y:-1*s})})),l.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var i=this.context.view,r=this.startCache[t],o=r.min,a=r.max,s=a-o,l=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),i.scale(e.field,{nice:!1,min:o+l,max:a+l})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(Sx),Ax=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return j(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this;ct(this.dims,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var i=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var r=this.cacheScaleDefs[t],o=r.max-r.min,a=e.min,s=e.max,l=n*o,u=a-l,c=s+l,h=(c-u)/o;c>u&&h<100&&h>.01&&i.scale(e.field,{nice:!1,min:a-l,max:s+l})},e}(Sx);var Fx,Tx,Ex=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.scroll=function(t){var e=this.context,n=e.view,i=e.event;if(n.getOptions().scrollbar){var r=(null==t?void 0:t.wheelDelta)||1,o=n.getController("scrollbar"),a=n.getXScale(),s=n.getOptions().data,l=Me(At(s,a.field)),u=Me(a.values),c=o.getValue(),h=Math.floor((l-u)*c)+(function(t){return t.gEvent.originalEvent.deltaY>0}(i)?r:-r),p=Dt(h/(l-u)+r/(l-u)/1e4,0,1);o.setValue(p)}},e}(yh),Ix=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.show=function(){var t=this.context,e=Dh(t).axis.cfg.title,n=e.description,i=e.text,r=e.descriptionTooltipStyle,o=t.event,a=o.x,s=o.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:i||"",customContent:function(){return'\n r&&(t.splice(o+1,0,h),i=!0)}return i}}function qM(t,e,n,i){var r=i-t*t,o=Math.abs(r)<1e-24?0:(n-t*e)/r;return[e-o*t,o]}function UM(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function i(i){var r=0,o=0,a=0,s=0,l=0,u=t?+t[0]:Infinity,c=t?+t[1]:-Infinity;HM(i,e,n,(function(e,n){++r,o+=(e-o)/r,a+=(n-a)/r,s+=(e*n-s)/r,l+=(e*e-l)/r,t||(ec&&(c=e))}));var h=VM(qM(o,a,s,l),2),p=h[0],f=h[1],d=function(t){return f*t+p},g=[[u,d(u)],[c,d(c)]];return g.a=f,g.b=p,g.predict=d,g.rSquared=WM(i,e,n,a,d),g}return i.domain=function(e){return arguments.length?(t=e,i):t},i.x=function(t){return arguments.length?(e=t,i):e},i.y=function(t){return arguments.length?(n=t,i):n},i}function ZM(t){t.sort((function(t,e){return t-e}));var e=t.length/2;return e%1==0?(t[e-1]+t[e])/2:t[Math.floor(e)]}function KM(t){return(t=1-t*t*t)*t*t}function QM(t,e,n){var i=t[e],r=n[0],o=n[1]+1;if(!(o>=t.length))for(;e>r&&t[o]-i<=i-t[r];)n[0]=++r,n[1]=o,++o}function JM(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function i(i){var r,o,a,s,l=VM(XM(i,e,n),4),u=l[0],c=l[1],h=l[2],p=l[3],f=u.length,d=0,g=0,y=0,v=0,m=0;for(r=0;r0?Math.max.apply(Math,i):0,o=Math.abs(t)%360;return o?360*r/o:r}function aT(t){var e=t.chart,n=t.options,i=n.barStyle,r=n.color,o=n.tooltip,a=n.colorField,s=n.type,l=n.xField,u=n.yField,c=n.data,h=n.shape,p=Yx(c,u);return e.data(p),Zw($x({},t,{options:{tooltip:o,seriesField:a,interval:{style:i,color:r,shape:h||("line"===s?"line":"intervel")},minColumnWidth:n.minBarWidth,maxColumnWidth:n.maxBarWidth,columnBackground:n.barBackground}})),"line"===s&&Qw({chart:e,options:{xField:l,yField:u,seriesField:a,point:{shape:"circle",color:r}}}),t}function sT(t){var e,n=t.options,i=n.yField,r=n.xField,o=n.data,a=n.isStack,s=n.isGroup,l=n.colorField,u=n.maxAngle,c=a&&!s&&l?function(t,e,n){var i=[];return t.forEach((function(t){var r=i.find((function(n){return n[e]===t[e]}));r?r[n]+=t[n]||null:i.push($({},t))})),i}(o,r,i):o,h=Yx(c,i);return Ux(Rw(((e={})[i]={min:0,max:oT(u,i,h)},e)))(t)}function lT(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}).transpose(),t}function uT(t){var e=t.chart,n=t.options,i=n.xField,r=n.xAxis;return e.axis(i,r),t}function cT(t){var e=t.chart,n=t.options,i=n.label,r=n.yField,o=Zx(e,"interval");if(i){var a=i.callback,s=q(i,["callback"]);o.label({fields:[r],callback:a,cfg:$($({},tw(s)),{type:"polar"})})}else o.label(!1);return t}function hT(t){return Ux(Fw("barStyle"),aT,sT,uT,lT,Iw,Pw,Bw,Ew,Tw,_w(),cT)(t)}xf("interval","liquid-fill-gauge",{draw:function(t,e){var n=t.customInfo,i=n,r=i.percent,o=i.radius,a=i.shape,s=i.shapeStyle,l=i.background,u=i.animation,c=n.outline,h=n.wave,p=c.border,f=c.distance,d=h.count,g=h.length,y=Ct(t.points,(function(t,e){return Math.min(t,e.x)}),Infinity),v=this.parsePoint({x:.5,y:.5}),m=this.parsePoint({x:y,y:.5}),x=v.x-m.x,w=Math.min(x,m.y*o),b=function(t){var e=$({opacity:1},t.style);return t.color&&!e.fill&&(e.fill=t.color),e}(t),C=function(t){var e=ee({},{fill:"#fff",fillOpacity:0,lineWidth:4},t.style);return t.color&&!e.stroke&&(e.stroke=t.color),Rt(t.opacity)&&(e.opacity=e.strokeOpacity=t.opacity),e}(ee({},t,c)),M=w-p/2,S=("function"==typeof a?a:QF[a]||QF.circle)(v.x,v.y,2*M,2*M);if(s&&e.addShape("path",{name:"shape",attrs:$({path:S},s)}),r>0){var k=e.addGroup({name:"waves"}),A=k.setClip({type:"path",attrs:{path:S}});!function(t,e,n,i,r,o,a,s,l,u){for(var c=r.fill,h=r.opacity,p=a.getBBox(),f=p.maxX-p.minX,d=p.maxY-p.minY,g=0;g0){var a=this.view.geometries[0],s=a.dataArray,l=o[0].name,u=[];return s.forEach((function(t){t.forEach((function(t){var e=td.getTooltipItems(t,a)[0];if(!i&&e&&e.name===l){var n=st(r)?l:r;u.push($($({},e),{name:e.title,title:n}))}else if(i&&e){n=st(r)?e.name||l:r;u.push($($({},e),{name:e.title,title:n}))}}))})),u}return[]},e}(tf)),wh("radar-tooltip",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.init=function(){this.context.view.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event;this.getTooltipController().showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){this.getTooltipController().hideTooltip()},e.prototype.getTooltipController=function(){return this.context.view.getController("radar-tooltip")},e}(yh)),fp("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]}),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}j(e,t),e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return $x({},t.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return rT}}(Sb);var pT=$x({},Sb.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240});function fT(t){var e=t.chart,n=t.options,i=n.data,r=n.sectorStyle,o=n.shape,a=n.color;return e.data(i),Ux(Zw)($x({},t,{options:{marginRatio:1,interval:{style:r,color:a,shape:o}}})),t}function dT(t){var e=t.chart,n=t.options,i=n.label,r=n.xField,o=Zx(e,"interval");if(!1===i)o.label(!1);else if(ut(i)){var a=i.callback,s=i.fields,l=q(i,["callback","fields"]),u=l.offset,c=l.layout;(void 0===u||u>=0)&&(c=c?lt(c)?c:[c]:[],l.layout=it(c,(function(t){return"limit-in-shape"!==t.type})),l.layout.length||delete l.layout),o.label({fields:s||[r],callback:a,cfg:tw(l)})}else Rx(Lx.WARN,null===i,"the label option must be an Object."),o.label({fields:[r]});return t}function gT(t){var e=t.chart,n=t.options,i=n.legend,r=n.seriesField;return!1===i?e.legend(!1):r&&e.legend(r,i),t}function yT(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}),t}function vT(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return Ux(Rw(((e={})[o]=i,e[a]=r,e)))(t)}function mT(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return i?e.axis(o,i):e.axis(o,!1),r?e.axis(a,r):e.axis(a,!1),t}function xT(t){Ux(Fw("sectorStyle"),fT,vT,dT,yT,mT,gT,Ew,Iw,Pw,Bw,_w(),Lw)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial-bar",e}j(e,t),e.getDefaultOptions=function(){return pT},e.prototype.changeData=function(t){this.updateOption({data:t}),sT({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return hT}}(Sb);var wT=$x({},Sb.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}j(e,t),e.getDefaultOptions=function(){return wT},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return xT}}(Sb);function bT(t,e,n){if(!lt(t))return[];var i=[],r=function(t,e,n){var i=[];return t.forEach((function(t){var r=t[e],o=t[n];i.includes(r)||i.push(r),i.includes(o)||i.push(o)})),i}(t,e,n),o=function(t,e,n,i){var r={};return e.forEach((function(t){r[t]={},e.forEach((function(e){r[t][e]=0}))})),t.forEach((function(t){r[t[n]][t[i]]=1})),r}(t,r,e,n),a={};function s(t){a[t]=1,r.forEach((function(e){if(0!=o[t][e])if(1==a[e])i.push("".concat(t,"_").concat(e));else{if(-1==a[e])return;s(e)}})),a[t]=-1}return r.forEach((function(t){a[t]=0})),r.forEach((function(t){-1!=a[t]&&s(t)})),i.length,t.filter((function(t){return i.findIndex((function(i){return i==="".concat(t[e],"_").concat(t[n])}))<0}))}function CT(t){return t.target.depth}function MT(t,e){return t.sourceLinks.length?t.depth:e-1}function ST(t){return function(){return t}}function kT(t,e){for(var n=0,i=0;i