<?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="">
    <sql id="condition_Ywglbmkh">
        where 1=1
        <isNotEmpty prepend='AND ' property='xh'>
            (xh = #xh# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEkhdxbh'>
            (khdxbh like '%$LIKEkhdxbh$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='khdxbh'>
            (khdxbh = #khdxbh# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEkhdxmc'>
            (khdxmc like '%$LIKEkhdxmc$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='khdxmc'>
            (khdxmc = #khdxmc# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEpjyf'>
            (pjyf like '%$LIKEpjyf$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='pjyf'>
            (pjyf = #pjyf# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='LIKEscore'>
            (score like '%$LIKEcsqc$%' )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='score'>
            (score = #score# )
        </isNotEmpty>
        <isNotEmpty prepend='AND ' property='khtype'>
            (khtype = #khtype# )
        </isNotEmpty>
        <isNotEmpty property='tableparam'>
            $tableparam$
        </isNotEmpty>
        <isNotEmpty property='order'>
            $order$
        </isNotEmpty>

    </sql>

    <!-- add object -->
    <insert id="insert_Ywglbmkh" parameterClass="java.util.Map">
        insert into
        Ywglbmkh(
        <dynamic prepend=" ">
            <isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
            <isNotEmpty prepend=',' property='khdxbh'>khdxbh</isNotEmpty>
            <isNotEmpty prepend=',' property='khdxmc'>khdxmc</isNotEmpty>
            <isNotEmpty prepend=',' property='pjyf'>pjyf</isNotEmpty>
            <isNotEmpty prepend=',' property='cjrq'>cjrq</isNotEmpty>
            <isNotEmpty prepend=',' property='cjry'>cjry</isNotEmpty>
            <isNotEmpty prepend=',' property='xgrq'>xgrq</isNotEmpty>
            <isNotEmpty prepend=',' property='xgry'>xgry</isNotEmpty>
            <isNotEmpty prepend=',' property='score'>score</isNotEmpty>
            <isNotEmpty prepend=',' property='bz'>bz</isNotEmpty>
            <isNotEmpty prepend=',' property='khtype'>khtype</isNotEmpty>
        </dynamic>
        <![CDATA[
	        ) values (
	    ]]>
        <dynamic prepend=" ">
            <isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
            <isNotEmpty prepend=',' property='khdxbh'>#khdxbh#</isNotEmpty>
            <isNotEmpty prepend=',' property='khdxmc'>#khdxmc#</isNotEmpty>
            <isNotEmpty prepend=',' property='pjyf'>#pjyf#</isNotEmpty>
            <isNotEmpty prepend=',' property='cjrq'>#cjrq#</isNotEmpty>
            <isNotEmpty prepend=',' property='cjry'>#cjry#</isNotEmpty>
            <isNotEmpty prepend=',' property='xgrq'>#xgrq#</isNotEmpty>
            <isNotEmpty prepend=',' property='xgry'>#xgry#</isNotEmpty>
            <isNotEmpty prepend=',' property='score'>#score#</isNotEmpty>
            <isNotEmpty prepend=',' property='bz'>#bz#</isNotEmpty>
            <isNotEmpty prepend=',' property='khtype'>#khtype#</isNotEmpty>
        </dynamic>
        <![CDATA[
	        )
	    ]]>
    </insert>

    <!-- edit object  -->
    <update id="update_Ywglbmkh" parameterClass="java.util.Map">
        update Ywglbmkh
        <dynamic prepend="set ">
            <isNotEmpty prepend=',' property='khdxbh'>khdxbh=#khdxbh#</isNotEmpty>
            <isNotEmpty prepend=',' property='khdxmc'>khdxmc=#khdxmc#</isNotEmpty>
            <isNotEmpty prepend=',' property='pjyf'>pjyf=#pjyf#</isNotEmpty>
            <isNotEmpty prepend=',' property='cjrq'>cjrq=#cjrq#</isNotEmpty>
            <isNotEmpty prepend=',' property='cjry'>cjry=#cjry#</isNotEmpty>
            <isNotEmpty prepend=',' property='xgrq'>xgrq=#xgrq#</isNotEmpty>
            <isNotEmpty prepend=',' property='xgry'>xgry=#xgry#</isNotEmpty>
            <isNotEmpty prepend=',' property='score'>score=#score#</isNotEmpty>
            <isNotEmpty prepend=',' property='bz'>bz=#bz#</isNotEmpty>
        </dynamic>
        where xh = #XGTJxh#
    </update>

    <!-- delete object -->
    <delete id="delete_Ywglbmkh" parameterClass="java.util.Map">
		delete from Ywglbmkh where xh = #xh#
	</delete>

    <!-- batch delete object -->
    <delete id="batch_delete_Ywglbmkh" parameterClass="java.util.Map">
		delete from Ywglbmkh
		where xh  in (#keyword#)
	</delete>

    <!-- query objects by page-->
    <select id="query_Ywglbmkh" resultClass="java.util.HashMap" parameterClass="java.util.Map">
        select xh,khdxbh,khdxmc,pjyf,cjrq,cjry,xgrq,xgry,bz,score from Ywglbmkh
        <include refid="condition_Ywglbmkh"/>
    </select>

    <!-- query objects totalcount -->
    <select id="count_Ywglbmkh" resultClass="java.lang.Integer" parameterClass="java.util.Map">
        select count(*) from Ywglbmkh
        <include refid="condition_Ywglbmkh"/>
    </select>

    <!-- batch add objects -->
    <insert id="batch_insert_Ywglbmkh" parameterClass="java.util.List">
        <![CDATA[
          INSERT
      	]]>
        <iterate conjunction=" ">
            into Ywglbmkh(
            <![CDATA[xh,khdxbh, khdxmc, pjyf, cjrq, cjry, xgrq, xgry, bz, score
			 ]]>
            <![CDATA[
				(
				#list[].xh#,#list[].khdxbh#,#list[].khdxmc#,#list[].pjyf#,#list[].cjrq#,#list[].cjry#,#list[].xgrq#,#list[].xgry#,#list[].bz#,#list[].score#
				)
			]]>
        </iterate>
    </insert>
</sqlMap>











