<?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="" >
	
	<sql id="condition_Ywrecordcurrentstate">
		where 1=1
		<isNotEmpty prepend='AND' property='countdateStart'>
		<![CDATA[ 
			countdate >= #countdateStart#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdateEnd'>
		<![CDATA[ 
			countdate <= #countdateEnd#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstateid'>
			(recordstateid like '%$LIKErecordstateid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstateid'>
			(recordstateid = #recordstateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocatalog'>
			(videocatalog like '%$LIKEvideocatalog$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocatalog'>
			(videocatalog = #videocatalog# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountdate'>
			(countdate like '%$LIKEcountdate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdate'>
			(countdate = #countdate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountmonth'>
			(countmonth like '%$LIKEcountmonth$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countmonth'>
			(countmonth = #countmonth# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstate'>
			(recordstate like '%$LIKErecordstate$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(recordstate = #recordstate#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailuretype'>
			(failuretype like '%$LIKEfailuretype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failuretype'>
			(failuretype = #failuretype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailurecause'>
			(failurecause like '%$LIKEfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failurecause'>
			(failurecause = #failurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonestate'>
			(onestate like '%$LIKEonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onestate'>
			(onestate = #onestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonetaskid'>
			(onetaskid like '%$LIKEonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onetaskid'>
			(onetaskid = #onetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwostate'>
			(twostate like '%$LIKEtwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twostate'>
			(twostate = #twostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwotaskid'>
			(twotaskid like '%$LIKEtwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twotaskid'>
			(twotaskid = #twotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreestate'>
			(threestate like '%$LIKEthreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threestate'>
			(threestate = #threestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreetaskid'>
			(threetaskid like '%$LIKEthreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threetaskid'>
			(threetaskid = #threetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourstate'>
			(fourstate like '%$LIKEfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourstate'>
			(fourstate = #fourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourtaskid'>
			(fourtaskid like '%$LIKEfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourtaskid'>
			(fourtaskid = #fourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivestate'>
			(fivestate like '%$LIKEfivestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivestate'>
			(fivestate = #fivestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivetaskid'>
			(fivetaskid like '%$LIKEfivetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivetaskid'>
			(fivetaskid = #fivetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixstate'>
			(sixstate like '%$LIKEsixstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixstate'>
			(sixstate = #sixstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixtaskid'>
			(sixtaskid like '%$LIKEsixtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixtaskid'>
			(sixtaskid = #sixtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsevenstate'>
			(sevenstate like '%$LIKEsevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sevenstate'>
			(sevenstate = #sevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventaskid'>
			(seventaskid like '%$LIKEseventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventaskid'>
			(seventaskid = #seventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeightstate'>
			(eightstate like '%$LIKEeightstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eightstate'>
			(eightstate = #eightstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighttaskid'>
			(eighttaskid like '%$LIKEeighttaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighttaskid'>
			(eighttaskid = #eighttaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninestate'>
			(ninestate like '%$LIKEninestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninestate'>
			(ninestate = #ninestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninetaskid'>
			(ninetaskid like '%$LIKEninetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninetaskid'>
			(ninetaskid = #ninetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtenstate'>
			(tenstate like '%$LIKEtenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tenstate'>
			(tenstate = #tenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtentaskid'>
			(tentaskid like '%$LIKEtentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tentaskid'>
			(tentaskid = #tentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEelevenstate'>
			(elevenstate like '%$LIKEelevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='elevenstate'>
			(elevenstate = #elevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeleventaskid'>
			(eleventaskid like '%$LIKEeleventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eleventaskid'>
			(eleventaskid = #eleventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvestate'>
			(twelvestate like '%$LIKEtwelvestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvestate'>
			(twelvestate = #twelvestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvetaskid'>
			(twelvetaskid like '%$LIKEtwelvetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvetaskid'>
			(twelvetaskid = #twelvetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteenstate'>
			(thirteenstate like '%$LIKEthirteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteenstate'>
			(thirteenstate = #thirteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteentaskid'>
			(thirteentaskid like '%$LIKEthirteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteentaskid'>
			(thirteentaskid = #thirteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteenstate'>
			(fourteenstate like '%$LIKEfourteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteenstate'>
			(fourteenstate = #fourteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteentaskid'>
			(fourteentaskid like '%$LIKEfourteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteentaskid'>
			(fourteentaskid = #fourteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteenstate'>
			(fifteenstate like '%$LIKEfifteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteenstate'>
			(fifteenstate = #fifteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteentaskid'>
			(fifteentaskid like '%$LIKEfifteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteentaskid'>
			(fifteentaskid = #fifteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteenstate'>
			(sixteenstate like '%$LIKEsixteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteenstate'>
			(sixteenstate = #sixteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteentaskid'>
			(sixteentaskid like '%$LIKEsixteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteentaskid'>
			(sixteentaskid = #sixteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeenstate'>
			(seventeenstate like '%$LIKEseventeenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeenstate'>
			(seventeenstate = #seventeenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeentaskid'>
			(seventeentaskid like '%$LIKEseventeentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeentaskid'>
			(seventeentaskid = #seventeentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteenstate'>
			(eighteenstate like '%$LIKEeighteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteenstate'>
			(eighteenstate = #eighteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteentaskid'>
			(eighteentaskid like '%$LIKEeighteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteentaskid'>
			(eighteentaskid = #eighteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteenstate'>
			(nineteenstate like '%$LIKEnineteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteenstate'>
			(nineteenstate = #nineteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteentaskid'>
			(nineteentaskid like '%$LIKEnineteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteentaskid'>
			(nineteentaskid = #nineteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentystate'>
			(twentystate like '%$LIKEtwentystate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentystate'>
			(twentystate = #twentystate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytaskid'>
			(twentytaskid like '%$LIKEtwentytaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytaskid'>
			(twentytaskid = #twentytaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonestate'>
			(twentyonestate like '%$LIKEtwentyonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonestate'>
			(twentyonestate = #twentyonestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonetaskid'>
			(twentyonetaskid like '%$LIKEtwentyonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonetaskid'>
			(twentyonetaskid = #twentyonetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwostate'>
			(twentytwostate like '%$LIKEtwentytwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwostate'>
			(twentytwostate = #twentytwostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwotaskid'>
			(twentytwotaskid like '%$LIKEtwentytwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwotaskid'>
			(twentytwotaskid = #twentytwotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreestate'>
			(twentythreestate like '%$LIKEtwentythreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreestate'>
			(twentythreestate = #twentythreestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreetaskid'>
			(twentythreetaskid like '%$LIKEtwentythreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreetaskid'>
			(twentythreetaskid = #twentythreetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourstate'>
			(twentyfourstate like '%$LIKEtwentyfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourstate'>
			(twentyfourstate = #twentyfourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourtaskid'>
			(twentyfourtaskid like '%$LIKEtwentyfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourtaskid'>
			(twentyfourtaskid = #twentyfourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabelstatus'>
			(recordlabelstatus like '%$LIKErecordlabelstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabelstatus'>
			(recordlabelstatus = #recordlabelstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabeltime'>
			(recordlabeltime like '%$LIKErecordlabeltime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabeltime'>
			(recordlabeltime = #recordlabeltime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabelaccount'>
			(videolabelaccount like '%$LIKEvideolabelaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabelaccount'>
			(videolabelaccount = #videolabelaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateaccount'>
			(createaccount like '%$LIKEcreateaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createaccount'>
			(createaccount = #createaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreatetime'>
			(createtime like '%$LIKEcreatetime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createtime'>
			(createtime = #createtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyaccount'>
			(modifyaccount like '%$LIKEmodifyaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyaccount'>
			(modifyaccount = #modifyaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifytime'>
			(modifytime like '%$LIKEmodifytime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifytime'>
			(modifytime = #modifytime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEremarks'>
			(remarks like '%$LIKEremarks$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='remarks'>
			(remarks = #remarks# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend1'>
			(extend1 like '%$LIKEextend1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend1'>
			(extend1 = #extend1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend2'>
			(extend2 like '%$LIKEextend2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend2'>
			(extend2 = #extend2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend3'>
			(extend3 like '%$LIKEextend3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend3'>
			(extend3 = #extend3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend4'>
			(extend4 like '%$LIKEextend4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend4'>
			(extend4 = #extend4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Ywrecordcurrentstate" parameterClass="java.util.Map">
		insert into 
		ywrecordcurrentstate(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='recordstateid'>recordstateid</isNotEmpty>
<isNotEmpty prepend=',' property='recordstate'>recordstate</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>videonum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>videocatalog</isNotEmpty>
			<isNotEmpty prepend=',' property='countdate'>countdate</isNotEmpty>
			<isNotEmpty prepend=',' property='countmonth'>countmonth</isNotEmpty>
			<isNotEmpty prepend=',' property='failuretype'>failuretype</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>failurecause</isNotEmpty>
			<isNotEmpty prepend=',' property='onestate'>onestate</isNotEmpty>
			<isNotEmpty prepend=',' property='onetaskid'>onetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twostate'>twostate</isNotEmpty>
			<isNotEmpty prepend=',' property='twotaskid'>twotaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='threestate'>threestate</isNotEmpty>
			<isNotEmpty prepend=',' property='threetaskid'>threetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='fourstate'>fourstate</isNotEmpty>
			<isNotEmpty prepend=',' property='fourtaskid'>fourtaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='fivestate'>fivestate</isNotEmpty>
			<isNotEmpty prepend=',' property='fivetaskid'>fivetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='sixstate'>sixstate</isNotEmpty>
			<isNotEmpty prepend=',' property='sixtaskid'>sixtaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='sevenstate'>sevenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='seventaskid'>seventaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='eightstate'>eightstate</isNotEmpty>
			<isNotEmpty prepend=',' property='eighttaskid'>eighttaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='ninestate'>ninestate</isNotEmpty>
			<isNotEmpty prepend=',' property='ninetaskid'>ninetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='tenstate'>tenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='tentaskid'>tentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='elevenstate'>elevenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='eleventaskid'>eleventaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvestate'>twelvestate</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvetaskid'>twelvetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteenstate'>thirteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteentaskid'>thirteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteenstate'>fourteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteentaskid'>fourteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteenstate'>fifteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteentaskid'>fifteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteenstate'>sixteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteentaskid'>sixteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeenstate'>seventeenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeentaskid'>seventeentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteenstate'>eighteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteentaskid'>eighteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteenstate'>nineteenstate</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteentaskid'>nineteentaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twentystate'>twentystate</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytaskid'>twentytaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonestate'>twentyonestate</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonetaskid'>twentyonetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwostate'>twentytwostate</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwotaskid'>twentytwotaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreestate'>twentythreestate</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreetaskid'>twentythreetaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourstate'>twentyfourstate</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourtaskid'>twentyfourtaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabelstatus'>recordlabelstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabeltime'>recordlabeltime</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>videolabelaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>createaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>createtime</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>extend1</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>extend2</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>extend3</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>extend4</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='recordstateid'>#recordstateid#</isNotEmpty>
<isNotEmpty prepend=',' property='recordstate'>#recordstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>#videocatalog#</isNotEmpty>
			<isNotEmpty prepend=',' property='countdate'>#countdate#</isNotEmpty>
			<isNotEmpty prepend=',' property='countmonth'>#countmonth#</isNotEmpty>
			<isNotEmpty prepend=',' property='failuretype'>#failuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>#failurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='onestate'>#onestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='onetaskid'>#onetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twostate'>#twostate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twotaskid'>#twotaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='threestate'>#threestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='threetaskid'>#threetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourstate'>#fourstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourtaskid'>#fourtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fivestate'>#fivestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fivetaskid'>#fivetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixstate'>#sixstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixtaskid'>#sixtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sevenstate'>#sevenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventaskid'>#seventaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='eightstate'>#eightstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighttaskid'>#eighttaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='ninestate'>#ninestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='ninetaskid'>#ninetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='tenstate'>#tenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='tentaskid'>#tentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='elevenstate'>#elevenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eleventaskid'>#eleventaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvestate'>#twelvestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvetaskid'>#twelvetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteenstate'>#thirteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteentaskid'>#thirteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteenstate'>#fourteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteentaskid'>#fourteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteenstate'>#fifteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteentaskid'>#fifteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteenstate'>#sixteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteentaskid'>#sixteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeenstate'>#seventeenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeentaskid'>#seventeentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteenstate'>#eighteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteentaskid'>#eighteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteenstate'>#nineteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteentaskid'>#nineteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentystate'>#twentystate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytaskid'>#twentytaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonestate'>#twentyonestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonetaskid'>#twentyonetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwostate'>#twentytwostate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwotaskid'>#twentytwotaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreestate'>#twentythreestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreetaskid'>#twentythreetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourstate'>#twentyfourstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourtaskid'>#twentyfourtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabelstatus'>#recordlabelstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabeltime'>#recordlabeltime#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>#videolabelaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>#createaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>#createtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>#modifytime#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>#remarks#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>#extend1#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>#extend2#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>#extend3#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>#extend4#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Ywrecordcurrentstate" parameterClass="java.util.Map">
		update ywrecordcurrentstate 
		<dynamic prepend="set ">   
			

			<isNotEmpty prepend=',' property='videonum'>videonum=#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum=#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname=#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>videocatalog=#videocatalog#</isNotEmpty>
			<isNotEmpty prepend=',' property='countdate'>countdate=#countdate#</isNotEmpty>
			<isNotEmpty prepend=',' property='countmonth'>countmonth=#countmonth#</isNotEmpty>
			<isNotEmpty prepend=',' property='failuretype'>failuretype=#failuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>failurecause=#failurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='onestate'>onestate=#onestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='onetaskid'>onetaskid=#onetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twostate'>twostate=#twostate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twotaskid'>twotaskid=#twotaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='threestate'>threestate=#threestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='threetaskid'>threetaskid=#threetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourstate'>fourstate=#fourstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourtaskid'>fourtaskid=#fourtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fivestate'>fivestate=#fivestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fivetaskid'>fivetaskid=#fivetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixstate'>sixstate=#sixstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixtaskid'>sixtaskid=#sixtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sevenstate'>sevenstate=#sevenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventaskid'>seventaskid=#seventaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='eightstate'>eightstate=#eightstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighttaskid'>eighttaskid=#eighttaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='ninestate'>ninestate=#ninestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='ninetaskid'>ninetaskid=#ninetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='tenstate'>tenstate=#tenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='tentaskid'>tentaskid=#tentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='elevenstate'>elevenstate=#elevenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eleventaskid'>eleventaskid=#eleventaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvestate'>twelvestate=#twelvestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twelvetaskid'>twelvetaskid=#twelvetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteenstate'>thirteenstate=#thirteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='thirteentaskid'>thirteentaskid=#thirteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteenstate'>fourteenstate=#fourteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fourteentaskid'>fourteentaskid=#fourteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteenstate'>fifteenstate=#fifteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='fifteentaskid'>fifteentaskid=#fifteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteenstate'>sixteenstate=#sixteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='sixteentaskid'>sixteentaskid=#sixteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeenstate'>seventeenstate=#seventeenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='seventeentaskid'>seventeentaskid=#seventeentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteenstate'>eighteenstate=#eighteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='eighteentaskid'>eighteentaskid=#eighteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteenstate'>nineteenstate=#nineteenstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='nineteentaskid'>nineteentaskid=#nineteentaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentystate'>twentystate=#twentystate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytaskid'>twentytaskid=#twentytaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonestate'>twentyonestate=#twentyonestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyonetaskid'>twentyonetaskid=#twentyonetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwostate'>twentytwostate=#twentytwostate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentytwotaskid'>twentytwotaskid=#twentytwotaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreestate'>twentythreestate=#twentythreestate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentythreetaskid'>twentythreetaskid=#twentythreetaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourstate'>twentyfourstate=#twentyfourstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='twentyfourtaskid'>twentyfourtaskid=#twentyfourtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabelstatus'>recordlabelstatus=#recordlabelstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordlabeltime'>recordlabeltime=#recordlabeltime#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>videolabelaccount=#videolabelaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>createaccount=#createaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>createtime=#createtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks=#remarks#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>extend1=#extend1#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>extend2=#extend2#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>extend3=#extend3#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>extend4=#extend4#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJrecordstateid'> recordstateid = #XGTJrecordstateid#</isNotEmpty>
<isNotEmpty prepend='AND' property='XGTJrecordstate'> recordstate = #XGTJrecordstate#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideonum'> videonum = #XGTJvideonum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelnum'> channelnum = #XGTJchannelnum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelname'> channelname = #XGTJchannelname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideocatalog'> videocatalog = #XGTJvideocatalog# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcountdate'> countdate = #XGTJcountdate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcountmonth'> countmonth = #XGTJcountmonth# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfailuretype'> failuretype = #XGTJfailuretype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfailurecause'> failurecause = #XGTJfailurecause# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJonestate'> onestate = #XGTJonestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJonetaskid'> onetaskid = #XGTJonetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwostate'> twostate = #XGTJtwostate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwotaskid'> twotaskid = #XGTJtwotaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthreestate'> threestate = #XGTJthreestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthreetaskid'> threetaskid = #XGTJthreetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfourstate'> fourstate = #XGTJfourstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfourtaskid'> fourtaskid = #XGTJfourtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfivestate'> fivestate = #XGTJfivestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfivetaskid'> fivetaskid = #XGTJfivetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsixstate'> sixstate = #XGTJsixstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsixtaskid'> sixtaskid = #XGTJsixtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsevenstate'> sevenstate = #XGTJsevenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJseventaskid'> seventaskid = #XGTJseventaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJeightstate'> eightstate = #XGTJeightstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJeighttaskid'> eighttaskid = #XGTJeighttaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJninestate'> ninestate = #XGTJninestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJninetaskid'> ninetaskid = #XGTJninetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtenstate'> tenstate = #XGTJtenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtentaskid'> tentaskid = #XGTJtentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJelevenstate'> elevenstate = #XGTJelevenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJeleventaskid'> eleventaskid = #XGTJeleventaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwelvestate'> twelvestate = #XGTJtwelvestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwelvetaskid'> twelvetaskid = #XGTJtwelvetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthirteenstate'> thirteenstate = #XGTJthirteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthirteentaskid'> thirteentaskid = #XGTJthirteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfourteenstate'> fourteenstate = #XGTJfourteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfourteentaskid'> fourteentaskid = #XGTJfourteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfifteenstate'> fifteenstate = #XGTJfifteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfifteentaskid'> fifteentaskid = #XGTJfifteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsixteenstate'> sixteenstate = #XGTJsixteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsixteentaskid'> sixteentaskid = #XGTJsixteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJseventeenstate'> seventeenstate = #XGTJseventeenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJseventeentaskid'> seventeentaskid = #XGTJseventeentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJeighteenstate'> eighteenstate = #XGTJeighteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJeighteentaskid'> eighteentaskid = #XGTJeighteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnineteenstate'> nineteenstate = #XGTJnineteenstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnineteentaskid'> nineteentaskid = #XGTJnineteentaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentystate'> twentystate = #XGTJtwentystate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentytaskid'> twentytaskid = #XGTJtwentytaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentyonestate'> twentyonestate = #XGTJtwentyonestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentyonetaskid'> twentyonetaskid = #XGTJtwentyonetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentytwostate'> twentytwostate = #XGTJtwentytwostate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentytwotaskid'> twentytwotaskid = #XGTJtwentytwotaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentythreestate'> twentythreestate = #XGTJtwentythreestate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentythreetaskid'> twentythreetaskid = #XGTJtwentythreetaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentyfourstate'> twentyfourstate = #XGTJtwentyfourstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtwentyfourtaskid'> twentyfourtaskid = #XGTJtwentyfourtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordlabelstatus'> recordlabelstatus = #XGTJrecordlabelstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordlabeltime'> recordlabeltime = #XGTJrecordlabeltime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideolabelaccount'> videolabelaccount = #XGTJvideolabelaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcreateaccount'> createaccount = #XGTJcreateaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcreatetime'> createtime = #XGTJcreatetime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmodifyaccount'> modifyaccount = #XGTJmodifyaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmodifytime'> modifytime = #XGTJmodifytime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJremarks'> remarks = #XGTJremarks# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJextend1'> extend1 = #XGTJextend1# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJextend2'> extend2 = #XGTJextend2# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJextend3'> extend3 = #XGTJextend3# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJextend4'> extend4 = #XGTJextend4# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Ywrecordcurrentstate" parameterClass="java.util.Map">
		delete from ywrecordcurrentstate 
		<include refid="condition_Ywrecordcurrentstate"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywrecordcurrentstate" parameterClass="java.util.Map">
		delete from ywrecordcurrentstate 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywrecordcurrentstate" resultClass="java.util.HashMap" parameterClass="java.util.Map" remapResults="true">
		select  
			a.*,e.sbip,e.cjmc
			,f.videonum as videonum2,f.channelnum as channelnum2,f.channelname as channelname2
		from ywrecordcurrentstate a
			RIGHT JOIN ywvideosyncchannel f on (a.videonum = f.videonum and a.channelnum = f.channelnum)
		left join sbxx e on (a.videonum=e.sbbh)
		<isNotEmpty prepend=' ' property='bmbh'>
			LEFT JOIN sbtdjqqx b on (b.sbbh=f.videonum and b.tdbh=f.channelnum ) 
		</isNotEmpty>
		where 1=1
		<isNotEmpty prepend='and' property='bmbh'>
			b.bmbh=#bmbh#
		</isNotEmpty>
		<isNotEmpty prepend='and' property='xzbh'>
			(f.admincatalogue = #xzbh#  or (f.admincatalogue in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdateStart'>
		<![CDATA[ 
			a.countdate >= #countdateStart#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdateEnd'>
		<![CDATA[ 
			a.countdate <= #countdateEnd#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstateid'>
			(a.recordstateid like '%$LIKErecordstateid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstateid'>
			(a.recordstateid = #recordstateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(a.videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(a.videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(a.channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(a.channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(a.channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(a.channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocatalog'>
			(a.videocatalog like '%$LIKEvideocatalog$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocatalog'>
			(a.videocatalog = #videocatalog# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountdate'>
			(a.countdate like '%$LIKEcountdate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdate'>
			(a.countdate = #countdate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountmonth'>
			(a.countmonth like '%$LIKEcountmonth$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countmonth'>
			(a.countmonth = #countmonth# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstate'>
			(a.recordstate like '%$LIKErecordstate$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(a.recordstate = #recordstate#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailuretype'>
			(a.failuretype like '%$LIKEfailuretype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failuretype'>
			(a.failuretype = #failuretype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailurecause'>
			(a.failurecause like '%$LIKEfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failurecause'>
			(a.failurecause = #failurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonestate'>
			(a.onestate like '%$LIKEonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onestate'>
			(a.onestate = #onestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonetaskid'>
			(a.onetaskid like '%$LIKEonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onetaskid'>
			(a.onetaskid = #onetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwostate'>
			(a.twostate like '%$LIKEtwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twostate'>
			(a.twostate = #twostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwotaskid'>
			(a.twotaskid like '%$LIKEtwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twotaskid'>
			(a.twotaskid = #twotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreestate'>
			(a.threestate like '%$LIKEthreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threestate'>
			(a.threestate = #threestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreetaskid'>
			(a.threetaskid like '%$LIKEthreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threetaskid'>
			(a.threetaskid = #threetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourstate'>
			(fourstate like '%$LIKEfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourstate'>
			(a.fourstate = #fourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourtaskid'>
			(a.fourtaskid like '%$LIKEfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourtaskid'>
			(a.fourtaskid = #fourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivestate'>
			(a.fivestate like '%$LIKEfivestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivestate'>
			(a.fivestate = #fivestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivetaskid'>
			(a.fivetaskid like '%$LIKEfivetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivetaskid'>
			(a.fivetaskid = #fivetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixstate'>
			(a.sixstate like '%$LIKEsixstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixstate'>
			(a.sixstate = #sixstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixtaskid'>
			(a.sixtaskid like '%$LIKEsixtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixtaskid'>
			(a.sixtaskid = #sixtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsevenstate'>
			(a.sevenstate like '%$LIKEsevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sevenstate'>
			(a.sevenstate = #sevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventaskid'>
			(a.seventaskid like '%$LIKEseventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventaskid'>
			(a.seventaskid = #seventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeightstate'>
			(a.eightstate like '%$LIKEeightstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eightstate'>
			(a.eightstate = #eightstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighttaskid'>
			(a.eighttaskid like '%$LIKEeighttaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighttaskid'>
			(a.eighttaskid = #eighttaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninestate'>
			(a.ninestate like '%$LIKEninestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninestate'>
			(a.ninestate = #ninestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninetaskid'>
			(a.ninetaskid like '%$LIKEninetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninetaskid'>
			(a.ninetaskid = #ninetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtenstate'>
			(a.tenstate like '%$LIKEtenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tenstate'>
			(a.tenstate = #tenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtentaskid'>
			(a.tentaskid like '%$LIKEtentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tentaskid'>
			(a.tentaskid = #tentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEelevenstate'>
			(a.elevenstate like '%$LIKEelevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='elevenstate'>
			(a.elevenstate = #elevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeleventaskid'>
			(a.eleventaskid like '%$LIKEeleventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eleventaskid'>
			(a.eleventaskid = #eleventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvestate'>
			(a.twelvestate like '%$LIKEtwelvestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvestate'>
			(a.twelvestate = #twelvestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvetaskid'>
			(a.twelvetaskid like '%$LIKEtwelvetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvetaskid'>
			(a.twelvetaskid = #twelvetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteenstate'>
			(a.thirteenstate like '%$LIKEthirteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteenstate'>
			(a.thirteenstate = #thirteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteentaskid'>
			(a.thirteentaskid like '%$LIKEthirteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteentaskid'>
			(a.thirteentaskid = #thirteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteenstate'>
			(a.fourteenstate like '%$LIKEfourteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteenstate'>
			(a.fourteenstate = #fourteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteentaskid'>
			(a.fourteentaskid like '%$LIKEfourteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteentaskid'>
			(a.fourteentaskid = #fourteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteenstate'>
			(a.fifteenstate like '%$LIKEfifteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteenstate'>
			(a.fifteenstate = #fifteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteentaskid'>
			(a.fifteentaskid like '%$LIKEfifteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteentaskid'>
			(a.fifteentaskid = #fifteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteenstate'>
			(a.sixteenstate like '%$LIKEsixteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteenstate'>
			(a.sixteenstate = #sixteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteentaskid'>
			(a.sixteentaskid like '%$LIKEsixteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteentaskid'>
			(a.sixteentaskid = #sixteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeenstate'>
			(a.seventeenstate like '%$LIKEseventeenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeenstate'>
			(a.seventeenstate = #seventeenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeentaskid'>
			(a.seventeentaskid like '%$LIKEseventeentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeentaskid'>
			(a.seventeentaskid = #seventeentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteenstate'>
			(a.eighteenstate like '%$LIKEeighteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteenstate'>
			(a.eighteenstate = #eighteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteentaskid'>
			(a.eighteentaskid like '%$LIKEeighteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteentaskid'>
			(a.eighteentaskid = #eighteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteenstate'>
			(a.nineteenstate like '%$LIKEnineteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteenstate'>
			(a.nineteenstate = #nineteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteentaskid'>
			(a.nineteentaskid like '%$LIKEnineteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteentaskid'>
			(a.nineteentaskid = #nineteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentystate'>
			(a.twentystate like '%$LIKEtwentystate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentystate'>
			(a.twentystate = #twentystate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytaskid'>
			(a.twentytaskid like '%$LIKEtwentytaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytaskid'>
			(a.twentytaskid = #twentytaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonestate'>
			(a.twentyonestate like '%$LIKEtwentyonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonestate'>
			(a.twentyonestate = #twentyonestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonetaskid'>
			(a.twentyonetaskid like '%$LIKEtwentyonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonetaskid'>
			(a.twentyonetaskid = #twentyonetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwostate'>
			(a.twentytwostate like '%$LIKEtwentytwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwostate'>
			(a.twentytwostate = #twentytwostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwotaskid'>
			(a.twentytwotaskid like '%$LIKEtwentytwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwotaskid'>
			(a.twentytwotaskid = #twentytwotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreestate'>
			(a.twentythreestate like '%$LIKEtwentythreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreestate'>
			(a.twentythreestate = #twentythreestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreetaskid'>
			(a.twentythreetaskid like '%$LIKEtwentythreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreetaskid'>
			(a.twentythreetaskid = #twentythreetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourstate'>
			(a.twentyfourstate like '%$LIKEtwentyfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourstate'>
			(a.twentyfourstate = #twentyfourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourtaskid'>
			(a.twentyfourtaskid like '%$LIKEtwentyfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourtaskid'>
			(a.twentyfourtaskid = #twentyfourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabelstatus'>
			(a.recordlabelstatus like '%$LIKErecordlabelstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabelstatus'>
			(a.recordlabelstatus = #recordlabelstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabeltime'>
			(a.recordlabeltime like '%$LIKErecordlabeltime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabeltime'>
			(a.recordlabeltime = #recordlabeltime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabelaccount'>
			(a.videolabelaccount like '%$LIKEvideolabelaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabelaccount'>
			(a.videolabelaccount = #videolabelaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateaccount'>
			(a.createaccount like '%$LIKEcreateaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createaccount'>
			(a.createaccount = #createaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreatetime'>
			(a.createtime like '%$LIKEcreatetime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createtime'>
			(a.createtime = #createtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyaccount'>
			(a.modifyaccount like '%$LIKEmodifyaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyaccount'>
			(a.modifyaccount = #modifyaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifytime'>
			(a.modifytime like '%$LIKEmodifytime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifytime'>
			(a.modifytime = #modifytime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEremarks'>
			(a.remarks like '%$LIKEremarks$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='remarks'>
			(a.remarks = #remarks# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend1'>
			(a.extend1 like '%$LIKEextend1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend1'>
			(a.extend1 = #extend1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend2'>
			(a.extend2 like '%$LIKEextend2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend2'>
			(a.extend2 = #extend2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend3'>
			(a.extend3 like '%$LIKEextend3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend3'>
			(a.extend3 = #extend3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend4'>
			(a.extend4 like '%$LIKEextend4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend4'>
			(a.extend4 = #extend4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywrecordcurrentstate" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) 
		from ywrecordcurrentstate a
		RIGHT JOIN ywvideosyncchannel f on (a.videonum = f.videonum and a.channelnum = f.channelnum)
		<isNotEmpty prepend=' ' property='bmbh'>
			LEFT JOIN sbtdjqqx b on (b.sbbh=f.videonum and b.tdbh=f.channelnum ) 
		</isNotEmpty>
		where 1=1
		<isNotEmpty prepend='and' property='bmbh'>
			b.bmbh=#bmbh#
		</isNotEmpty>
		<isNotEmpty prepend='and' property='xzbh'>
			(f.admincatalogue = #xzbh#  or (f.admincatalogue in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdateStart'>
		<![CDATA[ 
			a.countdate >= #countdateStart#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdateEnd'>
		<![CDATA[ 
			a.countdate <= #countdateEnd#
		]]>
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstateid'>
			(a.recordstateid like '%$LIKErecordstateid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstateid'>
			(a.recordstateid = #recordstateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(a.videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(a.videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(a.channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(a.channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(a.channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(a.channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocatalog'>
			(a.videocatalog like '%$LIKEvideocatalog$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocatalog'>
			(a.videocatalog = #videocatalog# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountdate'>
			(a.countdate like '%$LIKEcountdate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countdate'>
			(a.countdate = #countdate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountmonth'>
			(a.countmonth like '%$LIKEcountmonth$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countmonth'>
			(a.countmonth = #countmonth# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstate'>
			(a.recordstate like '%$LIKErecordstate$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(a.recordstate = #recordstate#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailuretype'>
			(a.failuretype like '%$LIKEfailuretype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failuretype'>
			(a.failuretype = #failuretype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailurecause'>
			(a.failurecause like '%$LIKEfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failurecause'>
			(a.failurecause = #failurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonestate'>
			(a.onestate like '%$LIKEonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onestate'>
			(a.onestate = #onestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonetaskid'>
			(a.onetaskid like '%$LIKEonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onetaskid'>
			(a.onetaskid = #onetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwostate'>
			(a.twostate like '%$LIKEtwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twostate'>
			(a.twostate = #twostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwotaskid'>
			(a.twotaskid like '%$LIKEtwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twotaskid'>
			(a.twotaskid = #twotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreestate'>
			(a.threestate like '%$LIKEthreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threestate'>
			(a.threestate = #threestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthreetaskid'>
			(a.threetaskid like '%$LIKEthreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='threetaskid'>
			(a.threetaskid = #threetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourstate'>
			(fourstate like '%$LIKEfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourstate'>
			(a.fourstate = #fourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourtaskid'>
			(a.fourtaskid like '%$LIKEfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourtaskid'>
			(a.fourtaskid = #fourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivestate'>
			(a.fivestate like '%$LIKEfivestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivestate'>
			(a.fivestate = #fivestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfivetaskid'>
			(a.fivetaskid like '%$LIKEfivetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fivetaskid'>
			(a.fivetaskid = #fivetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixstate'>
			(a.sixstate like '%$LIKEsixstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixstate'>
			(a.sixstate = #sixstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixtaskid'>
			(a.sixtaskid like '%$LIKEsixtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixtaskid'>
			(a.sixtaskid = #sixtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsevenstate'>
			(a.sevenstate like '%$LIKEsevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sevenstate'>
			(a.sevenstate = #sevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventaskid'>
			(a.seventaskid like '%$LIKEseventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventaskid'>
			(a.seventaskid = #seventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeightstate'>
			(a.eightstate like '%$LIKEeightstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eightstate'>
			(a.eightstate = #eightstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighttaskid'>
			(a.eighttaskid like '%$LIKEeighttaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighttaskid'>
			(a.eighttaskid = #eighttaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninestate'>
			(a.ninestate like '%$LIKEninestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninestate'>
			(a.ninestate = #ninestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEninetaskid'>
			(a.ninetaskid like '%$LIKEninetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='ninetaskid'>
			(a.ninetaskid = #ninetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtenstate'>
			(a.tenstate like '%$LIKEtenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tenstate'>
			(a.tenstate = #tenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtentaskid'>
			(a.tentaskid like '%$LIKEtentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tentaskid'>
			(a.tentaskid = #tentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEelevenstate'>
			(a.elevenstate like '%$LIKEelevenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='elevenstate'>
			(a.elevenstate = #elevenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeleventaskid'>
			(a.eleventaskid like '%$LIKEeleventaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eleventaskid'>
			(a.eleventaskid = #eleventaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvestate'>
			(a.twelvestate like '%$LIKEtwelvestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvestate'>
			(a.twelvestate = #twelvestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwelvetaskid'>
			(a.twelvetaskid like '%$LIKEtwelvetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twelvetaskid'>
			(a.twelvetaskid = #twelvetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteenstate'>
			(a.thirteenstate like '%$LIKEthirteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteenstate'>
			(a.thirteenstate = #thirteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirteentaskid'>
			(a.thirteentaskid like '%$LIKEthirteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirteentaskid'>
			(a.thirteentaskid = #thirteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteenstate'>
			(a.fourteenstate like '%$LIKEfourteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteenstate'>
			(a.fourteenstate = #fourteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfourteentaskid'>
			(a.fourteentaskid like '%$LIKEfourteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fourteentaskid'>
			(a.fourteentaskid = #fourteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteenstate'>
			(a.fifteenstate like '%$LIKEfifteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteenstate'>
			(a.fifteenstate = #fifteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfifteentaskid'>
			(a.fifteentaskid like '%$LIKEfifteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fifteentaskid'>
			(a.fifteentaskid = #fifteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteenstate'>
			(a.sixteenstate like '%$LIKEsixteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteenstate'>
			(a.sixteenstate = #sixteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsixteentaskid'>
			(a.sixteentaskid like '%$LIKEsixteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sixteentaskid'>
			(a.sixteentaskid = #sixteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeenstate'>
			(a.seventeenstate like '%$LIKEseventeenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeenstate'>
			(a.seventeenstate = #seventeenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEseventeentaskid'>
			(a.seventeentaskid like '%$LIKEseventeentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='seventeentaskid'>
			(a.seventeentaskid = #seventeentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteenstate'>
			(a.eighteenstate like '%$LIKEeighteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteenstate'>
			(a.eighteenstate = #eighteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEeighteentaskid'>
			(a.eighteentaskid like '%$LIKEeighteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='eighteentaskid'>
			(a.eighteentaskid = #eighteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteenstate'>
			(a.nineteenstate like '%$LIKEnineteenstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteenstate'>
			(a.nineteenstate = #nineteenstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnineteentaskid'>
			(a.nineteentaskid like '%$LIKEnineteentaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nineteentaskid'>
			(a.nineteentaskid = #nineteentaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentystate'>
			(a.twentystate like '%$LIKEtwentystate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentystate'>
			(a.twentystate = #twentystate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytaskid'>
			(a.twentytaskid like '%$LIKEtwentytaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytaskid'>
			(a.twentytaskid = #twentytaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonestate'>
			(a.twentyonestate like '%$LIKEtwentyonestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonestate'>
			(a.twentyonestate = #twentyonestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyonetaskid'>
			(a.twentyonetaskid like '%$LIKEtwentyonetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyonetaskid'>
			(a.twentyonetaskid = #twentyonetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwostate'>
			(a.twentytwostate like '%$LIKEtwentytwostate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwostate'>
			(a.twentytwostate = #twentytwostate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentytwotaskid'>
			(a.twentytwotaskid like '%$LIKEtwentytwotaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentytwotaskid'>
			(a.twentytwotaskid = #twentytwotaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreestate'>
			(a.twentythreestate like '%$LIKEtwentythreestate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreestate'>
			(a.twentythreestate = #twentythreestate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentythreetaskid'>
			(a.twentythreetaskid like '%$LIKEtwentythreetaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentythreetaskid'>
			(a.twentythreetaskid = #twentythreetaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourstate'>
			(a.twentyfourstate like '%$LIKEtwentyfourstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourstate'>
			(a.twentyfourstate = #twentyfourstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtwentyfourtaskid'>
			(a.twentyfourtaskid like '%$LIKEtwentyfourtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='twentyfourtaskid'>
			(a.twentyfourtaskid = #twentyfourtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabelstatus'>
			(a.recordlabelstatus like '%$LIKErecordlabelstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabelstatus'>
			(a.recordlabelstatus = #recordlabelstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordlabeltime'>
			(a.recordlabeltime like '%$LIKErecordlabeltime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordlabeltime'>
			(a.recordlabeltime = #recordlabeltime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabelaccount'>
			(a.videolabelaccount like '%$LIKEvideolabelaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabelaccount'>
			(a.videolabelaccount = #videolabelaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateaccount'>
			(a.createaccount like '%$LIKEcreateaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createaccount'>
			(a.createaccount = #createaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreatetime'>
			(a.createtime like '%$LIKEcreatetime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createtime'>
			(a.createtime = #createtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyaccount'>
			(a.modifyaccount like '%$LIKEmodifyaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyaccount'>
			(a.modifyaccount = #modifyaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifytime'>
			(a.modifytime like '%$LIKEmodifytime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifytime'>
			(a.modifytime = #modifytime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEremarks'>
			(a.remarks like '%$LIKEremarks$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='remarks'>
			(a.remarks = #remarks# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend1'>
			(a.extend1 like '%$LIKEextend1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend1'>
			(a.extend1 = #extend1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend2'>
			(a.extend2 like '%$LIKEextend2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend2'>
			(a.extend2 = #extend2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend3'>
			(a.extend3 like '%$LIKEextend3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend3'>
			(a.extend3 = #extend3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEextend4'>
			(a.extend4 like '%$LIKEextend4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend4'>
			(a.extend4 = #extend4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<!-- <isNotEmpty property='order'>
			$order$
		</isNotEmpty> -->
	</select>
	<!-- ÀúÊ·¸ÅÀÀ -->
	<select id="query_Ywrecordhistorystate" resultClass="java.util.HashMap" parameterClass="java.util.Map" remapResults="true">
		select  
			a.*,e.sbip,e.cjmc
		from ywrecordhistorystate a
		left join sbxx e on a.videonum=e.sbbh
		INNER JOIN ywvideosyncchannel d on (a.videonum=d.videonum and a.channelnum=d.channelnum  )
		<isNotEmpty prepend=' ' property='bmbh'>
			LEFT JOIN sbtdjqqx b on (b.sbbh=a.videonum and b.tdbh=a.channelnum ) 
		</isNotEmpty>
		where 1=1
		<isNotEmpty prepend='and' property='bmbh'>
			b.bmbh=#bmbh#
		</isNotEmpty>
		<isNotEmpty prepend='and' property='xzbh'>
			(d.xzbh = #xzbh# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordhisstateid'>
			(recordhisstateid = #recordhisstateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(recordstate = #recordstate#  )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
		<!-- <isNotEmpty prepend=' ' property='start'>
			limit $start$ ,$limit$
		</isNotEmpty>	 -->
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywrecordhistorystate" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywrecordhistorystate a
		INNER JOIN ywvideosyncchannel d on (a.videonum=d.videonum and a.channelnum=d.channelnum  )
		<isNotEmpty prepend=' ' property='bmbh'>
			LEFT JOIN sbtdjqqx b on (b.sbbh=a.videonum and b.tdbh=a.channelnum ) 
		</isNotEmpty>
		where 1=1
		<isNotEmpty prepend='and' property='bmbh'>
			b.bmbh=#bmbh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordhisstateid'>
			(recordhisstateid = #recordhisstateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcountmonth'>
			(countmonth like '%$LIKEcountmonth$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstate'>
			(recordstate like '%$LIKErecordstate$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(recordstate = #recordstate#  )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywrecordcurrentstate" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywrecordcurrentstate(
			 <![CDATA[ 
				recordstateid,videonum,channelnum,channelname,videocatalog,countdate,countmonth,recordstate,failuretype,failurecause,onestate,onetaskid,twostate,twotaskid,threestate,threetaskid,fourstate,fourtaskid,fivestate,fivetaskid,sixstate,sixtaskid,sevenstate,seventaskid,eightstate,eighttaskid,ninestate,ninetaskid,tenstate,tentaskid,elevenstate,eleventaskid,twelvestate,twelvetaskid,thirteenstate,thirteentaskid,fourteenstate,fourteentaskid,fifteenstate,fifteentaskid,sixteenstate,sixteentaskid,seventeenstate,seventeentaskid,eighteenstate,eighteentaskid,nineteenstate,nineteentaskid,twentystate,twentytaskid,twentyonestate,twentyonetaskid,twentytwostate,twentytwotaskid,twentythreestate,twentythreetaskid,twentyfourstate,twentyfourtaskid,recordlabelstatus,recordlabeltime,videolabelaccount,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].recordstateid#,#list[].videonum#,#list[].channelnum#,#list[].channelname#,#list[].videocatalog#,#list[].countdate#,#list[].countmonth#,	#list[].recordstate#,#list[].failuretype#,#list[].failurecause#,#list[].onestate#,#list[].onetaskid#,#list[].twostate#,#list[].twotaskid#,#list[].threestate#,#list[].threetaskid#,#list[].fourstate#,#list[].fourtaskid#,#list[].fivestate#,#list[].fivetaskid#,#list[].sixstate#,#list[].sixtaskid#,#list[].sevenstate#,#list[].seventaskid#,#list[].eightstate#,#list[].eighttaskid#,#list[].ninestate#,#list[].ninetaskid#,#list[].tenstate#,#list[].tentaskid#,#list[].elevenstate#,#list[].eleventaskid#,#list[].twelvestate#,#list[].twelvetaskid#,#list[].thirteenstate#,#list[].thirteentaskid#,#list[].fourteenstate#,#list[].fourteentaskid#,#list[].fifteenstate#,#list[].fifteentaskid#,#list[].sixteenstate#,#list[].sixteentaskid#,#list[].seventeenstate#,#list[].seventeentaskid#,#list[].eighteenstate#,#list[].eighteentaskid#,#list[].nineteenstate#,#list[].nineteentaskid#,#list[].twentystate#,#list[].twentytaskid#,#list[].twentyonestate#,#list[].twentyonetaskid#,#list[].twentytwostate#,#list[].twentytwotaskid#,#list[].twentythreestate#,#list[].twentythreetaskid#,#list[].twentyfourstate#,#list[].twentyfourtaskid#,#list[].recordlabelstatus#,#list[].recordlabeltime#,#list[].videolabelaccount#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
	
	<select id="getYwrecordHisState" parameterClass="java.util.Map" resultClass="java.util.HashMap">
		select * from ywrecordhistorystate where 1=1
		<isNotEmpty prepend="and" property="recordstateid">
			recordstateid = #recordstateid#
		</isNotEmpty>
		<isNotEmpty prepend="and" property="recordstate">
			recordstate != #recordstate#
		</isNotEmpty>
		order by countdate desc
		
	</select>
	
</sqlMap>











