条码清单
This commit is contained in:
parent
702defea73
commit
545bb41089
@ -391,3 +391,34 @@ create table wm_issue_line (
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 12、条码清单表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_barcode;
|
||||||
|
create table wm_barcode (
|
||||||
|
barcode_id bigint(20) not null auto_increment comment '条码ID',
|
||||||
|
barcode_formart varchar(64) not null comment '条码格式',
|
||||||
|
barcode_type varchar(64) not null comment '条码类型',
|
||||||
|
barcode_content varchar(255) not null comment '产品物料ID',
|
||||||
|
url varchar(255) comment '条码地址',
|
||||||
|
enable_flag char(1) default 'Y' 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 (barcode_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '条码清单表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
116
ktg-mes/src/main/resources/mapper/wm/WmBarcodeMapper.xml
Normal file
116
ktg-mes/src/main/resources/mapper/wm/WmBarcodeMapper.xml
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ktg.mes.wm.mapper.WmBarcodeMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmBarcode" id="WmBarcodeResult">
|
||||||
|
<result property="barcodeId" column="barcode_id" />
|
||||||
|
<result property="barcodeFormart" column="barcode_formart" />
|
||||||
|
<result property="barcodeType" column="barcode_type" />
|
||||||
|
<result property="barcodeContent" column="barcode_content" />
|
||||||
|
<result property="url" column="url" />
|
||||||
|
<result property="enableFlag" column="enable_flag" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmBarcodeVo">
|
||||||
|
select barcode_id, barcode_formart, barcode_type, barcode_content, url, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_barcode
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmBarcodeList" parameterType="WmBarcode" resultMap="WmBarcodeResult">
|
||||||
|
<include refid="selectWmBarcodeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''"> and barcode_formart = #{barcodeFormart}</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''"> and barcode_type = #{barcodeType}</if>
|
||||||
|
<if test="barcodeContent != null and barcodeContent != ''"> and barcode_content = #{barcodeContent}</if>
|
||||||
|
<if test="url != null and url != ''"> and url = #{url}</if>
|
||||||
|
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||||
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||||
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||||
|
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||||
|
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmBarcodeByBarcodeId" parameterType="Long" resultMap="WmBarcodeResult">
|
||||||
|
<include refid="selectWmBarcodeVo"/>
|
||||||
|
where barcode_id = #{barcodeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmBarcode" parameterType="WmBarcode" useGeneratedKeys="true" keyProperty="barcodeId">
|
||||||
|
insert into wm_barcode
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''">barcode_formart,</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">barcode_type,</if>
|
||||||
|
<if test="barcodeContent != null and barcodeContent != ''">barcode_content,</if>
|
||||||
|
<if test="url != null">url,</if>
|
||||||
|
<if test="enableFlag != null">enable_flag,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''">#{barcodeFormart},</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">#{barcodeType},</if>
|
||||||
|
<if test="barcodeContent != null and barcodeContent != ''">#{barcodeContent},</if>
|
||||||
|
<if test="url != null">#{url},</if>
|
||||||
|
<if test="enableFlag != null">#{enableFlag},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmBarcode" parameterType="WmBarcode">
|
||||||
|
update wm_barcode
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="barcodeFormart != null and barcodeFormart != ''">barcode_formart = #{barcodeFormart},</if>
|
||||||
|
<if test="barcodeType != null and barcodeType != ''">barcode_type = #{barcodeType},</if>
|
||||||
|
<if test="barcodeContent != null and barcodeContent != ''">barcode_content = #{barcodeContent},</if>
|
||||||
|
<if test="url != null">url = #{url},</if>
|
||||||
|
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where barcode_id = #{barcodeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmBarcodeByBarcodeId" parameterType="Long">
|
||||||
|
delete from wm_barcode where barcode_id = #{barcodeId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmBarcodeByBarcodeIds" parameterType="String">
|
||||||
|
delete from wm_barcode where barcode_id in
|
||||||
|
<foreach item="barcodeId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{barcodeId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user