<?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.sooka.system.mapper.TgjjKjhzbMapper">
    
    <resultMap type="TgjjKjhzb" id="TgjjKjhzbResult">
        <result property="ID"    column="ID"    />
        <result property="ZXBH"    column="ZXBH"    />
        <result property="BBQC"    column="BBQC"    />
        <result property="ZFGJJCK"    column="ZFGJJCK"    />
        <result property="ZZSYCK"    column="ZZSYCK"    />
        <result property="YSLX"    column="YSLX"    />
        <result property="QTYSK"    column="QTYSK"    />
        <result property="WTDK"    column="WTDK"    />
        <result property="GRDK"    column="GRDK"    />
        <result property="XMDK"    column="XMDK"    />
        <result property="YQDK"    column="YQDK"    />
        <result property="GRYQDK"    column="GRYQDK"    />
        <result property="XMYQDK"    column="XMYQDK"    />
        <result property="GJZQ"    column="GJZQ"    />
        <result property="ZFGJJ"    column="ZFGJJ"    />
        <result property="YFLX"    column="YFLX"    />
        <result property="ZXYFK"    column="ZXYFK"    />
        <result property="ZFGJJGLZXGLFY"    column="ZFGJJGLZXGLFY"    />
        <result property="CSLZFJSBCZJZXYF"    column="CSLZFJSBCZJZXYF"    />
        <result property="QTYFK"    column="QTYFK"    />
        <result property="DKFXZB"    column="DKFXZB"    />
        <result property="GRDKFXZB"    column="GRDKFXZB"    />
        <result property="XMDKFXZB"    column="XMDKFXZB"    />
        <result property="ZZSY"    column="ZZSY"    />
        <result property="ZZSYFP"    column="ZZSYFP"    />
        <result property="TQDKFXZB"    column="TQDKFXZB"    />
        <result property="TQGRDKFXZB"    column="TQGRDKFXZB"    />
        <result property="TQXMDKFXZB"    column="TQXMDKFXZB"    />
        <result property="TQGJJZXGLFY"    column="TQGJJZXGLFY"    />
        <result property="CSLZZFJSBCZJ"    column="CSLZZFJSBCZJ"    />
        <result property="DFPZZSY"    column="DFPZZSY"    />
        <result property="YWSR"    column="YWSR"    />
        <result property="ZFGJJLXSR"    column="ZFGJJLXSR"    />
        <result property="ZZSYLXSR"    column="ZZSYLXSR"    />
        <result property="WTDKLXSR"    column="WTDKLXSR"    />
        <result property="GRDKLXSR"    column="GRDKLXSR"    />
        <result property="XMDKLXSR"    column="XMDKLXSR"    />
        <result property="GJZQLXSR"    column="GJZQLXSR"    />
        <result property="QTSR"    column="QTSR"    />
        <result property="GRDKYQFXSR"    column="GRDKYQFXSR"    />
        <result property="XMDKYQFXSR"    column="XMDKYQFXSR"    />
        <result property="YWZC"    column="YWZC"    />
        <result property="ZFGJJLXZC"    column="ZFGJJLXZC"    />
        <result property="ZFGJJGJSXFZC"    column="ZFGJJGJSXFZC"    />
        <result property="WTDKSXFZC"    column="WTDKSXFZC"    />
        <result property="GRDKSXFZC"    column="GRDKSXFZC"    />
        <result property="XMDKSXFZC"    column="XMDKSXFZC"    />
        <result property="XMDKQTZC"    column="XMDKQTZC"    />
        <result property="QTZC"    column="QTZC"    />
        <result property="lastUpdateTime"    column="LAST_UPDATE_TIME"    />
        <result property="CLLX"    column="CLLX"    />
    </resultMap>

    <sql id="selectTgjjKjhzbVo">
        select ID, ZXBH, BBQC, ZFGJJCK, ZZSYCK, YSLX, QTYSK, WTDK, GRDK, XMDK, YQDK, GRYQDK, XMYQDK, GJZQ, ZFGJJ, YFLX, ZXYFK, ZFGJJGLZXGLFY, CSLZFJSBCZJZXYF, QTYFK, DKFXZB, GRDKFXZB, XMDKFXZB, ZZSY, ZZSYFP, TQDKFXZB, TQGRDKFXZB, TQXMDKFXZB, TQGJJZXGLFY, CSLZZFJSBCZJ, DFPZZSY, YWSR, ZFGJJLXSR, ZZSYLXSR, WTDKLXSR, GRDKLXSR, XMDKLXSR, GJZQLXSR, QTSR, GRDKYQFXSR, XMDKYQFXSR, YWZC, ZFGJJLXZC, ZFGJJGJSXFZC, WTDKSXFZC, GRDKSXFZC, XMDKSXFZC, XMDKQTZC, QTZC, LAST_UPDATE_TIME, CLLX from tgjj_kjhzb
    </sql>

    <select id="selectTgjjKjhzbList" parameterType="TgjjKjhzb" resultMap="TgjjKjhzbResult">
        <include refid="selectTgjjKjhzbVo"/>
        <where>  
            <if test="ZXBH != null  and ZXBH != ''"> and ZXBH = #{ZXBH}</if>
            <if test="BBQC != null  and BBQC != ''"> and BBQC = #{BBQC}</if>
            <if test="ZFGJJCK != null "> and ZFGJJCK = #{ZFGJJCK}</if>
            <if test="ZZSYCK != null "> and ZZSYCK = #{ZZSYCK}</if>
            <if test="YSLX != null "> and YSLX = #{YSLX}</if>
            <if test="QTYSK != null "> and QTYSK = #{QTYSK}</if>
            <if test="WTDK != null "> and WTDK = #{WTDK}</if>
            <if test="GRDK != null "> and GRDK = #{GRDK}</if>
            <if test="XMDK != null "> and XMDK = #{XMDK}</if>
            <if test="YQDK != null "> and YQDK = #{YQDK}</if>
            <if test="GRYQDK != null "> and GRYQDK = #{GRYQDK}</if>
            <if test="XMYQDK != null "> and XMYQDK = #{XMYQDK}</if>
            <if test="GJZQ != null "> and GJZQ = #{GJZQ}</if>
            <if test="ZFGJJ != null "> and ZFGJJ = #{ZFGJJ}</if>
            <if test="YFLX != null "> and YFLX = #{YFLX}</if>
            <if test="ZXYFK != null "> and ZXYFK = #{ZXYFK}</if>
            <if test="ZFGJJGLZXGLFY != null "> and ZFGJJGLZXGLFY = #{ZFGJJGLZXGLFY}</if>
            <if test="CSLZFJSBCZJZXYF != null "> and CSLZFJSBCZJZXYF = #{CSLZFJSBCZJZXYF}</if>
            <if test="QTYFK != null "> and QTYFK = #{QTYFK}</if>
            <if test="DKFXZB != null "> and DKFXZB = #{DKFXZB}</if>
            <if test="GRDKFXZB != null "> and GRDKFXZB = #{GRDKFXZB}</if>
            <if test="XMDKFXZB != null "> and XMDKFXZB = #{XMDKFXZB}</if>
            <if test="ZZSY != null "> and ZZSY = #{ZZSY}</if>
            <if test="ZZSYFP != null "> and ZZSYFP = #{ZZSYFP}</if>
            <if test="TQDKFXZB != null "> and TQDKFXZB = #{TQDKFXZB}</if>
            <if test="TQGRDKFXZB != null "> and TQGRDKFXZB = #{TQGRDKFXZB}</if>
            <if test="TQXMDKFXZB != null "> and TQXMDKFXZB = #{TQXMDKFXZB}</if>
            <if test="TQGJJZXGLFY != null "> and TQGJJZXGLFY = #{TQGJJZXGLFY}</if>
            <if test="CSLZZFJSBCZJ != null "> and CSLZZFJSBCZJ = #{CSLZZFJSBCZJ}</if>
            <if test="DFPZZSY != null "> and DFPZZSY = #{DFPZZSY}</if>
            <if test="YWSR != null "> and YWSR = #{YWSR}</if>
            <if test="ZFGJJLXSR != null "> and ZFGJJLXSR = #{ZFGJJLXSR}</if>
            <if test="ZZSYLXSR != null "> and ZZSYLXSR = #{ZZSYLXSR}</if>
            <if test="WTDKLXSR != null "> and WTDKLXSR = #{WTDKLXSR}</if>
            <if test="GRDKLXSR != null "> and GRDKLXSR = #{GRDKLXSR}</if>
            <if test="XMDKLXSR != null "> and XMDKLXSR = #{XMDKLXSR}</if>
            <if test="GJZQLXSR != null "> and GJZQLXSR = #{GJZQLXSR}</if>
            <if test="QTSR != null "> and QTSR = #{QTSR}</if>
            <if test="GRDKYQFXSR != null "> and GRDKYQFXSR = #{GRDKYQFXSR}</if>
            <if test="XMDKYQFXSR != null "> and XMDKYQFXSR = #{XMDKYQFXSR}</if>
            <if test="YWZC != null "> and YWZC = #{YWZC}</if>
            <if test="ZFGJJLXZC != null "> and ZFGJJLXZC = #{ZFGJJLXZC}</if>
            <if test="ZFGJJGJSXFZC != null "> and ZFGJJGJSXFZC = #{ZFGJJGJSXFZC}</if>
            <if test="WTDKSXFZC != null "> and WTDKSXFZC = #{WTDKSXFZC}</if>
            <if test="GRDKSXFZC != null "> and GRDKSXFZC = #{GRDKSXFZC}</if>
            <if test="XMDKSXFZC != null "> and XMDKSXFZC = #{XMDKSXFZC}</if>
            <if test="XMDKQTZC != null "> and XMDKQTZC = #{XMDKQTZC}</if>
            <if test="QTZC != null "> and QTZC = #{QTZC}</if>
            <if test="lastUpdateTime != null "> and LAST_UPDATE_TIME = #{lastUpdateTime}</if>
            <if test="CLLX != null "> and CLLX = #{CLLX}</if>
        </where>
        order by LAST_UPDATE_TIME DESC
    </select>
    
    <select id="selectTgjjKjhzbById" parameterType="Long" resultMap="TgjjKjhzbResult">
        <include refid="selectTgjjKjhzbVo"/>
        where ID = #{ID}
    </select>
        
    <insert id="insertTgjjKjhzb" parameterType="TgjjKjhzb" useGeneratedKeys="true" keyProperty="ID">
        insert into tgjj_kjhzb
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="ZXBH != null">ZXBH,</if>
            <if test="BBQC != null">BBQC,</if>
            <if test="ZFGJJCK != null">ZFGJJCK,</if>
            <if test="ZZSYCK != null">ZZSYCK,</if>
            <if test="YSLX != null">YSLX,</if>
            <if test="QTYSK != null">QTYSK,</if>
            <if test="WTDK != null">WTDK,</if>
            <if test="GRDK != null">GRDK,</if>
            <if test="XMDK != null">XMDK,</if>
            <if test="YQDK != null">YQDK,</if>
            <if test="GRYQDK != null">GRYQDK,</if>
            <if test="XMYQDK != null">XMYQDK,</if>
            <if test="GJZQ != null">GJZQ,</if>
            <if test="ZFGJJ != null">ZFGJJ,</if>
            <if test="YFLX != null">YFLX,</if>
            <if test="ZXYFK != null">ZXYFK,</if>
            <if test="ZFGJJGLZXGLFY != null">ZFGJJGLZXGLFY,</if>
            <if test="CSLZFJSBCZJZXYF != null">CSLZFJSBCZJZXYF,</if>
            <if test="QTYFK != null">QTYFK,</if>
            <if test="DKFXZB != null">DKFXZB,</if>
            <if test="GRDKFXZB != null">GRDKFXZB,</if>
            <if test="XMDKFXZB != null">XMDKFXZB,</if>
            <if test="ZZSY != null">ZZSY,</if>
            <if test="ZZSYFP != null">ZZSYFP,</if>
            <if test="TQDKFXZB != null">TQDKFXZB,</if>
            <if test="TQGRDKFXZB != null">TQGRDKFXZB,</if>
            <if test="TQXMDKFXZB != null">TQXMDKFXZB,</if>
            <if test="TQGJJZXGLFY != null">TQGJJZXGLFY,</if>
            <if test="CSLZZFJSBCZJ != null">CSLZZFJSBCZJ,</if>
            <if test="DFPZZSY != null">DFPZZSY,</if>
            <if test="YWSR != null">YWSR,</if>
            <if test="ZFGJJLXSR != null">ZFGJJLXSR,</if>
            <if test="ZZSYLXSR != null">ZZSYLXSR,</if>
            <if test="WTDKLXSR != null">WTDKLXSR,</if>
            <if test="GRDKLXSR != null">GRDKLXSR,</if>
            <if test="XMDKLXSR != null">XMDKLXSR,</if>
            <if test="GJZQLXSR != null">GJZQLXSR,</if>
            <if test="QTSR != null">QTSR,</if>
            <if test="GRDKYQFXSR != null">GRDKYQFXSR,</if>
            <if test="XMDKYQFXSR != null">XMDKYQFXSR,</if>
            <if test="YWZC != null">YWZC,</if>
            <if test="ZFGJJLXZC != null">ZFGJJLXZC,</if>
            <if test="ZFGJJGJSXFZC != null">ZFGJJGJSXFZC,</if>
            <if test="WTDKSXFZC != null">WTDKSXFZC,</if>
            <if test="GRDKSXFZC != null">GRDKSXFZC,</if>
            <if test="XMDKSXFZC != null">XMDKSXFZC,</if>
            <if test="XMDKQTZC != null">XMDKQTZC,</if>
            <if test="QTZC != null">QTZC,</if>
            <if test="lastUpdateTime != null">LAST_UPDATE_TIME,</if>
            <if test="CLLX != null">CLLX,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="ZXBH != null">#{ZXBH},</if>
            <if test="BBQC != null">#{BBQC},</if>
            <if test="ZFGJJCK != null">#{ZFGJJCK},</if>
            <if test="ZZSYCK != null">#{ZZSYCK},</if>
            <if test="YSLX != null">#{YSLX},</if>
            <if test="QTYSK != null">#{QTYSK},</if>
            <if test="WTDK != null">#{WTDK},</if>
            <if test="GRDK != null">#{GRDK},</if>
            <if test="XMDK != null">#{XMDK},</if>
            <if test="YQDK != null">#{YQDK},</if>
            <if test="GRYQDK != null">#{GRYQDK},</if>
            <if test="XMYQDK != null">#{XMYQDK},</if>
            <if test="GJZQ != null">#{GJZQ},</if>
            <if test="ZFGJJ != null">#{ZFGJJ},</if>
            <if test="YFLX != null">#{YFLX},</if>
            <if test="ZXYFK != null">#{ZXYFK},</if>
            <if test="ZFGJJGLZXGLFY != null">#{ZFGJJGLZXGLFY},</if>
            <if test="CSLZFJSBCZJZXYF != null">#{CSLZFJSBCZJZXYF},</if>
            <if test="QTYFK != null">#{QTYFK},</if>
            <if test="DKFXZB != null">#{DKFXZB},</if>
            <if test="GRDKFXZB != null">#{GRDKFXZB},</if>
            <if test="XMDKFXZB != null">#{XMDKFXZB},</if>
            <if test="ZZSY != null">#{ZZSY},</if>
            <if test="ZZSYFP != null">#{ZZSYFP},</if>
            <if test="TQDKFXZB != null">#{TQDKFXZB},</if>
            <if test="TQGRDKFXZB != null">#{TQGRDKFXZB},</if>
            <if test="TQXMDKFXZB != null">#{TQXMDKFXZB},</if>
            <if test="TQGJJZXGLFY != null">#{TQGJJZXGLFY},</if>
            <if test="CSLZZFJSBCZJ != null">#{CSLZZFJSBCZJ},</if>
            <if test="DFPZZSY != null">#{DFPZZSY},</if>
            <if test="YWSR != null">#{YWSR},</if>
            <if test="ZFGJJLXSR != null">#{ZFGJJLXSR},</if>
            <if test="ZZSYLXSR != null">#{ZZSYLXSR},</if>
            <if test="WTDKLXSR != null">#{WTDKLXSR},</if>
            <if test="GRDKLXSR != null">#{GRDKLXSR},</if>
            <if test="XMDKLXSR != null">#{XMDKLXSR},</if>
            <if test="GJZQLXSR != null">#{GJZQLXSR},</if>
            <if test="QTSR != null">#{QTSR},</if>
            <if test="GRDKYQFXSR != null">#{GRDKYQFXSR},</if>
            <if test="XMDKYQFXSR != null">#{XMDKYQFXSR},</if>
            <if test="YWZC != null">#{YWZC},</if>
            <if test="ZFGJJLXZC != null">#{ZFGJJLXZC},</if>
            <if test="ZFGJJGJSXFZC != null">#{ZFGJJGJSXFZC},</if>
            <if test="WTDKSXFZC != null">#{WTDKSXFZC},</if>
            <if test="GRDKSXFZC != null">#{GRDKSXFZC},</if>
            <if test="XMDKSXFZC != null">#{XMDKSXFZC},</if>
            <if test="XMDKQTZC != null">#{XMDKQTZC},</if>
            <if test="QTZC != null">#{QTZC},</if>
            <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
            <if test="CLLX != null">#{CLLX},</if>
         </trim>
    </insert>

    <update id="updateTgjjKjhzb" parameterType="TgjjKjhzb">
        update tgjj_kjhzb
        <trim prefix="SET" suffixOverrides=",">
            <if test="ZXBH != null">ZXBH = #{ZXBH},</if>
            <if test="BBQC != null">BBQC = #{BBQC},</if>
            <if test="ZFGJJCK != null">ZFGJJCK = #{ZFGJJCK},</if>
            <if test="ZZSYCK != null">ZZSYCK = #{ZZSYCK},</if>
            <if test="YSLX != null">YSLX = #{YSLX},</if>
            <if test="QTYSK != null">QTYSK = #{QTYSK},</if>
            <if test="WTDK != null">WTDK = #{WTDK},</if>
            <if test="GRDK != null">GRDK = #{GRDK},</if>
            <if test="XMDK != null">XMDK = #{XMDK},</if>
            <if test="YQDK != null">YQDK = #{YQDK},</if>
            <if test="GRYQDK != null">GRYQDK = #{GRYQDK},</if>
            <if test="XMYQDK != null">XMYQDK = #{XMYQDK},</if>
            <if test="GJZQ != null">GJZQ = #{GJZQ},</if>
            <if test="ZFGJJ != null">ZFGJJ = #{ZFGJJ},</if>
            <if test="YFLX != null">YFLX = #{YFLX},</if>
            <if test="ZXYFK != null">ZXYFK = #{ZXYFK},</if>
            <if test="ZFGJJGLZXGLFY != null">ZFGJJGLZXGLFY = #{ZFGJJGLZXGLFY},</if>
            <if test="CSLZFJSBCZJZXYF != null">CSLZFJSBCZJZXYF = #{CSLZFJSBCZJZXYF},</if>
            <if test="QTYFK != null">QTYFK = #{QTYFK},</if>
            <if test="DKFXZB != null">DKFXZB = #{DKFXZB},</if>
            <if test="GRDKFXZB != null">GRDKFXZB = #{GRDKFXZB},</if>
            <if test="XMDKFXZB != null">XMDKFXZB = #{XMDKFXZB},</if>
            <if test="ZZSY != null">ZZSY = #{ZZSY},</if>
            <if test="ZZSYFP != null">ZZSYFP = #{ZZSYFP},</if>
            <if test="TQDKFXZB != null">TQDKFXZB = #{TQDKFXZB},</if>
            <if test="TQGRDKFXZB != null">TQGRDKFXZB = #{TQGRDKFXZB},</if>
            <if test="TQXMDKFXZB != null">TQXMDKFXZB = #{TQXMDKFXZB},</if>
            <if test="TQGJJZXGLFY != null">TQGJJZXGLFY = #{TQGJJZXGLFY},</if>
            <if test="CSLZZFJSBCZJ != null">CSLZZFJSBCZJ = #{CSLZZFJSBCZJ},</if>
            <if test="DFPZZSY != null">DFPZZSY = #{DFPZZSY},</if>
            <if test="YWSR != null">YWSR = #{YWSR},</if>
            <if test="ZFGJJLXSR != null">ZFGJJLXSR = #{ZFGJJLXSR},</if>
            <if test="ZZSYLXSR != null">ZZSYLXSR = #{ZZSYLXSR},</if>
            <if test="WTDKLXSR != null">WTDKLXSR = #{WTDKLXSR},</if>
            <if test="GRDKLXSR != null">GRDKLXSR = #{GRDKLXSR},</if>
            <if test="XMDKLXSR != null">XMDKLXSR = #{XMDKLXSR},</if>
            <if test="GJZQLXSR != null">GJZQLXSR = #{GJZQLXSR},</if>
            <if test="QTSR != null">QTSR = #{QTSR},</if>
            <if test="GRDKYQFXSR != null">GRDKYQFXSR = #{GRDKYQFXSR},</if>
            <if test="XMDKYQFXSR != null">XMDKYQFXSR = #{XMDKYQFXSR},</if>
            <if test="YWZC != null">YWZC = #{YWZC},</if>
            <if test="ZFGJJLXZC != null">ZFGJJLXZC = #{ZFGJJLXZC},</if>
            <if test="ZFGJJGJSXFZC != null">ZFGJJGJSXFZC = #{ZFGJJGJSXFZC},</if>
            <if test="WTDKSXFZC != null">WTDKSXFZC = #{WTDKSXFZC},</if>
            <if test="GRDKSXFZC != null">GRDKSXFZC = #{GRDKSXFZC},</if>
            <if test="XMDKSXFZC != null">XMDKSXFZC = #{XMDKSXFZC},</if>
            <if test="XMDKQTZC != null">XMDKQTZC = #{XMDKQTZC},</if>
            <if test="QTZC != null">QTZC = #{QTZC},</if>
            <if test="lastUpdateTime != null">LAST_UPDATE_TIME = #{lastUpdateTime},</if>
            <if test="CLLX != null">CLLX = #{CLLX},</if>
        </trim>
        where ID = #{ID}
    </update>

    <delete id="deleteTgjjKjhzbById" parameterType="Long">
        delete from tgjj_kjhzb where ID = #{ID}
    </delete>

    <delete id="deleteTgjjKjhzbByIds" parameterType="String">
        delete from tgjj_kjhzb where ID in 
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        </foreach>
    </delete>

</mapper>