<?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.ruoyi.system.mapper.projectV2.ZsyzSbbzbMapper">
    
    <resultMap type="ZsyzSbbzb" id="ZsyzSbbzbResult">
        <result property="id"    column="id"    />
        <result property="sbdw"    column="sbdw"    />
        <result property="tbrq"    column="tbrq"    />
        <result property="zszxfzr"    column="zszxfzr"    />
        <result property="xmbh"    column="xmbh"    />
        <result property="xmxsmc"    column="xmxsmc"    />
        <result property="sfwlhxxxm"    column="sfwlhxxxm"    />
        <result property="yzdqId"    column="yzdq_id"    />
        <result property="yzdqName"    column="yzdq_name"    />
        <result property="yzssName"    column="yzss_name"    />
        <result property="ntze"    column="ntze"    />
        <result property="cylxId"    column="cylx_id"    />
        <result property="cylxName"    column="cylx_name"    />
        <result property="xmlb"    column="xmlb"    />
        <result property="tzlb"    column="tzlb"    />
        <result property="nlhd"    column="nlhd"    />
        <result property="czpt"    column="czpt"    />
        <result property="tzzt"    column="tzzt"    />
        <result property="xmjz"    column="xmjz"    />
        <result property="gtzzrsfzhm"    column="gtzzrsfzhm"    />
        <result property="qytzrxyzdm"    column="qytzrxyzdm"    />
        <result property="qybj"    column="qybj"    />
        <result property="tzfjj"    column="tzfjj"    />
        <result property="sndxse"    column="sndxse"    />
        <result property="sndnse"    column="sndnse"    />
        <result property="tzrxm"    column="tzrxm"    />
        <result property="tzrzw"    column="tzrzw"    />
        <result property="tzrdh"    column="tzrdh"    />
        <result property="xmjj"    column="xmjj"    />
        <result property="name"    column="name"    />
        <result property="strq"    column="strq"    />
        <result property="phone"    column="phone"    />
        <result property="zw"    column="zw"    />
        <result property="userId"    column="user_id"    />
        <result property="createBy"    column="create_by"    />
        <result property="type"    column="type"    />
        <result property="progress"    column="progress"    />
        <result property="deptId"    column="dept_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="isDel"    column="is_del"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="cjdId"    column="cjd_id"    />
        <result property="cjdName"    column="cjd_name"    />
        <result property="isMeet"    column="is_meet"    />
        <result property="meetRemark"    column="meet_remark"    />
    </resultMap>

    <sql id="selectZsyzSbbzbVo">
        select id, sbdw, tbrq, zszxfzr, xmbh, xmxsmc, sfwlhxxxm, yzdq_id, yzdq_name, yzss_name, ntze, cylx_id, cylx_name, xmlb, tzlb, nlhd, czpt, tzzt, xmjz, gtzzrsfzhm, qytzrxyzdm, qybj, tzfjj, sndxse, sndnse, tzrxm, tzrzw, tzrdh, xmjj, name, strq, phone, zw, user_id, create_by, type, progress, dept_id, create_time, update_by, is_del, update_time, remark, cjd_id, cjd_name, is_meet, meet_remark from zsyz_sbbzb
    </sql>

    <select id="selectZsyzSbbzbList" parameterType="ZsyzSbbzb" resultMap="ZsyzSbbzbResult">
        <include refid="selectZsyzSbbzbVo"/>
        <where>  
            <if test="sbdw != null  and sbdw != ''"> and sbdw = #{sbdw}</if>
            <if test="tbrq != null "> and tbrq = #{tbrq}</if>
            <if test="zszxfzr != null  and zszxfzr != ''"> and zszxfzr = #{zszxfzr}</if>
            <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
            <if test="xmxsmc != null  and xmxsmc != ''"> and xmxsmc = #{xmxsmc}</if>
            <if test="sfwlhxxxm != null  and sfwlhxxxm != ''"> and sfwlhxxxm = #{sfwlhxxxm}</if>
            <if test="yzdqId != null  and yzdqId != ''"> and yzdq_id = #{yzdqId}</if>
            <if test="yzdqName != null  and yzdqName != ''"> and yzdq_name like concat('%', #{yzdqName}, '%')</if>
            <if test="yzssName != null  and yzssName != ''"> and yzss_name like concat('%', #{yzssName}, '%')</if>
            <if test="ntze != null  and ntze != ''"> and ntze = #{ntze}</if>
            <if test="cylxId != null  and cylxId != ''"> and cylx_id = #{cylxId}</if>
            <if test="cylxName != null  and cylxName != ''"> and cylx_name like concat('%', #{cylxName}, '%')</if>
            <if test="xmlb != null  and xmlb != ''"> and xmlb = #{xmlb}</if>
            <if test="tzlb != null  and tzlb != ''"> and tzlb = #{tzlb}</if>
            <if test="nlhd != null  and nlhd != ''"> and nlhd = #{nlhd}</if>
            <if test="czpt != null  and czpt != ''"> and czpt = #{czpt}</if>
            <if test="tzzt != null  and tzzt != ''"> and tzzt = #{tzzt}</if>
            <if test="xmjz != null  and xmjz != ''"> and xmjz = #{xmjz}</if>
            <if test="gtzzrsfzhm != null  and gtzzrsfzhm != ''"> and gtzzrsfzhm = #{gtzzrsfzhm}</if>
            <if test="qytzrxyzdm != null  and qytzrxyzdm != ''"> and qytzrxyzdm = #{qytzrxyzdm}</if>
            <if test="qybj != null  and qybj != ''"> and qybj = #{qybj}</if>
            <if test="tzfjj != null  and tzfjj != ''"> and tzfjj = #{tzfjj}</if>
            <if test="sndxse != null  and sndxse != ''"> and sndxse = #{sndxse}</if>
            <if test="sndnse != null  and sndnse != ''"> and sndnse = #{sndnse}</if>
            <if test="tzrxm != null  and tzrxm != ''"> and tzrxm = #{tzrxm}</if>
            <if test="tzrzw != null  and tzrzw != ''"> and tzrzw = #{tzrzw}</if>
            <if test="tzrdh != null  and tzrdh != ''"> and tzrdh = #{tzrdh}</if>
            <if test="xmjj != null  and xmjj != ''"> and xmjj = #{xmjj}</if>
            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
            <if test="strq != null "> and strq = #{strq}</if>
            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
            <if test="zw != null  and zw != ''"> and zw = #{zw}</if>
            <if test="userId != null "> and user_id = #{userId}</if>
            <if test="type != null  and type != ''"> and type = #{type}</if>
            <if test="progress != null  and progress != ''"> and progress = #{progress}</if>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
            <if test="cjdId != null "> and cjd_id = #{cjdId}</if>
            <if test="cjdName != null  and cjdName != ''"> and cjd_name like concat('%', #{cjdName}, '%')</if>
            <if test="isMeet != null  and isMeet != ''"> and is_meet = #{isMeet}</if>
            <if test="meetRemark != null  and meetRemark != ''"> and meet_remark = #{meetRemark}</if>
        </where>
    </select>
    
    <select id="selectZsyzSbbzbById" parameterType="Long" resultMap="ZsyzSbbzbResult">
        <include refid="selectZsyzSbbzbVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertZsyzSbbzb" parameterType="ZsyzSbbzb" useGeneratedKeys="true" keyProperty="id">
        insert into zsyz_sbbzb
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="sbdw != null and sbdw != ''">sbdw,</if>
            <if test="tbrq != null">tbrq,</if>
            <if test="zszxfzr != null and zszxfzr != ''">zszxfzr,</if>
            <if test="xmbh != null">xmbh,</if>
            <if test="xmxsmc != null and xmxsmc != ''">xmxsmc,</if>
            <if test="sfwlhxxxm != null and sfwlhxxxm != ''">sfwlhxxxm,</if>
            <if test="yzdqId != null and yzdqId != ''">yzdq_id,</if>
            <if test="yzdqName != null and yzdqName != ''">yzdq_name,</if>
            <if test="yzssName != null and yzssName != ''">yzss_name,</if>
            <if test="ntze != null and ntze != ''">ntze,</if>
            <if test="cylxId != null and cylxId != ''">cylx_id,</if>
            <if test="cylxName != null and cylxName != ''">cylx_name,</if>
            <if test="xmlb != null and xmlb != ''">xmlb,</if>
            <if test="tzlb != null and tzlb != ''">tzlb,</if>
            <if test="nlhd != null and nlhd != ''">nlhd,</if>
            <if test="czpt != null and czpt != ''">czpt,</if>
            <if test="tzzt != null and tzzt != ''">tzzt,</if>
            <if test="xmjz != null and xmjz != ''">xmjz,</if>
            <if test="gtzzrsfzhm != null">gtzzrsfzhm,</if>
            <if test="qytzrxyzdm != null">qytzrxyzdm,</if>
            <if test="qybj != null and qybj != ''">qybj,</if>
            <if test="tzfjj != null">tzfjj,</if>
            <if test="sndxse != null">sndxse,</if>
            <if test="sndnse != null">sndnse,</if>
            <if test="tzrxm != null">tzrxm,</if>
            <if test="tzrzw != null">tzrzw,</if>
            <if test="tzrdh != null">tzrdh,</if>
            <if test="xmjj != null">xmjj,</if>
            <if test="name != null and name != ''">name,</if>
            <if test="strq != null">strq,</if>
            <if test="phone != null and phone != ''">phone,</if>
            <if test="zw != null and zw != ''">zw,</if>
            <if test="userId != null">user_id,</if>
            <if test="createBy != null">create_by,</if>
            <if test="type != null">type,</if>
            <if test="progress != null">progress,</if>
            <if test="deptId != null">dept_id,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="isDel != null">is_del,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
            <if test="cjdId != null">cjd_id,</if>
            <if test="cjdName != null">cjd_name,</if>
            <if test="isMeet != null">is_meet,</if>
            <if test="meetRemark != null">meet_remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="sbdw != null and sbdw != ''">#{sbdw},</if>
            <if test="tbrq != null">#{tbrq},</if>
            <if test="zszxfzr != null and zszxfzr != ''">#{zszxfzr},</if>
            <if test="xmbh != null">#{xmbh},</if>
            <if test="xmxsmc != null and xmxsmc != ''">#{xmxsmc},</if>
            <if test="sfwlhxxxm != null and sfwlhxxxm != ''">#{sfwlhxxxm},</if>
            <if test="yzdqId != null and yzdqId != ''">#{yzdqId},</if>
            <if test="yzdqName != null and yzdqName != ''">#{yzdqName},</if>
            <if test="yzssName != null and yzssName != ''">#{yzssName},</if>
            <if test="ntze != null and ntze != ''">#{ntze},</if>
            <if test="cylxId != null and cylxId != ''">#{cylxId},</if>
            <if test="cylxName != null and cylxName != ''">#{cylxName},</if>
            <if test="xmlb != null and xmlb != ''">#{xmlb},</if>
            <if test="tzlb != null and tzlb != ''">#{tzlb},</if>
            <if test="nlhd != null and nlhd != ''">#{nlhd},</if>
            <if test="czpt != null and czpt != ''">#{czpt},</if>
            <if test="tzzt != null and tzzt != ''">#{tzzt},</if>
            <if test="xmjz != null and xmjz != ''">#{xmjz},</if>
            <if test="gtzzrsfzhm != null">#{gtzzrsfzhm},</if>
            <if test="qytzrxyzdm != null">#{qytzrxyzdm},</if>
            <if test="qybj != null and qybj != ''">#{qybj},</if>
            <if test="tzfjj != null">#{tzfjj},</if>
            <if test="sndxse != null">#{sndxse},</if>
            <if test="sndnse != null">#{sndnse},</if>
            <if test="tzrxm != null">#{tzrxm},</if>
            <if test="tzrzw != null">#{tzrzw},</if>
            <if test="tzrdh != null">#{tzrdh},</if>
            <if test="xmjj != null">#{xmjj},</if>
            <if test="name != null and name != ''">#{name},</if>
            <if test="strq != null">#{strq},</if>
            <if test="phone != null and phone != ''">#{phone},</if>
            <if test="zw != null and zw != ''">#{zw},</if>
            <if test="userId != null">#{userId},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="type != null">#{type},</if>
            <if test="progress != null">#{progress},</if>
            <if test="deptId != null">#{deptId},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="isDel != null">#{isDel},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
            <if test="cjdId != null">#{cjdId},</if>
            <if test="cjdName != null">#{cjdName},</if>
            <if test="isMeet != null">#{isMeet},</if>
            <if test="meetRemark != null">#{meetRemark},</if>
         </trim>
    </insert>

    <update id="updateZsyzSbbzb" parameterType="ZsyzSbbzb">
        update zsyz_sbbzb
        <trim prefix="SET" suffixOverrides=",">
            <if test="sbdw != null and sbdw != ''">sbdw = #{sbdw},</if>
            <if test="tbrq != null">tbrq = #{tbrq},</if>
            <if test="zszxfzr != null and zszxfzr != ''">zszxfzr = #{zszxfzr},</if>
            <if test="xmbh != null">xmbh = #{xmbh},</if>
            <if test="xmxsmc != null and xmxsmc != ''">xmxsmc = #{xmxsmc},</if>
            <if test="sfwlhxxxm != null and sfwlhxxxm != ''">sfwlhxxxm = #{sfwlhxxxm},</if>
            <if test="yzdqId != null and yzdqId != ''">yzdq_id = #{yzdqId},</if>
            <if test="yzdqName != null and yzdqName != ''">yzdq_name = #{yzdqName},</if>
            <if test="yzssName != null and yzssName != ''">yzss_name = #{yzssName},</if>
            <if test="ntze != null and ntze != ''">ntze = #{ntze},</if>
            <if test="cylxId != null and cylxId != ''">cylx_id = #{cylxId},</if>
            <if test="cylxName != null and cylxName != ''">cylx_name = #{cylxName},</if>
            <if test="xmlb != null and xmlb != ''">xmlb = #{xmlb},</if>
            <if test="tzlb != null and tzlb != ''">tzlb = #{tzlb},</if>
            <if test="nlhd != null and nlhd != ''">nlhd = #{nlhd},</if>
            <if test="czpt != null and czpt != ''">czpt = #{czpt},</if>
            <if test="tzzt != null and tzzt != ''">tzzt = #{tzzt},</if>
            <if test="xmjz != null and xmjz != ''">xmjz = #{xmjz},</if>
            <if test="gtzzrsfzhm != null">gtzzrsfzhm = #{gtzzrsfzhm},</if>
            <if test="qytzrxyzdm != null">qytzrxyzdm = #{qytzrxyzdm},</if>
            <if test="qybj != null and qybj != ''">qybj = #{qybj},</if>
            <if test="tzfjj != null">tzfjj = #{tzfjj},</if>
            <if test="sndxse != null">sndxse = #{sndxse},</if>
            <if test="sndnse != null">sndnse = #{sndnse},</if>
            <if test="tzrxm != null">tzrxm = #{tzrxm},</if>
            <if test="tzrzw != null">tzrzw = #{tzrzw},</if>
            <if test="tzrdh != null">tzrdh = #{tzrdh},</if>
            <if test="xmjj != null">xmjj = #{xmjj},</if>
            <if test="name != null and name != ''">name = #{name},</if>
            <if test="strq != null">strq = #{strq},</if>
            <if test="phone != null and phone != ''">phone = #{phone},</if>
            <if test="zw != null and zw != ''">zw = #{zw},</if>
            <if test="userId != null">user_id = #{userId},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="type != null">type = #{type},</if>
            <if test="progress != null">progress = #{progress},</if>
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="isDel != null">is_del = #{isDel},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="cjdId != null">cjd_id = #{cjdId},</if>
            <if test="cjdName != null">cjd_name = #{cjdName},</if>
            <if test="isMeet != null">is_meet = #{isMeet},</if>
            <if test="meetRemark != null">meet_remark = #{meetRemark},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteZsyzSbbzbById" parameterType="Long">
        delete from zsyz_sbbzb where id = #{id}
    </delete>

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