<?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="Ywvideotaskrunresultbean" type="cn.vp.XXX.model.YwvideotaskrunresultBean"/> -->	<typeAlias alias="Ywvideotaskrunresult" type="cn.im.ywvideotaskrunresult.YwvideotaskrunresultBean"/>
	
	<sql id="condition_Ywvideotaskrunresult">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEid'>
			(id like '%$LIKEid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='id'>
			(id = #id#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErunsetid'>
			(runsetid like '%$LIKErunsetid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='runsetid'>
			(runsetid = #runsetid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskid'>
			(taskid like '%$LIKEtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskid'>
			(taskid = #taskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskname'>
			(taskname like '%$LIKEtaskname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskname'>
			(taskname = #taskname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtasktype'>
			(tasktype like '%$LIKEtasktype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tasktype'>
			(tasktype = #tasktype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelsetid'>
			(channelsetid like '%$LIKEchannelsetid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelsetid'>
			(channelsetid = #channelsetid# )
		</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='LIKEpicturepath'>
			(picturepath like '%$LIKEpicturepath$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='picturepath'>
			(picturepath = #picturepath# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEpicturebyte'>
			(picturebyte like '%$LIKEpicturebyte$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='picturebyte'>
			(picturebyte = #picturebyte# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEruntime'>
			(runtime like '%$LIKEruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='runtime'>
			(runtime = #runtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErunstatus'>
			(runstatus like '%$LIKErunstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='runstatus'>
			(runstatus = #runstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEisonline'>
			(isonline like '%$LIKEisonline$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='isonline'>
			(isonline = #isonline# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEplayfail'>
			(playfail like '%$LIKEplayfail$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='playfail'>
			(playfail = #playfail# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnetworkerror'>
			(networkerror like '%$LIKEnetworkerror$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='networkerror'>
			(networkerror = #networkerror# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnosignalvalue'>
			(nosignalvalue like '%$LIKEnosignalvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nosignalvalue'>
			(nosignalvalue = #nosignalvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnosignalstatus'>
			(nosignalstatus like '%$LIKEnosignalstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nosignalstatus'>
			(nosignalstatus = #nosignalstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgclearvalue'>
			(imgclearvalue like '%$LIKEimgclearvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgclearvalue'>
			(imgclearvalue = #imgclearvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgclearstatus'>
			(imgclearstatus like '%$LIKEimgclearstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgclearstatus'>
			(imgclearstatus = #imgclearstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcontrastvalue'>
			(imgcontrastvalue like '%$LIKEimgcontrastvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcontrastvalue'>
			(imgcontrastvalue = #imgcontrastvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcontraststatus'>
			(imgcontraststatus like '%$LIKEimgcontraststatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcontraststatus'>
			(imgcontraststatus = #imgcontraststatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcolorvalue'>
			(imgcolorvalue like '%$LIKEimgcolorvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcolorvalue'>
			(imgcolorvalue = #imgcolorvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcolorstatus'>
			(imgcolorstatus like '%$LIKEimgcolorstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcolorstatus'>
			(imgcolorstatus = #imgcolorstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimglightvalue'>
			(imglightvalue like '%$LIKEimglightvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imglightvalue'>
			(imglightvalue = #imglightvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimglightstatus'>
			(imglightstatus like '%$LIKEimglightstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imglightstatus'>
			(imglightstatus = #imglightstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideofreezevallue'>
			(videofreezevallue like '%$LIKEvideofreezevallue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videofreezevallue'>
			(videofreezevallue = #videofreezevallue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideofreezestatus'>
			(videofreezestatus like '%$LIKEvideofreezestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videofreezestatus'>
			(videofreezestatus = #videofreezestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideojittervalue'>
			(videojittervalue like '%$LIKEvideojittervalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videojittervalue'>
			(videojittervalue = #videojittervalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideojitterstatus'>
			(videojitterstatus like '%$LIKEvideojitterstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videojitterstatus'>
			(videojitterstatus = #videojitterstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideoupheavalvalue'>
			(videoupheavalvalue like '%$LIKEvideoupheavalvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videoupheavalvalue'>
			(videoupheavalvalue = #videoupheavalvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideoupheavalstatus'>
			(videoupheavalstatus like '%$LIKEvideoupheavalstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videoupheavalstatus'>
			(videoupheavalstatus = #videoupheavalstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocodeerrorvalue'>
			(videocodeerrorvalue like '%$LIKEvideocodeerrorvalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocodeerrorvalue'>
			(videocodeerrorvalue = #videocodeerrorvalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocodeerrorstatus'>
			(videocodeerrorstatus like '%$LIKEvideocodeerrorstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocodeerrorstatus'>
			(videocodeerrorstatus = #videocodeerrorstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonoisevalue'>
			(videonoisevalue like '%$LIKEvideonoisevalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonoisevalue'>
			(videonoisevalue = #videonoisevalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonoisestatus'>
			(videonoisestatus like '%$LIKEvideonoisestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonoisestatus'>
			(videonoisestatus = #videonoisestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideorollstripevalue'>
			(videorollstripevalue like '%$LIKEvideorollstripevalue$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videorollstripevalue'>
			(videorollstripevalue = #videorollstripevalue# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideorollstripestatus'>
			(videorollstripestatus like '%$LIKEvideorollstripestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videorollstripestatus'>
			(videorollstripestatus = #videorollstripestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideostatus'>
			(videostatus like '%$LIKEvideostatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videostatus'>
			(videostatus = #videostatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfailurecause'>
			(failurecause like '%$LIKEfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='failurecause'>
			(failurecause = #failurecause# )
		</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_Ywvideotaskrunresult" parameterClass="java.util.Map">
		insert into 
		ywvideotaskrunresult(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='id'>id</isNotEmpty>
			<isNotEmpty prepend=',' property='runsetid'>runsetid</isNotEmpty>
			<isNotEmpty prepend=',' property='taskid'>taskid</isNotEmpty>
			<isNotEmpty prepend=',' property='taskname'>taskname</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>tasktype</isNotEmpty>
			<isNotEmpty prepend=',' property='channelsetid'>channelsetid</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>videonum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname</isNotEmpty>
			<isNotEmpty prepend=',' property='picturepath'>picturepath</isNotEmpty>
			<isNotEmpty prepend=',' property='picturebyte'>picturebyte</isNotEmpty>
			<isNotEmpty prepend=',' property='runtime'>runtime</isNotEmpty>
			<isNotEmpty prepend=',' property='runstatus'>runstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>isonline</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>playfail</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>networkerror</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalvalue'>nosignalvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>nosignalstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearvalue'>imgclearvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>imgclearstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontrastvalue'>imgcontrastvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>imgcontraststatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorvalue'>imgcolorvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>imgcolorstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightvalue'>imglightvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>imglightstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezevallue'>videofreezevallue</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>videofreezestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videojittervalue'>videojittervalue</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>videojitterstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalvalue'>videoupheavalvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>videoupheavalstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorvalue'>videocodeerrorvalue</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>videocodeerrorstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisevalue'>videonoisevalue</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>videonoisestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripevalue'>videorollstripevalue</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>videorollstripestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>videostatus</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>failurecause</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='id'>#id#</isNotEmpty>
			<isNotEmpty prepend=',' property='runsetid'>#runsetid#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskid'>#taskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskname'>#taskname#</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>#tasktype#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelsetid'>#channelsetid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='picturepath'>#picturepath#</isNotEmpty>
			<isNotEmpty prepend=',' property='picturebyte'>#picturebyte:BLOB#</isNotEmpty>
			<isNotEmpty prepend=',' property='runtime'>#runtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='runstatus'>#runstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>#isonline#</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>#playfail#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>#networkerror#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalvalue'>#nosignalvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>#nosignalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearvalue'>#imgclearvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>#imgclearstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontrastvalue'>#imgcontrastvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>#imgcontraststatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorvalue'>#imgcolorvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>#imgcolorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightvalue'>#imglightvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>#imglightstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezevallue'>#videofreezevallue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>#videofreezestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojittervalue'>#videojittervalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>#videojitterstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalvalue'>#videoupheavalvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>#videoupheavalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorvalue'>#videocodeerrorvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>#videocodeerrorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisevalue'>#videonoisevalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>#videonoisestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripevalue'>#videorollstripevalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>#videorollstripestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>#videostatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>#failurecause#</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_Ywvideotaskrunresult" parameterClass="java.util.Map">
		update ywvideotaskrunresult 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='runsetid'>runsetid=#runsetid#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskid'>taskid=#taskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskname'>taskname=#taskname#</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>tasktype=#tasktype#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelsetid'>channelsetid=#channelsetid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>videonum=#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum=#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname=#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='picturepath'>picturepath=#picturepath#</isNotEmpty>
			<isNotEmpty prepend=',' property='picturebyte'>picturebyte=#picturebyte#</isNotEmpty>
			<isNotEmpty prepend=',' property='runtime'>runtime=#runtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='runstatus'>runstatus=#runstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>isonline=#isonline#</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>playfail=#playfail#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>networkerror=#networkerror#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalvalue'>nosignalvalue=#nosignalvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>nosignalstatus=#nosignalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearvalue'>imgclearvalue=#imgclearvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>imgclearstatus=#imgclearstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontrastvalue'>imgcontrastvalue=#imgcontrastvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>imgcontraststatus=#imgcontraststatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorvalue'>imgcolorvalue=#imgcolorvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>imgcolorstatus=#imgcolorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightvalue'>imglightvalue=#imglightvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>imglightstatus=#imglightstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezevallue'>videofreezevallue=#videofreezevallue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>videofreezestatus=#videofreezestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojittervalue'>videojittervalue=#videojittervalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>videojitterstatus=#videojitterstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalvalue'>videoupheavalvalue=#videoupheavalvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>videoupheavalstatus=#videoupheavalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorvalue'>videocodeerrorvalue=#videocodeerrorvalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>videocodeerrorstatus=#videocodeerrorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisevalue'>videonoisevalue=#videonoisevalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>videonoisestatus=#videonoisestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripevalue'>videorollstripevalue=#videorollstripevalue#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>videorollstripestatus=#videorollstripestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>videostatus=#videostatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='failurecause'>failurecause=#failurecause#</isNotEmpty>

			<isNotEmpty prepend=',' property='videolabelstatus'>videolabelstatus=#videolabelstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabeltime'>videolabeltime=#videolabeltime#</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='XGTJid'> id = #XGTJid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrunsetid'> runsetid = #XGTJrunsetid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskid'> taskid = #XGTJtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskname'> taskname = #XGTJtaskname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtasktype'> tasktype = #XGTJtasktype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelsetid'> channelsetid = #XGTJchannelsetid# </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='XGTJpicturepath'> picturepath = #XGTJpicturepath# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJpicturebyte'> picturebyte = #XGTJpicturebyte# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJruntime'> runtime = #XGTJruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrunstatus'> runstatus = #XGTJrunstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJisonline'> isonline = #XGTJisonline# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJplayfail'> playfail = #XGTJplayfail# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnetworkerror'> networkerror = #XGTJnetworkerror# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnosignalvalue'> nosignalvalue = #XGTJnosignalvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnosignalstatus'> nosignalstatus = #XGTJnosignalstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgclearvalue'> imgclearvalue = #XGTJimgclearvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgclearstatus'> imgclearstatus = #XGTJimgclearstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcontrastvalue'> imgcontrastvalue = #XGTJimgcontrastvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcontraststatus'> imgcontraststatus = #XGTJimgcontraststatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcolorvalue'> imgcolorvalue = #XGTJimgcolorvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcolorstatus'> imgcolorstatus = #XGTJimgcolorstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimglightvalue'> imglightvalue = #XGTJimglightvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimglightstatus'> imglightstatus = #XGTJimglightstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideofreezevallue'> videofreezevallue = #XGTJvideofreezevallue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideofreezestatus'> videofreezestatus = #XGTJvideofreezestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideojittervalue'> videojittervalue = #XGTJvideojittervalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideojitterstatus'> videojitterstatus = #XGTJvideojitterstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideoupheavalvalue'> videoupheavalvalue = #XGTJvideoupheavalvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideoupheavalstatus'> videoupheavalstatus = #XGTJvideoupheavalstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideocodeerrorvalue'> videocodeerrorvalue = #XGTJvideocodeerrorvalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideocodeerrorstatus'> videocodeerrorstatus = #XGTJvideocodeerrorstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideonoisevalue'> videonoisevalue = #XGTJvideonoisevalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideonoisestatus'> videonoisestatus = #XGTJvideonoisestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideorollstripevalue'> videorollstripevalue = #XGTJvideorollstripevalue# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideorollstripestatus'> videorollstripestatus = #XGTJvideorollstripestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideostatus'> videostatus = #XGTJvideostatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfailurecause'> failurecause = #XGTJfailurecause# </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_Ywvideotaskrunresult" parameterClass="java.util.Map">
		delete from ywvideotaskrunresult 
		<include refid="condition_Ywvideotaskrunresult"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywvideotaskrunresult" parameterClass="java.util.Map">
		delete from ywvideotaskrunresult 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywvideotaskrunresult" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			a.id,a.runsetid,a.taskid,a.taskname,
			a.tasktype,(select csmc from xtcl b where  b.csdl='ywVideoTaskType' and b.csdm=a.tasktype ) as tasktypename,
			a.channelsetid,a.videonum,a.channelnum,a.channelname,a.picturepath,a.picturebyte,
			a.runtime,
			a.runstatus,(select csmc from xtcl b where  b.csdl='ywTaskRunStatus' and b.csdm=a.runstatus) as runstatusname,
			a.isonline,(select csmc from xtcl b where  b.csdl='ywDeviceIsOnline' and b.csdm=a.isonline) as isonlinename,
			a.playfail,(select csmc from xtcl b where  b.csdl='ywDeviceFail' and b.csdm=a.playfail ) as playfailname,
			a.networkerror,(select csmc from xtcl b where  b.csdl='ywDeviceError' and b.csdm=a.networkerror) as networkerrorname,
			a.nosignalvalue,a.nosignalstatus,
			a.imgclearvalue,a.imgclearstatus,a.imgcontrastvalue,a.imgcontraststatus,a.imgcolorvalue,a.imgcolorstatus,
			a.videofreezevallue,a.videofreezestatus,a.videojittervalue,
			a.videojitterstatus,a.videoupheavalvalue,a.videoupheavalstatus,a.videocodeerrorvalue,a.videocodeerrorstatus,
			a.videonoisevalue,a.videonoisestatus,a.videorollstripevalue,a.videorollstripestatus,
			a.videostatus,(select csmc from xtcl b where  b.csdl='ywDeviceStatus' and b.csdm=a.videostatus ) as videostatusname,
			a.failurecause,
			a.videolabelstatus,(select csmc from xtcl b where  b.csdl='ywvideolabelstatus' and b.csdm=a.videolabelstatus ) as videolabelstatusname,
			a.videolabeltime,a.videolabelaccount,
			a.createaccount,a.createtime,a.modifyaccount,a.modifytime,a.remarks,a.extend1,a.extend2,a.extend3,a.extend4
		from ywvideotaskrunresult a
		left join sbtdspsr b on (a.videonum=b.sbbh and a.channelnum=b.tdbh  )
		where 1=1
		<isNotEmpty prepend='and' property='xzbh'>
			(b.xzbh = #xzbh#  or (b.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='id'>
			(a.id = #id#  )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='runsetid'>
			(a.runsetid = #runsetid#  )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='taskid'>
			(a.taskid = #taskid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='devices'>
			 videonum+"-"+channelnum  in 
			<iterate  open="(" close=")" conjunction="," property="devices"> 
			
				#devices[]#
	    	</iterate> 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskname'>
			(a.taskname like '%$LIKEtaskname$%'  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='runstatus'>
			(a.runstatus =$runstatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='videolabelstatus'>
			(a.videolabelstatus =$videolabelstatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='videostatus'>
			(a.videostatus =$videostatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='tasktype'>
			(a.tasktype = $tasktype$  )
		</isNotEmpty>	
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select>
	
	<!-- 统计 -->
	<select id="videoStatistics"  resultClass="java.util.HashMap" parameterClass="java.util.Map" >
		select c.* from 
			(SELECT * FROM ywvideotaskrunresult 
			WHERE runsetid IN ( SELECT runsetid FROM ywvideotaskrunset AS a
									WHERE NOT EXISTS ( SELECT 1 FROM ywvideotaskrunset AS b WHERE b.runstatus='1' AND b.taskid = a.taskid AND a.runtime <![CDATA[ <	]]>   b.runtime)
						) 
			ORDER BY runtime DESC ) c
			left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh  )
			where 1=1
			<isNotEmpty prepend='and' property='xzbh'>
				(d.xzbh = #xzbh#  or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='id'>
				(c.id = #id#  )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='taskid'>
				(c.taskid = #taskid#  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEtaskname'>
				(c.taskname like '%$LIKEtaskname$%'  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='runstatus'>
				(c.runstatus =$runstatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='videostatus'>
				(c.videostatus =$videostatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='tasktype'>
				(c.tasktype = $tasktype$  )
			</isNotEmpty>	
			<isNotEmpty property='tableparam'>
				$tableparam$
			</isNotEmpty>
			GROUP BY videonum,channelnum
			ORDER BY runtime desc 
	
	
	
	</select>
	<!-- 统计 折线-小时 -->
	<select id="videoStatisticsHour"  resultClass="java.util.HashMap" parameterClass="java.util.Map" >
		select  substr(m.runtime,12,2) as xData,sum(m.videostatus) as num from
		( select c.* from 
			(SELECT * FROM ywvideotaskrunresult 
			WHERE runsetid IN ( SELECT runsetid FROM ywvideotaskrunset AS a
									WHERE NOT EXISTS ( SELECT 1 FROM ywvideotaskrunset AS b WHERE b.runstatus='1' AND b.taskid = a.taskid AND a.runtime <![CDATA[ <	]]>   b.runtime)
						) 
			ORDER BY runtime DESC ) c
			left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh  )
			where 1=1
			<isNotEmpty prepend='and' property='xzbh'>
				(d.xzbh = #xzbh#  or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='id'>
				(c.id = #id#  )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='taskid'>
				(c.taskid = #taskid#  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEtaskname'>
				(c.taskname like '%$LIKEtaskname$%'  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='runstatus'>
				(c.runstatus =$runstatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='videostatus'>
				(c.videostatus =$videostatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='tasktype'>
				(c.tasktype = $tasktype$  )
			</isNotEmpty>	
			<isNotEmpty property='tableparam'>
				$tableparam$
			</isNotEmpty>
			GROUP BY videonum,channelnum
			ORDER BY runtime desc ) m
			group by xData
			
	</select>
	<!-- 统计 折线-天 -->
	<select id="videoStatisticsDay"  resultClass="java.util.HashMap" parameterClass="java.util.Map" >
		select  substr(m.runtime,9,2) as xData,sum(m.videostatus) as num from
		(select c.* from 
			(SELECT * FROM ywvideotaskrunresult 
			WHERE runsetid IN ( SELECT runsetid FROM ywvideotaskrunset AS a
									WHERE NOT EXISTS ( SELECT 1 FROM ywvideotaskrunset AS b WHERE b.runstatus='1' AND b.taskid = a.taskid AND a.runtime <![CDATA[ <	]]>   b.runtime)
						) 
			ORDER BY runtime DESC ) c
			left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh  )
			where 1=1
			<isNotEmpty prepend='and' property='xzbh'>
				(d.xzbh = #xzbh#  or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='id'>
				(c.id = #id#  )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='taskid'>
				(c.taskid = #taskid#  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEtaskname'>
				(c.taskname like '%$LIKEtaskname$%'  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='runstatus'>
				(c.runstatus =$runstatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='videostatus'>
				(c.videostatus =$videostatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='tasktype'>
				(c.tasktype = $tasktype$  )
			</isNotEmpty>	
			<isNotEmpty property='tableparam'>
				$tableparam$
			</isNotEmpty>
			GROUP BY videonum,channelnum
			ORDER BY runtime desc ) m
			group by xData
	</select>
	<!-- 统计 折线-月 -->
	<select id="videoStatisticsMonth"  resultClass="java.util.HashMap" parameterClass="java.util.Map" >
		select  substr(m.runtime,6,2) as xData,sum(m.videostatus) as num from
		(select c.* from 
			(SELECT * FROM ywvideotaskrunresult 
			WHERE runsetid IN ( SELECT runsetid FROM ywvideotaskrunset AS a
									WHERE NOT EXISTS ( SELECT 1 FROM ywvideotaskrunset AS b WHERE b.runstatus='1' AND b.taskid = a.taskid AND a.runtime <![CDATA[ <	]]>   b.runtime)
						) 
			ORDER BY runtime DESC ) c
			left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh  )
			where 1=1
			<isNotEmpty prepend='and' property='xzbh'>
				(d.xzbh = #xzbh#  or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='id'>
				(c.id = #id#  )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='taskid'>
				(c.taskid = #taskid#  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEtaskname'>
				(c.taskname like '%$LIKEtaskname$%'  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='runstatus'>
				(c.runstatus =$runstatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='videostatus'>
				(c.videostatus =$videostatus$  )
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='tasktype'>
				(c.tasktype = $tasktype$  )
			</isNotEmpty>	
			<isNotEmpty property='tableparam'>
				$tableparam$
			</isNotEmpty>
			GROUP BY videonum,channelnum
			ORDER BY runtime desc ) m
			group by xData
	</select>
	
	<select id="count_Ywvideotaskrunresult" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select  count(*)
		from ywvideotaskrunresult a
		left join sbtdspsr b on (a.videonum=b.sbbh and a.channelnum=b.tdbh  )
		where 1=1
		<isNotEmpty prepend='and' property='xzbh'>
			(b.xzbh = #xzbh#  or (b.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='id'>
			(a.id = #id#  )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='runsetid'>
			(a.runsetid = #runsetid#  )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='taskid'>
			(a.taskid = #taskid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskname'>
			(a.taskname like '%$LIKEtaskname$%'  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='runstatus'>
			(a.runstatus =$runstatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='videolabelstatus'>
			(a.videolabelstatus =$videolabelstatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='videostatus'>
			(a.videostatus =$videostatus$  )
		</isNotEmpty>	
		<isNotEmpty prepend='AND' property='tasktype'>
			(a.tasktype = $tasktype$  )
		</isNotEmpty>	
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywvideotaskrunresult" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywvideotaskrunresult(
			 <![CDATA[ 
				id,runsetid,taskid,taskname,tasktype,channelsetid,videonum,channelnum,channelname,picturepath,picturebyte,runtime,runstatus,isonline,playfail,networkerror,nosignalvalue,nosignalstatus,imgclearvalue,imgclearstatus,imgcontrastvalue,imgcontraststatus,imgcolorvalue,imgcolorstatus,imglightvalue,imglightstatus,videofreezevallue,videofreezestatus,videojittervalue,videojitterstatus,videoupheavalvalue,videoupheavalstatus,videocodeerrorvalue,videocodeerrorstatus,videonoisevalue,videonoisestatus,videorollstripevalue,videorollstripestatus,videostatus,failurecause,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].id#,#list[].runsetid#,#list[].taskid#,#list[].taskname#,#list[].tasktype#,#list[].channelsetid#,#list[].videonum#,#list[].channelnum#,#list[].channelname#,#list[].picturepath#,#picturebyte:BLOB#,#list[].runtime#,#list[].runstatus#,#list[].isonline#,#list[].playfail#,#list[].networkerror#,#list[].nosignalvalue#,#list[].nosignalstatus#,#list[].imgclearvalue#,#list[].imgclearstatus#,#list[].imgcontrastvalue#,#list[].imgcontraststatus#,#list[].imgcolorvalue#,#list[].imgcolorstatus#,#list[].imglightvalue#,#list[].imglightstatus#,#list[].videofreezevallue#,#list[].videofreezestatus#,#list[].videojittervalue#,#list[].videojitterstatus#,#list[].videoupheavalvalue#,#list[].videoupheavalstatus#,#list[].videocodeerrorvalue#,#list[].videocodeerrorstatus#,#list[].videonoisevalue#,#list[].videonoisestatus#,#list[].videorollstripevalue#,#list[].videorollstripestatus#,#list[].videostatus#,#list[].failurecause#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
	
	
	
	
	<!-- 服务器统计 -->
	<select id="statisticsmachineHour" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select countHour as xData, SUM(dataSize) AS num
		 from ywcountmachine
		 where 1=1 
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		group by countHour
	</select>
	<select id="statisticsmachineDay" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select substr(countDate,9,2) as xData, SUM(dataSize) AS num
		 from ywcountmachine
		 where 1=1 
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		group by xData
	</select>
	<select id="statisticsmachineMonth" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select substr(countMonth,6,2) as xData, SUM(dataSize) AS num
		 from ywcountmachine
		 where 1=1 
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		group by xData
	</select>
	
	
</sqlMap>











