131 lines
8.5 KiB
XML
131 lines
8.5 KiB
XML
<?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.xdadan.erp.emis.mapper.EmisTmsScanPicInfoMapper">
|
|
|
|
<resultMap type="EmisTmsScanPicInfo" id="EmisTmsScanPicInfoResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
|
<result property="id" column="id" />
|
|
<result property="billCode" column="bill_code" />
|
|
<result property="scanType" column="scan_type" />
|
|
<result property="picType" column="pic_type" />
|
|
<result property="picUrl" column="pic_url" />
|
|
<result property="scanDate" column="scan_date" />
|
|
<result property="scanManCode" column="scan_man_code" />
|
|
<result property="scanManPhone" column="scan_man_phone" />
|
|
<result property="scanSite" column="scan_site" />
|
|
<result property="scanSiteCode" column="scan_site_code" />
|
|
<result property="orderNum" column="order_num" />
|
|
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisTmsScanPicInfoVo">
|
|
select id, bill_code, scan_type, pic_type, pic_url, scan_date, scan_man_code, scan_man_phone, scan_site, scan_site_code, order_num, del_flag, create_by, create_time, update_by, update_time, remark from emis_tms_scan_pic_info
|
|
</sql>
|
|
|
|
<select id="selectEmisTmsScanPicInfoList" parameterType="EmisTmsScanPicInfo" resultMap="EmisTmsScanPicInfoResult">
|
|
<include refid="selectEmisTmsScanPicInfoVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
|
|
<if test="scanType != null and scanType != ''"> and scan_type like concat('%', #{scanType}, '%')</if>
|
|
<if test="picType != null and picType != ''"> and pic_type like concat('%', #{picType}, '%')</if>
|
|
<if test="picUrl != null and picUrl != ''"> and pic_url like concat('%', #{picUrl}, '%')</if>
|
|
<if test="scanDate != null and scanDate != ''"> and scan_date like concat('%', #{scanDate}, '%')</if>
|
|
<if test="scanManCode != null and scanManCode != ''"> and scan_man_code like concat('%', #{scanManCode}, '%')</if>
|
|
<if test="scanManPhone != null and scanManPhone != ''"> and scan_man_phone like concat('%', #{scanManPhone}, '%')</if>
|
|
<if test="scanSite != null and scanSite != ''"> and scan_site like concat('%', #{scanSite}, '%')</if>
|
|
<if test="scanSiteCode != null and scanSiteCode != ''"> and scan_site_code like concat('%', #{scanSiteCode}, '%')</if>
|
|
<if test="orderNum != null and orderNum != ''"> and order_num like concat('%', #{orderNum}, '%')</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>
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectEmisTmsScanPicInfoById" parameterType="Long" resultMap="EmisTmsScanPicInfoResult">
|
|
select id, bill_code, scan_type, pic_type, pic_url, scan_date, scan_man_code, scan_man_phone, scan_site, scan_site_code, order_num, del_flag, create_by, create_time, update_by, update_time, remark
|
|
from emis_tms_scan_pic_info a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisTmsScanPicInfo" parameterType="EmisTmsScanPicInfo">
|
|
insert into emis_tms_scan_pic_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="billCode != null and billCode != ''">bill_code,</if>
|
|
<if test="scanType != null and scanType != ''">scan_type,</if>
|
|
<if test="picType != null and picType != ''">pic_type,</if>
|
|
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
|
<if test="scanDate != null and scanDate != ''">scan_date,</if>
|
|
<if test="scanManCode != null and scanManCode != ''">scan_man_code,</if>
|
|
<if test="scanManPhone != null and scanManPhone != ''">scan_man_phone,</if>
|
|
<if test="scanSite != null and scanSite != ''">scan_site,</if>
|
|
<if test="scanSiteCode != null and scanSiteCode != ''">scan_site_code,</if>
|
|
<if test="orderNum != null and orderNum != ''">order_num,</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
|
<if test="scanType != null and scanType != ''">#{scanType},</if>
|
|
<if test="picType != null and picType != ''">#{picType},</if>
|
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
|
<if test="scanDate != null and scanDate != ''">#{scanDate},</if>
|
|
<if test="scanManCode != null and scanManCode != ''">#{scanManCode},</if>
|
|
<if test="scanManPhone != null and scanManPhone != ''">#{scanManPhone},</if>
|
|
<if test="scanSite != null and scanSite != ''">#{scanSite},</if>
|
|
<if test="scanSiteCode != null and scanSiteCode != ''">#{scanSiteCode},</if>
|
|
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisTmsScanPicInfo" parameterType="EmisTmsScanPicInfo">
|
|
update emis_tms_scan_pic_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
|
<if test="scanType != null and scanType != ''">scan_type = #{scanType},</if>
|
|
<if test="picType != null and picType != ''">pic_type = #{picType},</if>
|
|
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</if>
|
|
<if test="scanDate != null and scanDate != ''">scan_date = #{scanDate},</if>
|
|
<if test="scanManCode != null and scanManCode != ''">scan_man_code = #{scanManCode},</if>
|
|
<if test="scanManPhone != null and scanManPhone != ''">scan_man_phone = #{scanManPhone},</if>
|
|
<if test="scanSite != null and scanSite != ''">scan_site = #{scanSite},</if>
|
|
<if test="scanSiteCode != null and scanSiteCode != ''">scan_site_code = #{scanSiteCode},</if>
|
|
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteEmisTmsScanPicInfoById" parameterType="Long">
|
|
delete from emis_tms_scan_pic_info where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisTmsScanPicInfoByIds" parameterType="String">
|
|
delete from emis_tms_scan_pic_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |