<?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="init" />
<og:comment
	system	= "VV:GMIS Ver6"
	pgid	= "MCS0017"
	title	= "組付品登録"
	date	= "2015/06/19"
	author	= "LEE.M"
	text	= "ｺﾋﾟｰ元:品目(BAS3021)"
	version	= "001">
	2016/04/20 A.KAKIMOTO	遷移先画面の条件追加
	2016/09/05 WANXQ		検査区分､支給区分追加
	2016/10/21 XFL			”品目名称２”､”品目名称３”を項目追加 
	2016/10/31 ZHENGH		成形品､部品と補材に更新前子品目番号と補助No追加
	2017/04/04 ZHENGH		【61200-170310-13】要求部門と納入場所追加
	2017/05/17 SONG.LM		【61200-161214-04】成形品が部品に統一する
	2017/06/23 LEE.M		【61200-170526-06】MICS機能のGMICS適用
</og:comment>

<!-- history.back() で戻るﾎﾞﾀﾝを表示します｡ -->
<jsp:directive.include file="/jsp/common/history_back.jsp" />

<!-- ｶﾗﾑﾁｪｯｸ -->
<!-- 品目 -->
<og:columnCheck command="{@command}" columns="*" checkType="NEW" />
<!-- 工順 -->
<og:columnCheck command="{@command}" nullCheck=" "/>
<!-- 製品補材 -->
<og:columnCheck command="{@command}" tableId="3PAIN3" nullCheck=" " />
<!-- 梱包補材 -->
<og:columnCheck command="{@command}" tableId="3PAIN4" nullCheck=" " />

<!-- command="ENTRY"時は､ﾘｸｴｽﾄ情報（ｶﾗﾑ名__行番号)を､DBTableModelにｾｯﾄします｡ -->
<!-- 品目 -->
<og:entry command="{@command}" selectedAll="true" useConsistency="false" strictCheck="false" >
	<og:columnSet command="{@command}" columnId="PN"		action="SET"	value="{@PN}"		/>	<!-- 品目番号		-->
	<og:columnSet command="{@command}" columnId="CDJIG1"	action="SET"	value="{@CDJIG1}"	/>	<!-- 事業			-->
	<og:columnSet command="{@command}" columnId="NMPN"		action="SET"	value="{@NMPN}"		/>	<!-- 品目名称		-->
	<og:columnSet command="{@command}" columnId="NMPN2"		action="SET"	value="{@NMPN2}"	/>	<!-- 品目名称2		--><!-- 2016/10/21 ADD -->
	<og:columnSet command="{@command}" columnId="NMPN3"		action="SET"	value="{@NMPN3}"	/>	<!-- 品目名称3		--><!-- 2016/10/21 ADD -->
	<og:columnSet command="{@command}" columnId="JCKATSU"	action="SET"	value="{@JCKATSU}"	/>	<!-- 死活状況		-->
	<og:columnSet command="{@command}" columnId="NOZMN"		action="SET"	value="{@NOZMN}"	/>	<!-- 図面No			-->
	<og:columnSet command="{@command}" columnId="CDTNZAI1"	action="SET"	value="{@CDTNZAI1}"	/>	<!-- 在庫単位		-->
	<og:columnSet command="{@command}" columnId="CDTNTHI1"	action="SET"	value="{@CDTNTHI1}"	/>	<!-- 手配単位		-->
	<og:columnSet command="{@command}" columnId="KANZAN"	action="SET"	value="{@KANZAN}"	/>	<!-- 換算値			-->
	<og:columnSet command="{@command}" columnId="CDSOKO1"	action="SET"	value="{@CDSOKO1}"	/>	<!-- 倉庫ｺｰﾄﾞ		-->
	<og:columnSet command="{@command}" columnId="KBMNS"		action="SET"	value="{@KBMNS}"	/>	<!-- みなし出庫		-->
	<og:columnSet command="{@command}" columnId="SULOTMIN"	action="SET"	value="{@SULOTMIN}"	/>	<!-- ﾛｯﾄ数			-->
	<og:columnSet command="{@command}" columnId="KBHYOKA"	action="SET"	value="{@KBHYOKA}"	/>	<!-- 評価方法		-->
	<og:columnSet command="{@command}" columnId="KBLOT"		action="SET"	value="{@KBLOT}"	/>	<!-- ﾛｯﾄ管理		-->
	<og:columnSet command="{@command}" columnId="SUIRI"		action="SET"	value="{@SUIRI}"	/>	<!-- 入数			-->
	<og:columnSet command="{@command}" columnId="CDHBND1"	action="SET"	value="{@CDHBND1}"	/>	<!-- 大分類			-->
	<og:columnSet command="{@command}" columnId="CDHBNT1"	action="SET"	value="{@CDHBNT1}"	/>	<!-- 中分類			-->
	<og:columnSet command="{@command}" columnId="CDHBNS1"	action="SET"	value="{@CDHBNS1}"	/>	<!-- 小分類			-->
	<og:columnSet command="{@command}" columnId="CDTOKU"	action="SET"	value="{@CDTOKU}"	/>	<!-- 得意先			-->
	<og:columnSet command="{@command}" columnId="CDBUYK1"	action="SET"	value="{@CDBUYK1}"	/>	<!-- 要求部門		--><!-- 2017/04/04 ADD -->
	<og:columnSet command="{@command}" columnId="SUAZK"		action="SET"	value="{@SUAZK}"	/>	<!-- 安全在庫数		-->
	<og:columnSet command="{@command}" columnId="KBJDU"		action="SET"	value="{@KBJDU}"	/>	<!-- 自動手配		-->
	<og:columnSet command="{@command}" columnId="BUDOM"		action="SET"	value="{@BUDOM}"	/>	<!-- 歩留まり		-->
	<og:columnSet command="{@command}" columnId="KJPN"		action="SET"	value="{@KJPN}"		/>	<!-- 品目記事		--><!-- 2017/06/23 ADD -->
</og:entry>
<!-- 製品補材 -->
<og:entry command="{@command}" selectedAll="true" tableId="3PAIN3" useConsistency="false" strictCheck="false" >
	<og:columnSet command="{@command}" columnId="PNOYA"		action="SET"	value="{@PN}"		/>	<!-- 親品目番号	-->
	<og:columnSet command="{@command}" columnId="CDJIG_H2"	action="SET"	value="{@CDJIG1}"	/>	<!-- 親品目事業	-->
</og:entry>
<!-- 梱包補材 -->
<og:entry command="{@command}" selectedAll="true" tableId="3PAIN4" useConsistency="false" strictCheck="false" >
	<og:columnSet command="{@command}" columnId="PNOYA"		action="SET"	value="{@PN}"		/>	<!-- 親品目番号	-->
	<og:columnSet command="{@command}" columnId="CDJIG_H3"	action="SET"	value="{@CDJIG1}"	/>	<!-- 親品目事業	-->
</og:entry>

<!-- PlsqlUpdateTagでPLSQLを実行します｡ -->
<og:transaction >
	<!-- 追加／複写／変更 --><!-- 2017/05/17 MOD -->
	<og:equals val1="{@KBBTN}" val2="DELETE" notEquals="true">
		<!-- 品目ﾏｽﾀ --><!-- KBKN追加 2016/09/05 MOD --><!-- NMPN2,NMPN3追加 2016/10/21 MOD -->
		<!-- CDBUYK1,NONBASYO追加 2017/04/04 MOD --><!-- KJPN追加 2017/06/23 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBBTN,PN,CDJIG1,NMPN,NMPN2,NMPN3,JCKATSU,NOZMN,CDTNZAI1,CDTNTHI1,KANZAN,CDSOKO1,KBMNS,SULOTMIN,KBHYOKA,KBLOT
							,SUIRI,CDHBND1,CDHBNT1,CDHBNS1,CDTOKU,CDBUYK1,SUAZK,KBJDU,BUDOM,KJPN
							,DEL,KBNFLG,KJUN,CDKT1,KBNG,WC,LTNY,TMHDND,TMHSGY,TKHC,CDTUKA1,KBTK,CDKMBN_SR1
							,SEQBAS51,SEQMRP60,SEQBAS53,SEQBAS54,KBKN,NONBASYO"
			dbType		= "MCS0017AARG"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017A( ?,?,?,?,? ) }
		</og:plsqlUpdate>
		<!-- 製品補材 --><!-- KBSKY2追加 2016/09/05 MOD --><!-- PNKO7_M,NOHJO2追加 2016/10/31 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBSYU_P2,KBBTN,DEL2,KBNFLG2,SEQBAS52_2,PNOYA,CDJIG_H2,PNKO7,SUKSE,PUP1,CDTNKSE2,KBSKY2,PNKO7_M,NOHJO2"
			dbType		= "MCS0017BARG"
			tableId		= "3PAIN3"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017B( ?,?,?,?,? ) }
		</og:plsqlUpdate>
		<!-- 梱包補材 --><!-- KBSKY3追加 2016/09/05 MOD --><!-- PNKO8_M,NOHJO3追加 2016/10/31 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBSYU_P3,KBBTN,DEL3,KBNFLG3,SEQBAS52_3,PNOYA,CDJIG_H3,PNKO8,SUKSEBS,SUKSEBB,CDTNKSE3,KBSKY3,PNKO8_M,NOHJO3"
			dbType		= "MCS0017BARG"
			tableId		= "3PAIN4"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017B( ?,?,?,?,? ) }
		</og:plsqlUpdate>
	</og:equals>

	<!-- 削除 --><!-- 2017/05/17 MOD -->
	<og:equals val1="{@KBBTN}" val2="DELETE" >
		<!-- 製品補材 --><!-- KBSKY2追加 2016/09/05 MOD --><!-- PNKO7_M,NOHJO2追加 2016/10/31 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBSYU_P2,KBBTN,DEL2,KBNFLG2,SEQBAS52_2,PNOYA,CDJIG_H2,PNKO7,SUKSE,PUP1,CDTNKSE2,KBSKY2,PNKO7_M,NOHJO2"
			dbType		= "MCS0017BARG"
			tableId		= "3PAIN3"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017B( ?,?,?,?,? ) }
		</og:plsqlUpdate>
		<!-- 梱包補材 --><!-- KBSKY3追加 2016/09/05 MOD --><!-- PNKO8_M,NOHJO3追加 2016/10/31 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBSYU_P3,KBBTN,DEL3,KBNFLG3,SEQBAS52_3,PNOYA,CDJIG_H3,PNKO8,SUKSEBS,SUKSEBB,CDTNKSE3,KBSKY3,PNKO8_M,NOHJO3"
			dbType		= "MCS0017BARG"
			tableId		= "3PAIN4"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017B( ?,?,?,?,? ) }
		</og:plsqlUpdate>
		<!-- 品目ﾏｽﾀ --><!-- KBKN追加 2016/09/05 MOD --><!-- NMPN2,NMPN3追加 2016/10/21 MOD -->
		<!-- CDBUYK1,NONBASYO追加 2017/04/04 MOD --><!-- KJPN追加 2017/06/23 MOD -->
		<og:plsqlUpdate
			command		= "{@command}"
			names		= "KBBTN,PN,CDJIG1,NMPN,NMPN2,NMPN3,JCKATSU,NOZMN,CDTNZAI1,CDTNTHI1,KANZAN,CDSOKO1,KBMNS,SULOTMIN,KBHYOKA,KBLOT
							,SUIRI,CDHBND1,CDHBNT1,CDHBNS1,CDTOKU,CDBUYK1,SUAZK,KBJDU,BUDOM,KJPN
							,DEL,KBNFLG,KJUN,CDKT1,KBNG,WC,LTNY,TMHDND,TMHSGY,TKHC,CDTUKA1,KBTK,CDKMBN_SR1
							,SEQBAS51,SEQMRP60,SEQBAS53,SEQBAS54,KBKN,NONBASYO"
			dbType		= "MCS0017AARG"
			selectedAll	= "true"
			queryType	= "JDBCPLSQL" >
				{ call MCSS0017A( ?,?,?,?,? ) }
		</og:plsqlUpdate>
	</og:equals>
</og:transaction >

<!-- 2016/04/20 MOD -->
<og:equals val1="{@MEM.RETURN_TO_INPUT}" val2="TRUE" notEquals="true">
	<og:forward page="result.jsp" keys="command,SEL_ROW" vals="RENEW,{@RNUM}" target="CONTENTS.RESULT" />
</og:equals>
<og:equals val1="{@MEM.RETURN_TO_INPUT}" val2="TRUE">
	<og:forward page="result1.jsp" keys="command,SEL_ROW" vals="RENEW,{@RNUM}" />
</og:equals>

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