<?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="Sbtdspsrbean" type="cn.vp.XXX.model.SbtdspsrBean"/> -->	<typeAlias alias="Sbtdspsr" type="cn.im.sbtdspsr.SbtdspsrBean"/>
	
	<sql id="condition_Sbtdspsr">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKExh'>
			(xh like '%$LIKExh$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sbbh'>
			(sbbh = #sbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdbh'>
			(tdbh like '%$LIKEtdbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdbh'>
			(tdbh = #tdbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdlx'>
			(tdlx like '%$LIKEtdlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdlx'>
			(tdlx = #tdlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwbbh'>
			(wbbh like '%$LIKEwbbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wbbh'>
			(wbbh = #wbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdmc'>
			(tdmc = #tdmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmcpy'>
			(tdmcpy like '%$LIKEtdmcpy$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdmcpy'>
			(tdmcpy = #tdmcpy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdzt'>
			(tdzt like '%$LIKEtdzt$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdzt'>
			(tdzt = #tdzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdazwz'>
			(tdazwz like '%$LIKEtdazwz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdazwz'>
			(tdazwz = #tdazwz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjd'>
			(jd like '%$LIKEjd$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jd'>
			(jd = #jd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwd'>
			(wd like '%$LIKEwd$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wd'>
			(wd = #wd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtpwzx'>
			(tpwzx like '%$LIKEtpwzx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tpwzx'>
			(tpwzx = #tpwzx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtpwzy'>
			(tpwzy like '%$LIKEtpwzy$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tpwzy'>
			(tpwzy = #tpwzy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEspbmgs'>
			(spbmgs like '%$LIKEspbmgs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='spbmgs'>
			(spbmgs = #spbmgs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEspxsgs'>
			(spxsgs like '%$LIKEspxsgs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='spxsgs'>
			(spxsgs = #spxsgs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEssspsfzzf'>
			(ssspsfzzf like '%$LIKEssspsfzzf$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ssspsfzzf'>
			(ssspsfzzf = #ssspsfzzf# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEspzt'>
			(spzt like '%$LIKEspzt$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='spzt'>
			(spzt = #spzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxzt'>
			(lxzt like '%$LIKElxzt$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxzt'>
			(lxzt = #lxzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxsfzzf'>
			(lxsfzzf like '%$LIKElxsfzzf$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxsfzzf'>
			(lxsfzzf = #lxsfzzf# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEspzl'>
			(spzl like '%$LIKEspzl$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='spzl'>
			(spzl = #spzl# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEgjzjg'>
			(gjzjg like '%$LIKEgjzjg$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='gjzjg'>
			(gjzjg = #gjzjg# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEml'>
			(ml like '%$LIKEml$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ml'>
			(ml = #ml# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEspmlyxgs'>
			(spmlyxgs like '%$LIKEspmlyxgs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='spmlyxgs'>
			(spmlyxgs = #spmlyxgs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzcptzkz'>
			(sfzcptzkz like '%$LIKEsfzcptzkz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzcptzkz'>
			(sfzcptzkz = #sfzcptzkz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzxcczbh'>
			(zxcczbh like '%$LIKEzxcczbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zxcczbh'>
			(zxcczbh = #zxcczbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzxccxe'>
			(zxccxe like '%$LIKEzxccxe$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zxccxe'>
			(zxccxe = #zxccxe# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzxccyyrl'>
			(zxccyyrl like '%$LIKEzxccyyrl$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zxccyyrl'>
			(zxccyyrl = #zxccyyrl# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzxccsyrl'>
			(zxccsyrl like '%$LIKEzxccsyrl$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zxccsyrl'>
			(zxccsyrl = #zxccsyrl# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxblts'>
			(lxblts like '%$LIKElxblts$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxblts'>
			(lxblts = #lxblts# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfqy'>
			(sfqy like '%$LIKEsfqy$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfqy'>
			(sfqy = #sfqy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjlbh'>
			(jlbh like '%$LIKEjlbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jlbh'>
			(jlbh = #jlbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfxms'>
			(fxms like '%$LIKEfxms$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fxms'>
			(fxms = #fxms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjbms'>
			(jbms like '%$LIKEjbms$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jbms'>
			(jbms = #jbms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExzbh'>
			(xzbh like '%$LIKExzbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xzbh'>
			(xzbh = #xzbh#  or (xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEggbh'>
			(ggbh like '%$LIKEggbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ggbh'>
			(ggbh = #ggbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEznbh'>
			(znbh like '%$LIKEznbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='znbh'>
			(znbh = #znbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxfs'>
			(lxfs like '%$LIKElxfs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxfs'>
			(lxfs = #lxfs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjpkzdh'>
			(jpkzdh like '%$LIKEjpkzdh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jpkzdh'>
			(jpkzdh = #jpkzdh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjdpx'>
			(jdpx like '%$LIKEjdpx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jdpx'>
			(jdpx = #jdpx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfznfxjd'>
			(sfznfxjd like '%$LIKEsfznfxjd$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfznfxjd'>
			(sfznfxjd = #sfznfxjd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEznfxlx'>
			(znfxlx like '%$LIKEznfxlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='znfxlx'>
			(znfxlx = #znfxlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsqms'>
			(sqms like '%$LIKEsqms$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sqms'>
			(sqms = #sqms# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsqurllj'>
			(squrllj like '%$LIKEsqurllj$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='squrllj'>
			(squrllj = #squrllj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEssmlxz'>
			(ssmlxz like '%$LIKEssmlxz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ssmlxz'>
			(ssmlxz = #ssmlxz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxmlxz'>
			(lxmlxz like '%$LIKElxmlxz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxmlxz'>
			(lxmlxz = #lxmlxz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzburllj'>
			(zburllj like '%$LIKEzburllj$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zburllj'>
			(zburllj = #zburllj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzbdk'>
			(zbdk like '%$LIKEzbdk$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zbdk'>
			(zbdk = #zbdk# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdqx'>
			(dqx like '%$LIKEdqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dqx'>
			(dqx = #dqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExqx'>
			(xqx like '%$LIKExqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xqx'>
			(xqx = #xqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkqx'>
			(kqx like '%$LIKEkqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kqx'>
			(kqx = #kqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEpqx'>
			(pqx like '%$LIKEpqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='pqx'>
			(pqx = #pqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxhfqx'>
			(lxhfqx like '%$LIKElxhfqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxhfqx'>
			(lxhfqx = #lxhfqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxxzqx'>
			(lxxzqx like '%$LIKElxxzqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxxzqx'>
			(lxxzqx = #lxxzqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxdjqx'>
			(lxdjqx like '%$LIKElxdjqx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxdjqx'>
			(lxdjqx = #lxdjqx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzlx'>
			(sfzlx like '%$LIKEsfzlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzlx'>
			(sfzlx = #sfzlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsfzx'>
			(sfzx like '%$LIKEsfzx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sfzx'>
			(sfzx = #sfzx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEhb'>
			(hb like '%$LIKEhb$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='hb'>
			(hb = #hb# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEjmcj'>
			(jmcj like '%$LIKEjmcj$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='jmcj'>
			(jmcj = #jmcj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsj'>
			(sj like '%$LIKEsj$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sj'>
			(sj = #sj# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxlrcyfs'>
			(lxlrcyfs like '%$LIKElxlrcyfs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxlrcyfs'>
			(lxlrcyfs = #lxlrcyfs# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkhdosdxsnr'>
			(khdosdxsnr like '%$LIKEkhdosdxsnr$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khdosdxsnr'>
			(khdosdxsnr = #khdosdxsnr# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkhdosdxswz'>
			(khdosdxswz like '%$LIKEkhdosdxswz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='khdosdxswz'>
			(khdosdxswz = #khdosdxswz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjry'>
			(cjry like '%$LIKEcjry$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjry'>
			(cjry = #cjry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjrq'>
			(cjrq like '%$LIKEcjrq$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjrq'>
			(cjrq = #cjrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgry'>
			(xgry like '%$LIKExgry$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgry'>
			(xgry = #xgry# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgrq'>
			(xgrq like '%$LIKExgrq$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgrq'>
			(xgrq = #xgrq# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbz'>
			(bz like '%$LIKEbz$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bz'>
			(bz = #bz# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz1'>
			(kz1 like '%$LIKEkz1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz1'>
			(kz1 = #kz1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz2'>
			(kz2 like '%$LIKEkz2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz2'>
			(kz2 = #kz2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz3'>
			(kz3 like '%$LIKEkz3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz3'>
			(kz3 = #kz3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEkz4'>
			(kz4 like '%$LIKEkz4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='kz4'>
			(kz4 = #kz4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Sbtdspsr" parameterClass="java.util.Map">
		insert into 
		sbtdspsr(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>sbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>tdbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdlx'>tdlx</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>tdmc</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmcpy'>tdmcpy</isNotEmpty>
			<isNotEmpty prepend=',' property='tdzt'>tdzt</isNotEmpty>
			<isNotEmpty prepend=',' property='tdazwz'>tdazwz</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='spbmgs'>spbmgs</isNotEmpty>
			<isNotEmpty prepend=',' property='spxsgs'>spxsgs</isNotEmpty>
			<isNotEmpty prepend=',' property='ssspsfzzf'>ssspsfzzf</isNotEmpty>
			<isNotEmpty prepend=',' property='spzt'>spzt</isNotEmpty>
			<isNotEmpty prepend=',' property='lxzt'>lxzt</isNotEmpty>
			<isNotEmpty prepend=',' property='lxsfzzf'>lxsfzzf</isNotEmpty>
			<isNotEmpty prepend=',' property='spzl'>spzl</isNotEmpty>
			<isNotEmpty prepend=',' property='gjzjg'>gjzjg</isNotEmpty>
			<isNotEmpty prepend=',' property='ml'>ml</isNotEmpty>
			<isNotEmpty prepend=',' property='spmlyxgs'>spmlyxgs</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzcptzkz'>sfzcptzkz</isNotEmpty>
			<isNotEmpty prepend=',' property='zxcczbh'>zxcczbh</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccxe'>zxccxe</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccyyrl'>zxccyyrl</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccsyrl'>zxccsyrl</isNotEmpty>
			<isNotEmpty prepend=',' property='lxblts'>lxblts</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>sfqy</isNotEmpty>
			<isNotEmpty prepend=',' property='jlbh'>jlbh</isNotEmpty>
			<isNotEmpty prepend=',' property='fxms'>fxms</isNotEmpty>
			<isNotEmpty prepend=',' property='jbms'>jbms</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>xzbh</isNotEmpty>
			<isNotEmpty prepend=',' property='ggbh'>ggbh</isNotEmpty>
			<isNotEmpty prepend=',' property='znbh'>znbh</isNotEmpty>
			<isNotEmpty prepend=',' property='lxfs'>lxfs</isNotEmpty>
			<isNotEmpty prepend=',' property='jpkzdh'>jpkzdh</isNotEmpty>
			<isNotEmpty prepend=',' property='jdpx'>jdpx</isNotEmpty>
			<isNotEmpty prepend=',' property='sfznfxjd'>sfznfxjd</isNotEmpty>
			<isNotEmpty prepend=',' property='znfxlx'>znfxlx</isNotEmpty>
			<isNotEmpty prepend=',' property='sqms'>sqms</isNotEmpty>
			<isNotEmpty prepend=',' property='squrllj'>squrllj</isNotEmpty>
			<isNotEmpty prepend=',' property='ssmlxz'>ssmlxz</isNotEmpty>
			<isNotEmpty prepend=',' property='lxmlxz'>lxmlxz</isNotEmpty>
			<isNotEmpty prepend=',' property='zburllj'>zburllj</isNotEmpty>
			<isNotEmpty prepend=',' property='zbdk'>zbdk</isNotEmpty>
			<isNotEmpty prepend=',' property='dqx'>dqx</isNotEmpty>
			<isNotEmpty prepend=',' property='xqx'>xqx</isNotEmpty>
			<isNotEmpty prepend=',' property='kqx'>kqx</isNotEmpty>
			<isNotEmpty prepend=',' property='pqx'>pqx</isNotEmpty>
			<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx</isNotEmpty>
			<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx</isNotEmpty>
			<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzlx'>sfzlx</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzx'>sfzx</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>hb</isNotEmpty>
			<isNotEmpty prepend=',' property='jmcj'>jmcj</isNotEmpty>
			<isNotEmpty prepend=',' property='sj'>sj</isNotEmpty>
			<isNotEmpty prepend=',' property='lxlrcyfs'>lxlrcyfs</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxsnr'>khdosdxsnr</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxswz'>khdosdxswz</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>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='sbbh'>#sbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdbh'>#tdbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdlx'>#tdlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>#tdmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmcpy'>#tdmcpy#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdzt'>#tdzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdazwz'>#tdazwz#</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='spbmgs'>#spbmgs#</isNotEmpty>
			<isNotEmpty prepend=',' property='spxsgs'>#spxsgs#</isNotEmpty>
			<isNotEmpty prepend=',' property='ssspsfzzf'>#ssspsfzzf#</isNotEmpty>
			<isNotEmpty prepend=',' property='spzt'>#spzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxzt'>#lxzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxsfzzf'>#lxsfzzf#</isNotEmpty>
			<isNotEmpty prepend=',' property='spzl'>#spzl#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjzjg'>#gjzjg#</isNotEmpty>
			<isNotEmpty prepend=',' property='ml'>#ml#</isNotEmpty>
			<isNotEmpty prepend=',' property='spmlyxgs'>#spmlyxgs#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzcptzkz'>#sfzcptzkz#</isNotEmpty>
			<isNotEmpty prepend=',' property='zxcczbh'>#zxcczbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccxe'>#zxccxe#</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccyyrl'>#zxccyyrl#</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccsyrl'>#zxccsyrl#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxblts'>#lxblts#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>#sfqy#</isNotEmpty>
			<isNotEmpty prepend=',' property='jlbh'>#jlbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='fxms'>#fxms#</isNotEmpty>
			<isNotEmpty prepend=',' property='jbms'>#jbms#</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>#xzbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='ggbh'>#ggbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='znbh'>#znbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxfs'>#lxfs#</isNotEmpty>
			<isNotEmpty prepend=',' property='jpkzdh'>#jpkzdh#</isNotEmpty>
			<isNotEmpty prepend=',' property='jdpx'>#jdpx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfznfxjd'>#sfznfxjd#</isNotEmpty>
			<isNotEmpty prepend=',' property='znfxlx'>#znfxlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sqms'>#sqms#</isNotEmpty>
			<isNotEmpty prepend=',' property='squrllj'>#squrllj#</isNotEmpty>
			<isNotEmpty prepend=',' property='ssmlxz'>#ssmlxz#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxmlxz'>#lxmlxz#</isNotEmpty>
			<isNotEmpty prepend=',' property='zburllj'>#zburllj#</isNotEmpty>
			<isNotEmpty prepend=',' property='zbdk'>#zbdk#</isNotEmpty>
			<isNotEmpty prepend=',' property='dqx'>#dqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='xqx'>#xqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='kqx'>#kqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='pqx'>#pqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxhfqx'>#lxhfqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxxzqx'>#lxxzqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxdjqx'>#lxdjqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzlx'>#sfzlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzx'>#sfzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>#hb#</isNotEmpty>
			<isNotEmpty prepend=',' property='jmcj'>#jmcj#</isNotEmpty>
			<isNotEmpty prepend=',' property='sj'>#sj#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxlrcyfs'>#lxlrcyfs#</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxsnr'>#khdosdxsnr#</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxswz'>#khdosdxswz#</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>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object -->
	<update id="update_Sbtdspsr" parameterClass="java.util.Map">
		update Sbtdspsr
		<dynamic prepend="set ">
			<isNotEmpty prepend=',' property='tdlx'>tdlx=#tdlx#</isNotEmpty>
			<isNotEmpty prepend=',' property='wbbh'>wbbh=#wbbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmc'>tdmc=#tdmc#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdmcpy'>tdmcpy=#tdmcpy#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='tdzt'>tdzt=#tdzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='tdazwz'>tdazwz=#tdazwz#
			</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='spbmgs'>spbmgs=#spbmgs#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='spxsgs'>spxsgs=#spxsgs#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='ssspsfzzf'>ssspsfzzf=#ssspsfzzf#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='spzt'>spzt=#spzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxzt'>lxzt=#lxzt#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxsfzzf'>lxsfzzf=#lxsfzzf#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='spzl'>spzl=#spzl#</isNotEmpty>
			<isNotEmpty prepend=',' property='gjzjg'>gjzjg=#gjzjg#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='ml'>ml=#ml#</isNotEmpty>
			<isNotEmpty prepend=',' property='spmlyxgs'>spmlyxgs=#spmlyxgs#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzcptzkz'>sfzcptzkz=#sfzcptzkz#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zxcczbh'>zxcczbh=#zxcczbh#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccxe'>zxccxe=#zxccxe#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccyyrl'>zxccyyrl=#zxccyyrl#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zxccsyrl'>zxccsyrl=#zxccsyrl#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='lxblts'>lxblts=#lxblts#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='sfqy'>sfqy=#sfqy#</isNotEmpty>
			<isNotEmpty prepend=',' property='jlbh'>jlbh=#jlbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='fxms'>fxms=#fxms#</isNotEmpty>
			<isNotEmpty prepend=',' property='jbms'>jbms=#jbms#</isNotEmpty>
			<isNotEmpty prepend=',' property='xzbh'>xzbh=#xzbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='ggbh'>ggbh=#ggbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='znbh'>znbh=#znbh#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxfs'>lxfs=#lxfs#</isNotEmpty>
			<isNotEmpty prepend=',' property='jpkzdh'>jpkzdh=#jpkzdh#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='jdpx'>jdpx=#jdpx#</isNotEmpty>
			<isNotEmpty prepend=',' property='sfznfxjd'>sfznfxjd=#sfznfxjd#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='znfxlx'>znfxlx=#znfxlx#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='sqms'>sqms=#sqms#</isNotEmpty>
			<isNotEmpty prepend=',' property='squrllj'>squrllj=#squrllj#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='ssmlxz'>ssmlxz=#ssmlxz#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='lxmlxz'>lxmlxz=#lxmlxz#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zburllj'>zburllj=#zburllj#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='zbdk'>zbdk=#zbdk#</isNotEmpty>
			<isNotEmpty prepend=',' property='dqx'>dqx=#dqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='xqx'>xqx=#xqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='kqx'>kqx=#kqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='pqx'>pqx=#pqx#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxhfqx'>lxhfqx=#lxhfqx#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='lxxzqx'>lxxzqx=#lxxzqx#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='lxdjqx'>lxdjqx=#lxdjqx#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzlx'>sfzlx=#sfzlx#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='sfzx'>sfzx=#sfzx#</isNotEmpty>
			<isNotEmpty prepend=',' property='hb'>hb=#hb#</isNotEmpty>
			<isNotEmpty prepend=',' property='jmcj'>jmcj=#jmcj#</isNotEmpty>
			<isNotEmpty prepend=',' property='sj'>sj=#sj#</isNotEmpty>
			<isNotEmpty prepend=',' property='lxlrcyfs'>lxlrcyfs=#lxlrcyfs#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxsnr'>khdosdxsnr=#khdosdxsnr#
			</isNotEmpty>
			<isNotEmpty prepend=',' property='khdosdxswz'>khdosdxswz=#khdosdxswz#
			</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>
	
		</dynamic>
			where 1=1
			<isNotEmpty prepend='AND' property='xh'>
				xh= #xh#
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='sbbh'>
				sbbh= #sbbh#
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='tdbh'>
				tdbh= #tdbh#
			</isNotEmpty> 
	</update>
	
	<!-- delete object -->
	<delete id="delete_Sbtdspsr" parameterClass="java.util.Map">
		delete from sbtdspsr 
		<include refid="condition_Sbtdspsr"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Sbtdspsr" parameterClass="java.util.Map">
		delete from sbtdspsr 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- 
	<select id="query_Sbtdspsr" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			(select xzmc from ptxzs b where b.xzbh=a.xzbh ) as xzmc,
			xh,sbbh,tdbh,tdlx,wbbh,tdmc,tdmcpy,tdzt,tdazwz,jd,wd,tpwzx,tpwzy,spbmgs,spxsgs,ssspsfzzf,spzt,lxzt,lxsfzzf,spzl,gjzjg,ml,spmlyxgs,sfzcptzkz,zxcczbh,zxccxe,zxccyyrl,zxccsyrl,lxblts,sfqy,jlbh,fxms,jbms,xzbh,ggbh,znbh,lxfs,jpkzdh,jdpx,sfznfxjd,znfxlx,sqms,squrllj,ssmlxz,lxmlxz,zburllj,zbdk,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,sfzlx,sfzx,hb,jmcj,sj,lxlrcyfs,khdosdxsnr,khdosdxswz,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from sbtdspsr a
		<include refid="condition_Sbtdspsr"/>
		
	</select>
	 -->
	<!-- query objects by page-->
	<select id="query_Sbtdspsr" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select (select xzmc from ptxzs c where c.xzbh=b.xzbh ) as xzmc,
			xh,sbbh,tdbh,tdlx,wbbh,tdmc,tdmcpy,tdzt,tdazwz,jd,wd,tpwzx,tpwzy,spbmgs,spxsgs,ssspsfzzf,spzt,lxzt,lxsfzzf,spzl,gjzjg,ml,spmlyxgs,sfzcptzkz,zxcczbh,zxccxe,zxccyyrl,zxccsyrl,lxblts,sfqy,jlbh,fxms,jbms,xzbh,ggbh,znbh,lxfs,jpkzdh,jdpx,sfznfxjd,znfxlx,sqms,squrllj,ssmlxz,lxmlxz,zburllj,zbdk,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,sfzlx,sfzx,hb,jmcj,sj,lxlrcyfs,khdosdxsnr,khdosdxswz,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4,
		a.isonline,a.vqcstate,a.nosignalstatus,a.videoocclusionstatus,a.scenechangestatus,a.imgtoodarkstatus,a.imgoverbrightstatus,a.imgclearstatus,a.imgcolorstatus,a.recordstate
		from ywvideocurrentstate a
		left join sbtdspsr b
		on (a.videonum=b.sbbh and a.channelnum=b.tdbh)
		<include refid="condition_Sbtdspsr"/>
	</select>
	
	<select id="listSbtdspsrToChannelSet" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			(select xzmc from ptxzs b where b.xzbh=a.xzbh ) as xzmc,
			xh,sbbh,tdbh,tdlx,wbbh,tdmc,tdmcpy,tdzt,tdazwz,jd,wd,tpwzx,tpwzy,spbmgs,spxsgs,ssspsfzzf,spzt,lxzt,lxsfzzf,spzl,gjzjg,ml,spmlyxgs,sfzcptzkz,zxcczbh,zxccxe,zxccyyrl,zxccsyrl,lxblts,sfqy,jlbh,fxms,jbms,xzbh,ggbh,znbh,lxfs,jpkzdh,jdpx,sfznfxjd,znfxlx,sqms,squrllj,ssmlxz,lxmlxz,zburllj,zbdk,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,sfzlx,sfzx,hb,jmcj,sj,lxlrcyfs,khdosdxsnr,khdosdxswz,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
		from sbtdspsr a
		where 1=1
		<isNotEmpty prepend='AND' property='xzbh'>
			(xzbh = #xzbh#  or (xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(a.sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		and (a.sbbh,a.tdbh) 
			not in (select videonum,channelnum from ywvideochannelsetlist 
						where 1=1
						<isNotEmpty prepend='AND' property='channelsetid'>
							channelsetid = #channelsetid#
						</isNotEmpty>
					)
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	
	<select id="countSbtdspsrToChannelSet" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from sbtdspsr a
		where 1=1
		<isNotEmpty prepend='AND' property='xzbh'>
			(xzbh = #xzbh#  or (xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(a.sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		and (a.sbbh,a.tdbh) 
			not in (select videonum,channelnum from ywvideochannelsetlist 
						where 1=1
						<isNotEmpty prepend='AND' property='channelsetid'>
							channelsetid = #channelsetid#
						</isNotEmpty>
					)
	</select>
	<!-- query objects totalcount -->
	<select id="count_Sbtdspsr" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from sbtdspsr 
		<include refid="condition_Sbtdspsr"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Sbtdspsr" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into sbtdspsr(
			 <![CDATA[ 
				xh,sbbh,tdbh,tdlx,wbbh,tdmc,tdmcpy,tdzt,tdazwz,jd,wd,tpwzx,tpwzy,spbmgs,spxsgs,ssspsfzzf,spzt,lxzt,lxsfzzf,spzl,gjzjg,ml,spmlyxgs,sfzcptzkz,zxcczbh,zxccxe,zxccyyrl,zxccsyrl,lxblts,sfqy,jlbh,fxms,jbms,xzbh,ggbh,znbh,lxfs,jpkzdh,jdpx,sfznfxjd,znfxlx,sqms,squrllj,ssmlxz,lxmlxz,zburllj,zbdk,dqx,xqx,kqx,pqx,lxhfqx,lxxzqx,lxdjqx,sfzlx,sfzx,hb,jmcj,sj,lxlrcyfs,khdosdxsnr,khdosdxswz,cjry,cjrq,xgry,xgrq,bz,kz1,kz2,kz3,kz4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].xh#,#list[].sbbh#,#list[].tdbh#,#list[].tdlx#,#list[].wbbh#,#list[].tdmc#,#list[].tdmcpy#,#list[].tdzt#,#list[].tdazwz#,#list[].jd#,#list[].wd#,#list[].tpwzx#,#list[].tpwzy#,#list[].spbmgs#,#list[].spxsgs#,#list[].ssspsfzzf#,#list[].spzt#,#list[].lxzt#,#list[].lxsfzzf#,#list[].spzl#,#list[].gjzjg#,#list[].ml#,#list[].spmlyxgs#,#list[].sfzcptzkz#,#list[].zxcczbh#,#list[].zxccxe#,#list[].zxccyyrl#,#list[].zxccsyrl#,#list[].lxblts#,#list[].sfqy#,#list[].jlbh#,#list[].fxms#,#list[].jbms#,#list[].xzbh#,#list[].ggbh#,#list[].znbh#,#list[].lxfs#,#list[].jpkzdh#,#list[].jdpx#,#list[].sfznfxjd#,#list[].znfxlx#,#list[].sqms#,#list[].squrllj#,#list[].ssmlxz#,#list[].lxmlxz#,#list[].zburllj#,#list[].zbdk#,#list[].dqx#,#list[].xqx#,#list[].kqx#,#list[].pqx#,#list[].lxhfqx#,#list[].lxxzqx#,#list[].lxdjqx#,#list[].sfzlx#,#list[].sfzx#,#list[].hb#,#list[].jmcj#,#list[].sj#,#list[].lxlrcyfs#,#list[].khdosdxsnr#,#list[].khdosdxswz#,#list[].cjry#,#list[].cjrq#,#list[].xgry#,#list[].xgrq#,#list[].bz#,#list[].kz1#,#list[].kz2#,#list[].kz3#,#list[].kz4#
				)
			]]>    
    	</iterate> 
	</insert>
	
	
	<!-- 行政目录管理    使用-->
	<select id="query_Sbtdspsr_ext" resultClass="java.util.HashMap"
		parameterClass="java.util.Map">
		   select sptd.xh,             sptd.sbbh,             sptd.tdbh,             sptd.tdlx,
             sptd.wbbh,             sptd.tdmc,             sptd.tdmcpy,
             sptd.tdzt,            sptd.tdazwz,            sptd.jd,            sptd.wd,
            sptd.tpwzx,            sptd.tpwzy,            sptd.spbmgs,            sptd.spxsgs,
            sptd.ssspsfzzf,            sptd.spzt,            sptd.lxzt,            sptd.lxsfzzf,
            sptd.spzl,            sptd.gjzjg,            sptd.ml,            sptd.spmlyxgs,
            sptd.sfzcptzkz,            sptd.zxcczbh,            sptd.zxccxe,            sptd.zxccyyrl,
            sptd.zxccsyrl,            sptd.lxblts,            sptd.sfqy,            sptd.jlbh,
            sptd.fxms,            sptd.jbms,            sptd.xzbh,            sptd.ggbh,
            sptd.znbh,            sptd.lxfs,            sptd.jpkzdh,            sptd.jdpx,
            sptd.sfznfxjd,            sptd.znfxlx,            sptd.sqms,            sptd.squrllj,
            sptd.ssmlxz,            sptd.lxmlxz,            sptd.zburllj,            sptd.zbdk,
            sptd.dqx,            sptd.xqx,            sptd.kqx,            sptd.pqx,
            sptd.lxhfqx,            sptd.lxxzqx,            sptd.lxdjqx,            sptd.sfzlx,
            sptd.sfzx,            sptd.hb,            sptd.jmcj,            sptd.sj,
            sptd.lxlrcyfs,            sptd.khdosdxsnr,            sptd.khdosdxswz,            sptd.cjrq,
            sptd.xgry,            sptd.xgrq,            sptd.bz,            sptd.kz1,
            sptd.kz2,            sptd.kz3,            sptd.kz4,
            p.xzmc as xztreename,
			l.csmc as tdtypename,
			st.csmc as encodeformat,
			lxfs.csmc as recordmethod,
			aa.csmc as lxlrcyfsname,
			bb.csmc as lxfsname
	        from Sbtdspsr sptd 
	        left join ptxzs p          on p.xzbh = sptd.xzbh
	        left join xtcl l           on sptd.tdlx = l.csdm  				and l.csdl = 'channelSmallType'  
			left join xtcl st          on sptd.spbmgs = st.csdm        and st.csdl = 'encodeFormat'
			left join xtcl aa          on sptd.lxlrcyfs = aa.csdm        and aa.csdl = 'recordByRelay' 
			left join xtcl bb          on sptd.lxfs = bb.csdm        and bb.csdl = 'recordMethod' 
			left join xtcl lxfs          on sptd.spbmgs = lxfs.csdm        and lxfs.csdl = 'recordMethod' 
		<include refid="condition_Sbtdspsr" />
		
		<isNotEmpty prepend='and' property='XGTJxzbh'>
			sptd.xzbh in (select xzbh from    ptxzs  where  qlj like '%$XGTJxzbh$%' )
		</isNotEmpty>
		
	</select>
	
	<select id="count_Sbtdspsr_ext" resultClass="java.lang.Integer"
		parameterClass="java.util.Map">
		select count(*) from Sbtdspsr sptd
		<include refid="condition_Sbtdspsr" />
	</select>
	
	<update id="update_SbtdspsrByXh" parameterClass="java.util.HashMap">
		update Sbtdspsr set  xzbh = #xzbh# where 1=1 and xh  = #xh#
	</update>
	<delete id="detach_SbtdspsrByXh" parameterClass="java.util.HashMap">
		update Sbtdspsr set  xzbh = ''  where 1=1 and xh  = #xh#
	</delete>
	
	<update id="update_SbtdspsrByXzbh" parameterClass="java.util.HashMap">
		update Sbtdspsr set  xzbh = '' where xzbh = #xzbh#
	</update>

	<!-- 根据id查询相机详情 -->
	<select id="get_SbtdspsrDetail" resultClass="java.util.HashMap"
		parameterClass="java.util.Map">
		   select sptd.xh,             sptd.sbbh,             sptd.tdbh,             sptd.tdlx,
             sptd.wbbh,             sptd.tdmc,             sptd.tdmcpy,
             sptd.tdzt,            sptd.tdazwz,            sptd.jd,            sptd.wd,
            sptd.tpwzx,            sptd.tpwzy,            sptd.spbmgs,            sptd.spxsgs,
            sptd.ssspsfzzf,            sptd.spzt,            sptd.lxzt,            sptd.lxsfzzf,
            sptd.spzl,            sptd.gjzjg,            sptd.ml,            sptd.spmlyxgs,
            sptd.sfzcptzkz,            sptd.zxcczbh,            sptd.zxccxe,            sptd.zxccyyrl,
            sptd.zxccsyrl,            sptd.lxblts,            sptd.sfqy,            sptd.jlbh,
            sptd.fxms,            sptd.jbms,            sptd.xzbh,            sptd.ggbh,
            sptd.znbh,            sptd.lxfs,            sptd.jpkzdh,            sptd.jdpx,
            sptd.sfznfxjd,            sptd.znfxlx,            sptd.sqms,            sptd.squrllj,
            sptd.ssmlxz,            sptd.lxmlxz,            sptd.zburllj,            sptd.zbdk,
            sptd.dqx,            sptd.xqx,            sptd.kqx,            sptd.pqx,
            sptd.lxhfqx,            sptd.lxxzqx,            sptd.lxdjqx,            sptd.sfzlx,
            sptd.sfzx,            sptd.hb,            sptd.jmcj,            sptd.sj,
            sptd.lxlrcyfs,            sptd.khdosdxsnr,            sptd.khdosdxswz,            sptd.cjrq,
            sptd.xgry,            sptd.xgrq,            sptd.bz,            sptd.kz1,
            sptd.kz2,            sptd.kz3,            sptd.kz4,
            p.xzmc as xztreename,
			l.csmc as tdtypename,
			st.csmc as encodeformat,
			lxfs.csmc as recordmethod,
			aa.csmc as lxlrcyfsname,
			bb.csmc as lxfsname,
			sbxx.sbip,sbxx.cjmc,
			a.isonline,a.vqcstate,a.nosignalstatus,a.videoocclusionstatus,a.scenechangestatus,a.imgtoodarkstatus,a.imgoverbrightstatus,a.imgclearstatus,a.imgcolorstatus,a.recordstate,a.extend1
	        from Sbtdspsr sptd 
	        left join ywvideocurrentstate a on a.videonum=sptd.sbbh and a.channelnum=sptd.tdbh
	        left join sbxx on sptd.sbbh = sbxx.sbbh
	        left join ptxzs p          on p.xzbh = sptd.xzbh
	        left join xtcl l           on sptd.tdlx = l.csdm  				and l.csdl = 'channelSmallType'  
			left join xtcl st          on sptd.spbmgs = st.csdm        and st.csdl = 'encodeFormat'
			left join xtcl aa          on sptd.lxlrcyfs = aa.csdm        and aa.csdl = 'recordByRelay' 
			left join xtcl bb          on sptd.lxfs = bb.csdm        and bb.csdl = 'recordMethod' 
			left join xtcl lxfs          on sptd.spbmgs = lxfs.csdm        and lxfs.csdl = 'recordMethod' 
			where 1=1
		<isNotEmpty prepend='and' property='xh'>
			sptd.xh = #xh#
		</isNotEmpty>
		
	</select>

	<!-- 动态添加监控设备 list -->
	<select id="getSbtdspsrList" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select * from (
			select a.xh,a.sbbh,a.tdbh,a.tdmc,a.tdlx,a.tdzt,a.jd,a.wd,
			(select roadName from trafficdevicerelate b where b.deviceType='10' and a.xh=b.deviceId limit 1) roadName,
			(select roadId from trafficdevicerelate b where b.deviceType='10' and a.xh=b.deviceId limit 1) roadId
		from sbtdspsr a) c where 1=1 
		<isNotEmpty prepend='and' property='roadName'>
			(c.roadName = #roadName#)
		</isNotEmpty>
		<isNotEmpty prepend='and' property='tdmc'>
			(c.tdmc like concat('%',#tdmc# ,'%') )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='order'>
			$order$
		</isNotEmpty>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>

	<!-- 动态添加监控设备 count -->
	<select id="getSbtdspsrCount" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from (
			select a.xh,a.sbbh,a.tdbh,a.tdmc,a.tdlx,a.tdzt,a.jd,a.wd,
			(select roadName from trafficdevicerelate b where b.deviceType='10' and a.xh=b.deviceId limit 1) roadName,
			(select roadId from trafficdevicerelate b where b.deviceType='10' and a.xh=b.deviceId limit 1) roadId
		from sbtdspsr a) c where 1=1 
		<isNotEmpty prepend='and' property='roadName'>
			(c.roadName = #roadName#)
		</isNotEmpty>
		<isNotEmpty prepend='and' property='tdmc'>
			(c.tdmc like concat('%',#tdmc# ,'%') )
		</isNotEmpty>
	</select>

	<select id="query_Sbtdspsr_tdxx_ext" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			sptd.xh,sptd.sbbh,sptd.tdbh,sptd.tdlx,sptd.wbbh,sptd.tdmc,sptd.tdmcpy,sptd.tdzt,sptd.tdazwz,sptd.jd,
			sptd.wd,sptd.tpwzx,sptd.tpwzy,sptd.spbmgs,sptd.spxsgs,sptd.ssspsfzzf,sptd.spzt,sptd.lxzt,sptd.lxsfzzf,
            sptd.spzl,sptd.gjzjg,sptd.ml,sptd.spmlyxgs,sptd.sfzcptzkz,sptd.zxcczbh,sptd.zxccxe,sptd.zxccyyrl,
            sptd.zxccsyrl,sptd.lxblts,sptd.sfqy,sptd.jlbh,sptd.fxms,sptd.jbms,sptd.xzbh,sptd.ggbh,sptd.znbh,sptd.lxfs,
            sptd.jpkzdh,sptd.jdpx,sptd.sfznfxjd,sptd.znfxlx,sptd.sqms,sptd.squrllj,sptd.ssmlxz,sptd.lxmlxz,sptd.zburllj,
            sptd.zbdk,sptd.dqx,sptd.xqx,sptd.kqx,sptd.pqx,sptd.lxhfqx,sptd.lxxzqx,sptd.lxdjqx,sptd.sfzlx,sptd.sfzx,sptd.hb,
            sptd.jmcj,sptd.sj,sptd.lxlrcyfs,sptd.khdosdxsnr,sptd.khdosdxswz,sptd.cjrq,sptd.xgry,sptd.xgrq,sptd.bz,sptd.kz1,
            sptd.kz2,sptd.kz3,sptd.kz4,
            p.xzmc as xztreename,
			l.csmc as tdtypename,
			st.csmc as encodeformat,
			aa.csmc as lxlrcyfsname,
			bb.csmc as lxfsname,
			store.zms as zxcczmc,
			cc.csmc as sqmsmc,
			dd.csmc as lxmlxzmc,
			ee.csmc as tdztmc,
			ff.sbip,
			gg.cjmc,
			hh.csmc as sfzxmc
	        from sbtdspsr sptd 
	        left join ptxzs p on p.xzbh = sptd.xzbh
	        left join xtcl l on sptd.tdlx = l.csdm and l.csdl = 'channelSmallType'  
			left join xtcl st on sptd.spbmgs = st.csdm and st.csdl = 'encodeFormat'
			left join xtcl aa on sptd.lxlrcyfs = aa.csdm and aa.csdl = 'recordStoreType' 
			left join xtcl bb on sptd.lxfs = bb.csdm and bb.csdl = 'recordMethod' 
			left join ptlxccqz store on store.zbh = sptd.zxcczbh 
			left join xtcl cc on sptd.sqms = cc.csdm and cc.csdl = 'mediaWallMode'
			left join xtcl dd on sptd.lxmlxz = dd.csdm and dd.csdl = 'recordMdeiaType'
			left join xtcl ee on sptd.tdzt = ee.csdm and ee.csdl = 'channelState'
			left join sbxx ff on sptd.sbbh = ff.sbbh
			left join sbcj gg on ff.cjbh = gg.cjbh
			left join xtcl hh on sptd.sfzx = hh.csdm and hh.csdl = 'isOnline'
		where 1=1	
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(sptd.sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sbbh'>
			(sptd.sbbh = #sbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(sptd.tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdmc'>
			(sptd.tdmc = #tdmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdzt'>
			(sptd.tdzt like '%$LIKEtdzt$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdzt'>
			(sptd.tdzt = #tdzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdlx'>
			(sptd.tdlx like '%$LIKEtdlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdlx'>
			(sptd.tdlx = #tdlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxfs'>
			(sptd.lxfs like '%$LIKElxfs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxfs'>
			(sptd.lxfs = #lxfs# )
		</isNotEmpty>
	</select>

	<select id="count_Sbtdspsr_tdxx_ext" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select 
			count(*)
	        from sbtdspsr sptd 
	        left join ptxzs p on p.xzbh = sptd.xzbh
	        left join xtcl l on sptd.tdlx = l.csdm and l.csdl = 'channelSmallType'  
			left join xtcl st on sptd.spbmgs = st.csdm and st.csdl = 'encodeFormat'
			left join xtcl aa on sptd.lxlrcyfs = aa.csdm and aa.csdl = 'recordStoreType' 
			left join xtcl bb on sptd.lxfs = bb.csdm and bb.csdl = 'recordMethod' 
			left join ptlxccqz store on store.zbh = sptd.zxcczbh 
			left join xtcl cc on sptd.sqms = cc.csdm and cc.csdl = 'mediaWallMode'
			left join xtcl dd on sptd.lxmlxz = dd.csdm and dd.csdl = 'recordMdeiaType'
			left join xtcl ee on sptd.tdzt = ee.csdm and ee.csdl = 'channelState'
			left join sbxx ff on sptd.sbbh = ff.sbbh
			left join sbcj gg on ff.cjbh = gg.cjbh
			left join xtcl hh on sptd.sfzx = hh.csdm and hh.csdl = 'isOnline'
		where 1=1	
		<isNotEmpty prepend='AND' property='LIKEsbbh'>
			(sptd.sbbh like '%$LIKEsbbh$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sbbh'>
			(sptd.sbbh = #sbbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdmc'>
			(sptd.tdmc like '%$LIKEtdmc$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdmc'>
			(sptd.tdmc = #tdmc# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdzt'>
			(sptd.tdzt like '%$LIKEtdzt$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdzt'>
			(sptd.tdzt = #tdzt# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtdlx'>
			(sptd.tdlx like '%$LIKEtdlx$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tdlx'>
			(sptd.tdlx = #tdlx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElxfs'>
			(sptd.lxfs like '%$LIKElxfs$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='lxfs'>
			(sptd.lxfs = #lxfs# )
		</isNotEmpty>
	</select>

	<update id="updateJdWdByXh"  parameterClass="java.util.HashMap">
		update Sbtdspsr set  jd = #jd# , wd=#wd#, xgry=#xgry#,xgrq=#xgrq#  where 1=1 and xh  = #xh#
	</update>
</sqlMap>











