|
@@ -0,0 +1,217 @@
|
|
|
+
|
|
|
+create database if not exists wms_data default charset utf8 collate utf8_general_ci;
|
|
|
+
|
|
|
+use wms_data;
|
|
|
+
|
|
|
+create table acq_car_load
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ car_no varchar(20) null comment '车牌号',
|
|
|
+ urm_no varchar(32) null comment '核放单号',
|
|
|
+ bill_no varchar(50) null comment '出入仓单号',
|
|
|
+ form_no varchar(32) null comment '报关申请单号',
|
|
|
+ load_type varchar(2) null comment '装卸货类型 I:装货 E:卸货',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ load_time datetime null comment '装卸货时间',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '在途货物表'
|
|
|
+engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_goods_ie
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ car_no varchar(20) null comment '车牌号',
|
|
|
+ i_e_type varchar(2) null comment '出入类型 I:入 E:出',
|
|
|
+ urm_no varchar(32) null comment '核放单号',
|
|
|
+ form_no varchar(32) null comment '报关申请单号',
|
|
|
+ bill_no varchar(50) null comment '出入仓单号',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ i_e_time datetime null comment '出入仓时间',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '货物进出表'
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_goods_move
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ shelf_load_time datetime null comment '货物上架时间',
|
|
|
+ shelf_unload_time datetime null comment '货物下架时间',
|
|
|
+ target_seat_no varchar(50) null comment '目标库位代码',
|
|
|
+ origin_seat_no varchar(50) null comment '原库位代码',
|
|
|
+ goods_name varchar(255) null comment '商品名称',
|
|
|
+ code_ts varchar(30) null comment '商品编码',
|
|
|
+ sku_no varchar(50) null comment '商品SKU',
|
|
|
+ goods_id varchar(50) null comment '商品料件号',
|
|
|
+ g_unit varchar(10) null comment '申报单位',
|
|
|
+ g_qyt decimal(19, 5) null comment '申报数量',
|
|
|
+ legal_unit varchar(10) null comment '法定单位',
|
|
|
+ legal_qyt decimal(19, 5) null comment '法定数量',
|
|
|
+ goods_model varchar(500) null comment '规格型号',
|
|
|
+ local_ems_no varchar(20) null comment '园区账册号',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '货物仓库移动信息'
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_goods_on_seat
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '内部序号'
|
|
|
+ primary key,
|
|
|
+ seat_no varchar(32) null comment '库位代码',
|
|
|
+ goods_name varchar(255) null comment '商品名称',
|
|
|
+ code_ts varchar(30) null comment '商品编码',
|
|
|
+ form_no_dec varchar(32) null comment '报关单号',
|
|
|
+ form_no varchar(32) null comment '报关申请单号',
|
|
|
+ sku_no varchar(50) null comment '商品SKU',
|
|
|
+ goods_id varchar(50) null comment '商品料件号',
|
|
|
+ g_unit varchar(10) null comment '申报单位',
|
|
|
+ g_qyt decimal(19, 5) null comment '申报数量',
|
|
|
+ legal_unit varchar(10) null comment '法定单位',
|
|
|
+ legal_qyt decimal(19, 5) null comment '法定数量',
|
|
|
+ goods_model varchar(500) null comment '规格型号',
|
|
|
+ local_ems_no varchar(20) null comment '园区账册号',
|
|
|
+ owner_code varchar(10) null comment '货主企业海关编码',
|
|
|
+ owner_name varchar(255) null comment '货主企业名称',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '库位货物信息'
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_inventory_info
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ goods_name varchar(255) null comment '商品名称',
|
|
|
+ code_ts varchar(30) null comment '商品编码',
|
|
|
+ sku_no varchar(50) null comment '商品SKU',
|
|
|
+ goods_id varchar(50) null comment '商品料件号',
|
|
|
+ g_unit varchar(10) null comment '申报单位',
|
|
|
+ g_qyt decimal(19, 5) null comment '申报数量',
|
|
|
+ legal_unit varchar(10) null comment '法定单位',
|
|
|
+ legal_qyt decimal(19, 5) null comment '法定数量',
|
|
|
+ goods_model varchar(500) null comment '规格型号',
|
|
|
+ local_ems_no varchar(20) null comment '园区账册号',
|
|
|
+ owner_code varchar(10) null comment '货主企业海关编码',
|
|
|
+ owner_name varchar(255) null comment '货主企业名称',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_shelf_load
|
|
|
+(
|
|
|
+ id varchar(20) not null comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ goods_name varchar(255) null comment '商品名称',
|
|
|
+ code_ts varchar(30) null comment '商品编码',
|
|
|
+ form_no_dec varchar(32) null comment '报关单号',
|
|
|
+ form_no varchar(32) null comment '报关申请单号',
|
|
|
+ sku_no varchar(50) null comment '商品SKU',
|
|
|
+ goods_id varchar(50) null comment '商品料件号',
|
|
|
+ g_unit varchar(10) null comment '申报单位',
|
|
|
+ g_qyt decimal(19, 5) null comment '申报数量',
|
|
|
+ legal_unit varchar(10) null comment '法定单位',
|
|
|
+ legal_qyt decimal(19, 5) null comment '法定数量',
|
|
|
+ goods_model varchar(500) null comment '规格型号',
|
|
|
+ local_ems_no varchar(20) null comment '园区账册号',
|
|
|
+ seat_no varchar(32) null comment '库位代码',
|
|
|
+ shelf_load_time datetime null comment '上下架时间',
|
|
|
+ shelf_load_type varchar(2) null comment '上下架类型,I:上架 E:下架',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ store_code varchar(50) null comment '仓库编码',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '货物上下架信息'
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table acq_sku_part_ref
|
|
|
+(
|
|
|
+ id bigint auto_increment comment '库存内部序号'
|
|
|
+ primary key,
|
|
|
+ sku_no varchar(50) null comment '商品SKU',
|
|
|
+ goods_id varchar(50) null comment '商品料件号',
|
|
|
+ code_ts varchar(30) null comment '商品编码',
|
|
|
+ goods_name varchar(255) null comment '商品名称',
|
|
|
+ goods_model varchar(500) null comment '规格型号',
|
|
|
+ goods_id_unit varchar(10) null comment '商品料件号对应计量单位',
|
|
|
+ goods_id_unit_name varchar(255) null comment '商品料件号对应计量单位中文名称',
|
|
|
+ sku_unit varchar(10) null comment '商品SKU对应计量单位',
|
|
|
+ sku_unit_name varchar(255) null comment '商品SKU对应计量单位代码名称',
|
|
|
+ ratio varchar(10) null comment '商品SKU对应商品料件号数量换算比例 如"2:1" "3:1"',
|
|
|
+ store_company_name varchar(255) null comment '仓库使用企业名称',
|
|
|
+ store_usc_code varchar(18) null comment '仓库使用企业社会信用代码',
|
|
|
+ store_customs_code varchar(10) null comment '仓库使用企业海关编码',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ unit_1 varchar(10) null,
|
|
|
+ unit_2 varchar(10) null,
|
|
|
+ store_code varchar(50) null,
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|
|
|
+create table emt_record_time
|
|
|
+(
|
|
|
+ data_type varchar(64) default '' not null comment '数据类型,00:货物库存,01_01:货物上下架_上架,01_02:货物上下架_退港,01_03:货物上下架_正常拣货,02:货物库位移动,03:库位货物'
|
|
|
+ primary key,
|
|
|
+ last_time varchar(36) null comment '上次时间',
|
|
|
+ this_time varchar(36) null comment '本次时间',
|
|
|
+ creater_sn varchar(22) null comment '创建人编号',
|
|
|
+ create_time datetime null comment '创建时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ moder_sn varchar(22) null comment '修改人编号',
|
|
|
+ mod_time datetime null comment '修改时间,yyyy-MM-dd HH:mm:ss',
|
|
|
+ tstm timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '时间戳'
|
|
|
+)
|
|
|
+ comment '扫描时间'
|
|
|
+ engine=InnoDB default charset=utf8 collate=utf8_general_ci;
|
|
|
+
|