<?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="Ptyhgpsbean" type="cn.vp.XXX.model.PtyhgpsBean"/> -->	<typeAlias alias="Ptyhgps" type="cn.im.lqzh.PtyhgpsBean"/>
	
	<sql id="condition_Ptyhgps">
		where 1=1
		<isNotEmpty prepend='AND ' property='LIKEzzxh'>
			(zzxh like concat('%',#LIKEzzxh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='zzxh'>
			(zzxh = #zzxh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKExh'>
			(xh like concat('%',#LIKExh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEyhbh'>
			(yhbh like concat('%',#LIKEyhbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='yhbh'>
			(yhbh = #yhbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEsbbh'>
			(sbbh like concat('%',#LIKEsbbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='sbbh'>
			(sbbh = #sbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEtdbh'>
			(tdbh like concat('%',#LIKEtdbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='tdbh'>
			(tdbh = #tdbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEwbbh'>
			(wbbh like concat('%',#LIKEwbbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='wbbh'>
			(wbbh = #wbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEjssj'>
			(jssj like concat('%',#LIKEjssj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='jssj'>
			(jssj = #jssj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEgjsj'>
			(gjsj like concat('%',#LIKEgjsj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='gjsj'>
			(gjsj = #gjsj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEgjsjsz'>
			(gjsjsz like concat('%',#LIKEgjsjsz# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='gjsjsz'>
			(gjsjsz = #gjsjsz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEgjms'>
			(gjms like concat('%',#LIKEgjms# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='gjms'>
			(gjms = #gjms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEsd'>
			(sd like concat('%',#LIKEsd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='sd'>
			(sd = #sd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEfx'>
			(fx like concat('%',#LIKEfx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='fx'>
			(fx = #fx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEjd'>
			(jd like concat('%',#LIKEjd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='jd'>
			(jd = #jd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEwd'>
			(wd like concat('%',#LIKEwd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='wd'>
			(wd = #wd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEhb'>
			(hb like concat('%',#LIKEhb# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='hb'>
			(hb = #hb# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKElx'>
			(lx like concat('%',#LIKElx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='lx'>
			(lx = #lx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEtpwzx'>
			(tpwzx like concat('%',#LIKEtpwzx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='tpwzx'>
			(tpwzx = #tpwzx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEtpwzy'>
			(tpwzy like concat('%',#LIKEtpwzy# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='tpwzy'>
			(tpwzy = #tpwzy# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Ptyhgps" parameterClass="java.util.Map">
		insert into 
		ptyhgps(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='zzxh'>zzxh</isNotEmpty>
<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='yhbh'>yhbh</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>sbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>tdbh</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='jssj'>jssj</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsj'>gjsj</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsjsz'>gjsjsz</isNotEmpty>
			<isNotEmpty prepend=',' property='gjms'>gjms</isNotEmpty>
			<isNotEmpty prepend=',' property='sd'>sd</isNotEmpty>
			<isNotEmpty prepend=',' property='fx'>fx</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>hb</isNotEmpty>
			<isNotEmpty prepend=',' property='lx'>lx</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>tpwzx</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>tpwzy</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='zzxh'>#zzxh#</isNotEmpty>
<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='yhbh'>#yhbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>#sbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>#tdbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jssj'>#jssj#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsj'>#gjsj#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsjsz'>#gjsjsz#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjms'>#gjms#</isNotEmpty>
			<isNotEmpty prepend=',' property='sd'>#sd#</isNotEmpty>
			<isNotEmpty prepend=',' property='fx'>#fx#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>#hb#</isNotEmpty>
			<isNotEmpty prepend=',' property='lx'>#lx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>#tpwzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>#tpwzy#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Ptyhgps" parameterClass="java.util.Map">
		update ptyhgps 
		<dynamic prepend="set ">   
			

			<isNotEmpty prepend=',' property='yhbh'>yhbh=#yhbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>sbbh=#sbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>tdbh=#tdbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh=#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jssj'>jssj=#jssj#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsj'>gjsj=#gjsj#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjsjsz'>gjsjsz=#gjsjsz#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjms'>gjms=#gjms#</isNotEmpty>
			<isNotEmpty prepend=',' property='sd'>sd=#sd#</isNotEmpty>
			<isNotEmpty prepend=',' property='fx'>fx=#fx#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd=#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd=#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>hb=#hb#</isNotEmpty>
			<isNotEmpty prepend=',' property='lx'>lx=#lx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>tpwzx=#tpwzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>tpwzy=#tpwzy#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND ' property='XGTJzzxh'> zzxh = #XGTJzzxh#</isNotEmpty>
<isNotEmpty prepend='AND ' property='XGTJxh'> xh = #XGTJxh#</isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJyhbh'> yhbh = #XGTJyhbh# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJsbbh'> sbbh = #XGTJsbbh# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJtdbh'> tdbh = #XGTJtdbh# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJwbbh'> wbbh = #XGTJwbbh# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJjssj'> jssj = #XGTJjssj# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJgjsj'> gjsj = #XGTJgjsj# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJgjsjsz'> gjsjsz = #XGTJgjsjsz# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJgjms'> gjms = #XGTJgjms# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJsd'> sd = #XGTJsd# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJfx'> fx = #XGTJfx# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJjd'> jd = #XGTJjd# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJwd'> wd = #XGTJwd# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJhb'> hb = #XGTJhb# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJlx'> lx = #XGTJlx# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJtpwzx'> tpwzx = #XGTJtpwzx# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJtpwzy'> tpwzy = #XGTJtpwzy# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Ptyhgps" parameterClass="java.util.Map">
		delete from ptyhgps 
		<include refid="condition_Ptyhgps"/>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ptyhgps" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			zzxh,xh,yhbh,sbbh,tdbh,wbbh,jssj,gjsj,gjsjsz,gjms,sd,fx,jd,wd,hb,lx,tpwzx,tpwzy
		from ptyhgps 
		<include refid="condition_Ptyhgps"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ptyhgps" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ptyhgps 
		<include refid="condition_Ptyhgps"/>			
	</select>
	
</sqlMap>











