diff --git a/doc/实施文档/初始化配置数据.xlsx b/doc/实施文档/初始化配置数据.xlsx index e9b129a..098384e 100644 Binary files a/doc/实施文档/初始化配置数据.xlsx and b/doc/实施文档/初始化配置数据.xlsx differ diff --git a/doc/设计文档/数据库设计/mes-md.sql b/doc/设计文档/数据库设计/mes-md.sql index 535a5d4..1665322 100644 --- a/doc/设计文档/数据库设计/mes-md.sql +++ b/doc/设计文档/数据库设计/mes-md.sql @@ -65,6 +65,7 @@ create table md_product_bom ( bom_item_name varchar(255) not null comment 'BOM物料名称', bom_item_spec varchar(500) comment 'BOM物料规格', unit_of_measure varchar(64) not null comment 'BOM物料单位', + item_or_product varchar(20) not null comment '产品物料标识', quantity double(12,4) default 0 not null comment '物料使用比例', enable_flag char(1) default 'Y' not null comment '是否启用', remark varchar(500) default '' comment '备注', diff --git a/doc/设计文档/数据库设计/mes-pro.sql b/doc/设计文档/数据库设计/mes-pro.sql new file mode 100644 index 0000000..71b8ba1 --- /dev/null +++ b/doc/设计文档/数据库设计/mes-pro.sql @@ -0,0 +1,63 @@ +-- ---------------------------- +-- 1、生产工单表 +-- ---------------------------- +drop table if exists pro_workorder; +create table pro_workorder ( + workorder_id bigint(20) not null auto_increment comment '工单ID', + workorder_code varchar(64) not null comment '工单编码', + workorder_name varchar(255) not null comment '工单名称', + order_source varchar(64) not null comment '来源类型', + source_code varchar(64) comment '来源单据', + product_id bigint(20) not null comment '产品ID', + product_code varchar(64) not null comment '产品编号', + product_name varchar(255) not null comment '产品名称', + product_spc varchar(255) comment '规格型号', + unit_of_measure varchar(64) not null comment '单位', + quantity double(14,2) default 0 not null comment '生产数量', + client_id bigint(20) comment '客户ID', + client_code varchar(64) comment '客户编码', + client_name varchar(255) comment '客户名称', + request_date datetime not null comment '需求日期', + parent_id bigint(20) default 0,not null comment '父工单', + ancestors varchar(500) not null comment '所有父节点ID', + status varchar(64) default 'PREPARE' 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 (workorder_id) +) engine=innodb auto_increment=200 comment = '生产工单表'; + + +-- ---------------------------- +-- 2、生产工单BOM组成表 +-- ---------------------------- +drop table if exists pro_workorder_bom; +create table pro_workorder_bom ( + line_id bigint(20) not null auto_increment comment '行ID', + workorder_id bigint(20) not null comment '生产工单ID', + item_id bigint(20) not null comment 'BOM物料ID', + item_code varchar(64) not null comment 'BOM物料编号', + item_name varchar(255) not null comment 'BOM物料名称', + item_spc varchar(255) comment '规格型号', + unit_of_measure varchar(64) not null comment '单位', + item_or_product varchar(20) not null comment '物料产品标识', + quantity double(14,2) default 0 not null 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 (line_id) +) engine=innodb auto_increment=200 comment = '生产工单BOM组成表'; + + diff --git a/doc/设计文档/数据库设计/mes_sys.sql b/doc/设计文档/数据库设计/mes_sys.sql index c234f41..e9463bc 100644 --- a/doc/设计文档/数据库设计/mes_sys.sql +++ b/doc/设计文档/数据库设计/mes_sys.sql @@ -37,7 +37,7 @@ create table sys_auto_code_part ( part_code varchar(64) comment '分段编号', part_name varchar(255) comment '分段名称', part_length int(11) not null comment '分段长度', - date_formart varchar(20) comment '日期时间格式', + date_format varchar(20) comment '日期时间格式', input_character varchar(64) comment '输入字符', fix_character varchar(64) comment '固定字符', seria_start_no int(11) comment '流水号起始值', diff --git a/doc/设计文档/数据库设计/数据库设计.xlsx b/doc/设计文档/数据库设计/数据库设计.xlsx index 15bc30b..c4ba76c 100644 Binary files a/doc/设计文档/数据库设计/数据库设计.xlsx and b/doc/设计文档/数据库设计/数据库设计.xlsx differ