<?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.hzya.frame.grpU8.nxproof.glxmzl.dao.impl.SenderGlXmzlDaoImpl">

    <resultMap id="get-SenderGlXmzlEntity-result" type="com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity" >
       <result property="gsdm" column="GSDM" jdbcType="VARCHAR"/>
           <result property="kjnd" column="KJND" jdbcType="VARCHAR"/>
           <result property="xmdm" column="XMDM" jdbcType="VARCHAR"/>
           <result property="xmmc" column="XMMC" jdbcType="VARCHAR"/>
           <result property="zjm" column="ZJM" jdbcType="VARCHAR"/>
           <result property="ksrq" column="KSRQ" jdbcType="VARCHAR"/>
           <result property="jsrq" column="JSRQ" jdbcType="VARCHAR"/>
           <result property="bmdm" column="BMDM" jdbcType="VARCHAR"/>
           <result property="bm" column="BM" jdbcType="VARCHAR"/>
           <result property="ren" column="REN" jdbcType="VARCHAR"/>
           <result property="zy" column="ZY" jdbcType="VARCHAR"/>
           <result property="syzt" column="SYZT" jdbcType="VARCHAR"/>
           <result property="jlrId" column="JLR_ID" jdbcType="INTEGER"/>
           <result property="jlRq" column="JL_RQ" jdbcType="VARCHAR"/>
           <result property="xgrId" column="XGR_ID" jdbcType="INTEGER"/>
           <result property="xgRq" column="XG_RQ" jdbcType="VARCHAR"/>
           <result property="sjly" column="SJLY" jdbcType="VARCHAR"/>
           <result property="sfmx" column="SFMX" jdbcType="VARCHAR"/>
           <result property="projobjid" column="PROJOBJID" jdbcType="VARCHAR"/>
           <result property="zdxmbz" column="ZDXMBZ" jdbcType="VARCHAR"/>
           <result property="kzfs" column="KZFS" jdbcType="VARCHAR"/>
           <result property="isjbzc" column="ISJBZC" jdbcType="VARCHAR"/>
           <result property="lxnd" column="LXND" jdbcType="VARCHAR"/>
           <result property="zjly" column="ZJLY" jdbcType="VARCHAR"/>
           <result property="xmfl" column="XMFL" jdbcType="VARCHAR"/>
           <result property="sfjt" column="SFJT" jdbcType="VARCHAR"/>
           <result property="ren2" column="REN2" jdbcType="VARCHAR"/>
           <result property="ren3" column="REN3" jdbcType="VARCHAR"/>
           <result property="ysje" column="YSJE" jdbcType="NUMERIC"/>
           <result property="glh" column="GLH" jdbcType="VARCHAR"/>
           <result property="sfjjxm" column="sfjjxm" jdbcType="VARCHAR"/>
        </resultMap>
    <!-- 查询的字段-->
    <sql id = "SenderGlXmzlEntity_Base_Column_List">
        GSDM
       ,KJND 
        ,XMDM 
        ,XMMC 
        ,ZJM 
        ,KSRQ 
        ,JSRQ 
        ,BMDM 
        ,BM 
        ,REN 
        ,ZY 
        ,SYZT 
        ,JLR_ID 
        ,JL_RQ 
        ,XGR_ID 
        ,XG_RQ 
        ,SJLY 
        ,SFMX 
        ,PROJOBJID 
        ,ZDXMBZ 
        ,KZFS 
        ,ISJBZC 
        ,LXND 
        ,ZJLY 
        ,XMFL 
        ,SFJT 
        ,REN2 
        ,REN3 
        ,YSJE 
        ,GLH
        ,sfjjxm
     </sql>
 <!-- 查询 采用==查询 -->
 <select id="entity_list_base" resultMap="get-SenderGlXmzlEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity">
    select
    <include refid="SenderGlXmzlEntity_Base_Column_List" />
    from gl_xmzl
    <trim prefix="where" prefixOverrides="and"> 
        <if test="gsdm != null and gsdm != ''"> and GSDM = #{gsdm} </if>
            <if test="kjnd != null and kjnd != ''"> and KJND = #{kjnd} </if>
            <if test="xmdm != null and xmdm != ''"> and XMDM = #{xmdm} </if>
            <if test="xmmc != null and xmmc != ''"> and XMMC = #{xmmc} </if>
            <if test="zjm != null and zjm != ''"> and ZJM = #{zjm} </if>
            <if test="ksrq != null and ksrq != ''"> and KSRQ = #{ksrq} </if>
            <if test="jsrq != null and jsrq != ''"> and JSRQ = #{jsrq} </if>
            <if test="bmdm != null and bmdm != ''"> and BMDM = #{bmdm} </if>
            <if test="bm != null and bm != ''"> and BM = #{bm} </if>
            <if test="ren != null and ren != ''"> and REN = #{ren} </if>
            <if test="zy != null and zy != ''"> and ZY = #{zy} </if>
            <if test="syzt != null and syzt != ''"> and SYZT = #{syzt} </if>
            <if test="jlrId != null"> and JLR_ID = #{jlrId} </if>
            <if test="jlRq != null and jlRq != ''"> and JL_RQ = #{jlRq} </if>
            <if test="xgrId != null"> and XGR_ID = #{xgrId} </if>
            <if test="xgRq != null and xgRq != ''"> and XG_RQ >= #{xgRq} </if>
            <if test="sjly != null and sjly != ''"> and SJLY = #{sjly} </if>
            <if test="sfmx != null and sfmx != ''"> and SFMX = #{sfmx} </if>
            <if test="projobjid != null and projobjid != ''"> and PROJOBJID = #{projobjid} </if>
            <if test="zdxmbz != null and zdxmbz != ''"> and ZDXMBZ = #{zdxmbz} </if>
            <if test="kzfs != null and kzfs != ''"> and KZFS = #{kzfs} </if>
            <if test="isjbzc != null and isjbzc != ''"> and ISJBZC = #{isjbzc} </if>
            <if test="lxnd != null and lxnd != ''"> and LXND = #{lxnd} </if>
            <if test="zjly != null and zjly != ''"> and ZJLY = #{zjly} </if>
            <if test="xmfl != null and xmfl != ''"> and XMFL = #{xmfl} </if>
            <if test="sfjt != null and sfjt != ''"> and SFJT = #{sfjt} </if>
            <if test="ren2 != null and ren2 != ''"> and REN2 = #{ren2} </if>
            <if test="ren3 != null and ren3 != ''"> and REN3 = #{ren3} </if>
            <if test="ysje != null"> and YSJE = #{ysje} </if>
            <if test="glh != null and glh != ''"> and GLH = #{glh} </if>
            <if test="sfjjxm != null and sfjjxm != ''"> and sfjjxm = #{sfjjxm} </if>
       -- and gsdm in ('0101010201','0101010202')
    </trim>
</select>
    
<!-- 查询符合条件的数量 -->
<select id="SenderGlXmzlEntity_count" resultType="Integer" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity">
        select  count(1)   from gl_xmzl
    <trim prefix="where" prefixOverrides="and"> 
        <if test="gsdm != null and gsdm != ''"> and GSDM = #{gsdm} </if>
            <if test="kjnd != null and kjnd != ''"> and KJND = #{kjnd} </if>
            <if test="xmdm != null and xmdm != ''"> and XMDM = #{xmdm} </if>
            <if test="xmmc != null and xmmc != ''"> and XMMC = #{xmmc} </if>
            <if test="zjm != null and zjm != ''"> and ZJM = #{zjm} </if>
            <if test="ksrq != null and ksrq != ''"> and KSRQ = #{ksrq} </if>
            <if test="jsrq != null and jsrq != ''"> and JSRQ = #{jsrq} </if>
            <if test="bmdm != null and bmdm != ''"> and BMDM = #{bmdm} </if>
            <if test="bm != null and bm != ''"> and BM = #{bm} </if>
            <if test="ren != null and ren != ''"> and REN = #{ren} </if>
            <if test="zy != null and zy != ''"> and ZY = #{zy} </if>
            <if test="syzt != null and syzt != ''"> and SYZT = #{syzt} </if>
            <if test="jlrId != null"> and JLR_ID = #{jlrId} </if>
            <if test="jlRq != null and jlRq != ''"> and JL_RQ = #{jlRq} </if>
            <if test="xgrId != null"> and XGR_ID = #{xgrId} </if>
            <if test="xgRq != null and xgRq != ''"> and XG_RQ = #{xgRq} </if>
            <if test="sjly != null and sjly != ''"> and SJLY = #{sjly} </if>
            <if test="sfmx != null and sfmx != ''"> and SFMX = #{sfmx} </if>
            <if test="projobjid != null and projobjid != ''"> and PROJOBJID = #{projobjid} </if>
            <if test="zdxmbz != null and zdxmbz != ''"> and ZDXMBZ = #{zdxmbz} </if>
            <if test="kzfs != null and kzfs != ''"> and KZFS = #{kzfs} </if>
            <if test="isjbzc != null and isjbzc != ''"> and ISJBZC = #{isjbzc} </if>
            <if test="lxnd != null and lxnd != ''"> and LXND = #{lxnd} </if>
            <if test="zjly != null and zjly != ''"> and ZJLY = #{zjly} </if>
            <if test="xmfl != null and xmfl != ''"> and XMFL = #{xmfl} </if>
            <if test="sfjt != null and sfjt != ''"> and SFJT = #{sfjt} </if>
            <if test="ren2 != null and ren2 != ''"> and REN2 = #{ren2} </if>
            <if test="ren3 != null and ren3 != ''"> and REN3 = #{ren3} </if>
            <if test="ysje != null"> and YSJE = #{ysje} </if>
            <if test="glh != null and glh != ''"> and GLH = #{glh} </if>
    </trim>
    </select>

    <!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-SenderGlXmzlEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity">
    select
    <include refid="SenderGlXmzlEntity_Base_Column_List" />
    from gl_xmzl
    <trim prefix="where" prefixOverrides="and"> 
        <if test="gsdm != null and gsdm != ''"> and GSDM like concat('%',#{gsdm},'%') </if>
            <if test="kjnd != null and kjnd != ''"> and KJND like concat('%',#{kjnd},'%') </if>
            <if test="xmdm != null and xmdm != ''"> and XMDM like concat('%',#{xmdm},'%') </if>
            <if test="xmmc != null and xmmc != ''"> and XMMC like concat('%',#{xmmc},'%') </if>
            <if test="zjm != null and zjm != ''"> and ZJM like concat('%',#{zjm},'%') </if>
            <if test="ksrq != null and ksrq != ''"> and KSRQ like concat('%',#{ksrq},'%') </if>
            <if test="jsrq != null and jsrq != ''"> and JSRQ like concat('%',#{jsrq},'%') </if>
            <if test="bmdm != null and bmdm != ''"> and BMDM like concat('%',#{bmdm},'%') </if>
            <if test="bm != null and bm != ''"> and BM like concat('%',#{bm},'%') </if>
            <if test="ren != null and ren != ''"> and REN like concat('%',#{ren},'%') </if>
            <if test="zy != null and zy != ''"> and ZY like concat('%',#{zy},'%') </if>
            <if test="syzt != null and syzt != ''"> and SYZT like concat('%',#{syzt},'%') </if>
            <if test="jlrId != null"> and JLR_ID like concat('%',#{jlrId},'%') </if>
            <if test="jlRq != null and jlRq != ''"> and JL_RQ like concat('%',#{jlRq},'%') </if>
            <if test="xgrId != null"> and XGR_ID like concat('%',#{xgrId},'%') </if>
            <if test="xgRq != null and xgRq != ''"> and XG_RQ like concat('%',#{xgRq},'%') </if>
            <if test="sjly != null and sjly != ''"> and SJLY like concat('%',#{sjly},'%') </if>
            <if test="sfmx != null and sfmx != ''"> and SFMX like concat('%',#{sfmx},'%') </if>
            <if test="projobjid != null and projobjid != ''"> and PROJOBJID like concat('%',#{projobjid},'%') </if>
            <if test="zdxmbz != null and zdxmbz != ''"> and ZDXMBZ like concat('%',#{zdxmbz},'%') </if>
            <if test="kzfs != null and kzfs != ''"> and KZFS like concat('%',#{kzfs},'%') </if>
            <if test="isjbzc != null and isjbzc != ''"> and ISJBZC like concat('%',#{isjbzc},'%') </if>
            <if test="lxnd != null and lxnd != ''"> and LXND like concat('%',#{lxnd},'%') </if>
            <if test="zjly != null and zjly != ''"> and ZJLY like concat('%',#{zjly},'%') </if>
            <if test="xmfl != null and xmfl != ''"> and XMFL like concat('%',#{xmfl},'%') </if>
            <if test="sfjt != null and sfjt != ''"> and SFJT like concat('%',#{sfjt},'%') </if>
            <if test="ren2 != null and ren2 != ''"> and REN2 like concat('%',#{ren2},'%') </if>
            <if test="ren3 != null and ren3 != ''"> and REN3 like concat('%',#{ren3},'%') </if>
            <if test="ysje != null"> and YSJE like concat('%',#{ysje},'%') </if>
            <if test="glh != null and glh != ''"> and GLH like concat('%',#{glh},'%') </if>
    </trim>
</select>

<!-- 查询列表 字段采用or格式 -->
<select id="SenderGlXmzlEntity_list_or" resultMap="get-SenderGlXmzlEntity-result" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity">
    select
    <include refid="SenderGlXmzlEntity_Base_Column_List" />
    from gl_xmzl
    <trim prefix="where" prefixOverrides="and"> 
         <if test="gsdm != null and gsdm != ''"> or GSDM = #{gsdm} </if>
             <if test="kjnd != null and kjnd != ''"> or KJND = #{kjnd} </if>
             <if test="xmdm != null and xmdm != ''"> or XMDM = #{xmdm} </if>
             <if test="xmmc != null and xmmc != ''"> or XMMC = #{xmmc} </if>
             <if test="zjm != null and zjm != ''"> or ZJM = #{zjm} </if>
             <if test="ksrq != null and ksrq != ''"> or KSRQ = #{ksrq} </if>
             <if test="jsrq != null and jsrq != ''"> or JSRQ = #{jsrq} </if>
             <if test="bmdm != null and bmdm != ''"> or BMDM = #{bmdm} </if>
             <if test="bm != null and bm != ''"> or BM = #{bm} </if>
             <if test="ren != null and ren != ''"> or REN = #{ren} </if>
             <if test="zy != null and zy != ''"> or ZY = #{zy} </if>
             <if test="syzt != null and syzt != ''"> or SYZT = #{syzt} </if>
             <if test="jlrId != null"> or JLR_ID = #{jlrId} </if>
             <if test="jlRq != null and jlRq != ''"> or JL_RQ = #{jlRq} </if>
             <if test="xgrId != null"> or XGR_ID = #{xgrId} </if>
             <if test="xgRq != null and xgRq != ''"> or XG_RQ = #{xgRq} </if>
             <if test="sjly != null and sjly != ''"> or SJLY = #{sjly} </if>
             <if test="sfmx != null and sfmx != ''"> or SFMX = #{sfmx} </if>
             <if test="projobjid != null and projobjid != ''"> or PROJOBJID = #{projobjid} </if>
             <if test="zdxmbz != null and zdxmbz != ''"> or ZDXMBZ = #{zdxmbz} </if>
             <if test="kzfs != null and kzfs != ''"> or KZFS = #{kzfs} </if>
             <if test="isjbzc != null and isjbzc != ''"> or ISJBZC = #{isjbzc} </if>
             <if test="lxnd != null and lxnd != ''"> or LXND = #{lxnd} </if>
             <if test="zjly != null and zjly != ''"> or ZJLY = #{zjly} </if>
             <if test="xmfl != null and xmfl != ''"> or XMFL = #{xmfl} </if>
             <if test="sfjt != null and sfjt != ''"> or SFJT = #{sfjt} </if>
             <if test="ren2 != null and ren2 != ''"> or REN2 = #{ren2} </if>
             <if test="ren3 != null and ren3 != ''"> or REN3 = #{ren3} </if>
             <if test="ysje != null"> or YSJE = #{ysje} </if>
             <if test="glh != null and glh != ''"> or GLH = #{glh} </if>
    </trim>
</select>

<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity" keyProperty="" useGeneratedKeys="true">
    insert into gl_xmzl(
    <trim suffix="" suffixOverrides=",">
        <if test="kjnd != null and kjnd != ''"> KJND , </if>
        <if test="xmdm != null and xmdm != ''"> XMDM , </if>
        <if test="xmmc != null and xmmc != ''"> XMMC , </if>
        <if test="zjm != null and zjm != ''"> ZJM , </if>
        <if test="ksrq != null and ksrq != ''"> KSRQ , </if>
        <if test="jsrq != null and jsrq != ''"> JSRQ , </if>
        <if test="bmdm != null and bmdm != ''"> BMDM , </if>
        <if test="bm != null and bm != ''"> BM , </if>
        <if test="ren != null and ren != ''"> REN , </if>
        <if test="zy != null and zy != ''"> ZY , </if>
        <if test="syzt != null and syzt != ''"> SYZT , </if>
        <if test="jlrId != null"> JLR_ID , </if>
        <if test="jlRq != null and jlRq != ''"> JL_RQ , </if>
        <if test="xgrId != null"> XGR_ID , </if>
        <if test="xgRq != null and xgRq != ''"> XG_RQ , </if>
        <if test="sjly != null and sjly != ''"> SJLY , </if>
        <if test="sfmx != null and sfmx != ''"> SFMX , </if>
        <if test="projobjid != null and projobjid != ''"> PROJOBJID , </if>
        <if test="zdxmbz != null and zdxmbz != ''"> ZDXMBZ , </if>
        <if test="kzfs != null and kzfs != ''"> KZFS , </if>
        <if test="isjbzc != null and isjbzc != ''"> ISJBZC , </if>
        <if test="lxnd != null and lxnd != ''"> LXND , </if>
        <if test="zjly != null and zjly != ''"> ZJLY , </if>
        <if test="xmfl != null and xmfl != ''"> XMFL , </if>
        <if test="sfjt != null and sfjt != ''"> SFJT , </if>
        <if test="ren2 != null and ren2 != ''"> REN2 , </if>
        <if test="ren3 != null and ren3 != ''"> REN3 , </if>
        <if test="ysje != null"> YSJE , </if>
        <if test="glh != null and glh != ''"> GLH,  </if>
        <if test="sfjjxm != null and sfjjxm != ''"> sfjjxm,  </if>
        <if test="gsdm != null and gsdm != ''"> GSDM  </if>
    </trim>
    )values(
    <trim suffix="" suffixOverrides=",">
        <if test="kjnd != null and kjnd != ''"> #{kjnd} ,</if>
        <if test="xmdm != null and xmdm != ''"> #{xmdm} ,</if>
        <if test="xmmc != null and xmmc != ''"> #{xmmc} ,</if>
        <if test="zjm != null and zjm != ''"> #{zjm} ,</if>
        <if test="ksrq != null and ksrq != ''"> #{ksrq} ,</if>
        <if test="jsrq != null and jsrq != ''"> #{jsrq} ,</if>
        <if test="bmdm != null and bmdm != ''"> #{bmdm} ,</if>
        <if test="bm != null and bm != ''"> #{bm} ,</if>
        <if test="ren != null and ren != ''"> #{ren} ,</if>
        <if test="zy != null and zy != ''"> #{zy} ,</if>
        <if test="syzt != null and syzt != ''"> #{syzt} ,</if>
        <if test="jlrId != null"> #{jlrId} ,</if>
        <if test="jlRq != null and jlRq != ''"> #{jlRq} ,</if>
        <if test="xgrId != null"> #{xgrId} ,</if>
        <if test="xgRq != null and xgRq != ''"> #{xgRq} ,</if>
        <if test="sjly != null and sjly != ''"> #{sjly} ,</if>
        <if test="sfmx != null and sfmx != ''"> #{sfmx} ,</if>
        <if test="projobjid != null and projobjid != ''"> #{projobjid} ,</if>
        <if test="zdxmbz != null and zdxmbz != ''"> #{zdxmbz} ,</if>
        <if test="kzfs != null and kzfs != ''"> #{kzfs} ,</if>
        <if test="isjbzc != null and isjbzc != ''"> #{isjbzc} ,</if>
        <if test="lxnd != null and lxnd != ''"> #{lxnd} ,</if>
        <if test="zjly != null and zjly != ''"> #{zjly} ,</if>
        <if test="xmfl != null and xmfl != ''"> #{xmfl} ,</if>
        <if test="sfjt != null and sfjt != ''"> #{sfjt} ,</if>
        <if test="ren2 != null and ren2 != ''"> #{ren2} ,</if>
        <if test="ren3 != null and ren3 != ''"> #{ren3} ,</if>
        <if test="ysje != null"> #{ysje} ,</if>
        <if test="glh != null and glh != ''"> #{glh} ,</if>
        <if test="sfjjxm != null and sfjjxm != ''"> #{sfjjxm} ,</if>
        <if test="gsdm != null and gsdm != ''"> #{gsdm} </if>
    </trim>
    )
</insert>


<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="" useGeneratedKeys="true">
  insert into gl_xmzl(id,GSDM, KJND, XMDM, XMMC, ZJM, KSRQ, JSRQ, BMDM, BM, REN, ZY, SYZT, JLR_ID, JL_RQ, XGR_ID, XG_RQ, SJLY, SFMX, PROJOBJID, ZDXMBZ, KZFS, ISJBZC, LXND, ZJLY, XMFL, SFJT, REN2, REN3, YSJE, GLH)
    values
    <foreach collection="entities" item="entity" separator=",">
    (#{entity.id},#{entity.gsdm},#{entity.kjnd},#{entity.xmdm},#{entity.xmmc},#{entity.zjm},#{entity.ksrq},#{entity.jsrq},#{entity.bmdm},#{entity.bm},#{entity.ren},#{entity.zy},#{entity.syzt},#{entity.jlrId},#{entity.jlRq},#{entity.xgrId},#{entity.xgRq},#{entity.sjly},#{entity.sfmx},#{entity.projobjid},#{entity.zdxmbz},#{entity.kzfs},#{entity.isjbzc},#{entity.lxnd},#{entity.zjly},#{entity.xmfl},#{entity.sfjt},#{entity.ren2},#{entity.ren3},#{entity.ysje},#{entity.glh})
    </foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="" useGeneratedKeys="true">
    insert into gl_xmzl(id,GSDM, KJND, XMDM, XMMC, ZJM, KSRQ, JSRQ, BMDM, BM, REN, ZY, SYZT, JLR_ID, JL_RQ, XGR_ID, XG_RQ, SJLY, SFMX, PROJOBJID, ZDXMBZ, KZFS, ISJBZC, LXND, ZJLY, XMFL, SFJT, REN2, REN3, YSJE, GLH)
    values
    <foreach collection="entities" item="entity" separator=",">
    (#{entity.id},#{entity.gsdm},#{entity.kjnd},#{entity.xmdm},#{entity.xmmc},#{entity.zjm},#{entity.ksrq},#{entity.jsrq},#{entity.bmdm},#{entity.bm},#{entity.ren},#{entity.zy},#{entity.syzt},#{entity.jlrId},#{entity.jlRq},#{entity.xgrId},#{entity.xgRq},#{entity.sjly},#{entity.sfmx},#{entity.projobjid},#{entity.zdxmbz},#{entity.kzfs},#{entity.isjbzc},#{entity.lxnd},#{entity.zjly},#{entity.xmfl},#{entity.sfjt},#{entity.ren2},#{entity.ren3},#{entity.ysje},#{entity.glh})
    </foreach>
    on duplicate key update
    GSDM = values(GSDM),
    KJND = values(KJND),
    XMDM = values(XMDM),
    XMMC = values(XMMC),
    ZJM = values(ZJM),
    KSRQ = values(KSRQ),
    JSRQ = values(JSRQ),
    BMDM = values(BMDM),
    BM = values(BM),
    REN = values(REN),
    ZY = values(ZY),
    SYZT = values(SYZT),
    JLR_ID = values(JLR_ID),
    JL_RQ = values(JL_RQ),
    XGR_ID = values(XGR_ID),
    XG_RQ = values(XG_RQ),
    SJLY = values(SJLY),
    SFMX = values(SFMX),
    PROJOBJID = values(PROJOBJID),
    ZDXMBZ = values(ZDXMBZ),
    KZFS = values(KZFS),
    ISJBZC = values(ISJBZC),
    LXND = values(LXND),
    ZJLY = values(ZJLY),
    XMFL = values(XMFL),
    SFJT = values(SFJT),
    REN2 = values(REN2),
    REN3 = values(REN3),
    YSJE = values(YSJE),
    GLH = values(GLH)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity" >
    update gl_xmzl  set
    <trim suffix="" suffixOverrides=",">
        <if test="gsdm != null and gsdm != ''"> GSDM = #{gsdm},</if>
        <if test="kjnd != null and kjnd != ''"> KJND = #{kjnd},</if>
        <if test="xmdm != null and xmdm != ''"> XMDM = #{xmdm},</if>
        <if test="xmmc != null and xmmc != ''"> XMMC = #{xmmc},</if>
        <if test="zjm != null and zjm != ''"> ZJM = #{zjm},</if>
        <if test="ksrq != null and ksrq != ''"> KSRQ = #{ksrq},</if>
        <if test="jsrq != null and jsrq != ''"> JSRQ = #{jsrq},</if>
        <if test="bmdm != null and bmdm != ''"> BMDM = #{bmdm},</if>
        <if test="bm != null and bm != ''"> BM = #{bm},</if>
        <if test="ren != null and ren != ''"> REN = #{ren},</if>
        <if test="zy != null and zy != ''"> ZY = #{zy},</if>
        <if test="syzt != null and syzt != ''"> SYZT = #{syzt},</if>
        <if test="jlrId != null"> JLR_ID = #{jlrId},</if>
        <if test="jlRq != null and jlRq != ''"> JL_RQ = #{jlRq},</if>
        <if test="xgrId != null"> XGR_ID = #{xgrId},</if>
        <if test="xgRq != null and xgRq != ''"> XG_RQ = #{xgRq},</if>
        <if test="sjly != null and sjly != ''"> SJLY = #{sjly},</if>
        <if test="sfmx != null and sfmx != ''"> SFMX = #{sfmx},</if>
        <if test="projobjid != null and projobjid != ''"> PROJOBJID = #{projobjid},</if>
        <if test="zdxmbz != null and zdxmbz != ''"> ZDXMBZ = #{zdxmbz},</if>
        <if test="kzfs != null and kzfs != ''"> KZFS = #{kzfs},</if>
        <if test="isjbzc != null and isjbzc != ''"> ISJBZC = #{isjbzc},</if>
        <if test="lxnd != null and lxnd != ''"> LXND = #{lxnd},</if>
        <if test="zjly != null and zjly != ''"> ZJLY = #{zjly},</if>
        <if test="xmfl != null and xmfl != ''"> XMFL = #{xmfl},</if>
        <if test="sfjt != null and sfjt != ''"> SFJT = #{sfjt},</if>
        <if test="ren2 != null and ren2 != ''"> REN2 = #{ren2},</if>
        <if test="ren3 != null and ren3 != ''"> REN3 = #{ren3},</if>
        <if test="ysje != null"> YSJE = #{ysje},</if>
        <if test="sfjjxm != null"> sfjjxm = #{sfjjxm},</if>
        <if test="glh != null and glh != ''"> GLH = #{glh}</if>
    </trim>
    where  kjnd= #{kjnd} and gsdm=#{gsdm} and xmdm=#{xmdm}
</update>

<!-- 逻辑删除 -->
<update id="SenderGlXmzlEntity_logicDelete" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity" >
update gl_xmzl  set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where  id= #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="SenderGlXmzlEntity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.grpU8.nxproof.glxmzl.entity.SenderGlXmzlEntity" >
update gl_xmzl  set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
 <trim prefix="where" prefixOverrides="and"> 
        <if test="gsdm != null and gsdm != ''"> and GSDM = #{gsdm} </if>
            <if test="kjnd != null and kjnd != ''"> and KJND = #{kjnd} </if>
            <if test="xmdm != null and xmdm != ''"> and XMDM = #{xmdm} </if>
            <if test="xmmc != null and xmmc != ''"> and XMMC = #{xmmc} </if>
            <if test="zjm != null and zjm != ''"> and ZJM = #{zjm} </if>
            <if test="ksrq != null and ksrq != ''"> and KSRQ = #{ksrq} </if>
            <if test="jsrq != null and jsrq != ''"> and JSRQ = #{jsrq} </if>
            <if test="bmdm != null and bmdm != ''"> and BMDM = #{bmdm} </if>
            <if test="bm != null and bm != ''"> and BM = #{bm} </if>
            <if test="ren != null and ren != ''"> and REN = #{ren} </if>
            <if test="zy != null and zy != ''"> and ZY = #{zy} </if>
            <if test="syzt != null and syzt != ''"> and SYZT = #{syzt} </if>
            <if test="jlrId != null"> and JLR_ID = #{jlrId} </if>
            <if test="jlRq != null and jlRq != ''"> and JL_RQ = #{jlRq} </if>
            <if test="xgrId != null"> and XGR_ID = #{xgrId} </if>
            <if test="xgRq != null and xgRq != ''"> and XG_RQ = #{xgRq} </if>
            <if test="sjly != null and sjly != ''"> and SJLY = #{sjly} </if>
            <if test="sfmx != null and sfmx != ''"> and SFMX = #{sfmx} </if>
            <if test="projobjid != null and projobjid != ''"> and PROJOBJID = #{projobjid} </if>
            <if test="zdxmbz != null and zdxmbz != ''"> and ZDXMBZ = #{zdxmbz} </if>
            <if test="kzfs != null and kzfs != ''"> and KZFS = #{kzfs} </if>
            <if test="isjbzc != null and isjbzc != ''"> and ISJBZC = #{isjbzc} </if>
            <if test="lxnd != null and lxnd != ''"> and LXND = #{lxnd} </if>
            <if test="zjly != null and zjly != ''"> and ZJLY = #{zjly} </if>
            <if test="xmfl != null and xmfl != ''"> and XMFL = #{xmfl} </if>
            <if test="sfjt != null and sfjt != ''"> and SFJT = #{sfjt} </if>
            <if test="ren2 != null and ren2 != ''"> and REN2 = #{ren2} </if>
            <if test="ren3 != null and ren3 != ''"> and REN3 = #{ren3} </if>
            <if test="ysje != null"> and YSJE = #{ysje} </if>
            <if test="glh != null and glh != ''"> and GLH = #{glh} </if>
            and sts='Y'
    </trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
    delete from gl_xmzl where  id= #{id}
</delete>

    <!--通过会计年度，公司代码，项目资料代码删除-->
    <delete id="SenderGlXmzlEntity_delete_xmzl">
        delete from gl_xmzl where  gsdm= #{gsdm} and kjnd=#{kjnd}
        <if test="xmdm != null and xmdm != ''"> and xmdm = #{xmdm} </if>
    </delete>
</mapper>

