2024-03-01 06:47:57 +00:00
|
|
|
<?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.EmisTmsSiteBatchMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="EmisTmsSiteBatch" id="EmisTmsSiteBatchResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="batchCode" column="batch_code" />
|
|
|
|
|
<result property="batchName" column="batch_name" />
|
|
|
|
|
<result property="batchDate" column="batch_date" />
|
|
|
|
|
<result property="transType" column="trans_type" />
|
|
|
|
|
<result property="startSiteCode" column="start_site_code" />
|
|
|
|
|
<result property="nextSiteCode" column="next_site_code" />
|
|
|
|
|
<result property="airBilllNo" column="air_billl_no" />
|
|
|
|
|
<result property="etd" column="etd" />
|
|
|
|
|
<result property="eta" column="eta" />
|
|
|
|
|
<result property="packNum" column="pack_num" />
|
|
|
|
|
<result property="carNo" column="car_no" />
|
|
|
|
|
<result property="shipNo" column="ship_no" />
|
|
|
|
|
<result property="clearanceResStatus" column="clearance_res_status" />
|
|
|
|
|
<result property="declareResStatus" column="declare_res_status" />
|
2024-03-01 09:13:00 +00:00
|
|
|
<result property="createSiteCode" column="create_site_code" />
|
|
|
|
|
<result property="modifySiteCode" column="modify_site_code" />
|
2024-03-01 06:47:57 +00:00
|
|
|
<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="selectEmisTmsSiteBatchVo">
|
2024-03-01 09:13:00 +00:00
|
|
|
select id, batch_code, batch_name, batch_date, trans_type, start_site_code, next_site_code, air_billl_no, etd, eta, pack_num, car_no, ship_no, clearance_res_status, declare_res_status, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark from emis_tms_site_batch
|
2024-03-01 06:47:57 +00:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisTmsSiteBatchList" parameterType="EmisTmsSiteBatch" resultMap="EmisTmsSiteBatchResult">
|
|
|
|
|
<include refid="selectEmisTmsSiteBatchVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null "> and id = #{id}</if>
|
|
|
|
|
<if test="batchCode != null and batchCode != ''"> and batch_code like concat('%', #{batchCode}, '%')</if>
|
|
|
|
|
<if test="batchName != null and batchName != ''"> and batch_name like concat('%', #{batchName}, '%')</if>
|
|
|
|
|
<if test="batchDate != null and batchDate != ''"> and batch_date like concat('%', #{batchDate}, '%')</if>
|
|
|
|
|
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
|
|
|
|
|
<if test="startSiteCode != null and startSiteCode != ''"> and start_site_code like concat('%', #{startSiteCode}, '%')</if>
|
|
|
|
|
<if test="nextSiteCode != null and nextSiteCode != ''"> and next_site_code like concat('%', #{nextSiteCode}, '%')</if>
|
|
|
|
|
<if test="airBilllNo != null and airBilllNo != ''"> and air_billl_no like concat('%', #{airBilllNo}, '%')</if>
|
|
|
|
|
<if test="etd != null and etd != ''"> and etd like concat('%', #{etd}, '%')</if>
|
|
|
|
|
<if test="eta != null and eta != ''"> and eta like concat('%', #{eta}, '%')</if>
|
|
|
|
|
<if test="packNum != null and packNum != ''"> and pack_num like concat('%', #{packNum}, '%')</if>
|
|
|
|
|
<if test="carNo != null and carNo != ''"> and car_no like concat('%', #{carNo}, '%')</if>
|
|
|
|
|
<if test="shipNo != null and shipNo != ''"> and ship_no like concat('%', #{shipNo}, '%')</if>
|
|
|
|
|
<if test="clearanceResStatus != null and clearanceResStatus != ''"> and clearance_res_status like concat('%', #{clearanceResStatus}, '%')</if>
|
|
|
|
|
<if test="declareResStatus != null and declareResStatus != ''"> and declare_res_status like concat('%', #{declareResStatus}, '%')</if>
|
2024-03-01 09:13:00 +00:00
|
|
|
<if test="createSiteCode != null and createSiteCode != ''"> and create_site_code like concat('%', #{createSiteCode}, '%')</if>
|
|
|
|
|
<if test="modifySiteCode != null and modifySiteCode != ''"> and modify_site_code like concat('%', #{modifySiteCode}, '%')</if>
|
2024-03-01 06:47:57 +00:00
|
|
|
<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="selectEmisTmsSiteBatchById" parameterType="Long" resultMap="EmisTmsSiteBatchResult">
|
2024-03-01 09:13:00 +00:00
|
|
|
select id, batch_code, batch_name, batch_date, trans_type, start_site_code, next_site_code, air_billl_no, etd, eta, pack_num, car_no, ship_no, clearance_res_status, declare_res_status, create_site_code, modify_site_code, del_flag, create_by, create_time, update_by, update_time, remark
|
2024-03-01 06:47:57 +00:00
|
|
|
from emis_tms_site_batch a
|
|
|
|
|
where a.id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertEmisTmsSiteBatch" parameterType="EmisTmsSiteBatch">
|
|
|
|
|
insert into emis_tms_site_batch
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
|
<if test="batchCode != null and batchCode != ''">batch_code,</if>
|
|
|
|
|
<if test="batchName != null and batchName != ''">batch_name,</if>
|
|
|
|
|
<if test="batchDate != null and batchDate != ''">batch_date,</if>
|
|
|
|
|
<if test="transType != null and transType != ''">trans_type,</if>
|
|
|
|
|
<if test="startSiteCode != null and startSiteCode != ''">start_site_code,</if>
|
|
|
|
|
<if test="nextSiteCode != null and nextSiteCode != ''">next_site_code,</if>
|
|
|
|
|
<if test="airBilllNo != null and airBilllNo != ''">air_billl_no,</if>
|
|
|
|
|
<if test="etd != null and etd != ''">etd,</if>
|
|
|
|
|
<if test="eta != null and eta != ''">eta,</if>
|
|
|
|
|
<if test="packNum != null and packNum != ''">pack_num,</if>
|
|
|
|
|
<if test="carNo != null and carNo != ''">car_no,</if>
|
|
|
|
|
<if test="shipNo != null and shipNo != ''">ship_no,</if>
|
|
|
|
|
<if test="clearanceResStatus != null and clearanceResStatus != ''">clearance_res_status,</if>
|
|
|
|
|
<if test="declareResStatus != null and declareResStatus != ''">declare_res_status,</if>
|
2024-03-01 09:13:00 +00:00
|
|
|
<if test="createSiteCode != null and createSiteCode != ''">create_site_code,</if>
|
|
|
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code,</if>
|
2024-03-01 06:47:57 +00:00
|
|
|
<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="batchCode != null and batchCode != ''">#{batchCode},</if>
|
|
|
|
|
<if test="batchName != null and batchName != ''">#{batchName},</if>
|
|
|
|
|
<if test="batchDate != null and batchDate != ''">#{batchDate},</if>
|
|
|
|
|
<if test="transType != null and transType != ''">#{transType},</if>
|
|
|
|
|
<if test="startSiteCode != null and startSiteCode != ''">#{startSiteCode},</if>
|
|
|
|
|
<if test="nextSiteCode != null and nextSiteCode != ''">#{nextSiteCode},</if>
|
|
|
|
|
<if test="airBilllNo != null and airBilllNo != ''">#{airBilllNo},</if>
|
|
|
|
|
<if test="etd != null and etd != ''">#{etd},</if>
|
|
|
|
|
<if test="eta != null and eta != ''">#{eta},</if>
|
|
|
|
|
<if test="packNum != null and packNum != ''">#{packNum},</if>
|
|
|
|
|
<if test="carNo != null and carNo != ''">#{carNo},</if>
|
|
|
|
|
<if test="shipNo != null and shipNo != ''">#{shipNo},</if>
|
|
|
|
|
<if test="clearanceResStatus != null and clearanceResStatus != ''">#{clearanceResStatus},</if>
|
|
|
|
|
<if test="declareResStatus != null and declareResStatus != ''">#{declareResStatus},</if>
|
2024-03-01 09:13:00 +00:00
|
|
|
<if test="createSiteCode != null and createSiteCode != ''">#{createSiteCode},</if>
|
|
|
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">#{modifySiteCode},</if>
|
2024-03-01 06:47:57 +00:00
|
|
|
<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="updateEmisTmsSiteBatch" parameterType="EmisTmsSiteBatch">
|
|
|
|
|
update emis_tms_site_batch
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="batchCode != null and batchCode != ''">batch_code = #{batchCode},</if>
|
|
|
|
|
<if test="batchName != null and batchName != ''">batch_name = #{batchName},</if>
|
|
|
|
|
<if test="batchDate != null and batchDate != ''">batch_date = #{batchDate},</if>
|
|
|
|
|
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
|
|
|
|
|
<if test="startSiteCode != null and startSiteCode != ''">start_site_code = #{startSiteCode},</if>
|
|
|
|
|
<if test="nextSiteCode != null and nextSiteCode != ''">next_site_code = #{nextSiteCode},</if>
|
|
|
|
|
<if test="airBilllNo != null and airBilllNo != ''">air_billl_no = #{airBilllNo},</if>
|
|
|
|
|
<if test="etd != null and etd != ''">etd = #{etd},</if>
|
|
|
|
|
<if test="eta != null and eta != ''">eta = #{eta},</if>
|
|
|
|
|
<if test="packNum != null and packNum != ''">pack_num = #{packNum},</if>
|
|
|
|
|
<if test="carNo != null and carNo != ''">car_no = #{carNo},</if>
|
|
|
|
|
<if test="shipNo != null and shipNo != ''">ship_no = #{shipNo},</if>
|
|
|
|
|
<if test="clearanceResStatus != null and clearanceResStatus != ''">clearance_res_status = #{clearanceResStatus},</if>
|
|
|
|
|
<if test="declareResStatus != null and declareResStatus != ''">declare_res_status = #{declareResStatus},</if>
|
2024-03-01 09:13:00 +00:00
|
|
|
<if test="createSiteCode != null and createSiteCode != ''">create_site_code = #{createSiteCode},</if>
|
|
|
|
|
<if test="modifySiteCode != null and modifySiteCode != ''">modify_site_code = #{modifySiteCode},</if>
|
2024-03-01 06:47:57 +00:00
|
|
|
<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="deleteEmisTmsSiteBatchById" parameterType="Long">
|
|
|
|
|
delete from emis_tms_site_batch where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEmisTmsSiteBatchByIds" parameterType="String">
|
|
|
|
|
delete from emis_tms_site_batch where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|