diff --git a/doc/设计文档/数据库设计/mes-md.sql b/doc/设计文档/数据库设计/mes-md.sql index 0c81503..2c7a2ec 100644 --- a/doc/设计文档/数据库设计/mes-md.sql +++ b/doc/设计文档/数据库设计/mes-md.sql @@ -221,13 +221,13 @@ create table md_workstation ( process_id bigint(20) comment '工序ID', process_code varchar(64) comment '工序编码', process_name varchar(255) comment '工序名称', - warehouse_id bigint(20) comment '线边库ID', + warehouse_id bigint(20) not null comment '线边库ID', warehouse_code varchar(64) comment '线边库编码', warehouse_name varchar(255) comment '线边库名称', - location_id bigint(20) comment '库区ID', + location_id bigint(20) not null comment '库区ID', location_code varchar(64) comment '库区编码', location_name varchar(255) comment '库区名称', - area_id bigint(20) comment '库位ID', + area_id bigint(20) not null comment '库位ID', area_code varchar(64) comment '库位编码', area_name varchar(255) comment '库位名称', enable_flag char(1) default 'Y' not null comment '是否启用', diff --git a/doc/设计文档/数据库设计/mes-pro.sql b/doc/设计文档/数据库设计/mes-pro.sql index 7f7f07c..fec77e5 100644 --- a/doc/设计文档/数据库设计/mes-pro.sql +++ b/doc/设计文档/数据库设计/mes-pro.sql @@ -194,6 +194,35 @@ create table pro_route_product ( ) engine=innodb auto_increment=200 comment = '产品制程'; + +-- ---------------------------- +-- 4、产品制程物料BOM表 +-- ---------------------------- +drop table if exists pro_route_product_bom; +create table pro_route_product_bom ( + record_id bigint(20) not null auto_increment comment '记录ID', + route_id bigint(20) not null comment '工艺路线ID', + process_id bigint(20) not null comment '工序ID', + product_id bigint(20) not null comment '产品物料ID', + item_id bigint(20) not null comment '产品物料ID', + item_code varchar(64) not null comment '产品物料编码', + item_name varchar(255) not null comment '产品物料名称', + specification varchar(500) default null comment '规格型号', + unit_of_measure varchar(64) not null comment '单位', + quantity double(12,2) default 1 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 = '产品制程物料BOM表'; + + -- ---------------------------- -- 4、生产任务表 -- ---------------------------- diff --git a/doc/设计文档/数据库设计/数据库设计.xlsx b/doc/设计文档/数据库设计/数据库设计.xlsx index 9b34f7e..a8df152 100644 Binary files a/doc/设计文档/数据库设计/数据库设计.xlsx and b/doc/设计文档/数据库设计/数据库设计.xlsx differ