更新登录页及优化相关功能
This commit is contained in:
@@ -303,6 +303,7 @@ insert into sys_menu values('504', '客户现场', '121', '3', 'site', 'master/s
|
||||
insert into sys_menu values('505', '产线资料', '121', '4', 'line', 'master/line/index', '', '', 1, 0, 'C', '0', '0', 'master:line:list', '#', 'admin', sysdate(), '', null, '产线资料菜单');
|
||||
insert into sys_menu values('506', '仓库资料', '121', '5', 'warehouse', 'master/warehouse/index', '', '', 1, 0, 'C', '0', '0', 'master:warehouse:list', '#', 'admin', sysdate(), '', null, '仓库资料菜单');
|
||||
insert into sys_menu values('507', '托盘资料', '121', '6', 'pallet', 'master/pallet/index', '', '', 1, 0, 'C', '0', '0', 'master:pallet:list', '#', 'admin', sysdate(), '', null, '托盘资料菜单');
|
||||
insert into sys_menu values('520', '隧道资料', '121', '7', 'tunnel', 'master/tunnel/index', '', '', 1, 0, 'C', '0', '0', 'master:tunnel:list', '#', 'admin', sysdate(), '', null, '隧道资料菜单');
|
||||
insert into sys_menu values('508', '仓库入库', '122', '1', 'inbound', 'business/inbound/index', '', '', 1, 0, 'C', '0', '0', 'business:inbound:list', '#', 'admin', sysdate(), '', null, '仓库入库菜单');
|
||||
insert into sys_menu values('509', '工厂装填', '122', '2', 'filling', 'business/filling/index', '', '', 1, 0, 'C', '0', '0', 'business:filling:list', '#', 'admin', sysdate(), '', null, '工厂装填菜单');
|
||||
insert into sys_menu values('510', '发货出库', '122', '3', 'shipment', 'business/shipment/index', '', '', 1, 0, 'C', '0', '0', 'business:shipment:list', '#', 'admin', sysdate(), '', null, '发货出库菜单');
|
||||
@@ -338,6 +339,9 @@ insert into sys_menu values('1087', '托盘查询', '507', '1', '', '', '', '',
|
||||
insert into sys_menu values('1088', '托盘新增', '507', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'master:pallet:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1089', '托盘修改', '507', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'master:pallet:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1091', '托盘打印', '507', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'master:pallet:print', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1116', '隧道查询', '520', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'master:tunnel:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1117', '隧道新增', '520', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'master:tunnel:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1118', '隧道修改', '520', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'master:tunnel:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1092', '入库查询', '508', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'business:inbound:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1093', '入库新增', '508', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'business:inbound:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1094', '入库修改', '508', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'business:inbound:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
@@ -348,6 +352,7 @@ insert into sys_menu values('1099', '发货查询', '510', '1', '', '', '', '',
|
||||
insert into sys_menu values('1100', '发货新增', '510', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'business:shipment:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1101', '发货修改', '510', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'business:shipment:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1103', '发货确认', '510', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'business:shipment:confirm', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1119', '收货核对', '510', '6', '', '', '', '', 1, 0, 'F', '0', '0', 'business:shipment:receive', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1104', '使用查询', '511', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'business:usage:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1105', '使用新增', '511', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'business:usage:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1106', '退回查询', '512', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'business:return:query', '#', 'admin', sysdate(), '', null, '');
|
||||
@@ -960,6 +965,29 @@ create table biz_production_line (
|
||||
constraint ck_biz_production_line_status check (status in ('0', '1'))
|
||||
) engine=innodb comment = '客户现场产线主数据表';
|
||||
|
||||
-- 客户现场隧道主数据表
|
||||
create table biz_tunnel (
|
||||
tunnel_id bigint(20) not null auto_increment comment '隧道ID',
|
||||
test_batch_id bigint(20) null comment '测试数据批次ID;NULL表示正式数据',
|
||||
site_id bigint(20) not null comment '现场ID',
|
||||
tunnel_code varchar(64) not null comment '隧道编号',
|
||||
tunnel_name varchar(100) not null comment '隧道名称',
|
||||
current_trace_no varchar(64) comment '当前隧道物料溯源号',
|
||||
current_trace_started_at datetime comment '当前溯源批次开始时间',
|
||||
status char(1) not null default '0' comment '状态(0正常 1停用)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (tunnel_id),
|
||||
key idx_biz_tunnel_test_batch_id (test_batch_id),
|
||||
constraint uq_biz_tunnel_site_code unique (site_id, tunnel_code),
|
||||
constraint fk_biz_tunnel_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
constraint fk_biz_tunnel_site foreign key (site_id) references biz_customer_site (site_id),
|
||||
constraint ck_biz_tunnel_status check (status in ('0', '1'))
|
||||
) engine=innodb comment = '客户现场隧道主数据表';
|
||||
|
||||
-- 托盘资产主数据表
|
||||
create table biz_pallet (
|
||||
pallet_id bigint(20) not null auto_increment comment '托盘ID',
|
||||
@@ -1057,6 +1085,8 @@ create table biz_filling_record (
|
||||
strain_code_snapshot varchar(64) not null comment '菌种编码快照',
|
||||
strain_name_snapshot varchar(100) not null comment '菌种名称快照',
|
||||
batch_no varchar(64) not null comment '生产批次',
|
||||
production_date date comment '来源生产日期;历史未登记为空',
|
||||
expiry_date date comment '有效期至;历史未登记为空',
|
||||
package_spec varchar(64) not null comment '包装规格',
|
||||
initial_packages int not null comment '初始包数',
|
||||
active_slot varchar(16) comment '活动装填槽',
|
||||
@@ -1081,6 +1111,10 @@ create table biz_filling_record (
|
||||
constraint fk_biz_filling_record_operator foreign key (operator_id) references sys_user (user_id),
|
||||
constraint fk_biz_filling_record_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
constraint ck_biz_filling_record_initial_packages check (initial_packages > 0),
|
||||
constraint ck_biz_filling_record_material_dates check (
|
||||
(production_date is null and expiry_date is null) or
|
||||
(production_date is not null and expiry_date is not null and expiry_date >= production_date)
|
||||
),
|
||||
constraint ck_biz_filling_record_active_slot check (active_slot is null or active_slot = 'ACTIVE')
|
||||
) engine=innodb comment = '托盘装填记录';
|
||||
|
||||
@@ -1096,6 +1130,11 @@ create table biz_shipment_order (
|
||||
confirm_request_hash varchar(64) comment '确认请求摘要',
|
||||
confirmed_by bigint(20) comment '确认人ID',
|
||||
confirmed_at datetime comment '确认时间',
|
||||
receipt_state varchar(16) not null default 'PENDING' comment '收货状态;LEGACY表示历史未登记',
|
||||
received_by bigint(20) null comment '收货核对人ID',
|
||||
received_at datetime null comment '实际收货核对时间',
|
||||
receipt_idempotency_key varchar(64) null comment '收货确认幂等键',
|
||||
receipt_request_hash varchar(64) null comment '收货核对请求摘要',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
@@ -1105,11 +1144,14 @@ create table biz_shipment_order (
|
||||
key idx_biz_shipment_order_test_batch_id (test_batch_id),
|
||||
constraint uq_biz_shipment_order_no unique (shipment_no),
|
||||
constraint uq_biz_shipment_order_route_confirm_idempotency unique (source_warehouse_id, target_site_id, confirm_idempotency_key),
|
||||
constraint uq_biz_shipment_receipt_site_key unique (target_site_id, receipt_idempotency_key),
|
||||
constraint fk_biz_shipment_order_warehouse foreign key (source_warehouse_id) references biz_warehouse (warehouse_id),
|
||||
constraint fk_biz_shipment_order_site foreign key (target_site_id) references biz_customer_site (site_id),
|
||||
constraint fk_biz_shipment_order_confirmed_by foreign key (confirmed_by) references sys_user (user_id),
|
||||
constraint fk_biz_shipment_order_received_by foreign key (received_by) references sys_user (user_id),
|
||||
constraint fk_biz_shipment_order_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
constraint ck_biz_shipment_order_status check (status in ('DRAFT', 'CONFIRMED'))
|
||||
constraint ck_biz_shipment_order_status check (status in ('DRAFT', 'CONFIRMED')),
|
||||
constraint ck_biz_shipment_order_receipt_state check (receipt_state in ('PENDING', 'RECEIVED', 'LEGACY'))
|
||||
) engine=innodb comment = '整托发货单';
|
||||
|
||||
-- 整托发货明细
|
||||
@@ -1140,8 +1182,13 @@ create table biz_usage_record (
|
||||
pallet_id bigint(20) not null comment '托盘ID',
|
||||
active_filling_id bigint(20) not null comment '活动装填记录ID',
|
||||
site_id bigint(20) not null comment '现场ID',
|
||||
line_id bigint(20) not null comment '产线ID',
|
||||
tunnel_id bigint(20) comment '隧道ID;历史记录可能为空',
|
||||
trace_no varchar(64) comment '隧道物料内部溯源号;历史记录可能为空',
|
||||
batch_no_snapshot varchar(64) comment '生产批次快照;历史记录可能为空',
|
||||
line_id bigint(20) comment '产线ID(可选)',
|
||||
used_packages int not null comment '本次使用包数',
|
||||
fifo_skip_reason varchar(500) comment '跳过先到托盘原因',
|
||||
fifo_recommendation json comment '跳过时先到托盘身份及到货时间快照',
|
||||
remaining_packages_after int not null comment '使用后剩余包数',
|
||||
idempotency_key varchar(64) not null comment '幂等键',
|
||||
request_hash varchar(64) not null comment '请求摘要',
|
||||
@@ -1154,6 +1201,7 @@ create table biz_usage_record (
|
||||
constraint fk_biz_usage_record_pallet foreign key (pallet_id) references biz_pallet (pallet_id),
|
||||
constraint fk_biz_usage_record_filling foreign key (active_filling_id) references biz_filling_record (filling_id),
|
||||
constraint fk_biz_usage_record_site foreign key (site_id) references biz_customer_site (site_id),
|
||||
constraint fk_biz_usage_record_tunnel foreign key (tunnel_id) references biz_tunnel (tunnel_id),
|
||||
constraint fk_biz_usage_record_line foreign key (line_id) references biz_production_line (line_id),
|
||||
constraint fk_biz_usage_record_operator foreign key (operator_id) references sys_user (user_id),
|
||||
constraint fk_biz_usage_record_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
@@ -1202,6 +1250,9 @@ create table biz_return_item (
|
||||
return_id bigint(20) not null comment '退回单ID',
|
||||
pallet_id bigint(20) not null comment '托盘ID',
|
||||
active_filling_id_snapshot bigint(20) comment '申请时活动装填记录快照',
|
||||
tunnel_id_snapshot bigint(20) comment '申请时隧道ID快照',
|
||||
trace_no_snapshot varchar(64) comment '申请时物料溯源号快照',
|
||||
batch_no_snapshot varchar(64) comment '申请时生产批次快照',
|
||||
remaining_packages_snapshot int not null comment '申请时剩余包数快照',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
@@ -1211,6 +1262,7 @@ create table biz_return_item (
|
||||
constraint fk_biz_return_item_order foreign key (return_id) references biz_return_order (return_id),
|
||||
constraint fk_biz_return_item_pallet foreign key (pallet_id) references biz_pallet (pallet_id),
|
||||
constraint fk_biz_return_item_filling foreign key (active_filling_id_snapshot) references biz_filling_record (filling_id),
|
||||
constraint fk_biz_return_item_tunnel foreign key (tunnel_id_snapshot) references biz_tunnel (tunnel_id),
|
||||
constraint fk_biz_return_item_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
constraint ck_biz_return_item_remaining_packages_snapshot check (remaining_packages_snapshot >= 0)
|
||||
) engine=innodb comment = '托盘退回明细';
|
||||
@@ -1228,12 +1280,18 @@ create table biz_pallet_event (
|
||||
after_state varchar(32) not null comment '变更后状态',
|
||||
before_warehouse_id bigint(20) comment '变更前仓库ID',
|
||||
before_site_id bigint(20) comment '变更前现场ID',
|
||||
before_tunnel_id bigint(20) comment '变更前隧道ID',
|
||||
before_line_id bigint(20) comment '变更前产线ID',
|
||||
after_warehouse_id bigint(20) comment '变更后仓库ID',
|
||||
after_site_id bigint(20) comment '变更后现场ID',
|
||||
after_tunnel_id bigint(20) comment '变更后隧道ID',
|
||||
after_line_id bigint(20) comment '变更后产线ID',
|
||||
before_remaining_packages int not null comment '变更前剩余包数',
|
||||
after_remaining_packages int not null comment '变更后剩余包数',
|
||||
trace_no varchar(64) comment '事件关联物料溯源号',
|
||||
batch_no_snapshot varchar(64) comment '事件生产批次快照',
|
||||
fifo_skip_reason varchar(500) comment '跳过先到托盘原因',
|
||||
fifo_recommendation json comment '跳过时先到托盘身份及到货时间快照',
|
||||
operator_id bigint(20) not null comment '操作人ID',
|
||||
occurred_at datetime not null comment '发生时间',
|
||||
idempotency_key varchar(64) not null comment '幂等键',
|
||||
@@ -1245,9 +1303,11 @@ create table biz_pallet_event (
|
||||
constraint fk_biz_pallet_event_pallet foreign key (pallet_id) references biz_pallet (pallet_id),
|
||||
constraint fk_biz_pallet_event_before_warehouse foreign key (before_warehouse_id) references biz_warehouse (warehouse_id),
|
||||
constraint fk_biz_pallet_event_before_site foreign key (before_site_id) references biz_customer_site (site_id),
|
||||
constraint fk_biz_pallet_event_before_tunnel foreign key (before_tunnel_id) references biz_tunnel (tunnel_id),
|
||||
constraint fk_biz_pallet_event_before_line foreign key (before_line_id) references biz_production_line (line_id),
|
||||
constraint fk_biz_pallet_event_after_warehouse foreign key (after_warehouse_id) references biz_warehouse (warehouse_id),
|
||||
constraint fk_biz_pallet_event_after_site foreign key (after_site_id) references biz_customer_site (site_id),
|
||||
constraint fk_biz_pallet_event_after_tunnel foreign key (after_tunnel_id) references biz_tunnel (tunnel_id),
|
||||
constraint fk_biz_pallet_event_after_line foreign key (after_line_id) references biz_production_line (line_id),
|
||||
constraint fk_biz_pallet_event_operator foreign key (operator_id) references sys_user (user_id),
|
||||
constraint fk_biz_pallet_event_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
@@ -1256,6 +1316,8 @@ create table biz_pallet_event (
|
||||
'INBOUND_CONFIRMED',
|
||||
'FILLING_CONFIRMED',
|
||||
'SHIPMENT_CONFIRMED',
|
||||
'SHIPMENT_RECEIVED',
|
||||
'TUNNEL_ENTERED',
|
||||
'USAGE_RECORDED',
|
||||
'RETURN_REQUESTED',
|
||||
'RETURN_CONFIRMED'
|
||||
@@ -1270,9 +1332,12 @@ create table biz_pallet_inventory (
|
||||
active_filling_id bigint(20) comment '当前活动装填记录ID',
|
||||
warehouse_id bigint(20) comment '当前仓库ID',
|
||||
site_id bigint(20) comment '当前现场ID',
|
||||
tunnel_id bigint(20) comment '当前隧道ID',
|
||||
trace_no varchar(64) comment '当前隧道物料溯源号',
|
||||
current_line_id bigint(20) comment '当前驻场周期绑定产线ID',
|
||||
flow_state varchar(32) not null default 'UNSTOCKED' comment '托盘流转状态',
|
||||
remaining_packages int not null default 0 comment '当前剩余包数',
|
||||
site_arrived_at datetime null comment '本轮实际收货核对时间;历史未登记为空',
|
||||
last_event_id bigint(20) comment '最后事件ID',
|
||||
version int not null default 0 comment '并发版本号',
|
||||
updated_at datetime not null comment '更新时间',
|
||||
@@ -1282,6 +1347,7 @@ create table biz_pallet_inventory (
|
||||
constraint fk_biz_pallet_inventory_filling foreign key (active_filling_id) references biz_filling_record (filling_id),
|
||||
constraint fk_biz_pallet_inventory_warehouse foreign key (warehouse_id) references biz_warehouse (warehouse_id),
|
||||
constraint fk_biz_pallet_inventory_site foreign key (site_id) references biz_customer_site (site_id),
|
||||
constraint fk_biz_pallet_inventory_tunnel foreign key (tunnel_id) references biz_tunnel (tunnel_id),
|
||||
constraint fk_biz_pallet_inventory_line foreign key (current_line_id) references biz_production_line (line_id),
|
||||
constraint fk_biz_pallet_inventory_event foreign key (last_event_id) references biz_pallet_event (event_id),
|
||||
constraint fk_biz_pallet_inventory_test_batch_id foreign key (test_batch_id) references biz_test_batch (batch_id),
|
||||
@@ -1290,6 +1356,7 @@ create table biz_pallet_inventory (
|
||||
'UNSTOCKED',
|
||||
'EMPTY_IN_WAREHOUSE',
|
||||
'FILLED_IN_WAREHOUSE',
|
||||
'IN_TRANSIT',
|
||||
'AT_SITE_UNUSED',
|
||||
'AT_SITE_PARTIAL',
|
||||
'AT_SITE_EMPTY',
|
||||
|
||||
Reference in New Issue
Block a user