<?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.tmService.dao.BusSzrsAppMapper">

	<select id="querySwrySzsrUserxxBykey"  parameterClass="java.util.Map" resultClass="com.hst.taxService.domain.szrs.SwrySzxxDomain">
		SELECT RY.SWRY_DM swryDm,
			   RY.SWJG_DM swjgDm,
			   RY.XM xm,
			   RY.SZRS_ZH szrsZh,
			   RY.SZRS_PWS szrsPwd
			FROM $tm_user$.QYH_SZ_SWRY RY 
		WHERE RY.SWRY_DM = #swryDm#
	</select>
	
	<update id="updateSzrsSjtbByKey"  parameterClass="com.hst.common.bo.SzrsSjtb">
		 update $tm_user$.QYH_SZRS_SJTB set TBBZ=#tbbz#,TBSJ=to_date(#tbsj#, 'YYYY-MM-DD HH24:MI:SS'),
        SZRS_YWID=#szrsYwid#,ERR_MESS=#errMess# where SJTBRW_XH=#sjtbrwXh#
	</update>
	
	<select id="querySdsxRzByKey"  parameterClass="java.util.Map" resultClass="com.hst.taxService.domain.szrs.SzrsGzjsDomain">
	 SELECT RZ.RZDJ_XH rzdjXh,
	 		TO_CHAR(RZ.RQ,'YYYY-MM-DD') rq,
	        RZ.RZNR gzjs,
	        RZ.ZSZT zszt
	 	FROM $tm_user$.QYH_WDSX_RZ RZ 
	 WHERE RZ.RZDJ_XH = #rzdjXh#
	</select>
	
	<insert id="insertWdsxGztx"  parameterClass="com.hst.taxService.domain.szrs.WdsxGztxDomain">
		<selectKey keyProperty="gztxXh" resultClass="String" type="pre"> 
			select $tm_user$.SEQ_QYH_GZTX_XH.nextval as gztxXh from dual 
		</selectKey> 
		insert into $tm_user$.QYH_WDSX_GZTX(GZTX_XH,JSR_SWRY_DM,FSRQ,TXNR,CKBZ,CFTJ,YXBZ,URL)
		values(#gztxXh:NUMERIC#,#jsrSwryDm:VARCHAR#,to_date(#fsrq:DATE#,'YYYY-MM-DD HH24:MI:SS'),#txnr:VARCHAR#,
		#ckbz:VARCHAR#,#cftj:VARCHAR#,#yxbz:VARCHAR#,#url:VARCHAR#)
	</insert>
	
	<parameterMap class="java.util.Map" id="sjtbSuncessHxclMap">
    	<parameter property="sjtbrwXh" javaType="java.lang.String"   jdbcType="VARCHAR" mode="IN"/>
    </parameterMap>
    
    <procedure id="sjtbSuncessHxcl" parameterMap="sjtbSuncessHxclMap" >
    	{call $tm_user$.P_TM_SJCL_XXTS_SZRS(?)}
    </procedure>
	
</sqlMap>