<?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="Ywmachineinfobean" type="cn.vp.XXX.model.YwmachineinfoBean"/> -->	
<typeAlias alias="Ywmachineinfo" type="cn.yw.machine.bean.YwmachineinfoBean"/>
	
	<sql id="condition_Ywmachineinfo">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEmachineid'>
			(machineid like '%$LIKEmachineid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineid'>
			(machineid = #machineid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinenum'>
			(machinenum like '%$LIKEmachinenum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinenum'>
			(machinenum = #machinenum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinename'>
			(machinename like '%$LIKEmachinename$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinename'>
			(machinename = #machinename# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinetype'>
			(machinetype like '%$LIKEmachinetype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinetype'>
			(machinetype = #machinetype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinebrand'>
			(machinebrand like '%$LIKEmachinebrand$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinebrand'>
			(machinebrand = #machinebrand# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinebrandtype'>
			(machinebrandtype like '%$LIKEmachinebrandtype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinebrandtype'>
			(machinebrandtype = #machinebrandtype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineos'>
			(machineos like '%$LIKEmachineos$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineos'>
			(machineos = #machineos# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineostype'>
			(machineostype like '%$LIKEmachineostype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineostype'>
			(machineostype = #machineostype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineip'>
			(machineip like '%$LIKEmachineip$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineip'>
			(machineip = #machineip# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnetworkport'>
			(networkport like '%$LIKEnetworkport$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='networkport'>
			(networkport = #networkport# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineloginuser'>
			(machineloginuser like '%$LIKEmachineloginuser$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineloginuser'>
			(machineloginuser = #machineloginuser# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineloginpwd'>
			(machineloginpwd like '%$LIKEmachineloginpwd$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineloginpwd'>
			(machineloginpwd = #machineloginpwd# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineposition'>
			(machineposition like '%$LIKEmachineposition$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineposition'>
			(machineposition = #machineposition# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineareanum'>
			(machineareanum like '%$LIKEmachineareanum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineareanum'>
			(machineareanum = #machineareanum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinedescribe'>
			(machinedescribe like '%$LIKEmachinedescribe$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinedescribe'>
			(machinedescribe = #machinedescribe# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineruninterval'>
			(machineruninterval like '%$LIKEmachineruninterval$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineruninterval'>
			(machineruninterval = #machineruninterval# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinestatus'>
			(machinestatus like '%$LIKEmachinestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinestatus'>
			(machinestatus = #machinestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinestatusuptime'>
			(machinestatusuptime like '%$LIKEmachinestatusuptime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinestatusuptime'>
			(machinestatusuptime = #machinestatusuptime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachinefaulttype'>
			(machinefaulttype like '%$LIKEmachinefaulttype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machinefaulttype'>
			(machinefaulttype = #machinefaulttype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdetectionswitch'>
			(detectionswitch like '%$LIKEdetectionswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionswitch'>
			(detectionswitch = #detectionswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdetectionstarttime'>
			(detectionstarttime like '%$LIKEdetectionstarttime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionstarttime'>
			(detectionstarttime = #detectionstarttime# )
		</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_Ywmachineinfo" parameterClass="java.util.Map">
		insert into 
		ywmachineinfo(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='machineid'>machineid</isNotEmpty>
			<isNotEmpty prepend=',' property='machinenum'>machinenum</isNotEmpty>
			<isNotEmpty prepend=',' property='machinename'>machinename</isNotEmpty>
			<isNotEmpty prepend=',' property='machinetype'>machinetype</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrand'>machinebrand</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrandtype'>machinebrandtype</isNotEmpty>
			<isNotEmpty prepend=',' property='machineos'>machineos</isNotEmpty>
			<isNotEmpty prepend=',' property='machineostype'>machineostype</isNotEmpty>
			<isNotEmpty prepend=',' property='machineip'>machineip</isNotEmpty>
			<isNotEmpty prepend=',' property='networkport'>networkport</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginuser'>machineloginuser</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginpwd'>machineloginpwd</isNotEmpty>
			<isNotEmpty prepend=',' property='machineposition'>machineposition</isNotEmpty>
			<isNotEmpty prepend=',' property='machineareanum'>machineareanum</isNotEmpty>
			<isNotEmpty prepend=',' property='machinedescribe'>machinedescribe</isNotEmpty>
			<isNotEmpty prepend=',' property='machineruninterval'>machineruninterval</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatus'>machinestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatusuptime'>machinestatusuptime</isNotEmpty>
			<isNotEmpty prepend=',' property='machinefaulttype'>machinefaulttype</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>detectionstarttime</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='machineid'>#machineid#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinenum'>#machinenum#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinename'>#machinename#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinetype'>#machinetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrand'>#machinebrand#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrandtype'>#machinebrandtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineos'>#machineos#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineostype'>#machineostype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineip'>#machineip#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkport'>#networkport#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginuser'>#machineloginuser#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginpwd'>#machineloginpwd#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineposition'>#machineposition#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineareanum'>#machineareanum#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinedescribe'>#machinedescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineruninterval'>#machineruninterval#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatus'>#machinestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatusuptime'>#machinestatusuptime#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinefaulttype'>#machinefaulttype#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>#detectionswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>#detectionstarttime#</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_Ywmachineinfo" parameterClass="java.util.Map">
		update ywmachineinfo 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='machinenum'>machinenum=#machinenum#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinename'>machinename=#machinename#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinetype'>machinetype=#machinetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrand'>machinebrand=#machinebrand#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinebrandtype'>machinebrandtype=#machinebrandtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineos'>machineos=#machineos#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineostype'>machineostype=#machineostype#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineip'>machineip=#machineip#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkport'>networkport=#networkport#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginuser'>machineloginuser=#machineloginuser#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineloginpwd'>machineloginpwd=#machineloginpwd#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineposition'>machineposition=#machineposition#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineareanum'>machineareanum=#machineareanum#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinedescribe'>machinedescribe=#machinedescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineruninterval'>machineruninterval=#machineruninterval#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatus'>machinestatus=#machinestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinestatusuptime'>machinestatusuptime=#machinestatusuptime#</isNotEmpty>
			<isNotEmpty prepend=',' property='machinefaulttype'>machinefaulttype=#machinefaulttype#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch=#detectionswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>detectionstarttime=#detectionstarttime#</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='XGTJmachineid'> machineid = #XGTJmachineid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinenum'> machinenum = #XGTJmachinenum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinename'> machinename = #XGTJmachinename# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinetype'> machinetype = #XGTJmachinetype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinebrand'> machinebrand = #XGTJmachinebrand# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinebrandtype'> machinebrandtype = #XGTJmachinebrandtype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineos'> machineos = #XGTJmachineos# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineostype'> machineostype = #XGTJmachineostype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineip'> machineip = #XGTJmachineip# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnetworkport'> networkport = #XGTJnetworkport# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineloginuser'> machineloginuser = #XGTJmachineloginuser# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineloginpwd'> machineloginpwd = #XGTJmachineloginpwd# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineposition'> machineposition = #XGTJmachineposition# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineareanum'> machineareanum = #XGTJmachineareanum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinedescribe'> machinedescribe = #XGTJmachinedescribe# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineruninterval'> machineruninterval = #XGTJmachineruninterval# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinestatus'> machinestatus = #XGTJmachinestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinestatusuptime'> machinestatusuptime = #XGTJmachinestatusuptime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachinefaulttype'> machinefaulttype = #XGTJmachinefaulttype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdetectionswitch'> detectionswitch = #XGTJdetectionswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdetectionstarttime'> detectionstarttime = #XGTJdetectionstarttime# </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_Ywmachineinfo" parameterClass="java.util.Map">
		delete from ywmachineinfo 
		<include refid="condition_Ywmachineinfo"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywmachineinfo" parameterClass="java.util.Map">
		delete from ywmachineinfo 
		where 
		<isNotEmpty prepend=' ' property='ids'>
			machineid in
			<iterate open="("  close=")"  conjunction=","  property="ids">
				#ids[]#  
			</iterate>
		</isNotEmpty>
			
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywmachineinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.csdm,b.csmc from (
			select 
				machineid,machinenum,machinename,machinetype,machinebrand,machinebrandtype,machineos,
				machineostype,machineip,networkport,machineloginuser,machineloginpwd,machineposition,
				machineareanum,machinedescribe,machineruninterval,machinestatus,machinestatusuptime,
				detectionstarttime,machinefaulttype,detectionswitch,createaccount,createtime,modifyaccount,
				modifytime,remarks,extend1,extend2,extend3,extend4
			from ywmachineinfo 
			<include refid="condition_Ywmachineinfo"/>
			<!-- <isNotEmpty prepend=' ' property='start'>
				limit #start# ,#limit#
			</isNotEmpty> -->	
		) a
		left join xtcl b on a.detectionswitch = b.csdm and b.csdl = 'ywTaskEnable'				
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywmachineinfo" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywmachineinfo 
		<include refid="condition_Ywmachineinfo"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywmachineinfo" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywmachineinfo(
			 <![CDATA[ 
				machineid,machinenum,machinename,machinetype,machinebrand,machinebrandtype,machineos,machineostype,machineip,networkport,machineloginuser,machineloginpwd,machineposition,machineareanum,machinedescribe,machineruninterval,machinestatus,machinestatusuptime,machinefaulttype,detectionswitch,detectionstarttime,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].machineid#,#list[].machinenum#,#list[].machinename#,#list[].machinetype#,#list[].machinebrand#,#list[].machinebrandtype#,#list[].machineos#,#list[].machineostype#,#list[].machineip#,#list[].networkport#,#list[].machineloginuser#,#list[].machineloginpwd#,#list[].machineposition#,#list[].machineareanum#,#list[].machinedescribe#,#list[].machineruninterval#,#list[].machinestatus#,#list[].machinestatusuptime#,#list[].machinefaulttype#,#list[].detectionswitch#,#list[].detectionstarttime#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
	
	<!-- 根据 machineid 批量更新启用状态 -->
	<update id="edit_Ywmachineinfo" parameterClass="java.util.Map">
		update ywmachineinfo 
		<dynamic prepend="set ">   		
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch=#detectionswitch#</isNotEmpty>			
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</isNotEmpty>
		</dynamic>
		where  
		<isNotEmpty prepend=' ' property='keys'>
			machineid in
			<iterate open="("  close=")"  conjunction=","  property="keys">
				#keys[]#  
			</iterate>
		</isNotEmpty>
	</update>
	
	<!--  首页    运维数据看板 下数字统计 -->
	<select id="count_HomepageDeviceCount" resultClass="java.util.HashMap" parameterClass="java.util.Map">		
	 select count(*) as zs, 'fwqzl' as name from  ywmachineinfo
	    union all   
	    select count(*) as zs, 'jkzxs' as name from ywvideocurrentstate where isonline=1
	    union all   
	    select count(*) as zs, 'jkzl' as name from sbtdspsr 
	    union all   
	    select count(*) as zs, 'fwqzxs' as name from ywmachinecurrentstate where machinestate=1
    </select>
	<!-- <select id="count_HomepageDeviceCount" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select count(*) as fwqzl,
			(select count(*) from ywvideocurrentstate where isonline=1) as jkzxs,
			(select count(*) from sbtdspsr) as jkzl,
			(select count(*) from ywmachinecurrentstate where machinestate =1) as fwqzxs
		from ywmachineinfo			
	</select> -->
	
</sqlMap>











