<?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="Ptyhbmscbfbean" type="cn.vp.XXX.model.PtyhbmscbfBean"/> -->	<typeAlias alias="Ptyhbmscbf" type="cn.bsystem.ptuserrole.PtyhbmscbfBean"/>
	
	<sql id="condition_Ptyhbmscbf">
		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='LIKEbmbh'>
			(bmbh like concat('%',#LIKEbmbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmbh'>
			(bmbh = #bmbh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbmmc'>
			(bmmc like concat('%',#LIKEbmmc# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmmc'>
			(bmmc = #bmmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbmmcpy'>
			(bmmcpy like concat('%',#LIKEbmmcpy# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmmcpy'>
			(bmmcpy = #bmmcpy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEms'>
			(ms like concat('%',#LIKEms# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ms'>
			(ms = #ms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsjbmbh'>
			(sjbmbh like concat('%',#LIKEsjbmbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sjbmbh'>
			(sjbmbh = #sjbmbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEqlj'>
			(qlj like concat('%',#LIKEqlj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='qlj'>
			(qlj = #qlj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwbbh'>
			(wbbh like concat('%',#LIKEwbbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wbbh'>
			(wbbh = #wbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkhbh'>
			(khbh like concat('%',#LIKEkhbh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khbh'>
			(khbh = #khbh# )
		</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='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 prepend='AND' property='LIKEbmpx'>
			(bmpx like concat('%',#LIKEbmpx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bmpx'>
			(bmpx = #bmpx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEshbz'>
			(shbz like concat('%',#LIKEshbz# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='shbz'>
			(shbz = #shbz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEqscdurllj'>
			(qscdurllj like concat('%',#LIKEqscdurllj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='qscdurllj'>
			(qscdurllj = #qscdurllj# )
		</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 prepend='AND' property='LIKEkz1'>
			(kz1 like concat('%',#LIKEkz1# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz1'>
			(kz1 = #kz1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz2'>
			(kz2 like concat('%',#LIKEkz2# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz2'>
			(kz2 = #kz2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz3'>
			(kz3 like concat('%',#LIKEkz3# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz3'>
			(kz3 = #kz3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz4'>
			(kz4 like concat('%',#LIKEkz4# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz4'>
			(kz4 = #kz4# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEscczrybh'>
			(scczrybh like concat('%',#LIKEscczrybh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='scczrybh'>
			(scczrybh = #scczrybh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEscczrymc'>
			(scczrymc like concat('%',#LIKEscczrymc# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='scczrymc'>
			(scczrymc = #scczrymc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEscczsj'>
			(scczsj like concat('%',#LIKEscczsj# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='scczsj'>
			(scczsj = #scczsj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEscczip'>
			(scczip like concat('%',#LIKEscczip# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='scczip'>
			(scczip = #scczip# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Ptyhbmscbf" parameterClass="java.util.Map">
		insert into 
		ptyhbmscbf(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='bmbh'>bmbh</isNotEmpty>
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='bmmc'>bmmc</isNotEmpty>
			<isNotEmpty prepend=',' property='bmmcpy'>bmmcpy</isNotEmpty>
			<isNotEmpty prepend=',' property='ms'>ms</isNotEmpty>
			<isNotEmpty prepend=',' property='sjbmbh'>sjbmbh</isNotEmpty>
			<isNotEmpty prepend=',' property='qlj'>qlj</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='khbh'>khbh</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>tpwzx</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>tpwzy</isNotEmpty>
			<isNotEmpty prepend=',' property='bmpx'>bmpx</isNotEmpty>
			<isNotEmpty prepend=',' property='shbz'>shbz</isNotEmpty>
			<isNotEmpty prepend=',' property='qscdurllj'>qscdurllj</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>
			<isNotEmpty prepend=',' property='kz1'>kz1</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>kz2</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>kz3</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>kz4</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrybh'>scczrybh</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrymc'>scczrymc</isNotEmpty>
			<isNotEmpty prepend=',' property='scczsj'>scczsj</isNotEmpty>
			<isNotEmpty prepend=',' property='scczip'>scczip</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='bmbh'>#bmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmmc'>#bmmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmmcpy'>#bmmcpy#</isNotEmpty>
			<isNotEmpty prepend=',' property='ms'>#ms#</isNotEmpty>
			<isNotEmpty prepend=',' property='sjbmbh'>#sjbmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='qlj'>#qlj#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='khbh'>#khbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>#tpwzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>#tpwzy#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmpx'>#bmpx#</isNotEmpty>
			<isNotEmpty prepend=',' property='shbz'>#shbz#</isNotEmpty>
			<isNotEmpty prepend=',' property='qscdurllj'>#qscdurllj#</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>
			<isNotEmpty prepend=',' property='kz1'>#kz1#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>#kz2#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>#kz3#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>#kz4#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrybh'>#scczrybh#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrymc'>#scczrymc#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczsj'>#scczsj#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczip'>#scczip#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Ptyhbmscbf" parameterClass="java.util.Map">
		update ptyhbmscbf 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='bmmc'>bmmc=#bmmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmmcpy'>bmmcpy=#bmmcpy#</isNotEmpty>
			<isNotEmpty prepend=',' property='ms'>ms=#ms#</isNotEmpty>
			<isNotEmpty prepend=',' property='sjbmbh'>sjbmbh=#sjbmbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='qlj'>qlj=#qlj#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh=#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='khbh'>khbh=#khbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jd'>jd=#jd#</isNotEmpty>
			<isNotEmpty prepend=',' property='wd'>wd=#wd#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzx'>tpwzx=#tpwzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='tpwzy'>tpwzy=#tpwzy#</isNotEmpty>
			<isNotEmpty prepend=',' property='bmpx'>bmpx=#bmpx#</isNotEmpty>
			<isNotEmpty prepend=',' property='shbz'>shbz=#shbz#</isNotEmpty>
			<isNotEmpty prepend=',' property='qscdurllj'>qscdurllj=#qscdurllj#</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>
			<isNotEmpty prepend=',' property='kz1'>kz1=#kz1#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz2'>kz2=#kz2#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz3'>kz3=#kz3#</isNotEmpty>
			<isNotEmpty prepend=',' property='kz4'>kz4=#kz4#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrybh'>scczrybh=#scczrybh#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczrymc'>scczrymc=#scczrymc#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczsj'>scczsj=#scczsj#</isNotEmpty>
			<isNotEmpty prepend=',' property='scczip'>scczip=#scczip#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJbmbh'> bmbh = #XGTJbmbh#</isNotEmpty>
<isNotEmpty prepend='AND' property='XGTJxh'> xh = #XGTJxh#  </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbmmc'> bmmc = #XGTJbmmc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbmmcpy'> bmmcpy = #XGTJbmmcpy# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJms'> ms = #XGTJms# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsjbmbh'> sjbmbh = #XGTJsjbmbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJqlj'> qlj = #XGTJqlj# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwbbh'> wbbh = #XGTJwbbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkhbh'> khbh = #XGTJkhbh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJjd'> jd = #XGTJjd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwd'> wd = #XGTJwd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtpwzx'> tpwzx = #XGTJtpwzx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtpwzy'> tpwzy = #XGTJtpwzy# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbmpx'> bmpx = #XGTJbmpx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJshbz'> shbz = #XGTJshbz# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJqscdurllj'> qscdurllj = #XGTJqscdurllj# </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>
			<isNotEmpty prepend='AND' property='XGTJkz1'> kz1 = #XGTJkz1# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz2'> kz2 = #XGTJkz2# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz3'> kz3 = #XGTJkz3# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJkz4'> kz4 = #XGTJkz4# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJscczrybh'> scczrybh = #XGTJscczrybh# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJscczrymc'> scczrymc = #XGTJscczrymc# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJscczsj'> scczsj = #XGTJscczsj# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJscczip'> scczip = #XGTJscczip# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Ptyhbmscbf" parameterClass="java.util.Map">
		delete from ptyhbmscbf 
		<include refid="condition_Ptyhbmscbf"/>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ptyhbmscbf" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			bmbh,xh,bmmc,bmmcpy,ms,sjbmbh,qlj,wbbh,khbh,jd,wd,tpwzx,tpwzy,bmpx,shbz,qscdurllj,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4,scczrybh,scczrymc,scczsj,scczip
		from ptyhbmscbf 
		<include refid="condition_Ptyhbmscbf"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ptyhbmscbf" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ptyhbmscbf 
		<include refid="condition_Ptyhbmscbf"/>			
	</select>
	
</sqlMap>











