<?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_Nhywxmxx">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKExh'>
			(xh like '%$LIKExh$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmmc'>
			(xmmc like '%$LIKExmmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmmc'>
			(xmmc = #xmmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmbh'>
			(xmbh like '%$LIKExmbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmbh'>
			(xmbh = #xmbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmjc'>
			(xmjc like '%$LIKExmjc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmjc'>
			(xmjc = #xmjc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEgysbh'>
			(gysbh like '%$LIKEgysbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='gysbh'>
			(gysbh = #gysbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEgysmc'>
			(gysmc like '%$LIKEgysmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='gysmc'>
			(gysmc = #gysmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmlx'>
			(xmlx like '%$LIKExmlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmlx'>
			(xmlx = #xmlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmfzr'>
			(xmfzr like '%$LIKExmfzr$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmfzr'>
			(xmfzr = #xmfzr# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfzrdw'>
			(fzrdw like '%$LIKEfzrdw$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fzrdw'>
			(fzrdw = #fzrdw# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfzrdh'>
			(fzrdh like '%$LIKEfzrdh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fzrdh'>
			(fzrdh = #fzrdh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmscjd'>
			(xmscjd like '%$LIKExmscjd$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmscjd'>
			(xmscjd = #xmscjd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEscjdsm'>
			(scjdsm like '%$LIKEscjdsm$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='scjdsm'>
			(scjdsm = #scjdsm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExmms'>
			(xmms like '%$LIKExmms$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xmms'>
			(xmms = #xmms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjry'>
			(cjry like '%$LIKEcjry$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjry'>
			(cjry = #cjry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjrq'>
			(cjrq like '%$LIKEcjrq$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjrq'>
			(cjrq = #cjrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgry'>
			(xgry like '%$LIKExgry$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgry'>
			(xgry = #xgry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgrq'>
			(xgrq like '%$LIKExgrq$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgrq'>
			(xgrq = #xgrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbz'>
			(bz like '%$LIKEbz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bz'>
			(bz = #bz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz1'>
			(kz1 like '%$LIKEkz1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz1'>
			(kz1 = #kz1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz2'>
			(kz2 like '%$LIKEkz2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz2'>
			(kz2 = #kz2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz3'>
			(kz3 like '%$LIKEkz3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz3'>
			(kz3 = #kz3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz4'>
			(kz4 like '%$LIKEkz4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz4'>
			(kz4 = #kz4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Nhywxmxx" parameterClass="java.util.Map">
		insert into 
		nhywxmxx(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='xmmc'>xmmc</isNotEmpty>
			<isNotEmpty prepend=',' property='xmbh'>xmbh</isNotEmpty>
			<isNotEmpty prepend=',' property='xmjc'>xmjc</isNotEmpty>
			<isNotEmpty prepend=',' property='gysbh'>gysbh</isNotEmpty>
			<isNotEmpty prepend=',' property='gysmc'>gysmc</isNotEmpty>
			<isNotEmpty prepend=',' property='xmlx'>xmlx</isNotEmpty>
			<isNotEmpty prepend=',' property='xmfzr'>xmfzr</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdw'>fzrdw</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdh'>fzrdh</isNotEmpty>
			<isNotEmpty prepend=',' property='xmscjd'>xmscjd</isNotEmpty>
			<isNotEmpty prepend=',' property='scjdsm'>scjdsm</isNotEmpty>
			<isNotEmpty prepend=',' property='xmms'>xmms</isNotEmpty>
			<isNotEmpty prepend=',' property='cjry'>cjry</isNotEmpty>
			<isNotEmpty prepend=',' property='cjrq'>cjrq</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>xgry</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>xgrq</isNotEmpty>
			<isNotEmpty prepend=',' property='bz'>bz</isNotEmpty>
			<isNotEmpty prepend=',' property='kz1'>kz1</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>kz2</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>kz3</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>kz4</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmmc'>#xmmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmbh'>#xmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmjc'>#xmjc#</isNotEmpty>
			<isNotEmpty prepend=',' property='gysbh'>#gysbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='gysmc'>#gysmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmlx'>#xmlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmfzr'>#xmfzr#</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdw'>#fzrdw#</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdh'>#fzrdh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmscjd'>#xmscjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='scjdsm'>#scjdsm#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmms'>#xmms#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjry'>#cjry#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjrq'>#cjrq#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>#xgry#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>#xgrq#</isNotEmpty>
			<isNotEmpty prepend=',' property='bz'>#bz#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz1'>#kz1#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>#kz2#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>#kz3#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>#kz4#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Nhywxmxx" parameterClass="java.util.Map">
		update nhywxmxx 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='xmmc'>xmmc=#xmmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmbh'>xmbh=#xmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmjc'>xmjc=#xmjc#</isNotEmpty>
			<isNotEmpty prepend=',' property='gysbh'>gysbh=#gysbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='gysmc'>gysmc=#gysmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmlx'>xmlx=#xmlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmfzr'>xmfzr=#xmfzr#</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdw'>fzrdw=#fzrdw#</isNotEmpty>
			<isNotEmpty prepend=',' property='fzrdh'>fzrdh=#fzrdh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmscjd'>xmscjd=#xmscjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='scjdsm'>scjdsm=#scjdsm#</isNotEmpty>
			<isNotEmpty prepend=',' property='xmms'>xmms=#xmms#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjry'>cjry=#cjry#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjrq'>cjrq=#cjrq#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>xgry=#xgry#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>xgrq=#xgrq#</isNotEmpty>
			<isNotEmpty prepend=',' property='bz'>bz=#bz#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz1'>kz1=#kz1#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>kz2=#kz2#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>kz3=#kz3#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>kz4=#kz4#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJxh'> xh = #XGTJxh#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmmc'> xmmc = #XGTJxmmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmbh'> xmbh = #XGTJxmbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmjc'> xmjc = #XGTJxmjc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJgysbh'> gysbh = #XGTJgysbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJgysmc'> gysmc = #XGTJgysmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmlx'> xmlx = #XGTJxmlx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmfzr'> xmfzr = #XGTJxmfzr# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfzrdw'> fzrdw = #XGTJfzrdw# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfzrdh'> fzrdh = #XGTJfzrdh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmscjd'> xmscjd = #XGTJxmscjd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJscjdsm'> scjdsm = #XGTJscjdsm# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxmms'> xmms = #XGTJxmms# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcjry'> cjry = #XGTJcjry# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcjrq'> cjrq = #XGTJcjrq# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxgry'> xgry = #XGTJxgry# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxgrq'> xgrq = #XGTJxgrq# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbz'> bz = #XGTJbz# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz1'> kz1 = #XGTJkz1# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz2'> kz2 = #XGTJkz2# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz3'> kz3 = #XGTJkz3# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz4'> kz4 = #XGTJkz4# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Nhywxmxx" parameterClass="java.util.Map">
		delete from nhywxmxx 
		<include refid="condition_Nhywxmxx"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Nhywxmxx" parameterClass="java.util.Map">
		delete from nhywxmxx 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Nhywxmxx" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			a.xh,xmmc,xmbh,xmjc,gysbh,gysmc,xmlx,xmfzr,fzrdw,fzrdh,xmscjd,scjdsm,xmms,a.cjry,a.cjrq,
			a.xgry,a.xgrq,a.bz,kz1,kz2,kz3,kz4,b.csmc as xmlxmc
		from nhywxmxx a left join xtcl b on a.xmlx=b.csdm and b.csdl = 'nhywXmlx'
		<include refid="condition_Nhywxmxx"/>		
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Nhywxmxx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from nhywxmxx 
		<include refid="condition_Nhywxmxx"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Nhywxmxx" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into nhywxmxx(
			 <![CDATA[ 
				xh,xmmc,xmbh,xmjc,gysbh,gysmc,xmlx,xmfzr,fzrdw,fzrdh,xmscjd,scjdsm,xmms,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].xh#,#list[].xmmc#,#list[].xmbh#,#list[].xmjc#,#list[].gysbh#,#list[].gysmc#,#list[].xmlx#,#list[].xmfzr#,#list[].fzrdw#,#list[].fzrdh#,#list[].xmscjd#,#list[].scjdsm#,#list[].xmms#,#list[].cjry#,#list[].cjrq#,#list[].xgry#,#list[].xgrq#,#list[].bz#,#list[].kz1#,#list[].kz2#,#list[].kz3#,#list[].kz4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











