<?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.ZsyzQyxxMapper">
    
    <resultMap type="ZsyzQyxx" id="ZsyzQyxxResult">
        <result property="id"    column="id"    />
        <result property="xmId"    column="xm_id"    />
        <result property="xmbh"    column="xmbh"    />
        <result property="xmmc"    column="xmmc"    />
        <result property="dfqyr"    column="dfqyr"    />
        <result property="wfqyr"    column="wfqyr"    />
        <result property="tbrq"    column="tbrq"    />
        <result property="qyrq"    column="qyrq"    />
        <result property="xytze"    column="xytze"    />
        <result property="swzj"    column="swzj"    />
        <result property="gdzctze"    column="gdzctze"    />
        <result property="qygjrsjh"    column="qygjrsjh"    />
        <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="ydmj"    column="ydmj"    />
        <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="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>

    <sql id="selectZsyzQyxxVo">
        select id, xm_id, xmbh, xmmc, dfqyr, wfqyr, tbrq, qyrq, xytze, swzj, gdzctze, qygjrsjh, xmszd, sshy, tzfs, jsfs, sfys, jsnr, ydmj, zcqymc, zcrq, zczb, frdb, lxfs, jyfw, lxrq, nkgrq, path, create_by, create_time, update_by, update_time, remark from zsyz_qyxx
    </sql>

    <select id="selectZsyzQyxxList" parameterType="ZsyzQyxx" resultMap="ZsyzQyxxResult">
        <include refid="selectZsyzQyxxVo"/>
        <where>  
            <if test="xmId != null "> and xm_id = #{xmId}</if>
            <if test="xmbh != null  and xmbh != ''"> and xmbh = #{xmbh}</if>
            <if test="xmmc != null  and xmmc != ''"> and xmmc = #{xmmc}</if>
            <if test="dfqyr != null  and dfqyr != ''"> and dfqyr = #{dfqyr}</if>
            <if test="wfqyr != null  and wfqyr != ''"> and wfqyr = #{wfqyr}</if>
            <if test="tbrq != null "> and tbrq = #{tbrq}</if>
            <if test="qyrq != null "> and qyrq = #{qyrq}</if>
            <if test="xytze != null  and xytze != ''"> and xytze = #{xytze}</if>
            <if test="swzj != null  and swzj != ''"> and swzj = #{swzj}</if>
            <if test="gdzctze != null  and gdzctze != ''"> and gdzctze = #{gdzctze}</if>
            <if test="qygjrsjh != null  and qygjrsjh != ''"> and qygjrsjh = #{qygjrsjh}</if>
            <if test="xmszd != null  and xmszd != ''"> and xmszd = #{xmszd}</if>
            <if test="sshy != null  and sshy != ''"> and sshy = #{sshy}</if>
            <if test="tzfs != null  and tzfs != ''"> and tzfs = #{tzfs}</if>
            <if test="jsfs != null  and jsfs != ''"> and jsfs = #{jsfs}</if>
            <if test="sfys != null  and sfys != ''"> and sfys = #{sfys}</if>
            <if test="jsnr != null  and jsnr != ''"> and jsnr = #{jsnr}</if>
            <if test="ydmj != null  and ydmj != ''"> and ydmj = #{ydmj}</if>
            <if test="zcqymc != null  and zcqymc != ''"> and zcqymc = #{zcqymc}</if>
            <if test="zcrq != null "> and zcrq = #{zcrq}</if>
            <if test="zczb != null  and zczb != ''"> and zczb = #{zczb}</if>
            <if test="frdb != null  and frdb != ''"> and frdb = #{frdb}</if>
            <if test="lxfs != null  and lxfs != ''"> and lxfs = #{lxfs}</if>
            <if test="jyfw != null  and jyfw != ''"> and jyfw = #{jyfw}</if>
            <if test="lxrq != null "> and lxrq = #{lxrq}</if>
            <if test="nkgrq != null "> and nkgrq = #{nkgrq}</if>
            <if test="path != null  and path != ''"> and path = #{path}</if>
        </where>
    </select>
    
    <select id="selectZsyzQyxxById" parameterType="Long" resultMap="ZsyzQyxxResult">
        <include refid="selectZsyzQyxxVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertZsyzQyxx" parameterType="ZsyzQyxx" useGeneratedKeys="true" keyProperty="id">
        insert into zsyz_qyxx
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="xmId != null">xm_id,</if>
            <if test="xmbh != null">xmbh,</if>
            <if test="xmmc != null and xmmc != ''">xmmc,</if>
            <if test="dfqyr != null and dfqyr != ''">dfqyr,</if>
            <if test="wfqyr != null and wfqyr != ''">wfqyr,</if>
            <if test="tbrq != null">tbrq,</if>
            <if test="qyrq != null">qyrq,</if>
            <if test="xytze != null and xytze != ''">xytze,</if>
            <if test="swzj != null">swzj,</if>
            <if test="gdzctze != null and gdzctze != ''">gdzctze,</if>
            <if test="qygjrsjh != null and qygjrsjh != ''">qygjrsjh,</if>
            <if test="xmszd != null and xmszd != ''">xmszd,</if>
            <if test="sshy != null and sshy != ''">sshy,</if>
            <if test="tzfs != null and tzfs != ''">tzfs,</if>
            <if test="jsfs != null and jsfs != ''">jsfs,</if>
            <if test="sfys != null and sfys != ''">sfys,</if>
            <if test="jsnr != null and jsnr != ''">jsnr,</if>
            <if test="ydmj != null and ydmj != ''">ydmj,</if>
            <if test="zcqymc != null and zcqymc != ''">zcqymc,</if>
            <if test="zcrq != null">zcrq,</if>
            <if test="zczb != null and zczb != ''">zczb,</if>
            <if test="frdb != null and frdb != ''">frdb,</if>
            <if test="lxfs != null and lxfs != ''">lxfs,</if>
            <if test="jyfw != null and jyfw != ''">jyfw,</if>
            <if test="lxrq != null">lxrq,</if>
            <if test="nkgrq != null">nkgrq,</if>
            <if test="path != null">path,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="xmId != null">#{xmId},</if>
            <if test="xmbh != null">#{xmbh},</if>
            <if test="xmmc != null and xmmc != ''">#{xmmc},</if>
            <if test="dfqyr != null and dfqyr != ''">#{dfqyr},</if>
            <if test="wfqyr != null and wfqyr != ''">#{wfqyr},</if>
            <if test="tbrq != null">#{tbrq},</if>
            <if test="qyrq != null">#{qyrq},</if>
            <if test="xytze != null and xytze != ''">#{xytze},</if>
            <if test="swzj != null">#{swzj},</if>
            <if test="gdzctze != null and gdzctze != ''">#{gdzctze},</if>
            <if test="qygjrsjh != null and qygjrsjh != ''">#{qygjrsjh},</if>
            <if test="xmszd != null and xmszd != ''">#{xmszd},</if>
            <if test="sshy != null and sshy != ''">#{sshy},</if>
            <if test="tzfs != null and tzfs != ''">#{tzfs},</if>
            <if test="jsfs != null and jsfs != ''">#{jsfs},</if>
            <if test="sfys != null and sfys != ''">#{sfys},</if>
            <if test="jsnr != null and jsnr != ''">#{jsnr},</if>
            <if test="ydmj != null and ydmj != ''">#{ydmj},</if>
            <if test="zcqymc != null and zcqymc != ''">#{zcqymc},</if>
            <if test="zcrq != null">#{zcrq},</if>
            <if test="zczb != null and zczb != ''">#{zczb},</if>
            <if test="frdb != null and frdb != ''">#{frdb},</if>
            <if test="lxfs != null and lxfs != ''">#{lxfs},</if>
            <if test="jyfw != null and jyfw != ''">#{jyfw},</if>
            <if test="lxrq != null">#{lxrq},</if>
            <if test="nkgrq != null">#{nkgrq},</if>
            <if test="path != null">#{path},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
    </insert>

    <update id="updateZsyzQyxx" parameterType="ZsyzQyxx">
        update zsyz_qyxx
        <trim prefix="SET" suffixOverrides=",">
            <if test="xmId != null">xm_id = #{xmId},</if>
            <if test="xmbh != null">xmbh = #{xmbh},</if>
            <if test="xmmc != null and xmmc != ''">xmmc = #{xmmc},</if>
            <if test="dfqyr != null and dfqyr != ''">dfqyr = #{dfqyr},</if>
            <if test="wfqyr != null and wfqyr != ''">wfqyr = #{wfqyr},</if>
            <if test="tbrq != null">tbrq = #{tbrq},</if>
            <if test="qyrq != null">qyrq = #{qyrq},</if>
            <if test="xytze != null and xytze != ''">xytze = #{xytze},</if>
            <if test="swzj != null">swzj = #{swzj},</if>
            <if test="gdzctze != null and gdzctze != ''">gdzctze = #{gdzctze},</if>
            <if test="qygjrsjh != null and qygjrsjh != ''">qygjrsjh = #{qygjrsjh},</if>
            <if test="xmszd != null and xmszd != ''">xmszd = #{xmszd},</if>
            <if test="sshy != null and sshy != ''">sshy = #{sshy},</if>
            <if test="tzfs != null and tzfs != ''">tzfs = #{tzfs},</if>
            <if test="jsfs != null and jsfs != ''">jsfs = #{jsfs},</if>
            <if test="sfys != null and sfys != ''">sfys = #{sfys},</if>
            <if test="jsnr != null and jsnr != ''">jsnr = #{jsnr},</if>
            <if test="ydmj != null and ydmj != ''">ydmj = #{ydmj},</if>
            <if test="zcqymc != null and zcqymc != ''">zcqymc = #{zcqymc},</if>
            <if test="zcrq != null">zcrq = #{zcrq},</if>
            <if test="zczb != null and zczb != ''">zczb = #{zczb},</if>
            <if test="frdb != null and frdb != ''">frdb = #{frdb},</if>
            <if test="lxfs != null and lxfs != ''">lxfs = #{lxfs},</if>
            <if test="jyfw != null and jyfw != ''">jyfw = #{jyfw},</if>
            <if test="lxrq != null">lxrq = #{lxrq},</if>
            <if test="nkgrq != null">nkgrq = #{nkgrq},</if>
            <if test="path != null">path = #{path},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
        </trim>
        where id = #{id}
    </update>

    <delete id="deleteZsyzQyxxById" parameterType="Long">
        delete from zsyz_qyxx where id = #{id}
    </delete>

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