<?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_Ywarchivedepartment">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEdepartmentid'>
			(departmentid like '%$LIKEdepartmentid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='departmentid'>
			(departmentid = #departmentid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbuilddepartment'>
			(builddepartment like '%$LIKEbuilddepartment$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='builddepartment'>
			(builddepartment = #builddepartment# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEareacode'>
			(areacode like '%$LIKEareacode$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='areacode'>
			(areacode = #areacode# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsecreyattribute'>
			(secreyattribute like '%$LIKEsecreyattribute$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='secreyattribute'>
			(secreyattribute = #secreyattribute# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideofunctiontype'>
			(videofunctiontype like '%$LIKEvideofunctiontype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videofunctiontype'>
			(videofunctiontype = #videofunctiontype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEareapolicecode'>
			(areapolicecode like '%$LIKEareapolicecode$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='areapolicecode'>
			(areapolicecode = #areapolicecode# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEareapolicename'>
			(areapolicename like '%$LIKEareapolicename$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='areapolicename'>
			(areapolicename = #areapolicename# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideopolicetype'>
			(videopolicetype like '%$LIKEvideopolicetype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videopolicetype'>
			(videopolicetype = #videopolicetype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideopointtype'>
			(videopointtype like '%$LIKEvideopointtype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videopointtype'>
			(videopointtype = #videopointtype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmanageunitcode'>
			(manageunitcode like '%$LIKEmanageunitcode$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='manageunitcode'>
			(manageunitcode = #manageunitcode# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmanageunitname'>
			(manageunitname like '%$LIKEmanageunitname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='manageunitname'>
			(manageunitname = #manageunitname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmanageunitphone'>
			(manageunitphone like '%$LIKEmanageunitphone$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='manageunitphone'>
			(manageunitphone = #manageunitphone# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmanageunitaccount'>
			(manageunitaccount like '%$LIKEmanageunitaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='manageunitaccount'>
			(manageunitaccount = #manageunitaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEuseattribute'>
			(useattribute like '%$LIKEuseattribute$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='useattribute'>
			(useattribute = #useattribute# )
		</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_Ywarchivedepartment" parameterClass="java.util.Map">
		insert into 
		ywarchivedepartment(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='departmentid'>departmentid</isNotEmpty>
			<isNotEmpty prepend=',' property='builddepartment'>builddepartment</isNotEmpty>
			<isNotEmpty prepend=',' property='areacode'>areacode</isNotEmpty>
			<isNotEmpty prepend=',' property='secreyattribute'>secreyattribute</isNotEmpty>
			<isNotEmpty prepend=',' property='videofunctiontype'>videofunctiontype</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicecode'>areapolicecode</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicename'>areapolicename</isNotEmpty>
			<isNotEmpty prepend=',' property='videopolicetype'>videopolicetype</isNotEmpty>
			<isNotEmpty prepend=',' property='videopointtype'>videopointtype</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitcode'>manageunitcode</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitname'>manageunitname</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitphone'>manageunitphone</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitaccount'>manageunitaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='useattribute'>useattribute</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='departmentid'>#departmentid#</isNotEmpty>
			<isNotEmpty prepend=',' property='builddepartment'>#builddepartment#</isNotEmpty>
			<isNotEmpty prepend=',' property='areacode'>#areacode#</isNotEmpty>
			<isNotEmpty prepend=',' property='secreyattribute'>#secreyattribute#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofunctiontype'>#videofunctiontype#</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicecode'>#areapolicecode#</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicename'>#areapolicename#</isNotEmpty>
			<isNotEmpty prepend=',' property='videopolicetype'>#videopolicetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='videopointtype'>#videopointtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitcode'>#manageunitcode#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitname'>#manageunitname#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitphone'>#manageunitphone#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitaccount'>#manageunitaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='useattribute'>#useattribute#</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_Ywarchivedepartment" parameterClass="java.util.Map">
		update ywarchivedepartment 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='builddepartment'>builddepartment=#builddepartment#</isNotEmpty>
			<isNotEmpty prepend=',' property='areacode'>areacode=#areacode#</isNotEmpty>
			<isNotEmpty prepend=',' property='secreyattribute'>secreyattribute=#secreyattribute#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofunctiontype'>videofunctiontype=#videofunctiontype#</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicecode'>areapolicecode=#areapolicecode#</isNotEmpty>
			<isNotEmpty prepend=',' property='areapolicename'>areapolicename=#areapolicename#</isNotEmpty>
			<isNotEmpty prepend=',' property='videopolicetype'>videopolicetype=#videopolicetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='videopointtype'>videopointtype=#videopointtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitcode'>manageunitcode=#manageunitcode#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitname'>manageunitname=#manageunitname#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitphone'>manageunitphone=#manageunitphone#</isNotEmpty>
			<isNotEmpty prepend=',' property='manageunitaccount'>manageunitaccount=#manageunitaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='useattribute'>useattribute=#useattribute#</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='XGTJdepartmentid'> departmentid = #XGTJdepartmentid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJbuilddepartment'> builddepartment = #XGTJbuilddepartment# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJareacode'> areacode = #XGTJareacode# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsecreyattribute'> secreyattribute = #XGTJsecreyattribute# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideofunctiontype'> videofunctiontype = #XGTJvideofunctiontype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJareapolicecode'> areapolicecode = #XGTJareapolicecode# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJareapolicename'> areapolicename = #XGTJareapolicename# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideopolicetype'> videopolicetype = #XGTJvideopolicetype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideopointtype'> videopointtype = #XGTJvideopointtype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmanageunitcode'> manageunitcode = #XGTJmanageunitcode# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmanageunitname'> manageunitname = #XGTJmanageunitname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmanageunitphone'> manageunitphone = #XGTJmanageunitphone# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmanageunitaccount'> manageunitaccount = #XGTJmanageunitaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJuseattribute'> useattribute = #XGTJuseattribute# </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_Ywarchivedepartment" parameterClass="java.util.Map">
		delete from ywarchivedepartment 
		<include refid="condition_Ywarchivedepartment"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywarchivedepartment" parameterClass="java.util.Map">
		delete from ywarchivedepartment 
		where 
		<isNotEmpty prepend=' ' property='ids'>
			departmentid in
			<iterate open="("  close=")"  conjunction=","  property="ids">
				#ids[]#  
			</iterate>
		</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywarchivedepartment" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			departmentid,builddepartment,areacode,secreyattribute,videofunctiontype,areapolicecode,areapolicename,videopolicetype,videopointtype,manageunitcode,manageunitname,manageunitphone,manageunitaccount,useattribute,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
		from ywarchivedepartment 
		<include refid="condition_Ywarchivedepartment"/>		
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywarchivedepartment" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywarchivedepartment 
		<include refid="condition_Ywarchivedepartment"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywarchivedepartment" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywarchivedepartment(
			 <![CDATA[ 
				departmentid,builddepartment,areacode,secreyattribute,videofunctiontype,areapolicecode,areapolicename,videopolicetype,videopointtype,manageunitcode,manageunitname,manageunitphone,manageunitaccount,useattribute,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].departmentid#,#list[].builddepartment#,#list[].areacode#,#list[].secreyattribute#,#list[].videofunctiontype#,#list[].areapolicecode#,#list[].areapolicename#,#list[].videopolicetype#,#list[].videopointtype#,#list[].manageunitcode#,#list[].manageunitname#,#list[].manageunitphone#,#list[].manageunitaccount#,#list[].useattribute#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











