From 5f653cd83425db29ccf514e9fd966a90c7eeab32 Mon Sep 17 00:00:00 2001
From: dongyukun <1208714201@qq.com>
Date: 星期四, 02 一月 2025 13:47:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-model/iailab-module-model-biz/db/mysql.sql |   39 ++++++++++++++++++++++++++++++++-------
 1 files changed, 32 insertions(+), 7 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 59662c5..832e4f4 100644
--- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql
+++ b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
@@ -47,8 +47,8 @@
     datatime  datetime,
     datavalue decimal(19, 3),
     primary key (id),
-    INDEX     idx_outputid (outputid),
-    INDEX     idx_datatime (datatime)
+    UNIQUE KEY `unique_outputid_datatime` (`outputid`,`datatime`),
+    KEY `idx_outputid_datatime` (`outputid`,`datatime`) USING BTREE
 ) engine = innodb
   default character set utf8mb4 COMMENT = '预测结果表';
 
@@ -66,7 +66,7 @@
     id        varchar(36) not null,
     modelid   varchar(36),
     `key`     varchar(36),
-    value     varchar(256),
+    value     varchar(1000),
     name      varchar(36),
     valuetype varchar(36),
     primary key (id),
@@ -115,7 +115,7 @@
 (
     id         varchar(36) not null,
     itemid     varchar(36),
-    expression varchar(255),
+    expression varchar(1000),
     num        integer,
     primary key (id),
     UNIQUE INDEX uk_itemid (itemid)
@@ -236,6 +236,7 @@
 create table t_mm_predict_alarm_message
 (
     id            varchar(36) not null,
+    config_id     varchar(36) COMMENT '配置ID',
     title         varchar(36) COMMENT '消息标题',
     content       varchar(128) COMMENT '消息内容',
     alarm_obj     varchar(36) COMMENT '监控对象',
@@ -250,6 +251,7 @@
     create_time   datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
     primary key (id),
     INDEX         idx_item_id (item_id),
+    INDEX         idx_config_id (config_id),
     INDEX         idx_alarm_obj (alarm_obj),
     INDEX         idx_alarm_time (alarm_time)
 ) engine = innodb
@@ -636,7 +638,7 @@
     `method_id`   varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '方法id',
     `setting_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'key',
     `name`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数名称',
-    `value`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数默认值',
+    `value`       varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数默认值',
     `type`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '输入类型',
     `value_type`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数类型',
     `max`         int NULL DEFAULT NULL COMMENT '最大值',
@@ -707,7 +709,7 @@
     `file_path`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件路径',
     `version`     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '版本号',
     `log`         varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新日志',
-    `model_names` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '打包模型名称(“,”分割)',
+    `model_names` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '打包模型名称(“,”分割)',
     `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
     PRIMARY KEY (`id`, `project_id`) USING BTREE,
     INDEX         `del_package_history`(`project_id` ASC) USING BTREE,
@@ -873,4 +875,27 @@
 INSERT INTO `iailab_plat_system`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1629, 2, 'double[][]', '2', 'model_result_type', 0, '', '', '', '141', '2024-11-11 15:21:17', '141', '2024-11-11 15:21:17', b'0');
 
 
-alter table t_mm_item_output add column `result_name` varchar(50) DEFAULT NULL;
\ No newline at end of file
+alter table t_mm_item_output add column `result_name` varchar(50) DEFAULT NULL;
+
+
+alter table t_st_schedule_scheme add column `mpkprojectid` varchar(36) DEFAULT NULL;
+
+alter table t_st_schedule_record add column `result_code` varchar(10) DEFAULT NULL;
+alter table t_st_schedule_record add column `result_data` varchar(1000) DEFAULT NULL;
+
+CREATE TABLE `t_st_schedule_model_out` (
+                                  `id` varchar(36) NOT NULL COMMENT 'id',
+                                  `model_id` varchar(36) DEFAULT NULL COMMENT '模型ID',
+                                  `result_key` varchar(36) DEFAULT NULL COMMENT '输出key',
+                                  `result_type` varchar(36) DEFAULT NULL COMMENT '数据类型(double,double[],double[][])',
+                                  `result_port` int DEFAULT NULL COMMENT 'port',
+                                  `result_index` int DEFAULT NULL COMMENT 'index',
+                                  `is_write` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '是否下发',
+                                  `point_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '下发的点位',
+                                  `sort` int DEFAULT NULL COMMENT '排序',
+                                  `disturbance_point_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '无扰切换点位',
+                                  PRIMARY KEY (`id`) USING BTREE,
+                                  INDEX `ind_model_id`(`model_id` ASC) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模型下发信息表';
+
+alter table t_st_schedule_scheme add column `run_status` varchar(4) DEFAULT NULL COMMENT '运行状态';
\ No newline at end of file

--
Gitblit v1.9.3