From 03de02044038a99ceee089003d79669b07fecae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yinjinlu-pc=5C=E5=B0=B9=E9=87=91=E8=B7=AF?= <411641505@qq.com> Date: Sun, 5 Mar 2023 13:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=B7=BB=E5=8A=A0UNIQUE?= =?UTF-8?q?=E7=BA=A6=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/设计文档/数据库设计/mes-dv.sql | 8 ++-- doc/设计文档/数据库设计/mes-pro.sql | 57 +++++++++++++++++++++++++++++ doc/设计文档/数据库设计/mes-wm.sql | 6 +-- 3 files changed, 64 insertions(+), 7 deletions(-) diff --git a/doc/设计文档/数据库设计/mes-dv.sql b/doc/设计文档/数据库设计/mes-dv.sql index f24f4c8..47527e0 100644 --- a/doc/设计文档/数据库设计/mes-dv.sql +++ b/doc/设计文档/数据库设计/mes-dv.sql @@ -201,13 +201,13 @@ drop table if exists dv_repair_line; create table dv_repair_line ( line_id bigint(20) not null auto_increment comment '行ID', repair_id bigint(20) not null comment '维修单ID', - subject_id bigint(20) not null comment '项目ID', - subject_code varchar(64) not null comment '项目编码', + subject_id bigint(20) comment '项目ID', + subject_code varchar(64) comment '项目编码', subject_name varchar(255) comment '项目名称', subject_type varchar(64) comment '项目类型', - subject_content varchar(500) not null comment '项目内容', + subject_content varchar(500) comment '项目内容', subject_standard varchar(255) comment '标准', - malfunction varchar(500) comment '故障描述', + malfunction varchar(500) not null comment '故障描述', malfunction_url varchar(255) comment '故障描述资源', repair_des varchar(500) comment '维修情况', remark varchar(500) default '' comment '备注', diff --git a/doc/设计文档/数据库设计/mes-pro.sql b/doc/设计文档/数据库设计/mes-pro.sql index 53f51a2..fbcfc08 100644 --- a/doc/设计文档/数据库设计/mes-pro.sql +++ b/doc/设计文档/数据库设计/mes-pro.sql @@ -385,6 +385,7 @@ create table pro_trans_order ( item_name varchar(255) not null comment '产品物料名称', specification varchar(500) default null comment '规格型号', unit_of_measure varchar(64) not null comment '单位', + barcode_url varchar(255) comment '赋码地址', quantity_transfered double(12,2) comment '流转数量', produce_date datetime comment '生产日期', remark varchar(500) default '' comment '备注', @@ -440,3 +441,59 @@ create table pro_trans_consume ( primary key (record_id) ) engine=innodb auto_increment=200 comment = '物料消耗记录表'; + + +-- ---------------------------- +-- 4、上下工记录表 +-- ---------------------------- +drop table if exists pro_workrecord; +create table pro_workrecord ( + record_id bigint(20) not null auto_increment comment '记录ID', + user_id bigint(20) not null comment '用户ID', + user_name varchar(64) comment '用户名', + nick_name bigint(125) comment '名称', + workstation_id bigint(20) not null comment '工作站ID', + workstation_code varchar(64) comment '工作站编号', + workstation_name varchar(125) comment '工作站名称', + operation_flag char(1) not null comment '操作类型', + operation_time datetime comment '操作时间', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (record_id) +) engine=innodb auto_increment=200 comment = '上下工记录表'; + + + +-- ---------------------------- +-- 4、用户工作站绑定关系 +-- ---------------------------- +drop table if exists pro_user_workstation; +create table pro_user_workstation ( + record_id bigint(20) not null auto_increment comment '记录ID', + user_id bigint(20) not null comment '用户ID', + user_name varchar(64) comment '用户名', + nick_name bigint(125) comment '名称', + workstation_id bigint(20) not null comment '工作站ID', + workstation_code varchar(64) comment '工作站编号', + workstation_name varchar(125) comment '工作站名称', + operation_time datetime comment '操作时间', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (record_id) +) engine=innodb auto_increment=200 comment = '用户工作站绑定关系'; + + diff --git a/doc/设计文档/数据库设计/mes-wm.sql b/doc/设计文档/数据库设计/mes-wm.sql index 8294587..893a2e6 100644 --- a/doc/设计文档/数据库设计/mes-wm.sql +++ b/doc/设计文档/数据库设计/mes-wm.sql @@ -4,7 +4,7 @@ drop table if exists wm_warehouse; create table wm_warehouse ( warehouse_id bigint(20) not null auto_increment comment '仓库ID', - warehouse_code varchar(64) not null comment '仓库编码', + warehouse_code varchar(64) not null UNIQUE comment '仓库编码', warehouse_name varchar(255) not null comment '仓库名称', location varchar(500) comment '位置', area double(12,2) comment '面积', @@ -30,7 +30,7 @@ create table wm_warehouse ( drop table if exists wm_storage_location; create table wm_storage_location ( location_id bigint(20) not null auto_increment comment '库区ID', - location_code varchar(64) not null comment '库区编码', + location_code varchar(64) not null UNIQUE comment '库区编码', location_name varchar(255) not null comment '库区名称', warehouse_id bigint(20) not null comment '仓库ID', area double(12,2) comment '面积', @@ -54,7 +54,7 @@ create table wm_storage_location ( drop table if exists wm_storage_area; create table wm_storage_area ( area_id bigint(20) not null auto_increment comment '库位ID', - area_code varchar(64) not null comment '库位编码', + area_code varchar(64) not null UNIQUE comment '库位编码', area_name varchar(255) not null comment '库位名称', location_id bigint(20) not null comment '库区ID', area double(8,2) comment '面积',