使用navicat生成的数据库创建结构语句

This commit is contained in:
xiaochou164 2023-08-18 09:32:54 +08:00
parent d33644c572
commit b41a785af0
4 changed files with 1874 additions and 459 deletions

View File

@ -1,3 +1,6 @@
##创建reportdata数据库用于存放定制的报表
create schema reportdata collate utf8mb4_general_ci; create schema reportdata collate utf8mb4_general_ci;
##创建mes_sync数据库用于定时去MES生产库拉取同步数据
create schema mes_sync collate utf8mb4_general_ci; create schema mes_sync collate utf8mb4_general_ci;
##创建mes_origin数据库用于创建Dblink以链接MES生产库
create schema mes_origin collate utf8mb4_general_ci; create schema mes_origin collate utf8mb4_general_ci;

View File

@ -1,4 +1,10 @@
-- erp_job_mtl_confirm: table SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for erp_job_mtl_confirm
-- ----------------------------
DROP TABLE IF EXISTS `erp_job_mtl_confirm`;
CREATE TABLE `erp_job_mtl_confirm` ( CREATE TABLE `erp_job_mtl_confirm` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`job_mtl_manage_task_id` bigint DEFAULT NULL COMMENT 'job管理任务id', `job_mtl_manage_task_id` bigint DEFAULT NULL COMMENT 'job管理任务id',
@ -33,7 +39,10 @@ CREATE TABLE `erp_job_mtl_confirm` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/erp_job_mtl_confirm'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/erp_job_mtl_confirm';
-- erp_job_mtl_send: table -- ----------------------------
-- Table structure for erp_job_mtl_send
-- ----------------------------
DROP TABLE IF EXISTS `erp_job_mtl_send`;
CREATE TABLE `erp_job_mtl_send` ( CREATE TABLE `erp_job_mtl_send` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`job_mtl_confirm_id` bigint DEFAULT NULL COMMENT 'job发料确认id', `job_mtl_confirm_id` bigint DEFAULT NULL COMMENT 'job发料确认id',
@ -54,7 +63,10 @@ CREATE TABLE `erp_job_mtl_send` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/erp_job_mtl_send'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/erp_job_mtl_send';
-- mes_crystal_order: table -- ----------------------------
-- Table structure for mes_crystal_order
-- ----------------------------
DROP TABLE IF EXISTS `mes_crystal_order`;
CREATE TABLE `mes_crystal_order` ( CREATE TABLE `mes_crystal_order` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工单编码', `order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工单编码',
@ -93,9 +105,32 @@ CREATE TABLE `mes_crystal_order` (
KEY `idx_crystal_order` (`order_no`,`stove_no`,`material_code`,`material_name`,`product_type`) KEY `idx_crystal_order` (`order_no`,`stove_no`,`material_code`,`material_name`,`product_type`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_crystal_order'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_crystal_order';
-- No native definition for element: idx_crystal_order (index) -- ----------------------------
-- Table structure for mes_dismantle_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_dismantle_task`;
CREATE TABLE `mes_dismantle_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '工单编码',
`stove_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '炉台编码',
`thermal_field_size` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '热场尺寸',
`calcination_flag` tinyint(1) DEFAULT NULL COMMENT '是否煅烧(0:否 1:是)',
`status` int DEFAULT NULL COMMENT '状态 1:待处理、2:进行中 3:已完成',
`receive_user` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '任务领取人',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '更新者',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`delete_flag` tinyint(1) DEFAULT '0',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
`org_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_dismantle_task';
-- mes_disposable_qc_task: table -- ----------------------------
-- Table structure for mes_disposable_qc_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_disposable_qc_task`;
CREATE TABLE `mes_disposable_qc_task` ( CREATE TABLE `mes_disposable_qc_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`clean_id` bigint DEFAULT NULL COMMENT '清洗任务Id', `clean_id` bigint DEFAULT NULL COMMENT '清洗任务Id',
@ -123,7 +158,10 @@ CREATE TABLE `mes_disposable_qc_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_disposable_qc_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_disposable_qc_task';
-- mes_draw_line_task: table -- ----------------------------
-- Table structure for mes_draw_line_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_draw_line_task`;
CREATE TABLE `mes_draw_line_task` ( CREATE TABLE `mes_draw_line_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`hairy_rod_crystal_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '毛棒晶编', `hairy_rod_crystal_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '毛棒晶编',
@ -152,9 +190,10 @@ CREATE TABLE `mes_draw_line_task` (
KEY `mes_draw_line_task_code_index` (`hairy_rod_crystal_code`) KEY `mes_draw_line_task_code_index` (`hairy_rod_crystal_code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_draw_line_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_draw_line_task';
-- No native definition for element: mes_draw_line_task_code_index (index) -- ----------------------------
-- Table structure for mes_feeding_detail
-- mes_feeding_detail: table -- ----------------------------
DROP TABLE IF EXISTS `mes_feeding_detail`;
CREATE TABLE `mes_feeding_detail` ( CREATE TABLE `mes_feeding_detail` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '投料明细id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '投料明细id',
`feeding_task_id` bigint DEFAULT NULL COMMENT '投料任务id', `feeding_task_id` bigint DEFAULT NULL COMMENT '投料任务id',
@ -183,7 +222,10 @@ CREATE TABLE `mes_feeding_detail` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_feeding_detail'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_feeding_detail';
-- mes_feeding_task: table -- ----------------------------
-- Table structure for mes_feeding_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_feeding_task`;
CREATE TABLE `mes_feeding_task` ( CREATE TABLE `mes_feeding_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '投料明细id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '投料明细id',
`report_material_id` bigint DEFAULT NULL COMMENT '报料任务id', `report_material_id` bigint DEFAULT NULL COMMENT '报料任务id',
@ -210,7 +252,10 @@ CREATE TABLE `mes_feeding_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_feeding_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_feeding_task';
-- mes_furnace_detail: table -- ----------------------------
-- Table structure for mes_furnace_detail
-- ----------------------------
DROP TABLE IF EXISTS `mes_furnace_detail`;
CREATE TABLE `mes_furnace_detail` ( CREATE TABLE `mes_furnace_detail` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '投炉明细id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '投炉明细id',
`furnace_task_id` bigint DEFAULT NULL COMMENT '投料任务id', `furnace_task_id` bigint DEFAULT NULL COMMENT '投料任务id',
@ -226,7 +271,10 @@ CREATE TABLE `mes_furnace_detail` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_furnace_detail'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_furnace_detail';
-- mes_furnace_task: table -- ----------------------------
-- Table structure for mes_furnace_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_furnace_task`;
CREATE TABLE `mes_furnace_task` ( CREATE TABLE `mes_furnace_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '投炉明细id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '投炉明细id',
`feeding_task_id` bigint DEFAULT NULL COMMENT '投炉任务id', `feeding_task_id` bigint DEFAULT NULL COMMENT '投炉任务id',
@ -253,7 +301,10 @@ CREATE TABLE `mes_furnace_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_furnace_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_furnace_task';
-- mes_lifting_box_task: table -- ----------------------------
-- Table structure for mes_lifting_box_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_lifting_box_task`;
CREATE TABLE `mes_lifting_box_task` ( CREATE TABLE `mes_lifting_box_task` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`box_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱号', `box_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '箱号',
@ -281,7 +332,10 @@ CREATE TABLE `mes_lifting_box_task` (
UNIQUE KEY `box_code_2` (`box_code`) UNIQUE KEY `box_code_2` (`box_code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_lifting_box_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_lifting_box_task';
-- mes_packing_task: table -- ----------------------------
-- Table structure for mes_packing_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_packing_task`;
CREATE TABLE `mes_packing_task` ( CREATE TABLE `mes_packing_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`box_code` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '起托箱号', `box_code` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '起托箱号',
@ -318,7 +372,10 @@ CREATE TABLE `mes_packing_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_packing_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_packing_task';
-- mes_poi_formula: table -- ----------------------------
-- Table structure for mes_poi_formula
-- ----------------------------
DROP TABLE IF EXISTS `mes_poi_formula`;
CREATE TABLE `mes_poi_formula` ( CREATE TABLE `mes_poi_formula` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`report_material_id` bigint NOT NULL COMMENT '报料Id', `report_material_id` bigint NOT NULL COMMENT '报料Id',
@ -339,7 +396,10 @@ CREATE TABLE `mes_poi_formula` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_poi_formula'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_poi_formula';
-- mes_production: table -- ----------------------------
-- Table structure for mes_production
-- ----------------------------
DROP TABLE IF EXISTS `mes_production`;
CREATE TABLE `mes_production` ( CREATE TABLE `mes_production` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '晶体编码', `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '晶体编码',
@ -379,7 +439,10 @@ CREATE TABLE `mes_production` (
UNIQUE KEY `code_3` (`code`) UNIQUE KEY `code_3` (`code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_production'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_production';
-- mes_recycle_material_storage: table -- ----------------------------
-- Table structure for mes_recycle_material_storage
-- ----------------------------
DROP TABLE IF EXISTS `mes_recycle_material_storage`;
CREATE TABLE `mes_recycle_material_storage` ( CREATE TABLE `mes_recycle_material_storage` (
`id` bigint NOT NULL, `id` bigint NOT NULL,
`order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单号', `order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '单号',
@ -410,7 +473,10 @@ CREATE TABLE `mes_recycle_material_storage` (
UNIQUE KEY `order_no_2` (`order_no`) UNIQUE KEY `order_no_2` (`order_no`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_recycle_material_storage'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_recycle_material_storage';
-- mes_report_task: table -- ----------------------------
-- Table structure for mes_report_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_report_task`;
CREATE TABLE `mes_report_task` ( CREATE TABLE `mes_report_task` (
`id` bigint NOT NULL, `id` bigint NOT NULL,
`crystal_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '拉晶工单编码', `crystal_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '拉晶工单编码',
@ -440,9 +506,10 @@ CREATE TABLE `mes_report_task` (
KEY `idx_report_task` (`report_type`,`delete_flag`,`create_time`,`crystal_code`,`id`) KEY `idx_report_task` (`report_type`,`delete_flag`,`create_time`,`crystal_code`,`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_report_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_report_task';
-- No native definition for element: idx_report_task (index) -- ----------------------------
-- Table structure for mes_roll_rub_quality_task
-- mes_roll_rub_quality_task: table -- ----------------------------
DROP TABLE IF EXISTS `mes_roll_rub_quality_task`;
CREATE TABLE `mes_roll_rub_quality_task` ( CREATE TABLE `mes_roll_rub_quality_task` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`square_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '方棒编码', `square_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '方棒编码',
@ -464,7 +531,10 @@ CREATE TABLE `mes_roll_rub_quality_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_roll_rub_quality_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_roll_rub_quality_task';
-- mes_round_bar: table -- ----------------------------
-- Table structure for mes_round_bar
-- ----------------------------
DROP TABLE IF EXISTS `mes_round_bar`;
CREATE TABLE `mes_round_bar` ( CREATE TABLE `mes_round_bar` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`production_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '晶体编码', `production_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '晶体编码',
@ -510,11 +580,10 @@ CREATE TABLE `mes_round_bar` (
KEY `idx_mes_round_bar_create_time` (`create_time`) KEY `idx_mes_round_bar_create_time` (`create_time`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_round_bar'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_round_bar';
-- No native definition for element: idx_mes_round_bar_production_code (index) -- ----------------------------
-- Table structure for mes_round_bar_status
-- No native definition for element: idx_mes_round_bar_create_time (index) -- ----------------------------
DROP TABLE IF EXISTS `mes_round_bar_status`;
-- mes_round_bar_status: table
CREATE TABLE `mes_round_bar_status` ( CREATE TABLE `mes_round_bar_status` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`round_bar_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '圆棒编号', `round_bar_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '圆棒编号',
@ -539,9 +608,10 @@ CREATE TABLE `mes_round_bar_status` (
KEY `idx_mes_round_bar_status_round_bar_code` (`round_bar_code`) KEY `idx_mes_round_bar_status_round_bar_code` (`round_bar_code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_round_bar_status'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_round_bar_status';
-- No native definition for element: idx_mes_round_bar_status_round_bar_code (index) -- ----------------------------
-- Table structure for mes_square
-- mes_square: table -- ----------------------------
DROP TABLE IF EXISTS `mes_square`;
CREATE TABLE `mes_square` ( CREATE TABLE `mes_square` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '和圆棒编码一致', `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '和圆棒编码一致',
@ -585,7 +655,10 @@ CREATE TABLE `mes_square` (
UNIQUE KEY `code_3` (`code`) UNIQUE KEY `code_3` (`code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_square'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_square';
-- mes_stick_task: table -- ----------------------------
-- Table structure for mes_stick_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_stick_task`;
CREATE TABLE `mes_stick_task` ( CREATE TABLE `mes_stick_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工单编码', `order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工单编码',
@ -611,7 +684,45 @@ CREATE TABLE `mes_stick_task` (
UNIQUE KEY `crystal_code_3` (`crystal_code`) UNIQUE KEY `crystal_code_3` (`crystal_code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_stick_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_stick_task';
-- mes_surplus: table -- ----------------------------
-- Table structure for mes_sub_chamber_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_sub_chamber_task`;
CREATE TABLE `mes_sub_chamber_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`order_no` varchar(64) NOT NULL COMMENT '工单编码',
`stove_no` varchar(64) NOT NULL COMMENT '炉台编码',
`code` varchar(50) DEFAULT NULL COMMENT '晶编',
`opening_times` tinyint DEFAULT '0' COMMENT '开副室次数',
`feed_times` tinyint(1) DEFAULT NULL COMMENT '加料次数',
`opening_time` datetime DEFAULT NULL COMMENT '开副室时间',
`induced_crystal_times` int DEFAULT '1' COMMENT '引晶次数',
`cold_stoking` tinyint(1) DEFAULT '0' COMMENT '是否闷炉 0:是 1:否',
`cold_stoking_weight` decimal(10,2) DEFAULT NULL COMMENT '闷炉重量',
`cauldron_bottom_weight` decimal(10,2) DEFAULT NULL COMMENT '埚底料',
`surplus_sizing_weight` decimal(10,2) DEFAULT '0.00' COMMENT '余料重量',
`type` tinyint(1) DEFAULT NULL COMMENT ' 物料类型 1:正常取棒 2:断棒 3:拉晶余料',
`product_no` varchar(64) DEFAULT NULL COMMENT '产品编码',
`product_name` varchar(200) DEFAULT NULL COMMENT '产品名称',
`specs` varchar(64) DEFAULT NULL COMMENT '规格代码',
`product_type` varchar(64) DEFAULT NULL COMMENT '产品规格',
`surplus_material_type` int DEFAULT NULL COMMENT '余料类型:(1.提渣 2.提肩 3.吊多晶)',
`create_by` varchar(50) DEFAULT '' COMMENT '创建人',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(50) DEFAULT '' COMMENT '修改人',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`delete_flag` tinyint(1) DEFAULT '0' COMMENT '0正常。1已删除',
`close_mode` int DEFAULT NULL COMMENT '取棒类型 1 完好收尾 2 等径断棱 3收尾不良 4 掉棒',
`finish_rod` int DEFAULT NULL COMMENT '是否完结棒 0:是 1:否',
`org_id` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_sub_chamber_task';
-- ----------------------------
-- Table structure for mes_surplus
-- ----------------------------
DROP TABLE IF EXISTS `mes_surplus`;
CREATE TABLE `mes_surplus` ( CREATE TABLE `mes_surplus` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`product_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毛棒晶编', `product_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毛棒晶编',
@ -631,7 +742,10 @@ CREATE TABLE `mes_surplus` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus';
-- mes_surplus_collect_task: table -- ----------------------------
-- Table structure for mes_surplus_collect_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_surplus_collect_task`;
CREATE TABLE `mes_surplus_collect_task` ( CREATE TABLE `mes_surplus_collect_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`stove_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '炉台号', `stove_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '炉台号',
@ -654,7 +768,10 @@ CREATE TABLE `mes_surplus_collect_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus_collect_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus_collect_task';
-- mes_surplus_confirm_task: table -- ----------------------------
-- Table structure for mes_surplus_confirm_task
-- ----------------------------
DROP TABLE IF EXISTS `mes_surplus_confirm_task`;
CREATE TABLE `mes_surplus_confirm_task` ( CREATE TABLE `mes_surplus_confirm_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`product_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毛棒晶编', `product_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毛棒晶编',
@ -676,9 +793,10 @@ CREATE TABLE `mes_surplus_confirm_task` (
KEY `idx_mes_surplus_confirm_task_code_status` (`code`,`status`) KEY `idx_mes_surplus_confirm_task_code_status` (`code`,`status`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus_confirm_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_surplus_confirm_task';
-- No native definition for element: idx_mes_surplus_confirm_task_code_status (index) -- ----------------------------
-- Table structure for mes_transport_task
-- mes_transport_task: table -- ----------------------------
DROP TABLE IF EXISTS `mes_transport_task`;
CREATE TABLE `mes_transport_task` ( CREATE TABLE `mes_transport_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`type` int DEFAULT NULL COMMENT '运输类型 1初装运输、2加料运输、3 毛棒运输、4圆棒运输、5循环料运输', `type` int DEFAULT NULL COMMENT '运输类型 1初装运输、2加料运输、3 毛棒运输、4圆棒运输、5循环料运输',
@ -702,7 +820,10 @@ CREATE TABLE `mes_transport_task` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_transport_task'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/mes_transport_task';
-- yz_mes_spec: table -- ----------------------------
-- Table structure for yz_mes_spec
-- ----------------------------
DROP TABLE IF EXISTS `yz_mes_spec`;
CREATE TABLE `yz_mes_spec` ( CREATE TABLE `yz_mes_spec` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`spec_code` varchar(64) DEFAULT NULL COMMENT '规格代码', `spec_code` varchar(64) DEFAULT NULL COMMENT '规格代码',
@ -724,7 +845,10 @@ CREATE TABLE `yz_mes_spec` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/yz_mes_spec'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/yz_mes_spec';
-- yz_mes_spec_value: table -- ----------------------------
-- Table structure for yz_mes_spec_value
-- ----------------------------
DROP TABLE IF EXISTS `yz_mes_spec_value`;
CREATE TABLE `yz_mes_spec_value` ( CREATE TABLE `yz_mes_spec_value` (
`id` bigint NOT NULL COMMENT '主键', `id` bigint NOT NULL COMMENT '主键',
`spec_id` bigint DEFAULT NULL COMMENT '规格外键', `spec_id` bigint DEFAULT NULL COMMENT '规格外键',
@ -736,3 +860,4 @@ CREATE TABLE `yz_mes_spec_value` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/yz_mes_spec_value'; ) ENGINE=FEDERATED DEFAULT CHARSET=utf8mb3 CONNECTION='mysql://mesQuery:Query.123456@172.21.250.63:3306/raipiot-mes/yz_mes_spec_value';
SET FOREIGN_KEY_CHECKS = 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff