<?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="Ptlxccqz" >
<!-- 	<typeAlias alias="Ptlxccqzbean" type="com.vp.XXX.model.PtlxccqzBean"/> -->
	
	<sql id="condition_Ptlxccqz">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEzbh'>
			(zbh like concat('%',#LIKEzbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zbh'>
			(zbh = #zbh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzms'>
			(zms like concat('%',#LIKEzms# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zms'>
			(zms = #zms#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEccqlb'>
			(ccqlb like concat('%',#LIKEccqlb# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ccqlb'>
			(ccqlb = #ccqlb#  )
		</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_Ptlxccqz" parameterClass="java.util.Map">
		insert into 
		Ptlxccqz(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='zbh'>zbh</isNotEmpty>
<isNotEmpty prepend=',' property='zms'>zms</isNotEmpty>
<isNotEmpty prepend=',' property='ccqlb'>ccqlb</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='zbh'>#zbh#</isNotEmpty>
<isNotEmpty prepend=',' property='zms'>#zms#</isNotEmpty>
<isNotEmpty prepend=',' property='ccqlb'>#ccqlb#</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_Ptlxccqz" parameterClass="java.util.Map">
		update Ptlxccqz 
		<dynamic prepend="set ">   
			<isNotEmpty prepend=',' property='zms'>zms=#zms#</isNotEmpty>
<isNotEmpty prepend=',' property='ccqlb'>ccqlb=#ccqlb#</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='XGTJzbh'>
zbh= #XGTJzbh#
 </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Ptlxccqz" parameterClass="java.util.Map">
		delete from Ptlxccqz 
		<include refid="condition_Ptlxccqz"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ptlxccqz" parameterClass="java.util.Map">
		delete from Ptlxccqz 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ptlxccqz" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			zbh,zms,ccqlb,cjry,cjrq,xgry,xgrq,bz
		from Ptlxccqz 
		<include refid="condition_Ptlxccqz"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ptlxccqz" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from Ptlxccqz 
		<include refid="condition_Ptlxccqz"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ptlxccqz" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into Ptlxccqz(
			 <![CDATA[ 
				zbh,zms,ccqlb,cjry,cjrq,xgry,xgrq,bz
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
			#list[].zbh#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











