180 lines
11 KiB
XML
180 lines
11 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.EmisWaybillOperLogMapper">
|
|
|
|
<resultMap type="EmisWaybillOperLog" id="EmisWaybillOperLogResult">
|
|
<result property="id" column="id" />
|
|
<result property="billCode" column="bill_code" />
|
|
<result property="orderSn" column="order_sn" />
|
|
<result property="mainBillCode" column="main_bill_code" />
|
|
<result property="blSubBill" column="bl_sub_bill" />
|
|
<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" />
|
|
<result property="dataFrom" column="data_from" />
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisWaybillOperLogVo">
|
|
select id, bill_code, order_sn, main_bill_code, bl_sub_bill, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, data_from, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site from emis_waybill_oper_log
|
|
</sql>
|
|
|
|
<select id="selectListByMainBillCode" parameterType="String" resultMap="EmisWaybillOperLogResult">
|
|
select id, bill_code, order_sn, main_bill_code, bl_sub_bill, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, data_from, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site
|
|
from emis_waybill_oper_log
|
|
where del_flag='0' and main_bill_code=#{mainBillCode}
|
|
</select>
|
|
|
|
<select id="selectEmisWaybillOperLogList" parameterType="EmisWaybillOperLog" resultMap="EmisWaybillOperLogResult">
|
|
<include refid="selectEmisWaybillOperLogVo"/>
|
|
<where>
|
|
del_flag='0'
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="billCode != null and billCode != ''"> and bill_code=#{billCode}</if>
|
|
<if test="orderSn != null and orderSn != ''"> and order_sn like concat('%', #{orderSn}, '%')</if>
|
|
<if test="mainBillCode != null and mainBillCode != ''"> and main_bill_code=#{mainBillCode}</if>
|
|
<if test="blSubBill != null and blSubBill != ''"> and bl_sub_bill like concat('%', #{blSubBill}, '%')</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="dataFrom != null and dataFrom != ''"> and data_from like concat('%', #{dataFrom}, '%')</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="EmisWaybillOperLog" resultType="int">
|
|
select count(1) from emis_waybill_oper_log
|
|
where del_flag='0'
|
|
and id = #{id}
|
|
and bill_code = #{billCode}
|
|
and order_sn = #{orderSn}
|
|
and main_bill_code = #{mainBillCode}
|
|
and bl_sub_bill = #{blSubBill}
|
|
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 data_from = #{dataFrom}
|
|
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="selectEmisWaybillOperLogById" parameterType="Long" resultMap="EmisWaybillOperLogResult">
|
|
select id, bill_code, order_sn, main_bill_code, bl_sub_bill, op_type, op_date, op_man_code, op_man, op_site_code, op_site_name, op_desc, data_from, del_flag, remark, create_by, create_time, update_by, update_time, update_site, create_site
|
|
from emis_waybill_oper_log a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertEmisWaybillOperLog" parameterType="EmisWaybillOperLog" useGeneratedKeys="true" keyProperty="id">
|
|
insert into emis_waybill_oper_log
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="billCode != null and billCode != ''">bill_code,</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn,</if>
|
|
<if test="mainBillCode != null and mainBillCode != ''">main_bill_code,</if>
|
|
<if test="blSubBill != null and blSubBill != ''">bl_sub_bill,</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="dataFrom != null and dataFrom != ''">data_from,</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="billCode != null and billCode != ''">#{billCode},</if>
|
|
<if test="orderSn != null and orderSn != ''">#{orderSn},</if>
|
|
<if test="mainBillCode != null and mainBillCode != ''">#{mainBillCode},</if>
|
|
<if test="blSubBill != null and blSubBill != ''">#{blSubBill},</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="dataFrom != null and dataFrom != ''">#{dataFrom},</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="updateEmisWaybillOperLog" parameterType="EmisWaybillOperLog">
|
|
update emis_waybill_oper_log
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
|
|
<if test="mainBillCode != null and mainBillCode != ''">main_bill_code = #{mainBillCode},</if>
|
|
<if test="blSubBill != null and blSubBill != ''">bl_sub_bill = #{blSubBill},</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="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</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="deleteEmisWaybillOperLogById" parameterType="Long">
|
|
delete from emis_waybill_oper_log where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisWaybillOperLogByIds" parameterType="String">
|
|
delete from emis_waybill_oper_log where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |