101 lines
5.4 KiB
XML
101 lines
5.4 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.EmisTmsSiteBatchDtlMapper">
|
|
|
|
<resultMap type="EmisTmsSiteBatchDtl" id="EmisTmsSiteBatchDtlResult">
|
|
<result property="id" column="id" />
|
|
<result property="batchId" column="batch_id" />
|
|
<result property="waybillId" column="waybill_id" />
|
|
<result property="billCode" column="bill_code" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisTmsSiteBatchDtlVo">
|
|
select id, batch_id, waybill_id, bill_code, del_flag, create_by, create_time, update_by, update_time, remark from emis_tms_site_batch_dtl
|
|
</sql>
|
|
|
|
<select id="selectEmisTmsSiteBatchDtlList" parameterType="EmisTmsSiteBatchDtl" resultMap="EmisTmsSiteBatchDtlResult">
|
|
<include refid="selectEmisTmsSiteBatchDtlVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="batchId != null "> and batch_id = #{batchId}</if>
|
|
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
|
<if test="billCode != null "> and bill_code = #{billCode}</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="selectEmisTmsSiteBatchDtlById" parameterType="Long" resultMap="EmisTmsSiteBatchDtlResult">
|
|
select id, batch_id, waybill_id, bill_code, del_flag, create_by, create_time, update_by, update_time, remark
|
|
from emis_tms_site_batch_dtl a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisTmsSiteBatchDtl" parameterType="EmisTmsSiteBatchDtl">
|
|
insert into emis_tms_site_batch_dtl
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="batchId != null">batch_id,</if>
|
|
<if test="waybillId != null">waybill_id,</if>
|
|
<if test="billCode != null">bill_code,</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="batchId != null">#{batchId},</if>
|
|
<if test="waybillId != null">#{waybillId},</if>
|
|
<if test="billCode != null">#{billCode},</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="updateEmisTmsSiteBatchDtl" parameterType="EmisTmsSiteBatchDtl">
|
|
update emis_tms_site_batch_dtl
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="batchId != null">batch_id = #{batchId},</if>
|
|
<if test="waybillId != null">waybill_id = #{waybillId},</if>
|
|
<if test="billCode != null">bill_code = #{billCode},</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="deleteEmisTmsSiteBatchDtlById" parameterType="Long">
|
|
delete from emis_tms_site_batch_dtl where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisTmsSiteBatchDtlByIds" parameterType="String">
|
|
delete from emis_tms_site_batch_dtl where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |