<?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="Dtdldlbean" type="cn.vp.XXX.model.DtdldlBean"/> -->	
	<typeAlias alias="Dtdldl" type="cn.im.map.DtdldlBean"/>
	
	<sql id="condition_Dtdldl">
		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='LIKEdlmc'>
			(dlmc like concat('%',#LIKEdlmc# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dlmc'>
			(dlmc = #dlmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdljb'>
			(dljb like concat('%',#LIKEdljb# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dljb'>
			(dljb = #dljb# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdlfx'>
			(dlfx like concat('%',#LIKEdlfx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dlfx'>
			(dlfx = #dlfx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEqd'>
			(qd like concat('%',#LIKEqd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='qd'>
			(qd = #qd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzd'>
			(zd like concat('%',#LIKEzd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zd'>
			(zd = #zd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElz'>
			(lz like concat('%',#LIKElz# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lz'>
			(lz = #lz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEld'>
			(ld like concat('%',#LIKEld# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ld'>
			(ld = #ld# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEqdjd'>
			(qdjd like concat('%',#LIKEqdjd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='qdjd'>
			(qdjd = #qdjd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEqdwd'>
			(qdwd like concat('%',#LIKEqdwd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='qdwd'>
			(qdwd = #qdwd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzdjd'>
			(zdjd like concat('%',#LIKEzdjd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zdjd'>
			(zdjd = #zdjd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzdwd'>
			(zdwd like concat('%',#LIKEzdwd# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zdwd'>
			(zdwd = #zdwd# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Dtdldl" parameterClass="java.util.Map">
		insert into 
		dtdldl(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='dlmc'>dlmc</isNotEmpty>
			<isNotEmpty prepend=',' property='dljb'>dljb</isNotEmpty>
			<isNotEmpty prepend=',' property='dlfx'>dlfx</isNotEmpty>
			<isNotEmpty prepend=',' property='qd'>qd</isNotEmpty>
			<isNotEmpty prepend=',' property='zd'>zd</isNotEmpty>
			<isNotEmpty prepend=',' property='lz'>lz</isNotEmpty>
			<isNotEmpty prepend=',' property='ld'>ld</isNotEmpty>
			<isNotEmpty prepend=',' property='qdjd'>qdjd</isNotEmpty>
			<isNotEmpty prepend=',' property='qdwd'>qdwd</isNotEmpty>
			<isNotEmpty prepend=',' property='zdjd'>zdjd</isNotEmpty>
			<isNotEmpty prepend=',' property='zdwd'>zdwd</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='dlmc'>#dlmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='dljb'>#dljb#</isNotEmpty>
			<isNotEmpty prepend=',' property='dlfx'>#dlfx#</isNotEmpty>
			<isNotEmpty prepend=',' property='qd'>#qd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zd'>#zd#</isNotEmpty>
			<isNotEmpty prepend=',' property='lz'>#lz#</isNotEmpty>
			<isNotEmpty prepend=',' property='ld'>#ld#</isNotEmpty>
			<isNotEmpty prepend=',' property='qdjd'>#qdjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='qdwd'>#qdwd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zdjd'>#zdjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zdwd'>#zdwd#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Dtdldl" parameterClass="java.util.Map">
		update dtdldl 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='dlmc'>dlmc=#dlmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='dljb'>dljb=#dljb#</isNotEmpty>
			<isNotEmpty prepend=',' property='dlfx'>dlfx=#dlfx#</isNotEmpty>
			<isNotEmpty prepend=',' property='qd'>qd=#qd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zd'>zd=#zd#</isNotEmpty>
			<isNotEmpty prepend=',' property='lz'>lz=#lz#</isNotEmpty>
			<isNotEmpty prepend=',' property='ld'>ld=#ld#</isNotEmpty>
			<isNotEmpty prepend=',' property='qdjd'>qdjd=#qdjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='qdwd'>qdwd=#qdwd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zdjd'>zdjd=#zdjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='zdwd'>zdwd=#zdwd#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJxh'> xh = #XGTJxh#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdlmc'> dlmc = #XGTJdlmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdljb'> dljb = #XGTJdljb# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdlfx'> dlfx = #XGTJdlfx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJqd'> qd = #XGTJqd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzd'> zd = #XGTJzd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlz'> lz = #XGTJlz# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJld'> ld = #XGTJld# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJqdjd'> qdjd = #XGTJqdjd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJqdwd'> qdwd = #XGTJqdwd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzdjd'> zdjd = #XGTJzdjd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJzdwd'> zdwd = #XGTJzdwd# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Dtdldl" parameterClass="java.util.Map">
		delete from dtdldl 
		<include refid="condition_Dtdldl"/>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Dtdldl" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,dlmc,dljb,dlfx,qd,zd,lz,ld,qdjd,qdwd,zdjd,zdwd
		from dtdldl 
		<include refid="condition_Dtdldl"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Dtdldl" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from dtdldl 
		<include refid="condition_Dtdldl"/>			
	</select>
	
</sqlMap>











