<?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="Ywsoftwarelistbean" type="cn.vp.XXX.model.YwsoftwarelistBean"/> -->
<typeAlias alias="Ywsoftwarelist" type="cn.yw.software.bean.YwsoftwarelistBean"/>

	<sql id="condition_Ywsoftwarelist">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKElistid'>
			(listid like '%$LIKElistid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listid'>
			(listid = #listid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmachineid'>
			(machineid like '%$LIKEmachineid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='machineid'>
			(machineid = #machineid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistnum'>
			(listnum like '%$LIKElistnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listnum'>
			(listnum = #listnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistname'>
			(listname like '%$LIKElistname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listname'>
			(listname = #listname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElisttype'>
			(listtype like '%$LIKElisttype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listtype'>
			(listtype = #listtype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistdevelopcompany'>
			(listdevelopcompany like '%$LIKElistdevelopcompany$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listdevelopcompany'>
			(listdevelopcompany = #listdevelopcompany# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistdeploytime'>
			(listdeploytime like '%$LIKElistdeploytime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listdeploytime'>
			(listdeploytime = #listdeploytime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistdescribe'>
			(listdescribe like '%$LIKElistdescribe$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listdescribe'>
			(listdescribe = #listdescribe# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistposition'>
			(listposition like '%$LIKElistposition$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listposition'>
			(listposition = #listposition# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElistareanum'>
			(listareanum like '%$LIKElistareanum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='listareanum'>
			(listareanum = #listareanum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEliststatus'>
			(liststatus like '%$LIKEliststatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='liststatus'>
			(liststatus = #liststatus# )
		</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_Ywsoftwarelist" parameterClass="java.util.Map">
		insert into 
		ywsoftwarelist(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='listid'>listid</isNotEmpty>
			<isNotEmpty prepend=',' property='machineid'>machineid</isNotEmpty>
			<isNotEmpty prepend=',' property='listnum'>listnum</isNotEmpty>
			<isNotEmpty prepend=',' property='listname'>listname</isNotEmpty>
			<isNotEmpty prepend=',' property='listtype'>listtype</isNotEmpty>
			<isNotEmpty prepend=',' property='listdevelopcompany'>listdevelopcompany</isNotEmpty>
			<isNotEmpty prepend=',' property='listdeploytime'>listdeploytime</isNotEmpty>
			<isNotEmpty prepend=',' property='listdescribe'>listdescribe</isNotEmpty>
			<isNotEmpty prepend=',' property='listposition'>listposition</isNotEmpty>
			<isNotEmpty prepend=',' property='listareanum'>listareanum</isNotEmpty>
			<isNotEmpty prepend=',' property='liststatus'>liststatus</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='listid'>#listid#</isNotEmpty>
			<isNotEmpty prepend=',' property='machineid'>#machineid#</isNotEmpty>
			<isNotEmpty prepend=',' property='listnum'>#listnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='listname'>#listname#</isNotEmpty>
			<isNotEmpty prepend=',' property='listtype'>#listtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdevelopcompany'>#listdevelopcompany#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdeploytime'>#listdeploytime#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdescribe'>#listdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='listposition'>#listposition#</isNotEmpty>
			<isNotEmpty prepend=',' property='listareanum'>#listareanum#</isNotEmpty>
			<isNotEmpty prepend=',' property='liststatus'>#liststatus#</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_Ywsoftwarelist" parameterClass="java.util.Map">
		update ywsoftwarelist 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='machineid'>machineid=#machineid#</isNotEmpty>
			<isNotEmpty prepend=',' property='listnum'>listnum=#listnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='listname'>listname=#listname#</isNotEmpty>
			<isNotEmpty prepend=',' property='listtype'>listtype=#listtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdevelopcompany'>listdevelopcompany=#listdevelopcompany#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdeploytime'>listdeploytime=#listdeploytime#</isNotEmpty>
			<isNotEmpty prepend=',' property='listdescribe'>listdescribe=#listdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='listposition'>listposition=#listposition#</isNotEmpty>
			<isNotEmpty prepend=',' property='listareanum'>listareanum=#listareanum#</isNotEmpty>
			<isNotEmpty prepend=',' property='liststatus'>liststatus=#liststatus#</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='XGTJlistid'> listid = #XGTJlistid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmachineid'> machineid = #XGTJmachineid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistnum'> listnum = #XGTJlistnum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistname'> listname = #XGTJlistname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlisttype'> listtype = #XGTJlisttype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistdevelopcompany'> listdevelopcompany = #XGTJlistdevelopcompany# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistdeploytime'> listdeploytime = #XGTJlistdeploytime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistdescribe'> listdescribe = #XGTJlistdescribe# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistposition'> listposition = #XGTJlistposition# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlistareanum'> listareanum = #XGTJlistareanum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJliststatus'> liststatus = #XGTJliststatus# </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_Ywsoftwarelist" parameterClass="java.util.Map">
		delete from ywsoftwarelist 
		<include refid="condition_Ywsoftwarelist"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywsoftwarelist" parameterClass="java.util.Map">
		delete from ywsoftwarelist 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywsoftwarelist" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.csmc as detectionswitchMc, c.csmc as listtypeMc,d.machinename from (
			select listid,machineid,listnum,listname,listtype,listdevelopcompany,listdeploytime,listdescribe,
				listposition,listareanum,liststatus,detectionswitch,detectionstarttime,createaccount,
				createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4 from ywsoftwarelist 
			<include refid="condition_Ywsoftwarelist"/>	
			<!-- <isNotEmpty prepend=' ' property='start'>
				limit #start# ,#limit#
			</isNotEmpty> -->	
		) a
		left join xtcl b on a.detectionswitch = b.csdm and b.csdl = 'ywTaskEnable'
		left join xtcl c on a.listtype = c.csdm and c.csdl = 'ywSoftWareType'	
		left join ywmachineinfo d on a.machineid = d.machineid	
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywsoftwarelist" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywsoftwarelist 
		<include refid="condition_Ywsoftwarelist"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywsoftwarelist" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywsoftwarelist(
			 <![CDATA[ 
				listid,machineid,listnum,listname,listtype,listdevelopcompany,listdeploytime,listdescribe,listposition,listareanum,liststatus,detectionswitch,detectionstarttime,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].listid#,#list[].machineid#,#list[].listnum#,#list[].listname#,#list[].listtype#,#list[].listdevelopcompany#,#list[].listdeploytime#,#list[].listdescribe#,#list[].listposition#,#list[].listareanum#,#list[].liststatus#,#list[].detectionswitch#,#list[].detectionstarttime#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











