From a874b928e16320839315b9abcdf2cece1229a424 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期四, 07 十一月 2024 09:20:38 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/db/mysql.sql | 80 +++++++++++++++++++++++++++++++++------- 1 files changed, 66 insertions(+), 14 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 b7c46e2..9304163 100644 --- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql +++ b/iailab-module-model/iailab-module-model-biz/db/mysql.sql @@ -11,7 +11,8 @@ update_time datetime default current_timestamp, traintime datetime, primary key (id), - UNIQUE INDEX idx_moduletype (moduletype) + UNIQUE INDEX uk_modulename (modulename), + INDEX idx_moduletype (moduletype) ) engine = innodb default character set utf8mb4 COMMENT = '管网表'; @@ -101,19 +102,20 @@ itemname varchar(50), caltypeid varchar(36), itemtypeid varchar(36), - predictlength decimal(5, 0), - granularity decimal(5, 0), - status decimal(5, 0), - isfuse decimal(5, 0), - predictphase decimal(5, 0), - workchecked decimal(5, 0), - unittransfactor decimal(31, 6), - create_time datetime default current_timestamp, - update_time datetime default current_timestamp, + predictlength int, + granularity int, + status tinyint, + isfuse tinyint, + predictphase tinyint, + workchecked tinyint, + unittransfactor decimal(16, 6), + create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', saveindex varchar(16), primary key (id), - UNIQUE INDEX uk_itemno (itemno) -) engine = innodb default character set utf8mb4 COMMENT = '预测模型结果字符串表'; + UNIQUE INDEX uk_itemno (itemno), + INDEX uk_itemtypeid (itemtypeid) +) engine = innodb default character set utf8mb4 COMMENT = '预测项表'; create table t_mm_predict_merge_item @@ -417,7 +419,7 @@ -- config -INSERT INTO `iailab_plat_system`.`infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (13, 'model', 2, 'model文件备份路径', 'mpkBakFilePath', 'C:\\DLUT\\mpkBakFile', b'1', 'model文件备份路径', '1', '2024-09-12 11:10:25', '1', '2024-09-12 11:10:25', b'0'); +--INSERT INTO `iailab_plat_system`.`infra_config` (`id`, `category`, `type`, `name`, `config_key`, `value`, `visible`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (13, 'model', 2, 'model文件备份路径', 'mpkBakFilePath', 'C:\\DLUT\\mpkBakFile', b'1', 'model文件备份路径', '1', '2024-09-12 11:10:25', '1', '2024-09-12 11:10:25', b'0'); -- dist INSERT INTO `iailab_plat_system`.`system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (618, '模型方法', 'model_method', 0, '', '1', '2024-09-09 16:11:55', '1', '2024-09-09 16:11:55', b'0', '1970-01-01 00:00:00'); @@ -626,4 +628,54 @@ `name` varchar(36) NOT NULL COMMENT '名称', `sort` integer DEFAULT NULL COMMENT '排序', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '模型文件分组' ROW_FORMAT = Dynamic; \ No newline at end of file +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '模型文件分组' ROW_FORMAT = Dynamic; + +alter table t_mm_predict_model add column `mpkprojectid` varchar(36) DEFAULT NULL; + +-- chart 图表配置 + +-- menu +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416399, '图表管理', '', 1, 40, 1803317368415416363, 'chart', 'fa:align-left', '', '', 0, b'1', b'1', b'1', '1', '2024-11-05 11:57:25', '1', '2024-11-05 11:57:49', b'0', 0, 1); +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416400, '图表配置', '', 2, 1, 1803317368435416399, 'chartParam', 'fa-solid:cogs', 'model/chart/index', 'ChartParam', 0, b'1', b'1', b'1', '1', '2024-11-05 12:01:59', '1', '2024-11-06 08:45:17', b'0', 0, 1); +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416401, '查询', 'model:chart:query', 3, 1, 1803317368435416400, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-11-05 15:36:48', '1', '2024-11-05 15:36:48', b'0', NULL, 1); +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416402, '新增', 'model:chart:create', 3, 2, 1803317368435416400, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-11-05 15:37:03', '1', '2024-11-05 15:37:03', b'0', NULL, 1); +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416403, '修改', 'model:chart:update', 3, 3, 1803317368435416400, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-11-05 15:37:20', '1', '2024-11-05 15:37:20', b'0', NULL, 1); +INSERT INTO `iailab_plat_system`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `app_id`, `tenant_id`) VALUES (1803317368435416404, '删除', 'model:chart:delete', 3, 4, 1803317368435416400, '', '', '', '', 0, b'1', b'1', b'1', '1', '2024-11-05 15:37:38', '1', '2024-11-05 15:37:38', b'0', NULL, 1); + +-- table +CREATE TABLE `t_chart` ( + `id` varchar(36) NOT NULL, + `chart_name` varchar(100) DEFAULT NULL COMMENT '图表名称', + `chart_code` varchar(100) DEFAULT NULL COMMENT '图表编码', + `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间', + `update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_chart_code` (`chart_code`), + KEY `index_id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='图表配置'; + +CREATE TABLE `t_chart_param` ( + `id` varchar(36) NOT NULL, + `chart_id` varchar(36) NOT NULL COMMENT '图表id', + `param_name` varchar(255) DEFAULT NULL COMMENT '参数名称', + `param_code` varchar(100) DEFAULT NULL COMMENT '参数编码', + `param_value` varchar(1000) DEFAULT NULL COMMENT '参数值', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间', + `update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`id`,`chart_id`) USING BTREE, + KEY `index_chart_id` (`chart_id`), + CONSTRAINT `chart_id` FOREIGN KEY (`chart_id`) REFERENCES `t_chart` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='图表参数配置'; + + +DROP TABLE IF EXISTS `t_mpk_pack`; +CREATE TABLE `t_mpk_pack` ( + `id` varchar(36) NOT NULL COMMENT 'id', + `pack_name` varchar(50) NOT NULL COMMENT '包名称', + `pack_desc` varchar(50) DEFAULT NULL COMMENT '包描述', + `model_path` varchar(50) DEFAULT NULL COMMENT '模型路径', + `sort` integer DEFAULT NULL COMMENT '排序', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX uk_pack_name (pack_name) +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'MDK包名管理' ROW_FORMAT = Dynamic; \ No newline at end of file -- Gitblit v1.9.3