<?xml version="1.0" encoding="gbk" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="">
    <!-- 	<typeAlias alias="Ksh_kkxxbean" type="cn.vp.XXX.model.Ksh_kkxxBean"/> -->
    <typeAlias alias="Ksh_kkxx" type="cn.im.nhyw.Ksh_kkxxBean"/>

    <sql id="condition_Ksh_kkxx">
        where 1=1
        <isNotEmpty prepend='AND ' property='LIKElkbh'>
            (lkbh like '%$LIKElkbh$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='lkbh'>
            (lkbh = #lkbh# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKElkmc'>
            (lkmc like '%$LIKElkmc$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='jd'>
            (jd = #jd# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEjd'>
            (jd like '%$LIKEjd$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='wd'>
            (wd = #wd# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEwd'>
            (wd like '%$LIKEwd$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='gxdwmc'>
            (gxdwmc = #gxdwmc# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEgxdwmc'>
            (gxdwmc like '%$LIKEgxdwmc$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='gxdwdm'>
            (gxdwdm = #gxdwdm# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEgxdwdm'>
            (gxdwdm like '%$LIKEgxdwdm$%' )
        </isNotEmpty>

        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        <isNotEmpty property='order'>
            $order$
        </isNotEmpty>
    </sql>

    <!-- add object -->
    <insert id="insert_Ksh_kkxx" parameterClass="java.util.Map">
        insert into
		its.Ksh_kkxx(
        <dynamic prepend=" ">
            <isNotEmpty prepend=',' property='lkbh'>lkbh</isNotEmpty>
            <isNotEmpty prepend=',' property='lkmc'>lkmc</isNotEmpty>
            <isNotEmpty prepend=',' property='jd'>jd</isNotEmpty>
            <isNotEmpty prepend=',' property='wd'>wd</isNotEmpty>
            <isNotEmpty prepend=',' property='bz'>bz</isNotEmpty>
            <isNotEmpty prepend=',' property='gxdwdm'>gxdwdm</isNotEmpty>
            <isNotEmpty prepend=',' property='gxdwmc'>gxdwmc</isNotEmpty>
        </dynamic>
        <![CDATA[
	        ) values (
	    ]]>
        <dynamic prepend=" ">
			<isNotEmpty prepend=',' property='lkbh'>#lkbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='lkmc'>#lkmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='bz'>#bz#</isNotEmpty>
			<isNotEmpty prepend=',' property='gxdwdm'>#gxdwdm#</isNotEmpty>
			<isNotEmpty prepend=',' property='gxdwmc'>#gxdwmc#</isNotEmpty>
        </dynamic>
        <![CDATA[
	        )
	    ]]>
    </insert>

    <!-- edit object  -->
    <update id="update_Ksh_kkxx" parameterClass="java.util.Map">
        update its.Ksh_kkxx
        <dynamic prepend="set ">

			<isNotEmpty prepend=',' property='lkmc'> lkmc=#lkmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'> jd=#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'> wd=#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='bz'> bz=#bz#</isNotEmpty>
			<isNotEmpty prepend=',' property='gxdwdm'> gxdwdm=#gxdwdm#</isNotEmpty>
			<isNotEmpty prepend=',' property='gxdwmc'> gxdwmc=#gxdwmc#</isNotEmpty>

        </dynamic>
        where 1=1
        <isNotEmpty prepend='AND ' property='XGTJlkbh'> lkbh = #XGTJlkbh#</isNotEmpty>

    </update>

    <update id="updateKsh_kkxxByXh" parameterClass="java.util.HashMap">
		update its.Ksh_kkxx set  jd = #jd# , wd=#wd#, lkmc=#lkmc#,bz=#bz# , gxdwdm =#gxdwdm#,gxdwmc =#gxdwmc#   where 1=1 and lkbh = #lkbh#
	</update>

    <!-- delete object -->
    <delete id="delete_Ksh_kkxx" parameterClass="java.util.Map">
        delete from its.Ksh_kkxx
        <include refid="condition_Ksh_kkxx"/>
    </delete>

    <!-- batch delete object -->
    <delete id="batch_delete_Ksh_kkxx" parameterClass="java.util.Map">
        delete from its.Ksh_kkxx
        where 1=1
        <isNotEmpty prepend='AND ' property='keyword'>
            key in (#keyword#)
        </isNotEmpty>
    </delete>

    <!-- query objects by page-->
    <select id="query_Ksh_kkxx" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        select *  from its.Ksh_kkxx
        <include refid="condition_Ksh_kkxx"/>
    </select>

    <!-- query objects totalcount -->
    <select id="count_Ksh_kkxx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(*) from its.Ksh_kkxx
        <include refid="condition_Ksh_kkxx"/>
    </select>

    <!-- batch add objects -->
    <insert id="batch_insert_Ksh_kkxx" parameterClass="java.util.List">
        <![CDATA[
          INSERT
      	]]>
        <iterate conjunction=" ">
            into its.Ksh_kkxx(
            <![CDATA[
				lkbh,lkmc,jd,wd,bz,gxdwdm,gxdwmc
			)values
			 ]]>
            <![CDATA[
				(
				#list[].lkbh#,#list[].lkmc#,#list[].jd#,#list[].wd#,#list[].bz#,#list[].gxdwdm#,#list[].gxdwmc#
				)
			]]>
        </iterate>
    </insert>
</sqlMap>











