<?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_Ywcountvideoarchive">
		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='LIKEcountId'>
			(countId like '%$LIKEcountId$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countId'>
			(countId = #countId#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEareanum'>
			(areanum like '%$LIKEareanum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='areanum'>
			(areanum = #areanum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEareaname'>
			(areaname like '%$LIKEareaname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='areaname'>
			(areaname = #areaname# )
		</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='LIKEcountHour'>
			(countHour like '%$LIKEcountHour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='countHour'>
			(countHour = #countHour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmonitortotal'>
			(monitortotal like '%$LIKEmonitortotal$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='monitortotal'>
			(monitortotal = #monitortotal# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnetworkcount'>
			(networkcount like '%$LIKEnetworkcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='networkcount'>
			(networkcount = #networkcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnotnetworkcount'>
			(notnetworkcount like '%$LIKEnotnetworkcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='notnetworkcount'>
			(notnetworkcount = #notnetworkcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfirstmonitorcount'>
			(firstmonitorcount like '%$LIKEfirstmonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='firstmonitorcount'>
			(firstmonitorcount = #firstmonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsecondmonitorcount'>
			(secondmonitorcount like '%$LIKEsecondmonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='secondmonitorcount'>
			(secondmonitorcount = #secondmonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthirdmonitorcount'>
			(thirdmonitorcount like '%$LIKEthirdmonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thirdmonitorcount'>
			(thirdmonitorcount = #thirdmonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEpolicemonitorcount'>
			(policemonitorcount like '%$LIKEpolicemonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='policemonitorcount'>
			(policemonitorcount = #policemonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEothermonitorcount'>
			(othermonitorcount like '%$LIKEothermonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='othermonitorcount'>
			(othermonitorcount = #othermonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonmaprate'>
			(onmaprate like '%$LIKEonmaprate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onmaprate'>
			(onmaprate = #onmaprate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEonmapraterank'>
			(onmapraterank like '%$LIKEonmapraterank$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='onmapraterank'>
			(onmapraterank = #onmapraterank# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompleterate'>
			(completerate like '%$LIKEcompleterate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='completerate'>
			(completerate = #completerate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompleteraterank'>
			(completeraterank like '%$LIKEcompleteraterank$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='completeraterank'>
			(completeraterank = #completeraterank# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnewnetwork'>
			(newnetwork like '%$LIKEnewnetwork$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='newnetwork'>
			(newnetwork = #newnetwork# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsocialmonitorcount'>
			(socialmonitorcount like '%$LIKEsocialmonitorcount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='socialmonitorcount'>
			(socialmonitorcount = #socialmonitorcount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateTime'>
			(createTime like '%$LIKEcreateTime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createTime'>
			(createTime = #createTime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEupdateTime'>
			(updateTime like '%$LIKEupdateTime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='updateTime'>
			(updateTime = #updateTime# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		
	</sql>
	
	<!-- query objects by page-->
	<!-- <select id="query_Ywcountvideoarchive" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		SELECT @rownum:=@rownum+1 AS rownum, a.* FROM (SELECT @rownum:=0) r, ywcountvideoarchive a			
		<include refid="condition_Ywcountvideoarchive"/>
		order by cast(substring_index(onmaprate,"%",1) as DECIMAL) 	
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>	
		
		
		
		SELECT  rownum, a.* FROM  ywcountvideoarchive a	
		<include refid="condition_Ywcountvideoarchive"/>		 	
			order by	to_number(SUBSTR (onmaprate,  0,  INSTR (onmaprate, '%', 1, 1) - 1))	
			
		SELECT  rownum, a.* FROM  ywcountvideoarchive a	
		<include refid="condition_Ywcountvideoarchive"/>		 	
		
			order by	to_number(SUBSTR (onmaprate,  0,  INSTR (onmaprate, '%', 1, 1) - 1))			
	</select> -->
	<select id="query_Ywcountvideoarchive" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		SELECT  a.* FROM  ywcountvideoarchive a	
		<include refid="condition_Ywcountvideoarchive"/>		 	
					
	</select>
	
	<!-- <select id="query_Ywcountvideoarchive" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			countId,areanum,areaname,countDate,countMonth,countHour,monitortotal,networkcount,notnetworkcount,firstmonitorcount,secondmonitorcount,thirdmonitorcount,policemonitorcount,othermonitorcount,onmaprate,onmapraterank,completerate,completeraterank,newnetwork,socialmonitorcount,createTime,updateTime
		from ywcountvideoarchive 			
		<include refid="condition_Ywcountvideoarchive"/>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>				
	</select> -->
	
	<!-- query objects totalcount -->
	<select id="count_Ywcountvideoarchive" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywcountvideoarchive 
		<include refid="condition_Ywcountvideoarchive"/>			
	</select>
	
	
	<!-- 统计饼图展示 -->
	<!-- <select id="count_showPie" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select ifnull(sum(monitortotal),0) as monitortotal, 
				ifnull(sum(networkcount),0) as networkcount, 
				ifnull(sum(notnetworkcount),0) as notnetworkcount, 
				ifnull(sum(firstmonitorcount),0) as firstmonitorcount, 
				ifnull(sum(secondmonitorcount),0) as secondmonitorcount, 
				ifnull(sum(thirdmonitorcount),0) as thirdmonitorcount, 
				ifnull(sum(policemonitorcount),0) as policemonitorcount, 
				ifnull(sum(onmaprate),0) as onmaprate, 
				ifnull(sum(completerate),0) as completerate, 
				ifnull(sum(newnetwork),0) as newnetwork
		from ywcountvideoarchive 
		<include refid="condition_Ywcountvideoarchive"/>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select> -->
	<select id="count_showPie" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select  sum(monitortotal) as monitortotal, 
				sum(networkcount) as networkcount, 
				sum(notnetworkcount) as notnetworkcount, 
				sum(firstmonitorcount) as firstmonitorcount, 
				sum(secondmonitorcount) as secondmonitorcount, 
				sum(thirdmonitorcount) as thirdmonitorcount, 
				sum(policemonitorcount) as policemonitorcount, 
				<!-- onmaprate, completerate, --> 
				sum(newnetwork) as newnetwork
		from ywcountvideoarchive 
		<include refid="condition_Ywcountvideoarchive"/>
		<!-- group by onmaprate, completerate -->
		
	</select>
	
	<!-- 统计柱状图展示 -->
	<select id="count_showBar" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select areanum,areaname,
			sum(monitortotal) as monitortotal 
		from ywcountvideoarchive
		<include refid="condition_Ywcountvideoarchive"/>
		group by areanum,areaname
		
	</select>
<!-- 	<select id="count_showBar" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select areanum,areaname,ifnull(sum(monitortotal),0) as monitortotal from ywcountvideoarchive
		<include refid="condition_Ywcountvideoarchive"/>
		group by areanum,areaname
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</select> -->
	
	
</sqlMap>











