生产排产文档

This commit is contained in:
JinLu.Yin 2022-05-15 19:27:40 +08:00
parent 491f674fe5
commit 7efb15162d
3 changed files with 113 additions and 1 deletions

View File

@ -14,11 +14,14 @@ create table pro_workorder (
product_spc varchar(255) comment '规格型号',
unit_of_measure varchar(64) not null comment '单位',
quantity double(14,2) default 0 not null comment '生产数量',
quantity_produced double(14,2) default 0 comment '已生产数量',
quantity_changed double(14,2) default 0 comment '调整数量',
quantity_scheduled double(14,2) default 0 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 '父工单',
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 '备注',
@ -131,3 +134,110 @@ create table pro_route (
primary key (route_id)
) engine=innodb auto_increment=200 comment = '工艺路线表';
-- ----------------------------
-- 4、工艺组成表
-- ----------------------------
drop table if exists pro_route_process;
create table pro_route_process (
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',
process_code varchar(64) comment '工序编码',
process_name varchar(255) comment '工序名称',
order_num int(4) default 1 comment '序号',
next_process_id bigint(20) not null comment '工序ID',
next_process_code varchar(64) comment '工序编码',
next_process_name varchar(255) comment '工序名称',
link_type varchar(64) default 'SS' comment '与下一道工序关系',
default_pre_time int(11) default 0 comment '准备时间',
default_suf_time int(11) default 0 comment '等待时间',
color_code char(7) default '#00AEF3' 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_route_product;
create table pro_route_product (
record_id bigint(20) not null auto_increment comment '记录ID',
route_id bigint(20) not null comment '工艺路线ID',
item_id bigint(20) not null auto_increment 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 int(11) default 1 comment '生产数量',
production_time double(12,2) default 1 comment '生产用时',
time_unit_type varchar(64) default 'MINUTE' 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_task;
create table pro_task (
task_id bigint(20) not null auto_increment comment '任务ID',
task_code varchar(64) not null comment '任务编号',
task_name varchar(255) not null comment '任务名称',
workorder_id bigint(20) not null comment '生产工单ID',
workorder_code varchar(64) not null comment '生产工单编号',
workorder_name varchar(255) not null comment '工单名称',
workstation_id bigint(20) not null comment '工作站ID',
workstation_code varchar(64) not null comment '工作站编号',
workstation_name varchar(255) not null comment '工作站名称',
process_id bigint(20) not null comment '工序ID',
process_code varchar(64) comment '工序编码',
process_name varchar(255) comment '工序名称',
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) comment '规格型号',
unit_of_measure varchar(64) not null comment '单位',
quantity double(14,2) default 1 not null comment '排产数量',
quantity_produced double(14,2) default 0 comment '已生产数量',
quantity_changed double(14,2) default 0 comment '调整数量',
client_id bigint(20) not null comment '客户ID',
client_code varchar(64) not null comment '客户编码',
client_name varchar(255) not null comment '客户名称',
client_nick varchar(255) comment '客户简称',
start_time datetime default CURRENT_TIMESTAMP comment '开始生产时间',
duration int(11) default 1 comment '生产时长',
end_time datetime comment '完成生产时间',
color_code char(7) default '#00AEF3' comment '甘特图显示颜色',
request_date 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 (task_id)
) engine=innodb auto_increment=200 comment = '生产任务表';

View File

@ -82,6 +82,8 @@ public class UserConstants
public static final String ITEM_TYPE_CODE ="ITEM_TYPE_CODE";
public static final String ITEM_CODE ="ITEM_CODE";
public static final String MACHINERY_TYPE_CODE="MACHINERY_TYPE_CODE";
public static final String TASK_CODE="TASK_CODE";
/**
* 维护类型