<?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="Sbtdspyzdbean" type="cn.vp.XXX.model.SbtdspyzdBean"/> -->	<typeAlias alias="Sbtdspyzd" type="cn.im.trafficdevice.SbtdspyzdBean"/>
	
	<sql id="condition_Sbtdspyzd">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKExh'>
			(xh like '%$LIKExh$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sbbh'>
			(sbbh = #sbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdbh'>
			(tdbh like '%$LIKEtdbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdbh'>
			(tdbh = #tdbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdmc'>
			(tdmc = #tdmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyzdwmc'>
			(yzdwmc like '%$LIKEyzdwmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yzdwmc'>
			(yzdwmc = #yzdwmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyzdwx'>
			(yzdwx like '%$LIKEyzdwx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yzdwx'>
			(yzdwx = #yzdwx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyzdwy'>
			(yzdwy like '%$LIKEyzdwy$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yzdwy'>
			(yzdwy = #yzdwy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyzdwjl'>
			(yzdwjl like '%$LIKEyzdwjl$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yzdwjl'>
			(yzdwjl = #yzdwjl# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyzdwz'>
			(yzdwz like '%$LIKEyzdwz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yzdwz'>
			(yzdwz = #yzdwz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfqy'>
			(sfqy like '%$LIKEsfqy$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfqy'>
			(sfqy = #sfqy# )
		</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_Sbtdspyzd" parameterClass="java.util.Map">
		insert into 
		sbtdspyzd(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>sbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>tdbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>tdmc</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwmc'>yzdwmc</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwx'>yzdwx</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwy'>yzdwy</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwjl'>yzdwjl</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwz'>yzdwz</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>sfqy</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='sbbh'>#sbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>#tdbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>#tdmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwmc'>#yzdwmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwx'>#yzdwx#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwy'>#yzdwy#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwjl'>#yzdwjl#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwz'>#yzdwz#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>#sfqy#</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_Sbtdspyzd" parameterClass="java.util.Map">
		update sbtdspyzd 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='sbbh'>sbbh=#sbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>tdbh=#tdbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>tdmc=#tdmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwmc'>yzdwmc=#yzdwmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwx'>yzdwx=#yzdwx#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwy'>yzdwy=#yzdwy#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwjl'>yzdwjl=#yzdwjl#</isNotEmpty>
			<isNotEmpty prepend=',' property='yzdwz'>yzdwz=#yzdwz#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>sfqy=#sfqy#</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='XGTJsbbh'> sbbh = #XGTJsbbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtdbh'> tdbh = #XGTJtdbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtdmc'> tdmc = #XGTJtdmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyzdwmc'> yzdwmc = #XGTJyzdwmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyzdwx'> yzdwx = #XGTJyzdwx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyzdwy'> yzdwy = #XGTJyzdwy# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyzdwjl'> yzdwjl = #XGTJyzdwjl# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyzdwz'> yzdwz = #XGTJyzdwz# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsfqy'> sfqy = #XGTJsfqy# </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_Sbtdspyzd" parameterClass="java.util.Map">
		delete from sbtdspyzd 
		<include refid="condition_Sbtdspyzd"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Sbtdspyzd" parameterClass="java.util.Map">
		delete from sbtdspyzd 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Sbtdspyzd" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,sbbh,tdbh,tdmc,yzdwmc,yzdwx,yzdwy,yzdwjl,yzdwz,sfqy,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from sbtdspyzd 
		<include refid="condition_Sbtdspyzd"/>		
	</select>
	<select id="get_SbtdspyzdOne" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,sbbh,tdbh,tdmc,yzdwmc,yzdwx,yzdwy,yzdwjl,yzdwz,sfqy,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from sbtdspyzd 
		<include refid="condition_Sbtdspyzd"/>	
		order by cjrq desc
		limit 1	
	</select>
	<select id="getAll" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,sbbh,tdbh,tdmc,yzdwmc,yzdwx,yzdwy,yzdwjl,yzdwz,sfqy,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from sbtdspyzd 
		order by cjrq desc
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Sbtdspyzd" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from sbtdspyzd 
		<include refid="condition_Sbtdspyzd"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Sbtdspyzd" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into sbtdspyzd(
			 <![CDATA[ 
				xh,sbbh,tdbh,tdmc,yzdwmc,yzdwx,yzdwy,yzdwjl,yzdwz,sfqy,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].xh#,#list[].sbbh#,#list[].tdbh#,#list[].tdmc#,#list[].yzdwmc#,#list[].yzdwx#,#list[].yzdwy#,#list[].yzdwjl#,#list[].yzdwz#,#list[].sfqy#,#list[].cjry#,#list[].cjrq#,#list[].xgry#,#list[].xgrq#,#list[].bz#,#list[].kz1#,#list[].kz2#,#list[].kz3#,#list[].kz4#
				)
			]]>    
    	</iterate> 
	</insert>
	<insert id="batchInsert" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT into sbtdspyzd(xh,sbbh,tdbh,kz1 ,tdmc,xgrq,cjrq,sfqy)values
      	]]>
      	<iterate conjunction=", " > 
			
			 		 
			 <![CDATA[ 
				(
				#list[].xh#,#list[].sbbh#,#list[].tdbh#,#list[].kz1#,#list[].tdmc#,#list[].xgrq#,#list[].cjrq#,#list[].sfqy#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











