<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld" 
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<og:head headType="result" />
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system	= "GE:エンジン"
	pgid	= "MAIL07"
	title	= "バッチデータ検索・再送"
	date	= "2009/04/01"
	author	= "S.Li"
	text	= ""
	version	= "001"
>
	5.6.8.0 (2013/09/06) order by変更,日付条件にの00,99付加
	5.8.2.0 (2014/12/05) パフォーマンスが悪くなる原因となるのでGE36の検索を外す
	5.9.28.1 (2018/01/19) decodeをcaseに変更
</og:comment>

<!-- ワーニングメッセージです。ここでは、登録完了のメッセージを表示します。 -->
<og:errorMessage command="{@command}" clear="{@clear}" displayMsg="{@displayMsg}" />

<!-- 入力チェック -->
<og:columnCheck
	command   = "{@command}"
	nullCheck = "SYSTEM_ID"
/>

<!-- 取り消しボタンが押された時に必要です。 -->
<og:entry command="{@command}" />

<!-- DB検索 SQL文記述 debug="true" でSQL文を確認できます。-->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" stopZero="true">
		SELECT	 FGJ FGJ_PARA
				,case when FGJ='2' then '1' else '0' end as LINK_RRK
				,UNIQ
				,DYSET
				,USRSET
				,PGUPD
				,SYSTEM_ID
				,PTN_ID
				,FROM_ID
				,TO_ID
				,CC_ID
				,BCC_ID
				,H_TXT
				,F_TXT
				,PARAM0
				,PARAM1
				,PARAM2
				,PARAM3
				,PARAM4
				,PARAM5
				,PARAM6
				,PARAM7
				,PARAM8
				,PARAM9
				,ATTACH1
				,ATTACH2
				,ATTACH3
				,ATTACH4
				,ATTACH5
				,SNDTIME
				<!--,DECODE((SELECT COUNT(*) FROM GE36 WHERE PARA_KEY=GE30.UNIQ),0,0,1) LINK_ERR-->
		FROM	GE30
	<og:where>
		<og:and value = "SYSTEM_ID 	=	 '{@SYSTEM_ID}'"	/>
		<og:and value = "FROM_ID 	=	 '{@FROM_ID}'"		/>
		<og:and value = "PTN_ID 	=	 '{@PTN_ID}'"		/>
		<og:and value = "UNIQ	 	=	 '{@UNIQ}'"			/>
		<og:and value = "PGUPD	 	=	 '{@PGUPD}'"		/>
		<og:and value = "USRSET	 	=	 '{@USRSET}'"		/>
		<og:and value = "COALESCE(FGJ,'0')	=	 '{@FGJ_PARA}'"		/>
		<og:and value = "DYSET		&gt;= '{@DYSET_FROM}00000000'"	/>
		<og:and value = "DYSET		&lt;= '{@DYSET_TO}99999999'"	/>
	</og:where>
		order by UNIQ DESC
</og:query>

<!-- formタグでリクエストフィールドを囲います。oneClick()関数は、２重押し防止JavaScriptです。 -->
<form method="POST" action="forward.jsp" target="RESULT">

<og:writeCheck>
	<og:submit value="modify" command="MODIFY" lbl="MODIFY" accesskey="M" />
<br />
</og:writeCheck>

<og:viewLink command="{@command}" >
	<og:link onLink="[LINK_RRK]" column="FGJ_PARA" gamenId="MAIL03" href="index.jsp" target="CONTENTS"
		keys="command,SYSTEM_ID,PARA_KEY" vals="NEW,[SYSTEM_ID],[UNIQ]" />
	<og:link onLink="1" column="UNIQ" gamenId="MAIL06" href="index.jsp" target="CONTENTS"
		keys="command,SYSTEM_ID,PARA_KEY" vals="NEW,[SYSTEM_ID],[UNIQ]" />
</og:viewLink>

<og:columnEditor column="TO_ID" renderer="SLABEL" />
<og:columnEditor column="CC_ID" renderer="SLABEL" />
<og:columnEditor column="BCC_ID" renderer="SLABEL" />

<!-- DB検索結果を表示させます。 -->
<og:view
	viewFormType = "HTMLTable" 
	command      = "{@command}" 
	noDisplay    = "LINK_RRK"
	selectedType = "checkbox"/>
</form>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
