SN生成
This commit is contained in:
parent
a071a40a89
commit
862378d479
@ -343,27 +343,28 @@ create table md_product_sop (
|
|||||||
) engine=innodb auto_increment=200 comment = '产品SOP表';
|
) engine=innodb auto_increment=200 comment = '产品SOP表';
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `md_product_sip`;
|
-- ----------------------------
|
||||||
CREATE TABLE `md_product_sip` (
|
-- 12、产品SIP表
|
||||||
`sip_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
|
-- ----------------------------
|
||||||
`item_id` bigint(0) NOT NULL COMMENT '物料产品ID',
|
drop table if exists md_product_sip;
|
||||||
`order_num` int(0) NULL DEFAULT NULL COMMENT '排列顺序',
|
create table md_product_sip (
|
||||||
`process_id` bigint(0) NULL DEFAULT NULL COMMENT '对应的工序',
|
sip_id bigint(20) not null auto_increment comment '记录ID',
|
||||||
`process_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工序编号',
|
item_id bigint(20) not null comment '物料产品ID',
|
||||||
`process_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工序名称',
|
order_num int(4) comment '排列顺序',
|
||||||
`sip_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '标题',
|
process_id bigint(20) comment '对应的工序',
|
||||||
`sip_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '详细描述',
|
process_code varchar(64) comment '工序编号',
|
||||||
`sip_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片地址',
|
process_name varchar(255) comment '工序名称',
|
||||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '备注',
|
sip_title varchar(255) comment '标题',
|
||||||
`attr1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段1',
|
sip_description varchar(500) comment '详细描述',
|
||||||
`attr2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段2',
|
sip_url varchar(255) comment '图片地址',
|
||||||
`attr3` int(0) NULL DEFAULT 0 COMMENT '预留字段3',
|
remark varchar(500) default '' comment '备注',
|
||||||
`attr4` int(0) NULL DEFAULT 0 COMMENT '预留字段4',
|
attr1 varchar(64) default null comment '预留字段1',
|
||||||
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
|
attr2 varchar(255) default null comment '预留字段2',
|
||||||
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
attr3 int(11) default 0 comment '预留字段3',
|
||||||
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
|
attr4 int(11) default 0 comment '预留字段4',
|
||||||
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
create_by varchar(64) default '' comment '创建者',
|
||||||
PRIMARY KEY (`sip_id`) USING BTREE
|
create_time datetime comment '创建时间',
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '产品SIP表' ROW_FORMAT = Dynamic;
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
primary key (sip_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '产品SIP表';
|
||||||
|
@ -1219,3 +1219,162 @@ create table wm_stock_taking_result (
|
|||||||
update_time datetime comment '更新时间',
|
update_time datetime comment '更新时间',
|
||||||
primary key (result_id)
|
primary key (result_id)
|
||||||
) engine=innodb auto_increment=200 comment = '库存盘点结果表';
|
) engine=innodb auto_increment=200 comment = '库存盘点结果表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 27、外协领料单头表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_outsource_issue;
|
||||||
|
create table wm_outsource_issue (
|
||||||
|
issue_id bigint(20) not null auto_increment comment '领料单ID',
|
||||||
|
issue_code varchar(64) not null comment '领料单编号',
|
||||||
|
issue_name varchar(255) not null comment '领料单名称',
|
||||||
|
workorder_id bigint(20) comment '生产工单ID',
|
||||||
|
workorder_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 '供应商简称',
|
||||||
|
warehouse_id bigint(20) comment '仓库ID',
|
||||||
|
warehouse_code varchar(64) comment '仓库编码',
|
||||||
|
warehouse_name varchar(255) comment '仓库名称',
|
||||||
|
location_id bigint(20) comment '库区ID',
|
||||||
|
location_code varchar(64) comment '库区编码',
|
||||||
|
location_name varchar(255) comment '库区名称',
|
||||||
|
area_id bigint(20) comment '库位ID',
|
||||||
|
area_code varchar(64) comment '库位编码',
|
||||||
|
area_name varchar(255) comment '库位名称',
|
||||||
|
issue_date datetime 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 (issue_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '外协领料单头表';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 28、外协领料单行表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_outsource_issue_line;
|
||||||
|
create table wm_outsource_issue_line (
|
||||||
|
line_id bigint(20) not null auto_increment comment '行ID',
|
||||||
|
issue_id bigint(20) comment '领料单ID',
|
||||||
|
material_stock_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_issued double(12,2) not null comment '领料数量',
|
||||||
|
batch_code varchar(255) comment '领料批次号',
|
||||||
|
warehouse_id bigint(20) comment '仓库ID',
|
||||||
|
warehouse_code varchar(64) comment '仓库编码',
|
||||||
|
warehouse_name varchar(255) comment '仓库名称',
|
||||||
|
location_id bigint(20) comment '库区ID',
|
||||||
|
location_code varchar(64) comment '库区编码',
|
||||||
|
location_name varchar(255) comment '库区名称',
|
||||||
|
area_id bigint(20) comment '库位ID',
|
||||||
|
area_code varchar(64) comment '库位编码',
|
||||||
|
area_name varchar(255) 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 = '外协领料单行表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 29、外协入库单表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_outsource_recpt;
|
||||||
|
create table wm_outsource_recpt (
|
||||||
|
recpt_id bigint(20) not null auto_increment comment '入库单ID',
|
||||||
|
recpt_code varchar(64) not null comment '入库单编号',
|
||||||
|
recpt_name varchar(255) not null comment '入库单名称',
|
||||||
|
iqc_id bigint(20) comment '来料检验单ID',
|
||||||
|
iqc_code varchar(64) comment '来料检验单编号',
|
||||||
|
workorder_id bigint(20) comment '外协工单ID',
|
||||||
|
workorder_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 '供应商简称',
|
||||||
|
warehouse_id bigint(20) comment '仓库ID',
|
||||||
|
warehouse_code varchar(64) comment '仓库编码',
|
||||||
|
warehouse_name varchar(255) comment '仓库名称',
|
||||||
|
location_id bigint(20) comment '库区ID',
|
||||||
|
location_code varchar(64) comment '库区编码',
|
||||||
|
location_name varchar(255) comment '库区名称',
|
||||||
|
area_id bigint(20) comment '库位ID',
|
||||||
|
area_code varchar(64) comment '库位编码',
|
||||||
|
area_name varchar(255) comment '库位名称',
|
||||||
|
recpt_date datetime 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 (recpt_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '外协入库单表';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 30、外协入库单行表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_outsource_recpt_line;
|
||||||
|
create table wm_outsource_recpt_line (
|
||||||
|
line_id bigint(20) not null auto_increment comment '行ID',
|
||||||
|
recpt_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_recived double(12,2) not null comment '入库数量',
|
||||||
|
batch_code varchar(255) comment '入库批次号',
|
||||||
|
warehouse_id bigint(20) comment '仓库ID',
|
||||||
|
warehouse_code varchar(64) comment '仓库编码',
|
||||||
|
warehouse_name varchar(255) comment '仓库名称',
|
||||||
|
location_id bigint(20) comment '库区ID',
|
||||||
|
location_code varchar(64) comment '库区编码',
|
||||||
|
location_name varchar(255) comment '库区名称',
|
||||||
|
area_id bigint(20) comment '库位ID',
|
||||||
|
area_code varchar(64) comment '库位编码',
|
||||||
|
area_name varchar(255) comment '库位名称',
|
||||||
|
expire_date datetime 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 = '外协入库单行表';
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="unitOfMeasure" column="unit_of_measure" />
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
<result property="batchCode" column="batch_code" />
|
<result property="batchCode" column="batch_code" />
|
||||||
<result property="snNum" column="snNum"></result>
|
<result property="snNum" column="snNum"></result>
|
||||||
|
<result property="genDate" column="gen_date"></result>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="attr1" column="attr1" />
|
<result property="attr1" column="attr1" />
|
||||||
<result property="attr2" column="attr2" />
|
<result property="attr2" column="attr2" />
|
||||||
@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectWmSnVo">
|
<sql id="selectWmSnVo">
|
||||||
select sn_id, sn_code, item_id, item_code, item_name, specification, unit_of_measure, batch_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_sn
|
select sn_id, sn_code, item_id, item_code, item_name, specification, unit_of_measure, batch_code,gen_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_sn
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWmSnList" parameterType="WmSn" resultMap="WmSnResult">
|
<select id="selectWmSnList" parameterType="WmSn" resultMap="WmSnResult">
|
||||||
@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null">specification,</if>
|
<if test="specification != null">specification,</if>
|
||||||
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
<if test="batchCode != null">batch_code,</if>
|
<if test="batchCode != null">batch_code,</if>
|
||||||
|
<if test="genDate !=null">gen_date,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="attr1 != null">attr1,</if>
|
<if test="attr1 != null">attr1,</if>
|
||||||
<if test="attr2 != null">attr2,</if>
|
<if test="attr2 != null">attr2,</if>
|
||||||
@ -91,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="specification != null">#{specification},</if>
|
<if test="specification != null">#{specification},</if>
|
||||||
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
<if test="batchCode != null">#{batchCode},</if>
|
<if test="batchCode != null">#{batchCode},</if>
|
||||||
|
<if test="genDate !=null">#{genDate},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="attr1 != null">#{attr1},</if>
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
<if test="attr2 != null">#{attr2},</if>
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user