<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE sqlMap   
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"   
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">  
<sqlMap namespace="com.hst.taxService.dao.XtTaxLogMapper">

	<!--插入数据-->
	<insert id="insertXtTaxServiceLog"  parameterClass="com.hst.common.bo.XtTaxServiceLog">
		<selectKey keyProperty="logXh" resultClass="String" type="pre"> 
			select SEQ_LOG_XH.nextval as logXh from dual 
		</selectKey> 
		insert into XT_TAX_SERVICE_LOG(LOG_XH,RECV_TIME,RECV_DATA,CLBZ,BACK_TIME,BACK_DATA,ERR_MESS)
		values(#logXh:NUMERIC#,to_date(#recvTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#recvData:VARCHAR#,#clbz:VARCHAR#,
		to_date(#backTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#backData:VARCHAR#,#errMess:VARCHAR#)
	</insert>

	<!--根据主键更新该表中其它所有字段-->
    <update id="updateXtTaxServiceLogByKey" parameterClass="com.hst.common.bo.XtTaxServiceLog">
        update XT_TAX_SERVICE_LOG set CLBZ=#clbz#,BACK_TIME=to_date(#backTime#, 'YYYY-MM-DD HH24:MI:SS'),
        BACK_DATA=#backData#,ERR_MESS=#errMess# where LOG_XH=#logXh#
    </update>
    
    <!--插入数据-->
	<insert id="insertXtGt3Log"  parameterClass="com.hst.common.bo.XtGt3Log">
		<selectKey keyProperty="logXh" resultClass="String" type="pre"> 
			select SEQ_LOG_XH.nextval as logXh from dual
		</selectKey> 
		insert into XT_GT3_LOG(LOG_XH,TRAN_ID,REQ_TIME,REQ_DATA,CLBZ,
		RES_TIME,RES_DATA,ERR_MESS,RES_CODE,RES_MESS)
		values(#logXh:NUMERIC#,#tranId:VARCHAR#,to_date(#reqTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#reqData:VARCHAR#,#clbz:VARCHAR#,
		to_date(#resTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#resData:VARCHAR#,#errMess:VARCHAR#,#resCode:VARCHAR#,#resMess:VARCHAR#)
	</insert>

	<!--根据主键更新该表中其它所有字段-->
    <update id="updateXtGt3LogByKey" parameterClass="com.hst.common.bo.XtGt3Log">
        update XT_GT3_LOG set CLBZ=#clbz#,RES_TIME=to_date(#resTime#, 'YYYY-MM-DD HH24:MI:SS'),
        RES_DATA=#resData#,ERR_MESS=#errMess#,RES_CODE=#resCode#,RES_MESS=#resMess# where LOG_XH=#logXh#
    </update>

	<update id="deleteNsfwSwjgWhSxt" >
		delete from NSFW_WH_SWJG_SXT 
	</update>
	<insert id="insertNsfwSwjgWhSxt" parameterClass="com.hst.taxService.domain.DhXmlSaveDom">
		insert INTO  NSFW_WH_SWJG_SXT (channel_id, channel_mc, swjg_mc ,swjg_dm ,device_id ,type)
		VALUES (#channelId#,#channelMc#,#swjgMc#,#swjgDm#,#deviceId#,#type#)
	</insert>



	<!--插入数据-->
	<insert id="insertXtGt3SmbsLog"  parameterClass="com.hst.common.bo.XtGt3SmbsLog">
		<selectKey keyProperty="logXh" resultClass="String" type="pre">
			select SEQ_LOG_XH.nextval as logXh from dual
		</selectKey>
		insert into XT_GT3_SMBS_LOG(LOG_XH,TRAN_ID,REQ_TIME,REQ_DATA,CLBZ,
		RES_TIME,RES_DATA,ERR_MESS,RES_CODE,RES_MESS,
		YWID,SWJG_DM,BSDT_DJXH,TIME_USED)
		values(#logXh:NUMERIC#,#tranId:VARCHAR#,to_date(#reqTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#reqData:VARCHAR#,#clbz:VARCHAR#,
		to_date(#resTime:DATE#,'YYYY-MM-DD HH24:MI:SS'),#resData:VARCHAR#,#errMess:VARCHAR#,#resCode:VARCHAR#,#resMess:VARCHAR#,
		#ywid#,#swjgDm#,#bsdtDjxh#,#timeUsed#)
	</insert>

	<!--根据主键更新该表中其它所有字段-->
	<update id="updateXtGt3SmbsLogByKey" parameterClass="com.hst.common.bo.XtGt3SmbsLog">
		update XT_GT3_SMBS_LOG set CLBZ=#clbz#,RES_TIME=to_date(#resTime#, 'YYYY-MM-DD HH24:MI:SS'),
		RES_DATA=#resData#,ERR_MESS=#errMess#,RES_CODE=#resCode#,RES_MESS=#resMess#, TIME_USED = #timeUsed# where LOG_XH=#logXh#
	</update>
    <insert id="insertXtGt3SmbsRxbdLog" parameterClass="com.hst.common.bo.XtGt3SmbsRxbdLog">
		<selectKey keyProperty="logXh" resultClass="String" type="pre">
			select SEQ_LOG_XH.nextval as logXh from dual
		</selectKey>
		INSERT INTO XT_GT3_SMBS_RXBD_LOG (log_xh,cgbz,rq,returncode,returnmessage,sfzhm,swjg_dm,bsdt_djxh,jkyzuuid)
		VALUES (#logXh#,#cgbz#,sysdate,#returncode#,#returnmessage#,#sfzhm#,#swjgDm#,#bsdtDjxh#,#jkyzuuid#)

	</insert>
	<insert id="insertXtGt3SmbsSmcjLog" parameterClass="com.hst.common.bo.XtGt3SmbsSmcjLog">
		<selectKey keyProperty="logXh" resultClass="String" type="pre">
			select SEQ_LOG_XH.nextval as logXh from dual
		</selectKey>
		INSERT INTO XT_GT3_SMBS_SMCJ_LOG (log_xh,cgbz,rq,returncode,returnmessage,sfzhm,swjg_dm,bsdt_djxh,qhhm,qhsj)
		VALUES (#logXh#,#cgbz#,sysdate,#returncode#,#returnmessage#,#sfzhm#,#swjgDm#,#bsdtDjxh#,#qhhm#,to_date(#qhsj#,'YYYY-MM-DD HH24:MI:SS'))

	</insert>
</sqlMap>