|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.xdadan.erp.emis.mapper.EmisPrintTplMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="EmisPrintTpl" id="EmisPrintTplResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="code" column="code" />
|
|
|
|
|
@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="tplEncData" column="tpl_enc_data" />
|
|
|
|
|
<result property="tplPdfData" column="tpl_pdf_data" />
|
|
|
|
|
<result property="tplPicUrl" column="tpl_pic_url" />
|
|
|
|
|
<result property="orderNum" column="order_num" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
@ -28,11 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectEmisPrintTplVo">
|
|
|
|
|
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_enc_data, tpl_pdf_data, tpl_pic_url, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_print_tpl
|
|
|
|
|
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_pdf_data, tpl_pic_url, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_print_tpl
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisPrintTplList" parameterType="EmisPrintTpl" resultMap="EmisPrintTplResult">
|
|
|
|
|
select id, code, name, version, is_public, merch_id, express_type, tpl_pic_url, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_print_tpl
|
|
|
|
|
<include refid="selectEmisPrintTplVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null "> and id = #{id}</if>
|
|
|
|
|
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
|
|
|
|
|
@ -41,6 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="isPublic != null "> and is_public = #{isPublic}</if>
|
|
|
|
|
<if test="merchId != null "> and merch_id = #{merchId}</if>
|
|
|
|
|
<if test="expressType != null and expressType != ''"> and express_type like concat('%', #{expressType}, '%')</if>
|
|
|
|
|
<if test="tplData != null and tplData != ''"> and tpl_data like concat('%', #{tplData}, '%')</if>
|
|
|
|
|
<if test="tplEncData != null and tplEncData != ''"> and tpl_enc_data like concat('%', #{tplEncData}, '%')</if>
|
|
|
|
|
<if test="tplPdfData != null and tplPdfData != ''"> and tpl_pdf_data like concat('%', #{tplPdfData}, '%')</if>
|
|
|
|
|
<if test="tplPicUrl != null and tplPicUrl != ''"> and tpl_pic_url like concat('%', #{tplPicUrl}, '%')</if>
|
|
|
|
|
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
|
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
|
|
|
|
@ -53,13 +59,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectPrintTplListByPrinter" parameterType="EmisPrintTpl" resultMap="EmisPrintTplResult">
|
|
|
|
|
select id, code, name, version,express_type,tpl_enc_data from emis_print_tpl where del_flag='0'
|
|
|
|
|
order by order_num desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisPrintTplById" parameterType="Long" resultMap="EmisPrintTplResult">
|
|
|
|
|
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_enc_data, tpl_pdf_data, tpl_pic_url, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
|
|
|
|
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_enc_data, tpl_pdf_data, tpl_pic_url, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
|
|
|
|
from emis_print_tpl a
|
|
|
|
|
where a.id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertEmisPrintTpl" parameterType="EmisPrintTpl">
|
|
|
|
|
insert into emis_print_tpl
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
@ -74,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="tplEncData != null and tplEncData != ''">tpl_enc_data,</if>
|
|
|
|
|
<if test="tplPdfData != null and tplPdfData != ''">tpl_pdf_data,</if>
|
|
|
|
|
<if test="tplPicUrl != null and tplPicUrl != ''">tpl_pic_url,</if>
|
|
|
|
|
<if test="orderNum != null">order_num,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
@ -83,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''">create_site,</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
|
<if test="code != null and code != ''">#{code},</if>
|
|
|
|
|
@ -96,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="tplEncData != null and tplEncData != ''">#{tplEncData},</if>
|
|
|
|
|
<if test="tplPdfData != null and tplPdfData != ''">#{tplPdfData},</if>
|
|
|
|
|
<if test="tplPicUrl != null and tplPicUrl != ''">#{tplPicUrl},</if>
|
|
|
|
|
<if test="orderNum != null">#{orderNum},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
@ -105,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateEmisPrintTpl" parameterType="EmisPrintTpl">
|
|
|
|
|
@ -121,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="tplEncData != null and tplEncData != ''">tpl_enc_data = #{tplEncData},</if>
|
|
|
|
|
<if test="tplPdfData != null and tplPdfData != ''">tpl_pdf_data = #{tplPdfData},</if>
|
|
|
|
|
<if test="tplPicUrl != null and tplPicUrl != ''">tpl_pic_url = #{tplPicUrl},</if>
|
|
|
|
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
|
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
|
@ -139,7 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEmisPrintTplByIds" parameterType="String">
|
|
|
|
|
delete from emis_print_tpl where id in
|
|
|
|
|
delete from emis_print_tpl where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
|