<?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.BusTaxSmzzAppMapper">
	<select id="queryQttySmzzSwjgJbxx" parameterClass="java.util.Map"
		resultClass="com.hst.taxService.domain.qtty.QttySmzzSwjgJbxxReturnDomain">
		SELECT A.SWJG_DM swjgDm,
		(SELECT B.SWJG_MC FROM
		CTAIS2.DM_SWJG B WHERE B.SWJG_DM = A.SWJG_DM) swjgMc,
		A.PWD pwd,
		A.COMPANY company,
		A.COMPANYTEL companyTel
		FROM NSFW_ZZFW_SWJG_JBXX A
		WHERE A.YXBZ = 'Y'
		AND A.SWJG_DM = #swjgDm#
	</select>
	<select id="querySmzzSwjgYyxt" parameterClass="java.util.Map"
		resultClass="com.hst.taxService.domain.qtty.QttySmzzSwjgYyxtDomain">
		SELECT A.YYXT_DM yyxtdm,
		A.YYXT_MC yyxtmc,
		A.YYXT_JC yyxtjc,
		A.XTFL xtfl,
		A.URL url,
		A.LOGIN_TYPE logintype,
		A.LOGIN_USER_TYPE
		loginusertype,
		A.YXGRDL yxgrdl,
		A.WIN_TITLE wintitle,
		A.BG_NORMAL
		bgnormal,
		A.BG_MOVEON bgmoveon,
		A.APP_ICON appicon,
		B.SWJG_LOGIN
		swjglogin,
		B.SWJG_PWD swjgpwd,
		A.WEB_USER webuser,
		A.WEB_PWD webpwd,
		A.WEB_LOGIN weblogin
		FROM DM_NSFW_YYXT A, NSFW_ZZFW_SWJG_YYXT B
		WHERE A.YYXT_DM =
		B.YYXT_DM
		AND A.YXBZ='Y'
		AND B.SWJG_DM = #swjgDm#
		ORDER BY B.PXXH
	</select>
	<insert id="insertNsfwZzfwBsyLog" parameterClass="com.hst.taxService.domain.qtty.NsfwZzfwBsyLogDomain">
		<selectKey keyProperty="logxh" resultClass="string" type="pre">
			select seq_zzfw_logxh.nextval logxh from dual
		</selectKey>
		INSERT INTO NSFW_ZZFW_BSY_LOG
		(LOG_XH,SWJG_DM,XM,SFZHM,NSRSBH,YYXT_DM,RQ,LOGIN_TIME,IP)
		VALUES
		(#logxh#,#swjgDm#,#xm#,#sfzhm#,#nsrsbh#,#yyxtdm#,to_date(#rq#,'yyyy-mm-dd'),sysdate,#ip#)
	</insert>
	<update id="updateNsfwZzfwBsyLog" parameterClass="java.util.Map">
		update
		NSFW_ZZFW_BSY_LOG a set
		a.exit_time=sysdate,exit_type=#exittype#
		where
		a.log_xh=#logxh#
	</update>

	<parameterMap class="java.util.Map" id="pWebjkGetBsdtDjxhMap">
		<parameter property="swjgDm" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="IN" />
		<parameter property="bsdtDjxh" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="OUT" />
		<parameter property="code" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="OUT" />
		<parameter property="mess" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="OUT" />
	</parameterMap>

	<procedure id="pWebjkGetBsdtDjxh" parameterMap="pWebjkGetBsdtDjxhMap">
		{call
		P_WEBJK_GET_BSDTDJXH(?,?,?,?)}
	</procedure>

	<resultMap class="com.hst.taxService.domain.qtty.QttySmzzBsyNsrxxDomain"
		id="pWebjkQtty533SmzzBsynsrxxResMap">
		<result property="nsrsbh" column="NSRSBH" />
		<result property="nsrmc" column="NSRMC" />
		<result property="login" column="LOGIN" />
		<result property="pwd" column="PWD" />
	</resultMap>
	<parameterMap class="java.util.Map" id="pWebjkQtty533SmzzBsynsrxxMap">
		<parameter property="yyxtdm" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="IN" />
		<parameter property="code" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="OUT" />
		<parameter property="mess" javaType="java.lang.String"
			jdbcType="VARCHAR" mode="OUT" />
		<parameter property="dataList" javaType="java.sql.ResultSet"
			jdbcType="ORACLECURSOR" mode="OUT" resultMap="pWebjkQtty533SmzzBsynsrxxResMap" />
	</parameterMap>

	<procedure id="pWebjkQtty533SmzzBsynsrxx" parameterMap="pWebjkQtty533SmzzBsynsrxxMap">
		{call
		P_WEBJK_QTTY_533_SMZZBSYNSRXX(?,?,?,?)}
	</procedure>

	<insert id="insertSmzzBsyNsrxxLsb" parameterClass="java.util.Map">
		insert into
		LSB_NSRSBH (NSRSBH) VALUES(#nsrsbh#)
	</insert>


	<select id="selectSmzzBsyNsrsbhs" resultClass="java.lang.String">
		SELECT NSR.NSRSBH
		FROM $databaseUsername$.SMZ_BSY_JBXX
		BSY,$databaseUsername$.SMZ_BSY_NSR NSR
		WHERE BSY.BSYDJ_XH =
		NSR.BSYDJ_XH
		AND BSY.SFZHM = #sfzhm#
	</select>


</sqlMap>