<?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.BusSsglWxfwhAppMapper">
	<insert id="insertFwhZxzcZxwj" parameterClass="com.hst.common.bo.FwhZxzcZxwj">
		<selectKey keyProperty="zcwjDjxh" resultClass="string" type="pre">
			select $databaseUsername$.SEQ_ZCWJ_DJXH.nextval zcwjDjxh from dual
		</selectKey>
		INSERT INTO $databaseUsername$.FWH_ZXZC_ZXWJ
		(ZCWJ_DJXH,WJH,BT,FBRQ,FBDW,NR,URL,YXBZ)
		VALUES
		(#zcwjDjxh#,#wjh#,#bt#,to_date(#fbrq#,'YYYY-MM-DD'),#fbdw#,#nr:CLOB#,#url#,#yxbz#)		
	</insert>
   <select id="selectFwhZxzcZxwjByWjh" resultClass="com.hst.common.bo.FwhZxzcZxwj" parameterClass="java.util.Map">
   	select A.ZCWJ_DJXH zcwjDjxh, 
   		A.WJH wjh,A.BT bt ,TO_CHAR(A.FBRQ,'YYYY-MM-DD') fbrq,
   		A.NR nr,A.URL url,A.YXBZ yxbz
   	from $databaseUsername$.FWH_ZXZC_ZXWJ A where A.wjh=#wjh# AND A.YXBZ='Y'
   </select>
</sqlMap>