From 97d38f7b7f7d95fe38cdbb79960106c15454b6ba Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 19 十一月 2024 15:23:51 +0800
Subject: [PATCH] 预警信息

---
 iailab-module-model/iailab-module-model-biz/db/mysql.sql |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/db/mysql.sql b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
index f24ad84..59662c5 100644
--- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql
+++ b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
@@ -181,19 +181,35 @@
 (
     id                varchar(36) not null,
     item_id           varchar(36) not null COMMENT '预测项ID',
-    sample_length     integer COMMENT '样本长度',
+    out_id            varchar(36) not null COMMENT '输出ID',
+    sample_length     integer COMMENT '取样长度',
     value_type        integer COMMENT '值类型',
+    begin_time        datetime COMMENT '开始统计时间',
     in_deviation      decimal(8, 3) COMMENT '精准误差',
     in_accuracy_rate  decimal(6, 4) COMMENT '精准度',
     out_deviation     decimal(8, 3) COMMENT '不可信误差',
     out_accuracy_rate decimal(6, 4) COMMENT '不可信率',
-    is_enable         tinyint,
-    update_time       datetime,
-    begin_time        datetime,
+    is_enable         tinyint COMMENT '是否启用',
+    create_time       datetime COMMENT '创建时间',
+    update_time       datetime COMMENT '更新时间',
     primary key (id),
     INDEX             idx_item_id (item_id)
 ) engine = innodb
   default character set utf8mb4 COMMENT = '预测精准度表';
+
+create table t_mm_item_accuracy_his
+(
+    id                varchar(36) not null,
+    rate_id           varchar(36) not null COMMENT '预测精准度ID',
+    in_deviation      decimal(8, 3) COMMENT '精准误差',
+    in_accuracy_rate  decimal(6, 4) COMMENT '精准度',
+    out_deviation     decimal(8, 3) COMMENT '不可信误差',
+    out_accuracy_rate decimal(6, 4) COMMENT '不可信率',
+    create_time       datetime COMMENT '创建时间',
+    primary key (id),
+    INDEX             idx_rate_id (rate_id)
+) engine = innodb
+  default character set utf8mb4 COMMENT = '预测精准度历史';
 
 create table t_mm_predict_alarm_config
 (
@@ -201,12 +217,13 @@
     title         varchar(20) COMMENT '消息标题',
     alarm_obj     varchar(36) COMMENT '监控对象',
     item_id       varchar(36) COMMENT '预测项ID',
+    out_id        varchar(36) COMMENT '输出ID',
     comp_length   int COMMENT '比较长度',
     upper_limit   decimal(10, 4) COMMENT '上限',
     lower_limit   decimal(10, 4) COMMENT '下限',
     unit          varchar(10) COMMENT '单位',
     coefficient   decimal(10, 4) COMMENT '转换系数',
-    model_id      varchar(36) COMMENT '调度建议模型',
+    schedule_id      varchar(36) COMMENT '调度方案',
     is_enable     tinyint     NOT NULL COMMENT '是否启用(0禁用 1启用)',
     `creator`     varchar(64) NOT NULL DEFAULT '' COMMENT '创建者',
     `create_time` datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
@@ -224,6 +241,7 @@
     alarm_obj     varchar(36) COMMENT '监控对象',
     point_id      varchar(36) COMMENT '监控点位ID',
     item_id       varchar(36) COMMENT '预测项ID',
+    out_id        varchar(36) COMMENT '输出ID',
     current_value decimal(18, 4) COMMENT '当前值',
     out_time      datetime COMMENT '超出时间',
     out_value     decimal(18, 4) COMMENT '超出值',

--
Gitblit v1.9.3