添加到货通知单功能
This commit is contained in:
@@ -18,6 +18,7 @@ create table md_item (
|
||||
min_stock double(12,4) default 0 comment '最低库存量',
|
||||
max_stock double(12,4) default 0 comment '最大库存量',
|
||||
high_value char(1) default 'N' not null comment '高价值物资',
|
||||
batch_flag char(1) default 'Y' not null comment '批次管理',
|
||||
remark varchar(500) default '' comment '备注',
|
||||
attr1 varchar(64) default null comment '预留字段1',
|
||||
attr2 varchar(255) default null comment '预留字段2',
|
||||
@@ -82,6 +83,40 @@ create table md_product_bom (
|
||||
primary key (bom_id)
|
||||
) engine=innodb auto_increment=200 comment = '产品BOM关系表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 3、物料批次属性配置表
|
||||
-- ----------------------------
|
||||
drop table if exists md_item_batch_config;
|
||||
create table md_item_batch_config (
|
||||
config_id bigint(20) not null auto_increment comment '批次ID',
|
||||
item_id bigint(20) not null comment '产品物料ID',
|
||||
produce_date_flag char(1) comment '生产日期',
|
||||
expire_date_flag char(1) comment '有效期',
|
||||
recpt_date_flag char(1) comment '入库日期',
|
||||
vendor_flag char(1) comment '供应商',
|
||||
client_flag char(1) comment '客户',
|
||||
co_code_flag char(1) comment '销售订单编号',
|
||||
po_code_flag char(1) comment '采购订单编号',
|
||||
workorder_flag char(1) comment '生产工单',
|
||||
task_flag char(1) comment '生产任务',
|
||||
workstation_flag char(1) comment '工作站',
|
||||
tool_flag char(1) comment '工具',
|
||||
mold_flag char(1) comment '模具',
|
||||
product_code_flag char(1) comment '生产批号',
|
||||
quality_status_flag char(1) comment '质量状态',
|
||||
enable_flag char(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 (config_id)
|
||||
) engine=innodb auto_increment=200 comment = '物料批次属性配置表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、供应商表
|
||||
|
||||
@@ -570,3 +570,73 @@ create table pro_shutdown_record (
|
||||
) engine=innodb auto_increment=200 comment = '停机记录记录';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、工序流转卡表
|
||||
-- ----------------------------
|
||||
drop table if exists pro_card;
|
||||
create table pro_card (
|
||||
card_id bigint(20) not null auto_increment comment '流转卡ID',
|
||||
card_code varchar(64) comment '流转卡编号',
|
||||
workorder_id bigint(20) comment '生产工单ID',
|
||||
workorder_code varchar(64) comment '生产工单编号',
|
||||
workorder_name varchar(255) comment '生产工单名称',
|
||||
batch_code varchar(64) comment '批次号',
|
||||
item_id bigint(20) 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 '单位',
|
||||
barcode_url varchar(255) comment '赋码地址',
|
||||
quantity_transfered double(12,2) comment '流转数量',
|
||||
status varchar(64) 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 (card_id)
|
||||
) engine=innodb auto_increment=200 comment = '流转卡表';
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、工序流转卡-工序信息表
|
||||
-- ----------------------------
|
||||
drop table if exists pro_card_process;
|
||||
create table pro_card_process (
|
||||
record_id bigint(20) not null auto_increment comment '流水ID',
|
||||
card_id bigint(20) not null comment '流转卡ID',
|
||||
card_code varchar(64) comment '流转卡编号',
|
||||
seq_num int(11) default 1 comment '序号',
|
||||
process_id bigint(20) comment '工序ID',
|
||||
process_code varchar(64) comment '工序编号',
|
||||
process_name varchar(255) comment '工序名称',
|
||||
input_time datetime comment '进入工序时间',
|
||||
output_time datetime comment '出工序时间',
|
||||
quantity_input double(12,2) comment '投入数量',
|
||||
quantity_output double(12,2) comment '产出数量',
|
||||
quantity_unquanlify double(12,2) comment '不合格品数量',
|
||||
workstation_id bigint(20) not null comment '工作站ID',
|
||||
workstation_code varchar(64) comment '工作站编号',
|
||||
workstation_name varchar(125) comment '工作站名称',
|
||||
user_id bigint(20) not null comment '用户ID',
|
||||
user_name varchar(64) comment '用户名',
|
||||
nick_name varchar(125) comment '名称',
|
||||
ipqc_id bigint(20) comment '过程检验单ID',
|
||||
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 = '工序流转卡-工序信息表';
|
||||
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ create table qc_defect (
|
||||
defect_name varchar(500) not null comment '缺陷描述',
|
||||
index_type varchar(64) not null comment '检测项类型',
|
||||
defect_level varchar(64) not null comment '缺陷等级',
|
||||
process_method varchar(500) comment '处置方法',
|
||||
remark varchar(500) default '' comment '备注',
|
||||
attr1 varchar(64) default null comment '预留字段1',
|
||||
attr2 varchar(255) default null comment '预留字段2',
|
||||
@@ -156,7 +157,8 @@ create table qc_iqc (
|
||||
quantity_min_check int(11) default 1 comment '最低检测数',
|
||||
quantity_max_unqualified int(11) default 0 comment '最大不合格数',
|
||||
quantity_recived double(12,2) not null comment '本次接收数量',
|
||||
quantity_check int(11) not null comment '本次检测数量',
|
||||
quantity_check int(11) comment '本次检测数量',
|
||||
quantity_qualified int(11) default 0 comment '合格数',
|
||||
quantity_unqualified int(11) default 0 comment '不合格数',
|
||||
cr_rate double(12,2) default 0 comment '致命缺陷率',
|
||||
maj_rate double(12,2) default 0 comment '严重缺陷率',
|
||||
|
||||
@@ -169,6 +169,7 @@ create table wm_material_stock (
|
||||
package_code varchar(64) comment '容器编号',
|
||||
quantity_onhand double(12,2) comment '在库数量',
|
||||
quantity_reserved double(12,2) comment '保留数量',
|
||||
production_date datetime comment '生产日期',
|
||||
recpt_date datetime comment '入库时间',
|
||||
expire_date datetime comment '库存有效期',
|
||||
frozen_flag char(1) default 'N' not null comment '是否冻结',
|
||||
@@ -184,6 +185,66 @@ create table wm_material_stock (
|
||||
) engine=innodb auto_increment=200 comment = '库存记录表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 6、到货通知单
|
||||
-- ----------------------------
|
||||
drop table if exists wm_arrival_notice;
|
||||
create table wm_arrival_notice (
|
||||
notice_id bigint(20) not null auto_increment comment '通知单ID',
|
||||
notice_code varchar(64) not null comment '通知单编号',
|
||||
notice_name varchar(255) not null comment '通知单名称',
|
||||
po_code varchar(64) comment '采购订单编号',
|
||||
vendor_id bigint(20) comment '供应商ID',
|
||||
vendor_code varchar(64) comment '供应商编码',
|
||||
vendor_name varchar(255) comment '供应商名称',
|
||||
vendor_nick varchar(255) comment '供应商简称',
|
||||
arrival_date datetime comment '到货日期',
|
||||
contact varchar(64) comment '联系人',
|
||||
tel varchar(128) comment '联系方式',
|
||||
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 (notice_id)
|
||||
) engine=innodb auto_increment=200 comment = '到货通知单表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 7、到货通知单行表
|
||||
-- ----------------------------
|
||||
drop table if exists wm_arrival_notice_line;
|
||||
create table wm_arrival_notice_line (
|
||||
line_id bigint(20) not null auto_increment comment '行ID',
|
||||
notice_id bigint(20) comment '通知单ID',
|
||||
item_id bigint(20) not null comment '产品物料ID',
|
||||
item_code varchar(64) comment '产品物料编码',
|
||||
item_name varchar(255) comment '产品物料名称',
|
||||
specification varchar(500) comment '规格型号',
|
||||
unit_of_measure varchar(64) comment '单位',
|
||||
quantity_arrival double(12,2) not null comment '到货数量',
|
||||
quantity_quanlified double(12,2) comment '合格数量',
|
||||
iqc_check char(1) comment '是否来料检验',
|
||||
iqc_id bigint(20) comment '来料检验单ID',
|
||||
iqc_code varchar(64) 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 = '到货通知单行表';
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 6、物料入库单表
|
||||
@@ -195,6 +256,8 @@ create table wm_item_recpt (
|
||||
recpt_name varchar(255) not null comment '入库单名称',
|
||||
iqc_id bigint(20) comment '来料检验单ID',
|
||||
iqc_code varchar(64) comment '来料检验单编号',
|
||||
notice_id bigint(20) comment '到货通知单ID',
|
||||
notice_code varchar(64) comment '到货通知单编号',
|
||||
po_code varchar(64) comment '采购订单编号',
|
||||
vendor_id bigint(20) comment '供应商ID',
|
||||
vendor_code varchar(64) comment '供应商编码',
|
||||
@@ -231,6 +294,7 @@ drop table if exists wm_item_recpt_line;
|
||||
create table wm_item_recpt_line (
|
||||
line_id bigint(20) not null auto_increment comment '行ID',
|
||||
recpt_id bigint(20) comment '入库单ID',
|
||||
notice_line_id bigint(20) comment '到货通知单行ID',
|
||||
item_id bigint(20) not null comment '产品物料ID',
|
||||
item_code varchar(64) comment '产品物料编码',
|
||||
item_name varchar(255) comment '产品物料名称',
|
||||
@@ -1388,3 +1452,55 @@ create table wm_outsource_recpt_line (
|
||||
) engine=innodb auto_increment=200 comment = '外协入库单行表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 31、批次记录表
|
||||
-- ----------------------------
|
||||
drop table if exists wm_batch;
|
||||
create table wm_batch (
|
||||
batch_id bigint(20) not null auto_increment comment '批次ID',
|
||||
batch_code varchar(64) not null comment '批次编号',
|
||||
item_id bigint(20) not null comment '产品物料ID',
|
||||
item_code varchar(64) comment '产品物料编码',
|
||||
item_name varchar(255) comment '产品物料名称',
|
||||
specification varchar(500) comment '规格型号',
|
||||
unit_of_measure varchar(64) comment '单位',
|
||||
produce_date datetime comment '生产日期',
|
||||
expire_date datetime comment '有效期',
|
||||
recpt_date datetime comment '入库日期',
|
||||
vendor_id bigint(20) comment '供应商ID',
|
||||
vendor_code varchar(64) comment '供应商编码',
|
||||
vendor_name varchar(255) comment '供应商名称',
|
||||
vendor_nick varchar(255) comment '供应商简称',
|
||||
client_id bigint(20) comment '客户ID',
|
||||
client_code varchar(64) comment '客户编码',
|
||||
client_name varchar(255) comment '客户名称',
|
||||
client_nick varchar(255) comment '客户简称',
|
||||
co_code varchar(64) comment '销售订单编号',
|
||||
po_code varchar(64) comment '采购订单编号',
|
||||
workorder_id bigint(20) comment '生产工单ID',
|
||||
workorder_code varchar(64) comment '生产工单编码',
|
||||
task_id bigint(20) comment '生产任务ID',
|
||||
task_code varchar(64) comment '生产任务编号',
|
||||
workstation_id bigint(20) comment '工作站ID',
|
||||
workstation_code varchar(64) comment '工作站编码',
|
||||
tool_id bigint(20) comment '工具ID',
|
||||
tool_code varchar(64) comment '工具编号',
|
||||
mold_id bigint(20) comment '模具ID',
|
||||
mold_code varchar(64) comment '模具编号',
|
||||
product_code varchar(128) comment '生产批号',
|
||||
quality_status varchar(64) 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 (batch_id)
|
||||
) engine=innodb auto_increment=200 comment = '批次记录表';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user