<?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="Sbtdtpqx" >
<!-- 	<typeAlias alias="Sbtdtpqxbean" type="com.vp.XXX.model.SbtdtpqxBean"/> -->
	
	<sql id="condition_Sbtdtpqx">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKExh'>
			(xh like concat('%',#LIKExh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkhbh'>
			(khbh like concat('%',#LIKEkhbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khbh'>
			(khbh = #khbh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbmbh'>
			(bmbh like concat('%',#LIKEbmbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwbbh'>
			(wbbh like concat('%',#LIKEwbbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wbbh'>
			(wbbh = #wbbh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdqx'>
			(dqx like concat('%',#LIKEdqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dqx'>
			(dqx = #dqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExqx'>
			(xqx like concat('%',#LIKExqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xqx'>
			(xqx = #xqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkqx'>
			(kqx like concat('%',#LIKEkqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kqx'>
			(kqx = #kqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEpqx'>
			(pqx like concat('%',#LIKEpqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='pqx'>
			(pqx = #pqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxhfqx'>
			(lxhfqx like concat('%',#LIKElxhfqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxhfqx'>
			(lxhfqx = #lxhfqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxxzqx'>
			(lxxzqx like concat('%',#LIKElxxzqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxxzqx'>
			(lxxzqx = #lxxzqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxdjqx'>
			(lxdjqx like concat('%',#LIKElxdjqx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxdjqx'>
			(lxdjqx = #lxdjqx#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjry'>
			(cjry like concat('%',#LIKEcjry# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjry'>
			(cjry = #cjry#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjrq'>
			(cjrq like concat('%',#LIKEcjrq# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjrq'>
			(cjrq = #cjrq#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgry'>
			(xgry like concat('%',#LIKExgry# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgry'>
			(xgry = #xgry#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgrq'>
			(xgrq like concat('%',#LIKExgrq# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgrq'>
			(xgrq = #xgrq#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbz'>
			(bz like concat('%',#LIKEbz# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bz'>
			(bz = #bz#  )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Sbtdtpqx" parameterClass="java.util.Map">
		insert into 
		Sbtdtpqx(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
<isNotEmpty prepend=',' property='khbh'>khbh</isNotEmpty>
<isNotEmpty prepend=',' property='bmbh'>bmbh</isNotEmpty>
<isNotEmpty prepend=',' property='wbbh'>wbbh</isNotEmpty>
<isNotEmpty prepend=',' property='dqx'>dqx</isNotEmpty>
<isNotEmpty prepend=',' property='xqx'>xqx</isNotEmpty>
<isNotEmpty prepend=',' property='kqx'>kqx</isNotEmpty>
<isNotEmpty prepend=',' property='pqx'>pqx</isNotEmpty>
<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx</isNotEmpty>
<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx</isNotEmpty>
<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx</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>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty  prepend=',' property='xh'>#xh#</isNotEmpty>
<isNotEmpty prepend=',' property='khbh'>#khbh#</isNotEmpty>
<isNotEmpty prepend=',' property='bmbh'>#bmbh#</isNotEmpty>
<isNotEmpty prepend=',' property='wbbh'>#wbbh#</isNotEmpty>
<isNotEmpty prepend=',' property='dqx'>#dqx#</isNotEmpty>
<isNotEmpty prepend=',' property='xqx'>#xqx#</isNotEmpty>
<isNotEmpty prepend=',' property='kqx'>#kqx#</isNotEmpty>
<isNotEmpty prepend=',' property='pqx'>#pqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxhfqx'>#lxhfqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxxzqx'>#lxxzqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxdjqx'>#lxdjqx#</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>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Sbtdtpqx" parameterClass="java.util.Map">
		update Sbtdtpqx 
		<dynamic prepend="set ">   
			<isNotEmpty prepend=',' property='khbh'>khbh=#khbh#</isNotEmpty>
<isNotEmpty prepend=',' property='bmbh'>bmbh=#bmbh#</isNotEmpty>
<isNotEmpty prepend=',' property='wbbh'>wbbh=#wbbh#</isNotEmpty>
<isNotEmpty prepend=',' property='dqx'>dqx=#dqx#</isNotEmpty>
<isNotEmpty prepend=',' property='xqx'>xqx=#xqx#</isNotEmpty>
<isNotEmpty prepend=',' property='kqx'>kqx=#kqx#</isNotEmpty>
<isNotEmpty prepend=',' property='pqx'>pqx=#pqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx=#lxhfqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx=#lxxzqx#</isNotEmpty>
<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx=#lxdjqx#</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>

		</dynamic>
			where 1=1 
			<isNotEmpty  prepend='AND' property='xh'>
xh= #xh#
 </isNotEmpty>
<isNotEmpty prepend='AND' property='khbh'>
khbh= #khbh#
</isNotEmpty>
<isNotEmpty prepend='AND' property='bmbh'>
bmbh= #bmbh#
</isNotEmpty>
<isNotEmpty prepend='AND' property='wbbh'>
wbbh= #wbbh#
</isNotEmpty>
<isNotEmpty prepend='AND' property='dqx'>
dqx= #dqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='xqx'>
xqx= #xqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='kqx'>
kqx= #kqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='pqx'>
pqx= #pqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='lxhfqx'>
lxhfqx= #lxhfqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='lxxzqx'>
lxxzqx= #lxxzqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='lxdjqx'>
lxdjqx= #lxdjqx#
</isNotEmpty>
<isNotEmpty prepend='AND' property='cjry'>
cjry= #cjry#
</isNotEmpty>
<isNotEmpty prepend='AND' property='cjrq'>
cjrq= #cjrq#
</isNotEmpty>
<isNotEmpty prepend='AND' property='xgry'>
xgry= #xgry#
</isNotEmpty>
<isNotEmpty prepend='AND' property='xgrq'>
xgrq= #xgrq#
</isNotEmpty>
<isNotEmpty prepend='AND' property='bz'>
bz= #bz#
</isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Sbtdtpqx" parameterClass="java.util.Map">
		delete from Sbtdtpqx 
		<include refid="condition_Sbtdtpqx"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Sbtdtpqx" parameterClass="java.util.Map">
		delete from Sbtdtpqx 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Sbtdtpqx" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,khbh,bmbh,wbbh,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,cjry,cjrq,xgry,xgrq,bz
		from Sbtdtpqx 
		<include refid="condition_Sbtdtpqx"/>
		
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Sbtdtpqx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from Sbtdtpqx 
		<include refid="condition_Sbtdtpqx"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Sbtdtpqx" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into Sbtdtpqx(
			 <![CDATA[ 
				xh,khbh,bmbh,wbbh,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,cjry,cjrq,xgry,xgrq,bz
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
			#list[].xh#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











