<?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="SKcCrkDzysEmployeesignaturestatusMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSKcCrkDzysEmployeesignaturestatusList" parameterType="pd" resultType="pd">
        select * from s_kc_crk_dzys_employeesignaturestatus where 1=1
        <if test="employeeNumber !=null and employeeNumber !='' ">
            and employeeNumber = #{employeeNumber}
        </if>
        <if test="isSignatureUploaded !=null and isSignatureUploaded !='' ">
            and isSignatureUploaded = #{isSignatureUploaded}
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            and storeCode = #{storeCode}
        </if>
        <if test="receiverEmployeeNumber !=null and receiverEmployeeNumber !='' ">
            and receiverEmployeeNumber = #{receiverEmployeeNumber}
        </if>
        <if test="acceptorEmployeeNumber !=null and acceptorEmployeeNumber !='' ">
            and acceptorEmployeeNumber = #{acceptorEmployeeNumber}
        </if>
    </select>


    <update id="updateSKcCrkDzysEmployeesignaturestatus" parameterType="pd" >
        update s_kc_crk_dzys_employeesignaturestatus
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="employeeNumber !=null and employeeNumber !='' ">
            employeeNumber = #{employeeNumber},
        </if>
        <if test="isSignatureUploaded !=null and isSignatureUploaded !='' ">
            isSignatureUploaded = #{isSignatureUploaded},
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            storeCode = #{storeCode},
        </if>
        <if test="receiverEmployeeNumber !=null and receiverEmployeeNumber !='' ">
            receiverEmployeeNumber = #{receiverEmployeeNumber},
        </if>
        <if test="acceptorEmployeeNumber !=null and acceptorEmployeeNumber !='' ">
            acceptorEmployeeNumber = #{acceptorEmployeeNumber},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SKcCrkDzysEmployeesignaturestatusRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_kc_crk_dzys_employeesignaturestatus where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSKcCrkDzysEmployeesignaturestatus" parameterType="pd" >

        insert into s_kc_crk_dzys_employeesignaturestatus
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="employeeNumber !=null and employeeNumber !='' ">
            employeeNumber,
        </if>
        <if test="isSignatureUploaded !=null and isSignatureUploaded !='' ">
            isSignatureUploaded,
        </if>
        <if test="storeCode !=null and storeCode !='' ">
            storeCode,
        </if>
        <if test="receiverEmployeeNumber !=null and receiverEmployeeNumber !='' ">
            receiverEmployeeNumber,
        </if>
        <if test="acceptorEmployeeNumber !=null and acceptorEmployeeNumber !='' ">
            acceptorEmployeeNumber,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="employeeNumber !=null and employeeNumber !='' ">
             #{employeeNumber},
        </if>
        <if test="isSignatureUploaded !=null and isSignatureUploaded !='' ">
             #{isSignatureUploaded},
        </if>
        <if test="storeCode !=null and storeCode !='' ">
             #{storeCode},
        </if>
        <if test="receiverEmployeeNumber !=null and receiverEmployeeNumber !='' ">
             #{receiverEmployeeNumber},
        </if>
        <if test="acceptorEmployeeNumber !=null and acceptorEmployeeNumber !='' ">
             #{acceptorEmployeeNumber},
        </if>
        </trim>

    </insert>

</mapper>
