<?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="Ywalarmsmslogbean" type="cn.vp.XXX.model.YwalarmsmslogBean"/> -->	<typeAlias alias="Ywalarmsmslog" type="cn.im.ptlog.YwalarmsmslogBean"/>
	
	<sql id="condition_Ywalarmsmslog">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEsmslogid'>
			(smslogid like '%$LIKEsmslogid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='smslogid'>
			(smslogid = #smslogid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmeventid'>
			(alarmeventid like '%$LIKEalarmeventid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmeventid'>
			(alarmeventid = #alarmeventid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmdevicetype'>
			(alarmdevicetype like '%$LIKEalarmdevicetype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmdevicetype'>
			(alarmdevicetype = #alarmdevicetype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmdeviceid'>
			(alarmdeviceid like '%$LIKEalarmdeviceid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmdeviceid'>
			(alarmdeviceid = #alarmdeviceid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmdevicename'>
			(alarmdevicename like '%$LIKEalarmdevicename$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmdevicename'>
			(alarmdevicename = #alarmdevicename# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmtype'>
			(alarmtype like '%$LIKEalarmtype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmtype'>
			(alarmtype = #alarmtype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEalarmgrade'>
			(alarmgrade like '%$LIKEalarmgrade$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='alarmgrade'>
			(alarmgrade = #alarmgrade# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEreceiveinstructiontime'>
			(receiveinstructiontime like '%$LIKEreceiveinstructiontime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='receiveinstructiontime'>
			(receiveinstructiontime = #receiveinstructiontime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcallednumber'>
			(callednumber like '%$LIKEcallednumber$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='callednumber'>
			(callednumber = #callednumber# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsmscontent'>
			(smscontent like '%$LIKEsmscontent$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='smscontent'>
			(smscontent = #smscontent# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErequestnumber'>
			(requestnumber like '%$LIKErequestnumber$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='requestnumber'>
			(requestnumber = #requestnumber# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEstatusreportnumber'>
			(statusreportnumber like '%$LIKEstatusreportnumber$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='statusreportnumber'>
			(statusreportnumber = #statusreportnumber# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEisstatusreport'>
			(isstatusreport like '%$LIKEisstatusreport$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='isstatusreport'>
			(isstatusreport = #isstatusreport# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsubmitstatus'>
			(submitstatus like '%$LIKEsubmitstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='submitstatus'>
			(submitstatus = #submitstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsendstatus'>
			(sendstatus like '%$LIKEsendstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sendstatus'>
			(sendstatus = #sendstatus# )
		</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_Ywalarmsmslog" parameterClass="java.util.Map">
		insert into 
		ywalarmsmslog(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='smslogid'>smslogid</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmeventid'>alarmeventid</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicetype'>alarmdevicetype</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdeviceid'>alarmdeviceid</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicename'>alarmdevicename</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmtype'>alarmtype</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmgrade'>alarmgrade</isNotEmpty>
			<isNotEmpty prepend=',' property='receiveinstructiontime'>receiveinstructiontime</isNotEmpty>
			<isNotEmpty prepend=',' property='callednumber'>callednumber</isNotEmpty>
			<isNotEmpty prepend=',' property='smscontent'>smscontent</isNotEmpty>
			<isNotEmpty prepend=',' property='requestnumber'>requestnumber</isNotEmpty>
			<isNotEmpty prepend=',' property='statusreportnumber'>statusreportnumber</isNotEmpty>
			<isNotEmpty prepend=',' property='isstatusreport'>isstatusreport</isNotEmpty>
			<isNotEmpty prepend=',' property='submitstatus'>submitstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='sendstatus'>sendstatus</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='smslogid'>#smslogid#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmeventid'>#alarmeventid#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicetype'>#alarmdevicetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdeviceid'>#alarmdeviceid#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicename'>#alarmdevicename#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmtype'>#alarmtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmgrade'>#alarmgrade#</isNotEmpty>
			<isNotEmpty prepend=',' property='receiveinstructiontime'>#receiveinstructiontime#</isNotEmpty>
			<isNotEmpty prepend=',' property='callednumber'>#callednumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='smscontent'>#smscontent#</isNotEmpty>
			<isNotEmpty prepend=',' property='requestnumber'>#requestnumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='statusreportnumber'>#statusreportnumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='isstatusreport'>#isstatusreport#</isNotEmpty>
			<isNotEmpty prepend=',' property='submitstatus'>#submitstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='sendstatus'>#sendstatus#</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_Ywalarmsmslog" parameterClass="java.util.Map">
		update ywalarmsmslog 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='alarmeventid'>alarmeventid=#alarmeventid#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicetype'>alarmdevicetype=#alarmdevicetype#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdeviceid'>alarmdeviceid=#alarmdeviceid#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum=#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmdevicename'>alarmdevicename=#alarmdevicename#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmtype'>alarmtype=#alarmtype#</isNotEmpty>
			<isNotEmpty prepend=',' property='alarmgrade'>alarmgrade=#alarmgrade#</isNotEmpty>
			<isNotEmpty prepend=',' property='receiveinstructiontime'>receiveinstructiontime=#receiveinstructiontime#</isNotEmpty>
			<isNotEmpty prepend=',' property='callednumber'>callednumber=#callednumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='smscontent'>smscontent=#smscontent#</isNotEmpty>
			<isNotEmpty prepend=',' property='requestnumber'>requestnumber=#requestnumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='statusreportnumber'>statusreportnumber=#statusreportnumber#</isNotEmpty>
			<isNotEmpty prepend=',' property='isstatusreport'>isstatusreport=#isstatusreport#</isNotEmpty>
			<isNotEmpty prepend=',' property='submitstatus'>submitstatus=#submitstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='sendstatus'>sendstatus=#sendstatus#</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='XGTJsmslogid'> smslogid = #XGTJsmslogid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmeventid'> alarmeventid = #XGTJalarmeventid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmdevicetype'> alarmdevicetype = #XGTJalarmdevicetype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmdeviceid'> alarmdeviceid = #XGTJalarmdeviceid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelnum'> channelnum = #XGTJchannelnum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmdevicename'> alarmdevicename = #XGTJalarmdevicename# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmtype'> alarmtype = #XGTJalarmtype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJalarmgrade'> alarmgrade = #XGTJalarmgrade# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJreceiveinstructiontime'> receiveinstructiontime = #XGTJreceiveinstructiontime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcallednumber'> callednumber = #XGTJcallednumber# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsmscontent'> smscontent = #XGTJsmscontent# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrequestnumber'> requestnumber = #XGTJrequestnumber# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJstatusreportnumber'> statusreportnumber = #XGTJstatusreportnumber# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJisstatusreport'> isstatusreport = #XGTJisstatusreport# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsubmitstatus'> submitstatus = #XGTJsubmitstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsendstatus'> sendstatus = #XGTJsendstatus# </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_Ywalarmsmslog" parameterClass="java.util.Map">
		delete from ywalarmsmslog 
		<include refid="condition_Ywalarmsmslog"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywalarmsmslog" parameterClass="java.util.Map">
		delete from ywalarmsmslog 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywalarmsmslog" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select a.*,b.csmc as alarmdevicetypeMc,c.csmc as ywAlarmTypeMc from (
		select 
			smslogid,alarmeventid,alarmdevicetype,alarmdeviceid,channelnum,alarmdevicename,alarmtype,alarmgrade,receiveinstructiontime,callednumber,smscontent,requestnumber,statusreportnumber,isstatusreport,submitstatus,sendstatus,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
		from ywalarmsmslog 
		<include refid="condition_Ywalarmsmslog"/>
			
		) a 
		left join xtcl b on a.alarmdevicetype = b.csdm and b.csdl = 'alarmDeviceDefine'
		left join xtcl c on a.alarmtype = c.csdm and c.csdl = 'ywAlarmType' 
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywalarmsmslog" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywalarmsmslog 
		<include refid="condition_Ywalarmsmslog"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywalarmsmslog" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywalarmsmslog(
			 <![CDATA[ 
				smslogid,alarmeventid,alarmdevicetype,alarmdeviceid,channelnum,alarmdevicename,alarmtype,alarmgrade,receiveinstructiontime,callednumber,smscontent,requestnumber,statusreportnumber,isstatusreport,submitstatus,sendstatus,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].smslogid#,#list[].alarmeventid#,#list[].alarmdevicetype#,#list[].alarmdeviceid#,#list[].channelnum#,#list[].alarmdevicename#,#list[].alarmtype#,#list[].alarmgrade#,#list[].receiveinstructiontime#,#list[].callednumber#,#list[].smscontent#,#list[].requestnumber#,#list[].statusreportnumber#,#list[].isstatusreport#,#list[].submitstatus#,#list[].sendstatus#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











