<?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="Trafficroadinfo" >
 	<typeAlias alias="Trafficroadinfobean" type="cn.im.trafficdevice.model.TrafficroadinfoBean"/>	
	<!-- <typeAlias alias="Trafficroadinfo" type="cn.im.trafficdevice.TrafficroadinfoBean"/> -->
	
	<sql id="condition_Trafficroadinfo">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEroadId'>
			(roadId like concat('%',#LIKEroadId# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='roadId'>
			(roadId = #roadId#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEroadNumber'>
			(roadNumber like concat('%',#LIKEroadNumber# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='roadNumber'>
			(roadNumber = #roadNumber# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEroadName'>
			(roadName like concat('%',#LIKEroadName# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='roadName'>
			(roadName = #roadName# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEstandardName'>
			(standardName like concat('%',#LIKEstandardName# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='standardName'>
			(standardName = #standardName# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEupDirection'>
			(upDirection like concat('%',#LIKEupDirection# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='upDirection'>
			(upDirection = #upDirection# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdownDirection'>
			(downDirection like concat('%',#LIKEdownDirection# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='downDirection'>
			(downDirection = #downDirection# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEstartPile'>
			(startPile like concat('%',#LIKEstartPile# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='startPile'>
			(startPile = #startPile# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEendPile'>
			(endPile like concat('%',#LIKEendPile# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='endPile'>
			(endPile = #endPile# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEroadMaterial'>
			(roadMaterial like concat('%',#LIKEroadMaterial# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='roadMaterial'>
			(roadMaterial = #roadMaterial# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmaxVehicleNumber'>
			(maxVehicleNumber like concat('%',#LIKEmaxVehicleNumber# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='maxVehicleNumber'>
			(maxVehicleNumber = #maxVehicleNumber# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElongitude'>
			(longitude like concat('%',#LIKElongitude# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='longitude'>
			(longitude = #longitude# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElatitude'>
			(latitude like concat('%',#LIKElatitude# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='latitude'>
			(latitude = #latitude# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEroadPicture'>
			(roadPicture like concat('%',#LIKEroadPicture# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='roadPicture'>
			(roadPicture = #roadPicture# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEremarks'>
			(remarks like concat('%',#LIKEremarks# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='remarks'>
			(remarks = #remarks# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateAccount'>
			(createAccount like concat('%',#LIKEcreateAccount# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createAccount'>
			(createAccount = #createAccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateTime'>
			(createTime like concat('%',#LIKEcreateTime# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createTime'>
			(createTime = #createTime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyAccount'>
			(modifyAccount like concat('%',#LIKEmodifyAccount# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyAccount'>
			(modifyAccount = #modifyAccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyTime'>
			(modifyTime like concat('%',#LIKEmodifyTime# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyTime'>
			(modifyTime = #modifyTime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzh'>
			(startPile like concat('%',#LIKEzh# ,'%') or endPile like concat('%',#LIKEzh# ,'%'))
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Trafficroadinfo" parameterClass="java.util.Map">
		insert into 
		trafficroadinfo(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='roadId'>roadId</isNotEmpty>
			<isNotEmpty prepend=',' property='roadNumber'>roadNumber</isNotEmpty>
			<isNotEmpty prepend=',' property='roadName'>roadName</isNotEmpty>
			<isNotEmpty prepend=',' property='standardName'>standardName</isNotEmpty>
			<isNotEmpty prepend=',' property='upDirection'>upDirection</isNotEmpty>
			<isNotEmpty prepend=',' property='downDirection'>downDirection</isNotEmpty>
			<isNotEmpty prepend=',' property='startPile'>startPile</isNotEmpty>
			<isNotEmpty prepend=',' property='endPile'>endPile</isNotEmpty>
			<isNotEmpty prepend=',' property='roadMaterial'>roadMaterial</isNotEmpty>
			<isNotEmpty prepend=',' property='maxVehicleNumber'>maxVehicleNumber</isNotEmpty>
			<isNotEmpty prepend=',' property='longitude'>longitude</isNotEmpty>
			<isNotEmpty prepend=',' property='latitude'>latitude</isNotEmpty>
			<isNotEmpty prepend=',' property='roadPicture'>roadPicture</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks</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>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='roadId'>#roadId#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadNumber'>#roadNumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadName'>#roadName#</isNotEmpty>
			<isNotEmpty prepend=',' property='standardName'>#standardName#</isNotEmpty>
			<isNotEmpty prepend=',' property='upDirection'>#upDirection#</isNotEmpty>
			<isNotEmpty prepend=',' property='downDirection'>#downDirection#</isNotEmpty>
			<isNotEmpty prepend=',' property='startPile'>#startPile#</isNotEmpty>
			<isNotEmpty prepend=',' property='endPile'>#endPile#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadMaterial'>#roadMaterial#</isNotEmpty>
			<isNotEmpty prepend=',' property='maxVehicleNumber'>#maxVehicleNumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='longitude'>#longitude#</isNotEmpty>
			<isNotEmpty prepend=',' property='latitude'>#latitude#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadPicture'>#roadPicture#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>#remarks#</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>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Trafficroadinfo" parameterClass="java.util.Map">
		update trafficroadinfo 
		<dynamic prepend="set ">   			
			<isNotEmpty prepend=',' property='roadNumber'>roadNumber=#roadNumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadName'>roadName=#roadName#</isNotEmpty>
			<isNotEmpty prepend=',' property='standardName'>standardName=#standardName#</isNotEmpty>
			<isNotEmpty prepend=',' property='upDirection'>upDirection=#upDirection#</isNotEmpty>
			<isNotEmpty prepend=',' property='downDirection'>downDirection=#downDirection#</isNotEmpty>
			<isNotEmpty prepend=',' property='startPile'>startPile=#startPile#</isNotEmpty>
			<isNotEmpty prepend=',' property='endPile'>endPile=#endPile#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadMaterial'>roadMaterial=#roadMaterial#</isNotEmpty>
			<isNotEmpty prepend=',' property='maxVehicleNumber'>maxVehicleNumber=#maxVehicleNumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='longitude'>longitude=#longitude#</isNotEmpty>
			<isNotEmpty prepend=',' property='latitude'>latitude=#latitude#</isNotEmpty>
			<isNotEmpty prepend=',' property='roadPicture'>roadPicture=#roadPicture#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks=#remarks#</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>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJroadId'> roadId = #XGTJroadId#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJroadNumber'> roadNumber = #XGTJroadNumber# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJroadName'> roadName = #XGTJroadName# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJstandardName'> standardName = #XGTJstandardName# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJupDirection'> upDirection = #XGTJupDirection# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdownDirection'> downDirection = #XGTJdownDirection# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJstartPile'> startPile = #XGTJstartPile# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJendPile'> endPile = #XGTJendPile# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJroadMaterial'> roadMaterial = #XGTJroadMaterial# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmaxVehicleNumber'> maxVehicleNumber = #XGTJmaxVehicleNumber# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlongitude'> longitude = #XGTJlongitude# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJlatitude'> latitude = #XGTJlatitude# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJroadPicture'> roadPicture = #XGTJroadPicture# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJremarks'> remarks = #XGTJremarks# </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>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Trafficroadinfo" parameterClass="java.util.Map">
		delete from trafficroadinfo 
		<include refid="condition_Trafficroadinfo"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Trafficroadinfo" parameterClass="java.util.Map">
		delete from trafficroadinfo 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Trafficroadinfo" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			roadId,roadNumber,roadName,standardName,upDirection,downDirection,startPile,endPile,
			roadMaterial,maxVehicleNumber,longitude,latitude,roadPicture,remarks,createAccount,
			createTime,modifyAccount,modifyTime,concat(upDirection,'-',downDirection) as direction
		from trafficroadinfo 
		<include refid="condition_Trafficroadinfo"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects All-->
	<select id="getTrafficroadinfoAll" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			roadId,roadNumber,roadName,standardName,upDirection,downDirection,startPile,endPile,roadMaterial,maxVehicleNumber,longitude,latitude,roadPicture,remarks,createAccount,createTime,modifyAccount,modifyTime
		from trafficroadinfo 
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Trafficroadinfo" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from trafficroadinfo 
		<include refid="condition_Trafficroadinfo"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Trafficroadinfo" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into trafficroadinfo(
			 <![CDATA[ 
				roadId,roadNumber,roadName,standardName,upDirection,downDirection,startPile,endPile,roadMaterial,maxVehicleNumber,longitude,latitude,roadPicture,remarks,createAccount,createTime,modifyAccount,modifyTime
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].roadId#,#list[].roadNumber#,#list[].roadName#,#list[].standardName#,#list[].upDirection#,#list[].downDirection#,#list[].startPile#,#list[].endPile#,#list[].roadMaterial#,#list[].maxVehicleNumber#,#list[].longitude#,#list[].latitude#,#list[].roadPicture#,#list[].remarks#,#list[].createAccount#,#list[].createTime#,#list[].modifyAccount#,#list[].modifyTime#
				)
			]]>    
    	</iterate> 
	</insert>



</sqlMap>











