<?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="Lqjyxxbean" type="cn.vp.XXX.model.LqjyxxBean"/> -->	
		<typeAlias alias="Lqjyxx" type="cn.im.ren.LqjyxxBean"/>
	
	<sql id="condition_Lqjyxx">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEjybh'>
			(jybh like concat('%',#LIKEjybh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jybh'>
			(jybh = #jybh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhbh'>
			(yhbh like concat('%',#LIKEyhbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhbh'>
			(yhbh = #yhbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyhzh'>
			(yhzh like concat('%',#LIKEyhzh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yhzh'>
			(yhzh = #yhzh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjyjh'>
			(jyjh like concat('%',#LIKEjyjh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jyjh'>
			(jyjh = #jyjh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjymc'>
			(jymc like concat('%',#LIKEjymc# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jymc'>
			(jymc = #jymc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjymcpy'>
			(jymcpy like concat('%',#LIKEjymcpy# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jymcpy'>
			(jymcpy = #jymcpy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExb'>
			(xb like concat('%',#LIKExb# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xb'>
			(xb = #xb# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsjhm'>
			(sjhm like concat('%',#LIKEsjhm# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sjhm'>
			(sjhm = #sjhm# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEyx'>
			(yx like concat('%',#LIKEyx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='yx'>
			(yx = #yx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzh'>
			(sfzh like concat('%',#LIKEsfzh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzh'>
			(sfzh = #sfzh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzw'>
			(zw like concat('%',#LIKEzw# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zw'>
			(zw = #zw# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEgw'>
			(gw like concat('%',#LIKEgw# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='gw'>
			(gw = #gw# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExlq'>
			(xlq like concat('%',#LIKExlq# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xlq'>
			(xlq = #xlq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbmbh'>
			(bmbh like concat('%',#LIKEbmbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExzbh'>
			(xzbh like concat('%',#LIKExzbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xzbh'>
			(xzbh = #xzbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzt'>
			(zt like concat('%',#LIKEzt# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zt'>
			(zt = #zt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzp'>
			(zp like concat('%',#LIKEzp# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zp'>
			(zp = #zp# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjwthm'>
			(jwthm like concat('%',#LIKEjwthm# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jwthm'>
			(jwthm = #jwthm# )
		</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='LIKEtbsj'>
			(tbsj like concat('%',#LIKEtbsj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tbsj'>
			(tbsj = #tbsj# )
		</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_Lqjyxx" parameterClass="java.util.Map">
		insert into 
		lqjyxx(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='jybh'>jybh</isNotEmpty>
			<isNotEmpty prepend=',' property='yhbh'>yhbh</isNotEmpty>
			<isNotEmpty prepend=',' property='yhzh'>yhzh</isNotEmpty>
			<isNotEmpty prepend=',' property='jyjh'>jyjh</isNotEmpty>
			<isNotEmpty prepend=',' property='jymc'>jymc</isNotEmpty>
			<isNotEmpty prepend=',' property='jymcpy'>jymcpy</isNotEmpty>
			<isNotEmpty prepend=',' property='xb'>xb</isNotEmpty>
			<isNotEmpty prepend=',' property='sjhm'>sjhm</isNotEmpty>
			<isNotEmpty prepend=',' property='yx'>yx</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzh'>sfzh</isNotEmpty>
			<isNotEmpty prepend=',' property='zw'>zw</isNotEmpty>
			<isNotEmpty prepend=',' property='gw'>gw</isNotEmpty>
			<isNotEmpty prepend=',' property='xlq'>xlq</isNotEmpty>
			<isNotEmpty prepend=',' property='bmbh'>bmbh</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>xzbh</isNotEmpty>
			<isNotEmpty prepend=',' property='zt'>zt</isNotEmpty>
			<isNotEmpty prepend=',' property='zp'>zp</isNotEmpty>
			<isNotEmpty prepend=',' property='jwthm'>jwthm</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd</isNotEmpty>
			<isNotEmpty prepend=',' property='tbsj'>tbsj</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='jybh'>#jybh#</isNotEmpty>
			<isNotEmpty prepend=',' property='yhbh'>#yhbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='yhzh'>#yhzh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jyjh'>#jyjh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jymc'>#jymc#</isNotEmpty>
			<isNotEmpty prepend=',' property='jymcpy'>#jymcpy#</isNotEmpty>
			<isNotEmpty prepend=',' property='xb'>#xb#</isNotEmpty>
			<isNotEmpty prepend=',' property='sjhm'>#sjhm#</isNotEmpty>
			<isNotEmpty prepend=',' property='yx'>#yx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzh'>#sfzh#</isNotEmpty>
			<isNotEmpty prepend=',' property='zw'>#zw#</isNotEmpty>
			<isNotEmpty prepend=',' property='gw'>#gw#</isNotEmpty>
			<isNotEmpty prepend=',' property='xlq'>#xlq#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmbh'>#bmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>#xzbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='zt'>#zt#</isNotEmpty>
			<isNotEmpty prepend=',' property='zp'>#zp#</isNotEmpty>
			<isNotEmpty prepend=',' property='jwthm'>#jwthm#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='tbsj'>#tbsj#</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_Lqjyxx" parameterClass="java.util.Map">
		update lqjyxx 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='yhbh'>yhbh=#yhbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='yhzh'>yhzh=#yhzh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jyjh'>jyjh=#jyjh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jymc'>jymc=#jymc#</isNotEmpty>
			<isNotEmpty prepend=',' property='jymcpy'>jymcpy=#jymcpy#</isNotEmpty>
			<isNotEmpty prepend=',' property='xb'>xb=#xb#</isNotEmpty>
			<isNotEmpty prepend=',' property='sjhm'>sjhm=#sjhm#</isNotEmpty>
			<isNotEmpty prepend=',' property='yx'>yx=#yx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzh'>sfzh=#sfzh#</isNotEmpty>
			<isNotEmpty prepend=',' property='zw'>zw=#zw#</isNotEmpty>
			<isNotEmpty prepend=',' property='gw'>gw=#gw#</isNotEmpty>
			<isNotEmpty prepend=',' property='xlq'>xlq=#xlq#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmbh'>bmbh=#bmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>xzbh=#xzbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='zt'>zt=#zt#</isNotEmpty>
			<isNotEmpty prepend=',' property='zp'>zp=#zp#</isNotEmpty>
			<isNotEmpty prepend=',' property='jwthm'>jwthm=#jwthm#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd=#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd=#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='tbsj'>tbsj=#tbsj#</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='XGTJjybh'> jybh = #XGTJjybh#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyhbh'> yhbh = #XGTJyhbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyhzh'> yhzh = #XGTJyhzh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjyjh'> jyjh = #XGTJjyjh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjymc'> jymc = #XGTJjymc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjymcpy'> jymcpy = #XGTJjymcpy# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxb'> xb = #XGTJxb# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsjhm'> sjhm = #XGTJsjhm# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJyx'> yx = #XGTJyx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsfzh'> sfzh = #XGTJsfzh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzw'> zw = #XGTJzw# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJgw'> gw = #XGTJgw# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxlq'> xlq = #XGTJxlq# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbmbh'> bmbh = #XGTJbmbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJxzbh'> xzbh = #XGTJxzbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzt'> zt = #XGTJzt# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzp'> zp = #XGTJzp# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjwthm'> jwthm = #XGTJjwthm# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjd'> jd = #XGTJjd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwd'> wd = #XGTJwd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtbsj'> tbsj = #XGTJtbsj# </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>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Lqjyxx" parameterClass="java.util.Map">
		delete from lqjyxx 
		<include refid="condition_Lqjyxx"/>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Lqjyxx" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			jybh,yhbh,yhzh,jyjh,jymc,jymcpy,xb,sjhm,yx,sfzh,zw,gw,xlq,bmbh,xzbh,zt,zp,jwthm,jd,wd,tbsj,cjry,cjrq,xgry,xgrq,bz
		from lqjyxx 
		<include refid="condition_Lqjyxx"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Lqjyxx" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from lqjyxx 
		<include refid="condition_Lqjyxx"/>			
	</select>
	
	
	<!-- query objects by page-->
	<select id="query_Lqjyxx_sbxx" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.sblx,b.sbbh,b.tdbh,b.wbbh,c.bmmc from (
			select 
				jybh,yhbh,yhzh,jyjh,jymc,jymcpy,xb,sjhm,yx,sfzh,zw,gw,xlq,bmbh,xzbh,zt,zp,jwthm,jd,wd,tbsj,cjry,cjrq,xgry,xgrq,bz
			from lqjyxx 
			<include refid="condition_Lqjyxx"/>
		)a
		left join lqjyzb b on a.jybh = b.jybh 
		left join ptyhbm c on a.bmbh = c.bmbh
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
</sqlMap>











