<?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	= "GF:エンジンサンプル"
	pgid	= "DOC30"
	title	= "対訳"
	date	= "2015/05/09"
	author	= "K.Hasegawa"
	text	= ""
	version	= "001"
/>

<!-- 変更はここから -->

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

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

<!-- DB検索 SQL文記述 debug="true" でSQL文を確認できます。-->
<og:query command="NEW" debug="{@debug}" maxRowCount="0">
	select 	A.SYSTEM_ID,A.GENBUN,B.YAKU,B.SYSTEM_ID AS REF_SYSID,
			'1' as KBHORYU,A.ID,
			A.LANG_YAKU,A.KBYAKU,A.UNIQ,A.FGJ
	from   GF28 A inner join GF28 B
			on  A.GENBUN    = B.GENBUN
			and A.LANG_YAKU = B.LANG_YAKU
	--		and A.KBYAKU    = B.KBYAKU					<!-- 通常、短縮の区別は、原文が同じなら分けない -->
			and B.KBHORYU   in ( '1' , '8' )			<!-- KBHORYU in ( '1:翻訳済' , '8:重複' ) -->
			and B.YAKU is not null
			<og:where startKey="and">
				<og:and value = "B.SYSTEM_ID = '{@REF_SYSID}'" />
			</og:where>
	where	A.YAKU is null
	and		A.KBHORYU = '0'								<!-- KBHORYU='0' は初期 -->
	and		A.SYSTEM_ID = '{@MEM.SYSTEM_ID}'
	<og:where startKey="and">
		<og:and value = "A.LANG_YAKU = '{@MEM.LANG_YAKU}'" />
	</og:where>
	order by A.SYSTEM_ID,A.GENBUN,A.LANG_YAKU,A.UNIQ
</og:query>

<form onSubmit="return oneClick();" method="POST" action="forward.jsp" target="RESULT">
	<!-- 登録、取消、リセットボタンを作成します。 -->
	<og:writeCheck>
		<og:submit  action="ENTRY" />
	</og:writeCheck>

	<!-- DB検索結果を表示させます。 -->
	<og:view
		viewFormType	= "HTMLFormatTable"
		command			= "NEW"
		columnWritable	= "KBHORYU,YAKU"
		noDisplay		= "FGJ"
		checked			= "{@checked}"
		startNo			= "{@startNo}" 
		pageSize		= "{@pageSize}"
		rowspan			= "2"
	>
		<tr><td>[KBHORYU]  </td><td>[GENBUN]</td><td>[SYSTEM_ID]</td><td>[REF_SYSID]</td></tr>
		<tr><td>[LANG_YAKU]</td><td>[YAKU]  </td><td>[KBYAKU]   </td><td>[ID]</td></tr>
	</og:view>

	<og:hidden name="sqlType" defaultVal="MODIFY" value="MODIFY" />
</form>

<!-- ここまで。 -->
	<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
