156 lines
9.3 KiB
XML
156 lines
9.3 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.EmisTmsSiteBatchLogMapper">
|
||
|
|
|
||
|
|
<resultMap type="EmisTmsSiteBatchLog" id="EmisTmsSiteBatchLogResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="batchNo" column="batch_no" />
|
||
|
|
<result property="opType" column="op_type" />
|
||
|
|
<result property="opDate" column="op_date" />
|
||
|
|
<result property="opManCode" column="op_man_code" />
|
||
|
|
<result property="opMan" column="op_man" />
|
||
|
|
<result property="opSiteCode" column="op_site_code" />
|
||
|
|
<result property="opSiteName" column="op_site_name" />
|
||
|
|
<result property="opDesc" column="op_desc" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectEmisTmsSiteBatchLogVo">
|
||
|
|
select id, batch_no, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site from emis_tms_site_batch_log
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectListByBatchNo" parameterType="String" resultMap="EmisTmsSiteBatchLogResult">
|
||
|
|
select id, batch_no, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site
|
||
|
|
from emis_tms_site_batch_log
|
||
|
|
where del_flag='0' and batch_no=#{batchNo}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectEmisTmsSiteBatchLogList" parameterType="EmisTmsSiteBatchLog" resultMap="EmisTmsSiteBatchLogResult">
|
||
|
|
<include refid="selectEmisTmsSiteBatchLogVo"/>
|
||
|
|
<where>
|
||
|
|
del_flag='0'
|
||
|
|
<if test="id != null "> and id = #{id}</if>
|
||
|
|
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
|
||
|
|
<if test="opType != null and opType != ''"> and op_type like concat('%', #{opType}, '%')</if>
|
||
|
|
<if test="opDate != null "> and op_date = #{opDate}</if>
|
||
|
|
<if test="opManCode != null and opManCode != ''"> and op_man_code like concat('%', #{opManCode}, '%')</if>
|
||
|
|
<if test="opMan != null and opMan != ''"> and op_man like concat('%', #{opMan}, '%')</if>
|
||
|
|
<if test="opSiteCode != null and opSiteCode != ''"> and op_site_code like concat('%', #{opSiteCode}, '%')</if>
|
||
|
|
<if test="opSiteName != null and opSiteName != ''"> and op_site_name like concat('%', #{opSiteName}, '%')</if>
|
||
|
|
<if test="opDesc != null and opDesc != ''"> and op_desc like concat('%', #{opDesc}, '%')</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</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="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||
|
|
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||
|
|
</where>
|
||
|
|
order by create_time desc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="checkUnique" parameterType="EmisTmsSiteBatchLog" resultType="int">
|
||
|
|
select count(1) from emis_tms_site_batch_log
|
||
|
|
where del_flag='0'
|
||
|
|
and id = #{id}
|
||
|
|
and batch_no = #{batchNo}
|
||
|
|
and op_type = #{opType}
|
||
|
|
and op_date = #{opDate}
|
||
|
|
and op_man_code = #{opManCode}
|
||
|
|
and op_man = #{opMan}
|
||
|
|
and op_site_code = #{opSiteCode}
|
||
|
|
and op_site_name = #{opSiteName}
|
||
|
|
and op_desc = #{opDesc}
|
||
|
|
and del_flag = #{delFlag}
|
||
|
|
and remark = #{remark}
|
||
|
|
and create_by = #{createBy}
|
||
|
|
and create_time = #{createTime}
|
||
|
|
and update_by = #{updateBy}
|
||
|
|
and update_time = #{updateTime}
|
||
|
|
and update_site = #{updateSite}
|
||
|
|
and create_site = #{createSite}
|
||
|
|
limit 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectEmisTmsSiteBatchLogById" parameterType="Long" resultMap="EmisTmsSiteBatchLogResult">
|
||
|
|
select id, batch_no, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site
|
||
|
|
from emis_tms_site_batch_log a
|
||
|
|
where a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertEmisTmsSiteBatchLog" parameterType="EmisTmsSiteBatchLog" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into emis_tms_site_batch_log
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="batchNo != null and batchNo != ''">batch_no,</if>
|
||
|
|
<if test="opType != null and opType != ''">op_type,</if>
|
||
|
|
<if test="opDate != null">op_date,</if>
|
||
|
|
<if test="opManCode != null and opManCode != ''">op_man_code,</if>
|
||
|
|
<if test="opMan != null and opMan != ''">op_man,</if>
|
||
|
|
<if test="opSiteCode != null and opSiteCode != ''">op_site_code,</if>
|
||
|
|
<if test="opSiteName != null and opSiteName != ''">op_site_name,</if>
|
||
|
|
<if test="opDesc != null and opDesc != ''">op_desc,</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||
|
|
<if test="remark != null and remark != ''">remark,</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="updateSite != null and updateSite != ''">update_site,</if>
|
||
|
|
<if test="createSite != null and createSite != ''">create_site,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="batchNo != null and batchNo != ''">#{batchNo},</if>
|
||
|
|
<if test="opType != null and opType != ''">#{opType},</if>
|
||
|
|
<if test="opDate != null">#{opDate},</if>
|
||
|
|
<if test="opManCode != null and opManCode != ''">#{opManCode},</if>
|
||
|
|
<if test="opMan != null and opMan != ''">#{opMan},</if>
|
||
|
|
<if test="opSiteCode != null and opSiteCode != ''">#{opSiteCode},</if>
|
||
|
|
<if test="opSiteName != null and opSiteName != ''">#{opSiteName},</if>
|
||
|
|
<if test="opDesc != null and opDesc != ''">#{opDesc},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||
|
|
<if test="remark != null and remark != ''">#{remark},</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="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateEmisTmsSiteBatchLog" parameterType="EmisTmsSiteBatchLog">
|
||
|
|
update emis_tms_site_batch_log
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="batchNo != null and batchNo != ''">batch_no = #{batchNo},</if>
|
||
|
|
<if test="opType != null and opType != ''">op_type = #{opType},</if>
|
||
|
|
<if test="opDate != null">op_date = #{opDate},</if>
|
||
|
|
<if test="opManCode != null and opManCode != ''">op_man_code = #{opManCode},</if>
|
||
|
|
<if test="opMan != null and opMan != ''">op_man = #{opMan},</if>
|
||
|
|
<if test="opSiteCode != null and opSiteCode != ''">op_site_code = #{opSiteCode},</if>
|
||
|
|
<if test="opSiteName != null and opSiteName != ''">op_site_name = #{opSiteName},</if>
|
||
|
|
<if test="opDesc != null and opDesc != ''">op_desc = #{opDesc},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||
|
|
<if test="remark != null and remark != ''">remark = #{remark},</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="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||
|
|
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteEmisTmsSiteBatchLogById" parameterType="Long">
|
||
|
|
delete from emis_tms_site_batch_log where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteEmisTmsSiteBatchLogByIds" parameterType="String">
|
||
|
|
delete from emis_tms_site_batch_log where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|