Browse Source

建表:容器信息 执行器信息 库存位置 库存 库存账页

master
修宁 6 months ago
parent
commit
c5a69ce26f
  1. 103
      doc/RCS数据库结构.md

103
doc/RCS数据库结构.md

@ -18,7 +18,7 @@ create table rcs_task_biz
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (biz_task_id)
primary key (env_id, biz_task_id)
);
drop table if exists rcs_task_plan;
@ -44,7 +44,7 @@ create table rcs_task_plan
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (plan_task_id)
primary key (env_id, plan_task_id)
);
create index idx_task_plan_biz_task_id on rcs_task_plan (biz_task_id);
create index idx_task_plan_executor_id on rcs_task_plan (executor_id);
@ -70,7 +70,7 @@ create table rcs_task_device
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (device_task_id)
primary key (env_id, device_task_id)
);
create index idx_rcs_task_device1 on rcs_task_device (biz_task_id);
create index idx_rcs_task_device2 on rcs_task_device (plan_task_id);
@ -80,8 +80,8 @@ drop table if exists lcc_env_info;
create table lcc_env_info
(
env_id bigint not null comment '环境ID',
world_id varchar(50) not null comment '世界地图ID',
env_name varchar(50) not null comment '环境名称',
world_id varchar(50) not null comment '世界地图ID',
is_virtual boolean not null default false comment '是否虚拟环境',
env_payload varchar(3000) not null default 'N/A' comment '环境负载信息',
auto_start boolean not null default false comment '是否自动启动',
@ -97,4 +97,99 @@ insert into lcc_env_info (env_id, world_id, env_name, is_virtual, env_payload, a
values (1, 'example1', '台湾展会生产', false, 'N/A', true, now(), 'system', now(), 'system'),
(2, 'example1', '虚拟仿真', true, 'N/A', false, now(), 'system', now(), 'system');
drop table if exists lcc_bas_container;
create table lcc_bas_container
(
env_id bigint not null comment '环境ID',
lpn varchar(50) not null comment '容器条码',
container_type varchar(20) not null comment '容器类型',
is_active boolean not null default true comment '是否激活',
create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (env_id, lpn)
) comment '容器信息';
drop table if exists lcc_bas_executor;
create table lcc_bas_executor
(
env_id bigint not null comment '环境ID',
executor_id varchar(50) not null comment '执行器ID',
virtual_floor_code varchar(50) not null comment '仿真车所在楼层',
virtual_location_at varchar(50) not null comment '仿真车所在XYZ',
virtual_executor_payload varchar(3000) not null default 'N/A' comment '仿真车配置详情',
is_active boolean not null default true comment '是否激活',
create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (env_id, executor_id)
) comment '执行器信息';
drop table if exists lcc_bas_location;
create table lcc_bas_location
(
env_id bigint not null comment '环境ID',
loc_code varchar(50) not null comment '位置编码',
loc_type varchar(20) not null comment '位置类型_gstore_rack_executor',
way_point varchar(50) not null comment '路径点编码',
loc_direction varchar(10) not null comment '货位相对于路径方向',
rack varchar(50) not null comment '位置编码',
bay integer not null default '0' comment '货架列',
level integer not null default '0' comment '货架层',
cell integer not null default '0' comment '货架格',
is_lock tinyint not null default '0' comment '是否锁定',
is_frozen tinyint not null default '0' comment '是否冻结',
create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (env_id, loc_code)
) comment '库存位置';
drop table if exists lcc_inv_lpn;
create table lcc_inv_lpn
(
env_id bigint not null comment '环境ID',
lpn varchar(50) not null comment '托盘条码',
loc_code varchar(50) not null comment '库存位置',
layer_index integer not null comment '堆叠层号从0开始',
qty integer not null comment '库存数量',
qty_in integer not null comment '入库占用数量',
qty_out integer not null comment '出库占用数量',
create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (env_id, lpn, loc_code)
) comment '库存';
drop table if exists lcc_inv_ledger;
create table lcc_inv_ledger
(
env_id bigint not null comment '环境ID',
biz_task_id bigint not null comment '业务单据ID',
ledger_id bigint not null comment '账页号',
ledger_type varchar(20) not null comment '账页类型',
ledger_remark varchar(200) not null comment '账页原因',
lpn varchar(50) not null comment '托盘条码',
loc_code_before varchar(50) not null comment '改变前库存位置',
layer_index_before integer not null comment '改变前堆叠层号从0开始',
qty_before integer not null comment '改变前库存数量',
qty_in_before integer not null comment '改变前入库占用数量',
qty_out_before integer not null comment '改变前出库占用数量',
layer_index integer not null comment '改变后堆叠层号从0开始',
loc_code varchar(50) not null comment '改变前库存位置',
qty integer not null comment '改变后库存数量',
qty_in integer not null comment '改变后入库占用数量',
qty_out integer not null comment '改变后出库占用数量',
create_at timestamp not null comment '创建时间',
create_by varchar(50) not null comment '创建人',
update_at timestamp null comment '更新时间',
update_by varchar(50) null comment '更新人',
primary key (env_id, ledger_id)
) comment '库存账页';
```

Loading…
Cancel
Save