条码打印相关功能
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
<?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.ruoyi.bas.traycodeformat.mapper.BasTraycodeFormatMapper">
|
||||
|
||||
<resultMap type="BasTraycodeFormat" id="BasTraycodeFormatResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="barcodeFormat" column="barcode_format" />
|
||||
<result property="serialRule" column="serial_rule" />
|
||||
<result property="serialExample" column="serial_example" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="minNum" column="min_num" />
|
||||
<result property="maxNum" column="max_num" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasTraycodeFormatVo">
|
||||
select id, barcode_format, serial_rule, serial_example, remarks, min_num, max_num, create_time, update_time, spare1, spare2, spare3 from bas_traycode_format
|
||||
</sql>
|
||||
|
||||
<select id="selectBasTraycodeFormatList" parameterType="BasTraycodeFormat" resultMap="BasTraycodeFormatResult">
|
||||
<include refid="selectBasTraycodeFormatVo"/>
|
||||
<where>
|
||||
<if test="barcodeFormat != null and barcodeFormat != ''"> and barcode_format = #{barcodeFormat}</if>
|
||||
<if test="serialRule != null and serialRule != ''"> and serial_rule = #{serialRule}</if>
|
||||
<if test="serialExample != null and serialExample != ''"> and serial_example = #{serialExample}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
<if test="minNum != null "> and min_num = #{minNum}</if>
|
||||
<if test="maxNum != null "> and max_num = #{maxNum}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasTraycodeFormatById" parameterType="Long" resultMap="BasTraycodeFormatResult">
|
||||
<include refid="selectBasTraycodeFormatVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTraycodeFormat" parameterType="BasTraycodeFormat">
|
||||
insert into bas_traycode_format
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="barcodeFormat != null">barcode_format,</if>
|
||||
<if test="serialRule != null">serial_rule,</if>
|
||||
<if test="serialExample != null">serial_example,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
<if test="minNum != null">min_num,</if>
|
||||
<if test="maxNum != null">max_num,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="barcodeFormat != null">#{barcodeFormat},</if>
|
||||
<if test="serialRule != null">#{serialRule},</if>
|
||||
<if test="serialExample != null">#{serialExample},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
<if test="minNum != null">#{minNum},</if>
|
||||
<if test="maxNum != null">#{maxNum},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTraycodeFormat" parameterType="BasTraycodeFormat">
|
||||
update bas_traycode_format
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="barcodeFormat != null">barcode_format = #{barcodeFormat},</if>
|
||||
<if test="serialRule != null">serial_rule = #{serialRule},</if>
|
||||
<if test="serialExample != null">serial_example = #{serialExample},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
<if test="minNum != null">min_num = #{minNum},</if>
|
||||
<if test="maxNum != null">max_num = #{maxNum},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasTraycodeFormatById" parameterType="Long">
|
||||
delete from bas_traycode_format where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasTraycodeFormatByIds" parameterType="String">
|
||||
delete from bas_traycode_format where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?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.ruoyi.bas.traycode.mapper.BasTraycodeMapper">
|
||||
|
||||
<resultMap type="BasTraycode" id="BasTraycodeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formatId" column="format_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasTraycodeVo">
|
||||
select id, format_id, tray_code, create_time, update_time, spare1, spare2, spare3 from bas_traycode
|
||||
</sql>
|
||||
|
||||
<select id="selectBasTraycodeList" parameterType="BasTraycode" resultMap="BasTraycodeResult">
|
||||
<include refid="selectBasTraycodeVo"/>
|
||||
<where>
|
||||
<if test="formatId != null "> and format_id = #{formatId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasTraycodeById" parameterType="Long" resultMap="BasTraycodeResult">
|
||||
<include refid="selectBasTraycodeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTraycode" parameterType="BasTraycode">
|
||||
insert into bas_traycode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="formatId != null">format_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="formatId != null">#{formatId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBasTraycodeList">
|
||||
insert into bas_traycode( format_id, tray_code) values
|
||||
<foreach item="item" collection="list" separator=",">
|
||||
(
|
||||
|
||||
<if test="item.formatId != null">#{item.formatId},</if>
|
||||
<if test="item.trayCode != null">#{item.trayCode}</if>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTraycode" parameterType="BasTraycode">
|
||||
update bas_traycode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formatId != null">format_id = #{formatId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasTraycodeById" parameterType="Long">
|
||||
delete from bas_traycode where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasTraycodeByIds" parameterType="String">
|
||||
delete from bas_traycode where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user