/*********************************************************************
* All Rights reserved,Copyright (c) K-Opticom
**********************************************************************
*ƒƒvƒƒOƒ‰ƒ€“à—e„
*   ƒVƒXƒeƒ€–¼      FeoŒÚ‹qŠîŠ²ƒVƒXƒeƒ€
*   ƒ‚ƒWƒ…[ƒ‹–¼    FJWCWCSV000102ReqChk
*   ƒ\[ƒXƒtƒ@ƒCƒ‹–¼FJWCWCSV000102ReqChk.java
*   ì¬ŽÒ          FFJ
*   “ú•t            F2011”N07ŒŽ04“ú
*ƒ‹@”\ŠT—v„
*   Ž‹’®§ŒäƒI[ƒ_‘—MƒT[ƒrƒX‚Ìˆ—ƒR[ƒhˆø“nŽÀs”»’è•”•i‚Å‚·B
*ƒC³—š—ð„
*   ƒo[ƒWƒ‡ƒ“  C³“ú       C³ŽÒ      C³“à—e
*   v1.00.00    2011/07/04   •xŽm’Ê    V‹Kì¬
*
**********************************************************************/
package com.fujitsu.futurity.bp.custom.reqchk;

import java.util.ArrayList;
import java.util.HashMap;

import com.fujitsu.futurity.bp.x21.bpm.common.AbstractCustomReqChk;
import com.fujitsu.futurity.bp.x21.bpm.common.IConditionValue;
import com.fujitsu.futurity.bp.x21.bpm.exception.RequestParameterException;
import com.fujitsu.futurity.bp.x21.bpm.parameter.IRequestParameterReadOnly;
import com.fujitsu.futurity.bp.x21.bpm.reqchk.exception.ReqChkException;

public class JWCWCSV000102ReqChk extends AbstractCustomReqChk {

	@Override
	public boolean checkExecution(IRequestParameterReadOnly arg0,
			IConditionValue arg1) throws ReqChkException {
		// BP’è‹`ƒc[ƒ‹‚ÅŽw’è‚µ‚½’l‚ðŽæ“¾‚·‚é
	
		HashMap sc;
		ArrayList msgList;
		String strCase;
		String strCase2;

		try
		{
			//‹Æ–±ƒpƒ‰ƒ[ƒ^ˆê——Æ‰ï(Remux)SCŽž
			if(((String)arg1.get("”äŠr’l")).equals("WCSV000103SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					strCase2 = (String)(sc).get("wctrl_req_trn_cd");
					if ((strCase.equals("01") && !strCase2.equals("85")) || strCase.equals("06"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//‹Æ–±ƒpƒ‰ƒ[ƒ^ˆê——Æ‰ï(TM)—Ìˆæ‚OSCŽž
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000104SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//‹Æ–±ƒpƒ‰ƒ[ƒ^ˆê——Æ‰ï(TM)—Ìˆæ‚PSCŽž
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000105SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//‹Æ–±ƒpƒ‰ƒ[ƒ^ˆê——Æ‰ï(TM)—Ìˆæ‚QSCŽž
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000106SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//‹Æ–±ƒpƒ‰ƒ[ƒ^ˆê——Æ‰ï(TM)—Ìˆæ‚RSCŽž
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000107SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//‘î“à‹@Šíˆê——Æ‰ïSCŽž
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000108SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06") || strCase.equals("09"))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//Ž‹’®§ŒäƒI[ƒ_‘ÎÛƒfƒWƒ^ƒ‹ƒeƒBƒAƒOƒ‹[ƒv“o˜^(Remux)SC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000110SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					strCase2 = (String)(sc).get("wctrl_req_trn_cd");
					if ((strCase.equals("01") && !strCase2.equals("85")) || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd1") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else if (strCase.equals("03") || (strCase.equals("01") && strCase2.equals("85")))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//Ž‹’®§ŒäƒI[ƒ_‘ÎÛƒfƒWƒ^ƒ‹ƒeƒBƒAƒOƒ‹[ƒv“o˜^(TM)—Ìˆæ‚OSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000111SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd2") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//Ž‹’®§ŒäƒI[ƒ_‘ÎÛƒfƒWƒ^ƒ‹ƒeƒBƒAƒOƒ‹[ƒv“o˜^(TM)—Ìˆæ‚PSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000112SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd3") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//Ž‹’®§ŒäƒI[ƒ_‘ÎÛƒfƒWƒ^ƒ‹ƒeƒBƒAƒOƒ‹[ƒv“o˜^(TM)—Ìˆæ‚QSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000113SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd4") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//Ž‹’®§ŒäƒI[ƒ_‘ÎÛƒfƒWƒ^ƒ‹ƒeƒBƒAƒOƒ‹[ƒv“o˜^(TM)—Ìˆæ‚RSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000114SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd5") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//ƒeƒBƒAƒOƒ‹[ƒv‘ÎÛƒeƒBƒAˆê——Æ‰ï(Remux)SC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000115SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					strCase2 = (String)(sc).get("wctrl_req_trn_cd");
					if ((strCase.equals("01") && !strCase2.equals("85")) || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd1") == null){
							return false;
						}
						else
						{
							return true;
						}
					} 
					else if (strCase.equals("03") || (strCase.equals("01") && strCase2.equals("85")))
					{
						return true;
					}
					else
					{
						return false;
					}
				}
			}
			//ƒeƒBƒAƒOƒ‹[ƒv‘ÎÛƒeƒBƒAˆê——Æ‰ï(TM)—Ìˆæ‚OSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000116SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd2") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//ƒeƒBƒAƒOƒ‹[ƒv‘ÎÛƒeƒBƒAˆê——Æ‰ï(TM)—Ìˆæ‚PSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000117SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd3") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//ƒeƒBƒAƒOƒ‹[ƒv‘ÎÛƒeƒBƒAˆê——Æ‰ï(TM)—Ìˆæ‚QSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000118SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd4") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//ƒeƒBƒAƒOƒ‹[ƒv‘ÎÛƒeƒBƒAˆê——Æ‰ï(TM)—Ìˆæ‚RSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000119SC"))
			{
				if(arg0.getData("WCSV000109SC") == null){
					return false;
				}
				else
				{
					sc = (HashMap)arg0.getData("WCSV000109SC");
					strCase = (String)(sc).get("wctrl_order_cd");
					if (strCase.equals("01") || strCase.equals("03") || strCase.equals("06"))
					{
						sc = (HashMap)arg0.getMappingWorkArea().get("WORK");
						if(sc == null || sc.get("dgtia_grp_cd5") == null){
							return false;
						}
						else
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
			}
			//STBî•ñXVSC
			else if(((String)arg1.get("”äŠr’l")).equals("WCSV000122SC"))
			{
				if(arg0.getData("WCSV000122SC") == null){
					return false;
				}
				else
				{
					return true;
				}
			}

		}
		catch (RequestParameterException e)
		{
			return false;
		}
		
		return true;

	}
}
