<?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="xmjzqk" column="xmjzqk"/>
        <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="xmStatus" column="xm_status"/>
        <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"/>
        <result property="shjg" column="shjg"/>
        <result property="shsj" column="shsj"/>
        <result property="psnr" column="psnr"/>
        <result property="czwt" column="czwt"/>




        <association property="zsyzQyxx" javaType="ZsyzQyxx" resultMap="ZsyzQyxxResult"/>
        <association property="zsyzKgxx" javaType="ZsyzKgxx" resultMap="ZsyzKgxxResult"/>
        <association property="zsyzTcxx" javaType="ZsyzTcxx" resultMap="ZsyzTcxxResult"/>
        <collection property="shyjList" javaType="java.util.List" resultMap="ZsyzShyjResult"/>
        <collection property="zsyzJzqkList" javaType="java.util.List" resultMap="ZsyzJzqkResult"/>

    </resultMap>

    <!--签约信息-->
    <resultMap type="ZsyzQyxx" id="ZsyzQyxxResult">
        <result property="id" column="qid"/>
        <result property="xmId" column="qxm_id"/>
        <result property="xmbh" column="qxmbh"/>
        <result property="xmxsmc" column="qxmxsmc"/>
        <result property="xmmc" column="qxmmc"/>
        <result property="dfqyr" column="dfqyr"/>
        <result property="wfqyr" column="wfqyr"/>
        <result property="tbrq" column="qtbrq"/>
        <result property="qyrq" column="qyrq"/>
        <result property="xytze" column="xytze"/>
        <result property="swzj" column="swzj"/>
        <result property="gdzctze" column="gdzctze"/>
        <result property="xmgjrxm" column="xmgjrxm"/>
        <result property="xmgjrzw" column="xmgjrzw"/>
        <result property="xmgjrsjh" column="xmgjrsjh"/>
        <result property="xmszd" column="xmszd"/>
        <result property="sshy" column="sshy"/>
        <result property="tzfs" column="tzfs"/>
        <result property="jsfs" column="jsfs"/>
        <result property="sfys" column="sfys"/>
        <result property="jsnr" column="jsnr"/>
        <result property="zlcf" column="qzlcf"/>
        <result property="gdmj" column="gdmj"/>
        <result property="zcqymc" column="zcqymc"/>
        <result property="zcrq" column="zcrq"/>
        <result property="zczb" column="zczb"/>
        <result property="frdb" column="frdb"/>
        <result property="lxfs" column="lxfs"/>
        <result property="jyfw" column="jyfw"/>
        <result property="lxrq" column="lxrq"/>
        <result property="nkgrq" column="nkgrq"/>
        <result property="path" column="path"/>
        <result property="createBy" column="qcreate_by"/>
        <result property="createTime" column="qcreate_time"/>
        <result property="updateBy" column="qupdate_by"/>
        <result property="updateTime" column="qupdate_time"/>
        <result property="remark" column="qremark"/>
        <result property="czwt" column="qczwt"/>
    </resultMap>

    <!--开工信息-->
    <resultMap type="ZsyzKgxx" id="ZsyzKgxxResult">
        <result property="id" column="kid"/>
        <result property="xmId" column="kxm_id"/>
        <result property="xmbh" column="kxmbh"/>
        <result property="xmmc" column="kxmmc"/>
        <result property="kgrq" column="kgrq"/>
        <result property="njgrq" column="njgrq"/>
        <result property="sscrq" column="sscrq"/>
        <result property="ntcsj" column="ntcsj"/>
        <result property="rtsj" column="rtsj"/>
        <result property="nrtsj" column="nrtsj"/>
        <result property="kggjrsjh" column="kggjrsjh"/>
        <result property="createBy" column="kcreate_by"/>
        <result property="createTime" column="kcreate_time"/>
        <result property="updateBy" column="kupdate_by"/>
        <result property="updateTime" column="kupdate_time"/>
        <result property="remark" column="kremark"/>
        <result property="czwt" column="kczwt"/>
    </resultMap>

    <!--投产信息-->
    <resultMap type="ZsyzTcxx" id="ZsyzTcxxResult">
        <result property="id" column="tid"/>
        <result property="xmId" column="txm_id"/>
        <result property="xmbh" column="txmbh"/>
        <result property="xmmc" column="txmmc"/>
        <result property="tcrq" column="tcrq"/>
        <result property="rgsj" column="rgsj"/>
        <result property="nrgsj" column="nrgsj"/>
        <result property="tcgjrsjh" column="tcgjrsjh"/>
        <result property="sjdze" column="sjdze"/>
        <result property="ydmj" column="ydmj"/>
        <result property="tdcr" column="tdcr"/>
        <result property="xjcf" column="xjcf"/>
        <result property="cftr" column="cftr"/>
        <result property="sbqd" column="sbqd"/>
        <result property="sbfp" column="sbfp"/>
        <result property="sbht" column="sbht"/>
        <result property="fkpz" column="fkpz"/>
        <result property="zlcf" column="tzlcf"/>
        <result property="zlcftr" column="zlcftr"/>
        <result property="zlsbqd" column="zlsbqd"/>
        <result property="zlsbfp" column="zlsbfp"/>
        <result property="zlsbht" column="zlsbht"/>
        <result property="zlfkpz" column="zlfkpz"/>
        <result property="sjss" column="sjss"/>
        <result property="lxy" column="lxy"/>
        <result property="jnsb" column="jnsb"/>
        <result property="zbtr" column="zbtr"/>
        <result property="ndsjss" column="ndsjss"/>
        <result property="qt" column="qt"/>
        <result property="createBy" column="tcreate_by"/>
        <result property="createTime" column="tcreate_time"/>
        <result property="updateBy" column="tupdate_by"/>
        <result property="updateTime" column="tupdate_time"/>
        <result property="remark" column="tremark"/>
        <result property="czwt" column="tczwt"/>
    </resultMap>

    <resultMap type="ZsyzShyj" id="ZsyzShyjResult">
        <result property="id" column="id"/>
        <result property="xmId" column="xm_id"/>
        <result property="xmbh" column="xmbh"/>
        <result property="deptId" column="dept_id"/>
        <result property="shrxm" column="shrxm"/>
        <result property="xmjd" column="xmjd"/>
        <result property="xmmc" column="xmmc"/>
        <result property="shjg" column="shjg"/>
        <result property="shyj" column="shyj"/>
        <result property="shsj" column="shsj"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="remark" column="remark"/>
    </resultMap>

    <resultMap type="ZsyzJzqk" id="ZsyzJzqkResult">
        <result property="id"    column="jid"    />
        <result property="xmId"    column="jxm_id"    />
        <result property="xmbh"    column="jxmbh"    />
        <result property="xmmc"    column="jxmmc"    />
        <result property="deptId"    column="jdept_id"    />
        <result property="deptName"    column="jdept_name"    />
        <result property="qtrName"    column="qtr_name"    />
        <result property="qtTime"    column="qt_time"    />
        <result property="qtrxz"    column="qtrxz"    />
        <result property="qtrdwzw"    column="qtrdwzw"    />
        <result property="phone"    column="jphone"    />
        <result property="blsx"    column="blsx"    />
        <result property="dbsx"    column="dbsx"    />
        <result property="jzqk"    column="jzqk"    />
        <result property="czwt"    column="jczwt"    />
        <result property="jjjy"    column="jjjy"    />
        <result property="gzjh"    column="gzjh"    />
        <result property="createBy"    column="jcreate_by"    />
        <result property="createTime"    column="jcreate_time"    />
        <result property="updateBy"    column="jupdate_by"    />
        <result property="updateTime"    column="jupdate_time"    />
        <result property="remark"    column="jremark"    />
    </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,
               xmjzqk,
               name,
               strq,
               phone,
               zw,
               user_id,
               create_by,
               type,
               progress,
               xm_status,
               dept_id,
               create_time,
               update_by,
               is_del,
               update_time,
               remark,
               cjd_id,
               cjd_name,
               is_meet,
               meet_remark,
               shjg,psnr,czwt
        from zsyz_sbbzb
    </sql>

    <select id="selectZsyzSbbzbList" parameterType="ZsyzSbbzb" resultMap="ZsyzSbbzbResult">
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmbh as qxmbh,
        q.xmxsmc as qxmxsmc,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark
        from zsyz_sbbzb s
        left join zsyz_qyxx q on s.id = q.xm_id
        left join zsyz_kgxx k on s.id = k.xm_id
        left join zsyz_tcxx t on s.id = t.xm_id
        <where>
            s.is_del = 'N'
            <if test="sbdw != null  and sbdw != ''">and s.sbdw = #{sbdw}</if>
            <if test="tbrq != null ">and s.tbrq = #{tbrq}</if>
            <if test="zszxfzr != null  and zszxfzr != ''">and s.zszxfzr = #{zszxfzr}</if>
            <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
            <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
            <if test="sfwlhxxxm != null  and sfwlhxxxm != ''">and s.sfwlhxxxm = #{sfwlhxxxm}</if>
            <if test="yzdqId != null  and yzdqId != ''">and s.yzdq_id = #{yzdqId}</if>
            <if test="yzdqName != null  and yzdqName != ''">and s.yzdq_name like concat('%', #{yzdqName}, '%')</if>
            <if test="yzssName != null  and yzssName != ''">and s.yzss_name like concat('%', #{yzssName}, '%')</if>
            <if test="ntze != null  and ntze != ''">and s.ntze = #{ntze}</if>
            <if test="cylxId != null  and cylxId != ''">and s.cylx_id = #{cylxId}</if>
            <if test="cylxName != null  and cylxName != ''">and s.cylx_name like concat('%', #{cylxName}, '%')</if>
            <if test="xmlb != null  and xmlb != ''">and s.xmlb = #{xmlb}</if>
            <if test="tzlb != null  and tzlb != ''">and s.tzlb = #{tzlb}</if>
            <if test="nlhd != null  and nlhd != ''">and s.nlhd = #{nlhd}</if>
            <if test="czpt != null  and czpt != ''">and s.czpt = #{czpt}</if>
            <if test="tzzt != null  and tzzt != ''">and s.tzzt = #{tzzt}</if>
            <if test="xmjz != null  and xmjz != ''">and s.xmjz = #{xmjz}</if>
            <if test="gtzzrsfzhm != null  and gtzzrsfzhm != ''">and s.gtzzrsfzhm = #{gtzzrsfzhm}</if>
            <if test="qytzrxyzdm != null  and qytzrxyzdm != ''">and s.qytzrxyzdm = #{qytzrxyzdm}</if>
            <if test="qybj != null  and qybj != ''">and s.qybj = #{qybj}</if>
            <if test="tzfjj != null  and tzfjj != ''">and s.tzfjj = #{tzfjj}</if>
            <if test="sndxse != null  and sndxse != ''">and s.sndxse = #{sndxse}</if>
            <if test="sndnse != null  and sndnse != ''">and s.sndnse = #{sndnse}</if>
            <if test="tzrxm != null  and tzrxm != ''">and s.tzrxm = #{tzrxm}</if>
            <if test="tzrzw != null  and tzrzw != ''">and s.tzrzw = #{tzrzw}</if>
            <if test="tzrdh != null  and tzrdh != ''">and s.tzrdh = #{tzrdh}</if>
            <if test="xmjj != null  and xmjj != ''">and s.xmjj = #{xmjj}</if>
            <if test="name != null  and name != ''">and s.name like concat('%', #{name}, '%')</if>
            <if test="strq != null ">and s.strq = #{strq}</if>
            <if test="phone != null  and phone != ''">and s.phone = #{phone}</if>
            <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
            <if test="userId != null ">and s.user_id = #{userId}</if>
            <if test="type != null  and type != ''">and s.type = #{type}</if>
            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
            <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
            <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
            <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
            <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
            <if test="meetRemark != null  and meetRemark != ''">and s.meet_remark = #{meetRemark}</if>
            <if test="shjg != null  and shjg != ''">and s.shjg = #{shjg}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
            </if>
        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
        order by s.update_time desc
    </select>


    <select id="selectZsyzSbbzbListPs" parameterType="ZsyzSbbzb" resultMap="ZsyzSbbzbResult">
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmbh as qxmbh,
        q.xmxsmc as qxmxsmc,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark
        from zsyz_sbbzb s
        left join zsyz_qyxx q on s.id = q.xm_id
        left join zsyz_kgxx k on s.id = k.xm_id
        left join zsyz_tcxx t on s.id = t.xm_id
        <where>
            s.is_del = 'N' and s.psnr is not null
            <if test="sbdw != null  and sbdw != ''">and s.sbdw = #{sbdw}</if>
            <if test="tbrq != null ">and s.tbrq = #{tbrq}</if>
            <if test="zszxfzr != null  and zszxfzr != ''">and s.zszxfzr = #{zszxfzr}</if>
            <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
            <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
            <if test="sfwlhxxxm != null  and sfwlhxxxm != ''">and s.sfwlhxxxm = #{sfwlhxxxm}</if>
            <if test="yzdqId != null  and yzdqId != ''">and s.yzdq_id = #{yzdqId}</if>
            <if test="yzdqName != null  and yzdqName != ''">and s.yzdq_name like concat('%', #{yzdqName}, '%')</if>
            <if test="yzssName != null  and yzssName != ''">and s.yzss_name like concat('%', #{yzssName}, '%')</if>
            <if test="ntze != null  and ntze != ''">and s.ntze = #{ntze}</if>
            <if test="cylxId != null  and cylxId != ''">and s.cylx_id = #{cylxId}</if>
            <if test="cylxName != null  and cylxName != ''">and s.cylx_name like concat('%', #{cylxName}, '%')</if>
            <if test="xmlb != null  and xmlb != ''">and s.xmlb = #{xmlb}</if>
            <if test="tzlb != null  and tzlb != ''">and s.tzlb = #{tzlb}</if>
            <if test="nlhd != null  and nlhd != ''">and s.nlhd = #{nlhd}</if>
            <if test="czpt != null  and czpt != ''">and s.czpt = #{czpt}</if>
            <if test="tzzt != null  and tzzt != ''">and s.tzzt = #{tzzt}</if>
            <if test="xmjz != null  and xmjz != ''">and s.xmjz = #{xmjz}</if>
            <if test="gtzzrsfzhm != null  and gtzzrsfzhm != ''">and s.gtzzrsfzhm = #{gtzzrsfzhm}</if>
            <if test="qytzrxyzdm != null  and qytzrxyzdm != ''">and s.qytzrxyzdm = #{qytzrxyzdm}</if>
            <if test="qybj != null  and qybj != ''">and s.qybj = #{qybj}</if>
            <if test="tzfjj != null  and tzfjj != ''">and s.tzfjj = #{tzfjj}</if>
            <if test="sndxse != null  and sndxse != ''">and s.sndxse = #{sndxse}</if>
            <if test="sndnse != null  and sndnse != ''">and s.sndnse = #{sndnse}</if>
            <if test="tzrxm != null  and tzrxm != ''">and s.tzrxm = #{tzrxm}</if>
            <if test="tzrzw != null  and tzrzw != ''">and s.tzrzw = #{tzrzw}</if>
            <if test="tzrdh != null  and tzrdh != ''">and s.tzrdh = #{tzrdh}</if>
            <if test="xmjj != null  and xmjj != ''">and s.xmjj = #{xmjj}</if>
            <if test="name != null  and name != ''">and s.name like concat('%', #{name}, '%')</if>
            <if test="strq != null ">and s.strq = #{strq}</if>
            <if test="phone != null  and phone != ''">and s.phone = #{phone}</if>
            <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
            <if test="userId != null ">and s.user_id = #{userId}</if>
            <if test="type != null  and type != ''">and s.type = #{type}</if>
            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
            <if test="xmStatus != null  and xmStatus != ''">and xm_status = #{xmStatus})</if>
            <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
            <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
            <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
            <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
            <if test="meetRemark != null  and meetRemark != ''">and s.meet_remark = #{meetRemark}</if>
            <if test="shjg != null  and shjg != ''">and s.shjg = #{shjg}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
            </if>

        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
        order by s.update_time desc
    </select>

    <select id="selectZsyzSbbzbById" parameterType="Long" resultMap="ZsyzSbbzbResult">
                select s.id, s.sbdw, s.tbrq, s.zszxfzr, s.xmbh, s.xmxsmc, s.sfwlhxxxm, s.yzdq_id, s.yzdq_name, s.yzss_name,
        s.ntze, s.cylx_id, s.cylx_name, s.xmlb,
        s.tzlb, s.nlhd, s.czpt, s.tzzt, s.xmjz, s.gtzzrsfzhm, s.qytzrxyzdm, s.qybj, s.tzfjj, s.sndxse, s.sndnse,
        s.tzrxm, s.tzrzw, s.tzrdh, s.xmjj,s.xmjzqk, s.name,
        s.strq, s.phone, s.zw, s.user_id, s.create_by, s.type, s.progress,s.xm_status, s.dept_id, s.create_time, s.update_by,
        s.is_del, s.update_time, s.remark, s.cjd_id,
        s.cjd_name, s.is_meet, s.meet_remark,s.shjg,s.psnr,s.czwt
        from zsyz_sbbzb s
        where s.id = #{id} and s.is_del = 'N'
    </select>

    <select id="selectZsyzSbbzbListDc" parameterType="ZsyzSbbzb" resultMap="ZsyzSbbzbResult">
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmxsmc as qxmxsmc,
        q.xmbh as qxmbh,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark,
        j.id as jid, j.xm_id as jxm_id, j.xmbh as jxmbh, j.xmmc as jxmmc, j.dept_id as jdept_id, j.dept_name as jdept_name, j.qtr_name, j.qt_time, j.qtrxz, j.qtrdwzw, j.phone as jphone, j.blsx,
        j.dbsx, j.jzqk, j.czwt as jczwt, j.jjjy, j.gzjh
        from zsyz_sbbzb s
        left join zsyz_qyxx q on s.id = q.xm_id
        left join zsyz_kgxx k on s.id = k.xm_id
        left join zsyz_tcxx t on s.id = t.xm_id
        left join zsyz_jzqk j on s.id = j.xm_id
        <where>
            s.is_del = 'N'
            <if test="sbdw != null  and sbdw != ''">and s.sbdw = #{sbdw}</if>
            <if test="tbrq != null ">and s.tbrq = #{tbrq}</if>
            <if test="zszxfzr != null  and zszxfzr != ''">and s.zszxfzr = #{zszxfzr}</if>
            <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
            <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
            <if test="sfwlhxxxm != null  and sfwlhxxxm != ''">and s.sfwlhxxxm = #{sfwlhxxxm}</if>
            <if test="yzdqId != null  and yzdqId != ''">and s.yzdq_id = #{yzdqId}</if>
            <if test="yzdqName != null  and yzdqName != ''">and s.yzdq_name like concat('%', #{yzdqName}, '%')</if>
            <if test="yzssName != null  and yzssName != ''">and s.yzss_name like concat('%', #{yzssName}, '%')</if>
            <if test="ntze != null  and ntze != ''">and s.ntze = #{ntze}</if>
            <if test="cylxId != null  and cylxId != ''">and s.cylx_id = #{cylxId}</if>
            <if test="cylxName != null  and cylxName != ''">and s.cylx_name like concat('%', #{cylxName}, '%')</if>
            <if test="xmlb != null  and xmlb != ''">and s.xmlb = #{xmlb}</if>
            <if test="tzlb != null  and tzlb != ''">and s.tzlb = #{tzlb}</if>
            <if test="nlhd != null  and nlhd != ''">and s.nlhd = #{nlhd}</if>
            <if test="czpt != null  and czpt != ''">and s.czpt = #{czpt}</if>
            <if test="tzzt != null  and tzzt != ''">and s.tzzt = #{tzzt}</if>
            <if test="xmjz != null  and xmjz != ''">and s.xmjz = #{xmjz}</if>
            <if test="gtzzrsfzhm != null  and gtzzrsfzhm != ''">and s.gtzzrsfzhm = #{gtzzrsfzhm}</if>
            <if test="qytzrxyzdm != null  and qytzrxyzdm != ''">and s.qytzrxyzdm = #{qytzrxyzdm}</if>
            <if test="qybj != null  and qybj != ''">and s.qybj = #{qybj}</if>
            <if test="tzfjj != null  and tzfjj != ''">and s.tzfjj = #{tzfjj}</if>
            <if test="sndxse != null  and sndxse != ''">and s.sndxse = #{sndxse}</if>
            <if test="sndnse != null  and sndnse != ''">and s.sndnse = #{sndnse}</if>
            <if test="tzrxm != null  and tzrxm != ''">and s.tzrxm = #{tzrxm}</if>
            <if test="tzrzw != null  and tzrzw != ''">and s.tzrzw = #{tzrzw}</if>
            <if test="tzrdh != null  and tzrdh != ''">and s.tzrdh = #{tzrdh}</if>
            <if test="xmjj != null  and xmjj != ''">and s.xmjj = #{xmjj}</if>
            <if test="name != null  and name != ''">and s.name like concat('%', #{name}, '%')</if>
            <if test="strq != null ">and s.strq = #{strq}</if>
            <if test="phone != null  and phone != ''">and s.phone = #{phone}</if>
            <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
            <if test="userId != null ">and s.user_id = #{userId}</if>
            <if test="type != null  and type != ''">and s.type = #{type}</if>
            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
            <if test="deptId != null ">and s.dept_id = #{deptId}</if>
            <if test="isDel != null  and isDel != ''">and s.is_del = #{isDel}</if>
            <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
            <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
            <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
            <if test="meetRemark != null  and meetRemark != ''">and s.meet_remark = #{meetRemark}</if>
            <if test="shjg != null  and shjg != ''">and s.shjg = #{shjg}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(s.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
            </if>
        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
        order by s.update_time desc
    </select>
    <select id="selectZsyzSbbzbListByZp" resultMap="ZsyzSbbzbResult">
        (
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmbh as qxmbh,
        q.xmxsmc as qxmxsmc,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark
        from zsyz_project_dept d
        left join zsyz_qyxx q on d.xm_id = q.xm_id
        left join zsyz_kgxx k on d.xm_id = k.xm_id
        left join zsyz_tcxx t on d.xm_id = t.xm_id
        left join zsyz_sbbzb s on s.id = d.xm_id
        where s.is_del = 'N'
        and d.dept_id = #{deptId} and d.is_del = 'N' and d.dept_type = '2'
        <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
        <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
        <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
        <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </if>
        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>
        order by s.update_time desc)
        UNION
        (
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmbh as qxmbh,
        q.xmxsmc as qxmxsmc,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark
        from zsyz_sbbzb s
        left join zsyz_qyxx q on s.id = q.xm_id
        left join zsyz_kgxx k on s.id = k.xm_id
        left join zsyz_tcxx t on s.id = t.xm_id
        where s.is_del = 'N'
        <if test="deptId != null  and deptId != ''">and s.dept_id = #{deptId}</if>
        <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
        <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
        <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
        <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </if>
        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>
        order by s.update_time desc)


    </select>

    <select id="selectZsyzSbbzbListByZpPs"  resultMap="ZsyzSbbzbResult">
        SELECT * from ( select s.id,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,s.xmjzqk,
        s.name,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,s.psnr,s.czwt
        from zsyz_project_dept d
        left join zsyz_sbbzb s on s.id = d.xm_id
        where s.is_del = 'N'
        and d.dept_id = #{deptId} and d.is_del = 'N' and d.dept_type = '2'
        <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
        <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
        <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
        <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </if>
        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>

        UNION

        select s.id,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,s.xmjzqk,
        s.name,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,s.psnr,s.czwt
        from zsyz_sbbzb s
        where s.is_del = 'N'
        <if test="deptId != null  and deptId != ''">and s.dept_id = #{deptId}</if>
        <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
        <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
        <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
        <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </if>
        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>

        )d
        ${params.dataScope}
        order by d.update_time desc
    </select>

    <select id="selectZsyzSbbzbListCount" resultType="java.lang.Long">
        select count(1)
        from (
        select s.id
        from zsyz_sbbzb s
        left join zsyz_shyj j on s.id = j.xm_id
        <where>
            s.is_del = 'N'
            <if test="sbdw != null  and sbdw != ''">and s.sbdw = #{sbdw}</if>
            <if test="tbrq != null ">and s.tbrq = #{tbrq}</if>
            <if test="zszxfzr != null  and zszxfzr != ''">and s.zszxfzr = #{zszxfzr}</if>
            <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
            <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
            <if test="sfwlhxxxm != null  and sfwlhxxxm != ''">and s.sfwlhxxxm = #{sfwlhxxxm}</if>
            <if test="yzdqId != null  and yzdqId != ''">and s.yzdq_id = #{yzdqId}</if>
            <if test="yzdqName != null  and yzdqName != ''">and s.yzdq_name like concat('%', #{yzdqName}, '%')</if>
            <if test="yzssName != null  and yzssName != ''">and s.yzss_name like concat('%', #{yzssName}, '%')</if>
            <if test="ntze != null  and ntze != ''">and s.ntze = #{ntze}</if>
            <if test="cylxId != null  and cylxId != ''">and s.cylx_id = #{cylxId}</if>
            <if test="cylxName != null  and cylxName != ''">and s.cylx_name like concat('%', #{cylxName}, '%')</if>
            <if test="xmlb != null  and xmlb != ''">and s.xmlb = #{xmlb}</if>
            <if test="tzlb != null  and tzlb != ''">and s.tzlb = #{tzlb}</if>
            <if test="nlhd != null  and nlhd != ''">and s.nlhd = #{nlhd}</if>
            <if test="czpt != null  and czpt != ''">and s.czpt = #{czpt}</if>
            <if test="tzzt != null  and tzzt != ''">and s.tzzt = #{tzzt}</if>
            <if test="xmjz != null  and xmjz != ''">and s.xmjz = #{xmjz}</if>
            <if test="gtzzrsfzhm != null  and gtzzrsfzhm != ''">and s.gtzzrsfzhm = #{gtzzrsfzhm}</if>
            <if test="qytzrxyzdm != null  and qytzrxyzdm != ''">and s.qytzrxyzdm = #{qytzrxyzdm}</if>
            <if test="qybj != null  and qybj != ''">and s.qybj = #{qybj}</if>
            <if test="tzfjj != null  and tzfjj != ''">and s.tzfjj = #{tzfjj}</if>
            <if test="sndxse != null  and sndxse != ''">and s.sndxse = #{sndxse}</if>
            <if test="sndnse != null  and sndnse != ''">and s.sndnse = #{sndnse}</if>
            <if test="tzrxm != null  and tzrxm != ''">and s.tzrxm = #{tzrxm}</if>
            <if test="tzrzw != null  and tzrzw != ''">and s.tzrzw = #{tzrzw}</if>
            <if test="tzrdh != null  and tzrdh != ''">and s.tzrdh = #{tzrdh}</if>
            <if test="xmjj != null  and xmjj != ''">and s.xmjj = #{xmjj}</if>
            <if test="name != null  and name != ''">and s.name like concat('%', #{name}, '%')</if>
            <if test="strq != null ">and s.strq = #{strq}</if>
            <if test="phone != null  and phone != ''">and s.phone = #{phone}</if>
            <if test="zw != null  and zw != ''">and s.zw = #{zw}</if>
            <if test="userId != null ">and s.user_id = #{userId}</if>
            <if test="type != null  and type != ''">and s.type = #{type}</if>
            <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
            <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
            <if test="cjdId != null ">and s.cjd_id = #{cjdId}</if>
            <if test="cjdName != null  and cjdName != ''">and s.cjd_name like concat('%', #{cjdName}, '%')</if>
            <if test="isMeet != null  and isMeet != ''">and s.is_meet = #{isMeet}</if>
            <if test="meetRemark != null  and meetRemark != ''">and s.meet_remark = #{meetRemark}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
            </if>
        </where>
        group by s.id ) a
    </select>
    <select id="selectZsyzSbbzbCjdList" parameterType="ZsyzSbbzb" resultMap="ZsyzSbbzbResult">
        <include refid="selectZsyzSbbzbVo"/>
        <where>
            is_del = 'N'
            <if test="xmbh != null  and xmbh != ''">and xmbh like concat('%', #{xmbh}, '%')</if>
            <if test="xmxsmc != null  and xmxsmc != ''">and xmxsmc like concat('%', #{xmxsmc}, '%')</if>
            <if test="cjdId != null ">and (cjd_id = #{cjdId} or dept_id = #{cjdId})</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
            </if>
        </where>
        order by update_time desc
    </select>

    <select id="selectZsyzSbbzbListYz" resultMap="ZsyzSbbzbResult">
        SELECT
        s.id ,
        s.sbdw,
        s.tbrq,
        s.zszxfzr,
        s.xmbh,
        s.xmxsmc,
        s.sfwlhxxxm,
        s.yzdq_id,
        s.yzdq_name,
        s.yzss_name,
        s.ntze,
        s.cylx_id,
        s.cylx_name,
        s.xmlb,
        s.tzlb,
        s.nlhd,
        s.czpt,
        s.tzzt,
        s.xmjz,
        s.gtzzrsfzhm,
        s.qytzrxyzdm,
        s.qybj,
        s.tzfjj,
        s.sndxse,
        s.sndnse,
        s.tzrxm,
        s.tzrzw,
        s.tzrdh,
        s.xmjj,
        s.xmjzqk,
        s.NAME,
        s.strq,
        s.phone,
        s.zw,
        s.user_id,
        s.create_by,
        s.type,
        s.progress,
        s.xm_status,
        s.dept_id,
        s.create_time,
        s.update_by,
        s.is_del,
        s.update_time,
        s.remark,
        s.cjd_id,
        s.cjd_name,
        s.is_meet,
        s.meet_remark,
        s.shjg,
        s.psnr,
        s.czwt,
        q.id as qid,
        q.xm_id as qxm_id,
        q.xmbh as qxmbh,
        q.xmxsmc as qxmxsmc,
        q.xmmc as qxmmc,
        q.dfqyr,
        q.wfqyr,
        q.tbrq as qtbrq,
        q.qyrq,
        q.xytzely,
        q.xytze,
        q.swzj,
        q.gdzctze,
        q.xmgjrxm,
        q.xmgjrzw,
        q.xmgjrsjh,
        q.xmszd,
        q.sshy,
        q.tzfs,
        q.jsfs,
        q.sfys,
        q.jsnr,
        q.zlcf as qzlcf,
        q.gdmj,
        q.zcqymc,
        q.zcrq,
        q.zczb,
        q.frdb,
        q.lxfs,
        q.jyfw,
        q.lxrq,
        q.nkgrq,
        q.path,
        q.create_by as qcreate_by,
        q.create_time as qcreate_time,
        q.update_by as qupdate_by,
        q.update_time as qupdate_time,
        q.remark as qremark,
        q.czwt as qczwt,
        k.id as kid,
        k.xm_id as kxm_id,
        k.xmbh as kxmbh,
        k.xmmc as kxmmc,
        k.kgrq,
        k.njgrq,
        k.sscrq,
        k.ntcsj,
        k.rtsj,
        k.nrtsj,
        k.kggjrsjh,
        k.create_by as kcreate_by,
        k.create_time as kcreate_time,
        k.update_by as kupdate_by,
        k.update_time as kupdate_time,
        k.remark as kremark,
        k.czwt as kczwt,
        t.id as tid,
        t.xm_id as txm_id,
        t.xmbh as txmbh,
        t.xmmc as txmmc,
        t.tcrq,
        t.rgsj,
        t.nrgsj,
        t.tcgjrsjh,
        t.sjdze,
        t.ydmj,
        t.tdcr,
        t.xjcf,
        t.cftr,
        t.sbqd,
        t.sbfp,
        t.sbht,
        t.fkpz,
        t.zlcf as tzlcf,
        t.zlcftr,
        t.zlsbqd,
        t.zlsbfp,
        t.zlsbht,
        t.zlfkpz,
        t.sjss,
        t.lxy,
        t.jnsb,
        t.zbtr,
        t.ndsjss,
        t.qt,
        t.create_by as tcreate_by,
        t.create_time as tcreate_time,
        t.update_by as tupdate_by,
        t.update_time as tupdate_time,
        t.czwt as tczwt,
        t.remark as tremark
        from zsyz_project_dept d
        left join zsyz_sbbzb s on s.id = d.xm_id
        left join zsyz_qyxx q on d.xm_id = q.xm_id
        left join zsyz_kgxx k on d.xm_id = k.xm_id
        left join zsyz_tcxx t on d.xm_id = t.xm_id
        where s.is_del = 'N'
        and d.dept_id = #{deptId} and d.is_del = 'N' and d.dept_type = '3'
        <if test="xmbh != null  and xmbh != ''">and s.xmbh like concat('%', #{xmbh}, '%')</if>
        <if test="xmxsmc != null  and xmxsmc != ''">and s.xmxsmc like concat('%', #{xmxsmc}, '%')</if>
        <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
        <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
        <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
        <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </if>
        <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(s.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>
        order by d.update_time desc
    </select>

    <select id="selectZsyzSbbzbListTz" resultMap="ZsyzSbbzbResult">
        SELECT
        ANY_VALUE(a.id) AS id,
        ANY_VALUE(a.xmbh) AS xmbh,
        ANY_VALUE(a.xmxsmc) AS xmxsmc,
        ANY_VALUE(a.user_id) AS user_id,
        ANY_VALUE(a.progress) AS progress,
        ANY_VALUE(a.xm_status) AS xm_status,
        ANY_VALUE(a.dept_id) AS dept_id,
        ANY_VALUE(MAX(a.shsj)) AS shsj
        FROM
        (
        SELECT
        s.id as id,
        s.xmbh as xmbh,
        s.xmxsmc as xmxsmc,
        s.user_id as user_id,
        s.progress as progress,
        s.xm_status as xm_status,
        s.dept_id as dept_id,
        j.shsj as shsj
        FROM
        zsyz_sbbzb s
        LEFT JOIN zsyz_shyj j ON s.xmbh = j.xmbh
        WHERE
        s.is_del = 'N'
        AND j.xmjd = '项目首谈'
        AND j.shjg = 2
        <if test="year != null  and year != ''">and j.shsj like concat( #{year}, '%')</if>
        <if test="deptId != null ">and s.dept_id = #{deptId}</if>
        ) a
        GROUP BY
        a.xmbh
    </select>

    <!--<select id="selectZsyzSbbzbListTz" resultMap="ZsyzSbbzbResult">
        SELECT
        a.id,
        a.xmbh,
        a.xmxsmc,
        a.user_id,
        a.progress,
        a.xm_status,
        a.dept_id,
        MAX(a.shsj) AS shsj
        FROM
        (
        SELECT
        s.id as id,
        s.xmbh as xmbh,
        s.xmxsmc as xmxsmc,
        s.user_id as user_id,
        s.progress as progress,
        s.xm_status as xm_status,
        s.dept_id as dept_id,
        j.shsj as shsj
        FROM
        zsyz_sbbzb s
        LEFT JOIN zsyz_shyj j ON s.xmbh = j.xmbh
        WHERE
        s.is_del = 'N'
        AND j.xmjd = '项目首谈'
        AND j.shjg = 2
        <if test="year != null  and year != ''">and s.cjd_name like concat( #{year}, '%')</if>
        ) a
        GROUP BY
        a.xmbh
    </select>-->
    <select id="selectZsyzSbbzbCcList" resultType="java.lang.Integer" parameterType="ZsyzSbbzb">
        select count(0)
        from zsyz_sbbzb s
        <where>
            s.is_del = 'N'
            <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="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 = #{yzdqName}</if>
            <if test="yzssName != null  and yzssName != ''">and yzss_name = #{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 = #{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  = #{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 find_in_set(progress , #{progress})</if>
            <if test="xmStatus != null  and xmStatus != ''">and xm_status = #{xmStatus}</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>
            <if test="shjg != null  and shjg != ''">and shjg = #{shjg}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
            </if>
        </where>
    </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="xmjzqk != null">xmjzqk,</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="xmStatus != null">xm_status,</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>
            <if test="shjg != null">shjg,</if>
            <if test="psnr != null">psnr,</if>
            <if test="czwt != null">czwt,</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="xmjzqk != null">#{xmjzqk},</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="xmStatus != null">#{xmStatus},</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>
            <if test="shjg != null">#{shjg},</if>
            <if test="psnr != null">#{psnr},</if>
            <if test="czwt != null">#{czwt},</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="xmjzqk != null">xmjzqk = #{xmjzqk},</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="xmStatus != null">xm_status = #{xmStatus},</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>
            <if test="shjg != null">shjg = #{shjg},</if>
            <if test="psnr != null">psnr = #{psnr},</if>
            <if test="czwt != null">czwt = #{czwt},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="updateZsyzSbbzbCjd" parameterType="ZsyzSbbzb">
        update zsyz_sbbzb
        <trim prefix="SET" suffixOverrides=",">
            <if test="progress != null">progress = #{progress},</if>
            <if test="xmStatus != null">xm_status = #{xmStatus},</if>
            <if test="cjdId != null">cjd_id = #{cjdId},</if>
            <if test="cjdName != null">cjd_name = #{cjdName},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="updateZsyzSbbzbForZc" parameterType="ZsyzSbbzb">
        update zsyz_sbbzb
        <trim prefix="SET" suffixOverrides=",">
            <if test="type != null and type != ''">type = #{type},</if>
            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="updateZsyzSbbzbProgress" parameterType="ZsyzSbbzb">
        update zsyz_sbbzb
        <trim prefix="SET" suffixOverrides=",">
            <if test="progress != null and progress != ''">progress = #{progress},</if>
            <if test="xmStatus != null and xmStatus != ''">xm_status = #{xmStatus},</if>
            <if test="shjg != null and shjg != ''">shjg = #{shjg},</if>
            <if test=" progress == 1">cjd_id = null,</if>
            <if test=" progress == 1">cjd_name = null,</if>
            <if test=" sfwlhxxxm != null">sfwlhxxxm = #{sfwlhxxxm},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="updateZsyzSbbzbMeet" parameterType="ZsyzSbbzb">
        update zsyz_sbbzb
        set is_meet = #{isMeet}
        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>