/*
 * MosP - Mind Open Source Project    http://www.mosp.jp/
 * Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package jp.mosp.kintai.vo;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import jp.mosp.common.CommonConst;
import jp.mosp.common.common.MospException;
import jp.mosp.common.common.MospUtility;
import jp.mosp.common.utils.DateUtil;
import jp.mosp.common.utils.TimeUtil;
import jp.mosp.kintai.dto.MSyukkinboDto;

/**
 * @author yoshida
 *
 */
public class AttendanceQuitCardVo extends AttendanceMenuVo {
	
	private static final long	serialVersionUID				= -5662028312748138291L;
	
	// パラメータ名
	public static final String	PRM_LBL_WORK_TYPE				= "lblWorkType";
	public static final String	PRM_TXT_QUIT_HOUR				= "txtQuitHour";
	public static final String	PRM_TXT_QUIT_MIN				= "txtQuitMin";
	public static final String	PRM_PLT_HALF_HOLIDAY			= "pltHalfHoliday";
	public static final String	PRM_TXT_WORK_HOUR				= "txtWorkHour";
	public static final String	PRM_TXT_WORK_MIN				= "txtWorkMin";
	public static final String	PRM_TXT_BREAK_HOUR				= "txtBreakHour";
	public static final String	PRM_TXT_BREAK_MIN				= "txtBreakMin";
	public static final String	PRM_LBL_ACTUAL_HOUR				= "lblActualHour";
	public static final String	PRM_LBL_ACTUAL_MIN				= "lblActualMin";
	
	public static final String	PRM_PLT_LEAVE_EARLY_REASON		= "pltLeaveEarlyReason";
	public static final String	PRM_TXT_LEAVE_EARLY_HOUR		= "txtLeaveEarlyHour";
	public static final String	PRM_TXT_LEAVE_EARLY_MIN			= "txtLeaveEarlyMin";
	public static final String	PRM_PLT_LEAVE_EARLY_CERTIFICATE	= "pltLeaveEarlyCertificate";
	public static final String	PRM_TXT_LEAVE_EARLY_COMMENT		= "txtLeaveEarlyComment";
	
	public static final String	PRM_TXT_OVER_HOUR				= "txtOverHour";
	public static final String	PRM_TXT_OVER_MIN				= "txtOverMin";
	public static final String	PRM_TXT_WORK_ON_HOLIDAY_HOUR	= "txtWorkOnHolidayHour";
	public static final String	PRM_TXT_WORK_ON_HOLIDAY_MIN		= "txtWorkOnHolidayMin";
	public static final String	PRM_TXT_LATE_NIGHT_HOUR			= "txtLateNightHour";
	public static final String	PRM_TXT_LATE_NIGHT_MIN			= "txtLateNightMin";
	
	public static final String	PRM_CKB_SYOKUJI					= "ckbSyokuji";
	public static final String	PRM_CKB_CYOKU1					= "ckbCyoku1";
	public static final String	PRM_CKB_CYOKU2					= "ckbCyoku2";
	public static final String	PRM_CKB_CYOKU3					= "ckbCyoku3";
	public static final String	PRM_CKB_HOKA1					= "ckbHoka1";
	public static final String	PRM_CKB_HOKA2					= "ckbHoka2";
	public static final String	PRM_CKB_HOKA3					= "ckbHoka3";
	public static final String	PRM_CKB_HOKA4					= "ckbHoka4";
	public static final String	PRM_CKB_HOKA5					= "ckbHoka5";
	
	// フィールド名及び制限
	public String				NAM_WORKING_TYPE;
	public String				NAM_QUIT_TIME;
	public String				NAM_QUIT_TIME_HOUR;
	public String				NAM_QUIT_TIME_MIN;
	public String				NAM_HALF_HOLIDAY;
	public String				NAM_WORKING_TIME;
	public String				NAM_WORKING_TIME_HOUR;
	public String				NAM_WORKING_TIME_MIN;
	public String				NAM_INTERVAL_TIME;
	public String				NAM_INTERVAL_TIME_HOUR;
	public String				NAM_INTERVAL_TIME_MIN;
	public String				NAM_ACTUAL_WORK_TIME;
	public String				NAM_LEAVE_EARLY_REASON;
	public String				NAM_LEAVE_EARLY_TIME;
	public String				NAM_LEAVE_EARLY_TIME_HOUR;
	public String				NAM_LEAVE_EARLY_TIME_MIN;
	public String				NAM_LEAVE_EARLY_CERTIFICATE;
	public String				NAM_LEAVE_EARLY_COMMENT;
	public String				NAM_OVER_TIME_HOUR;
	public String				NAM_OVER_TIME_MIN;
	public String				NAM_WORK_ON_HOLIDAY;
	public String				NAM_WORK_ON_HOLIDAY_HOUR;
	public String				NAM_WORK_ON_HOLIDAY_MIN;
	public String				NAM_LATE_NIGHT;
	public String				NAM_LATE_NIGHT_HOUR;
	public String				NAM_LATE_NIGHT_MIN;
	public String				NAM_ALLOWANCE;
	public int					LEN_HOUR;
	public int					LEN_MIN;
	public int					LEN_COMMENT;
	
	// フィールド
	private String				lblWorkType;
	private String				txtQuitHour;
	private String				txtQuitMin;
	private String				pltHalfHoliday;
	private String				txtWorkHour;
	private String				txtWorkMin;
	private String				txtBreakHour;
	private String				txtBreakMin;
	private String				lblActualHour;
	private String				lblActualMin;
	
	private String				pltLeaveEarlyReason;
	private String				txtLeaveEarlyHour;
	private String				txtLeaveEarlyMin;
	private String				pltLeaveEarlyCertificate;
	private String				txtLeaveEarlyComment;
	
	private String				txtOverHour;
	private String				txtOverMin;
	private String				txtWorkOnHolidayHour;
	private String				txtWorkOnHolidayMin;
	private String				txtLateNightHour;
	private String				txtLateNightMin;
	
	private String				ckbSyokuji;
	private String				ckbCyoku1;
	private String				ckbCyoku2;
	private String				ckbCyoku3;
	private String				ckbHoka1;
	private String				ckbHoka2;
	private String				ckbHoka3;
	private String				ckbHoka4;
	private String				ckbHoka5;
	
	// 手当名称
	public String[][]			aryAllowance;
	// 勤務形態
	public String[][]			aryWorkType;
	
	// プルダウンリスト
	public String[][]			aryPltLeaveEarlyReason;
	public String[][]			aryPltLeaveEarlyCertificate;
	public String[][]			aryPltHalfHoliday;
	

	/**
	 * コンストラクタ
	 */
	public AttendanceQuitCardVo() {
		super();
		setViewPath(getClassName());
		setMode(MODE_EDIT);
		aryAllowance = new String[0][0];
		aryWorkType = new String[0][0];
		addAttendanceMenuCss();
		addAttendanceMenuJs();
	}
	
	@Override
	protected void setSubTitle() {
		subTitle = CommonConst.NAM_INPUT_QUIT;
	}
	
	@Override
	protected void setFieldsName() {
		super.setFieldsName();
		NAM_WORKING_TYPE = CommonConst.NAM_WORKING_TYPE;
		NAM_QUIT_TIME = CommonConst.NAM_QUIT_TIME + CommonConst.NAM_TIME;
		NAM_QUIT_TIME_HOUR = CommonConst.NAM_QUIT_TIME + CommonConst.NAM_TIME + CommonConst.MSG_HOUR;
		NAM_QUIT_TIME_MIN = CommonConst.NAM_QUIT_TIME + CommonConst.NAM_TIME + CommonConst.MSG_MINUTES;
		NAM_HALF_HOLIDAY = CommonConst.NAM_VACATION_LEAVE_HALF + CommonConst.NAM_COMMON_TYPE;
		NAM_WORKING_TIME = CommonConst.NAM_WORKING + CommonConst.NAM_COMMON_TIME;
		NAM_WORKING_TIME_HOUR = CommonConst.NAM_WORKING + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_WORKING_TIME_MIN = CommonConst.NAM_WORKING + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_MINUTES;
		NAM_INTERVAL_TIME = CommonConst.NAM_INTERVAL_TIME + CommonConst.NAM_COMMON_TIME;
		NAM_INTERVAL_TIME_HOUR = CommonConst.NAM_INTERVAL_TIME + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_INTERVAL_TIME_MIN = CommonConst.NAM_INTERVAL_TIME + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_MINUTES;
		NAM_ACTUAL_WORK_TIME = CommonConst.NAM_ACTUAL_WORK_TIME + CommonConst.NAM_COMMON_TIME;
		NAM_LEAVE_EARLY_REASON = CommonConst.NAM_LEAVE_EARLY + CommonConst.NAM_REASON;
		NAM_LEAVE_EARLY_TIME = CommonConst.NAM_LEAVE_EARLY + CommonConst.NAM_COMMON_TIME;
		NAM_LEAVE_EARLY_TIME_HOUR = CommonConst.NAM_LEAVE_EARLY + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_LEAVE_EARLY_TIME_MIN = CommonConst.NAM_LEAVE_EARLY + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_MINUTES;
		NAM_LEAVE_EARLY_CERTIFICATE = CommonConst.NAM_CERTIFICATE;
		NAM_LEAVE_EARLY_COMMENT = CommonConst.NAM_COMMENT;
		NAM_OVER_TIME = CommonConst.NAM_OVERTIME + CommonConst.NAM_COMMON_TIME;
		NAM_OVER_TIME_HOUR = CommonConst.NAM_OVERTIME + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_OVER_TIME_MIN = CommonConst.NAM_OVERTIME + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_MINUTES;
		NAM_WORK_ON_HOLIDAY = CommonConst.NAM_WORK_ON_HOLIDAY + CommonConst.NAM_COMMON_TIME;
		NAM_WORK_ON_HOLIDAY_HOUR = CommonConst.NAM_WORK_ON_HOLIDAY + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_WORK_ON_HOLIDAY_MIN = CommonConst.NAM_WORK_ON_HOLIDAY + CommonConst.NAM_COMMON_TIME
				+ CommonConst.MSG_MINUTES;
		NAM_LATE_NIGHT = CommonConst.NAM_LATE_NIGHT + CommonConst.NAM_COMMON_TIME;
		NAM_LATE_NIGHT_HOUR = CommonConst.NAM_LATE_NIGHT + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_HOUR;
		NAM_LATE_NIGHT_MIN = CommonConst.NAM_LATE_NIGHT + CommonConst.NAM_COMMON_TIME + CommonConst.MSG_MINUTES;
		NAM_ALLOWANCE = CommonConst.NAM_ALLOWANCE;
		LEN_HOUR = CommonConst.LEN_TIME_HOUR;
		LEN_MIN = CommonConst.LEN_TIME_MIN;
		LEN_COMMENT = CommonConst.LEN_COMMENT;
	}
	
	/**
	 * パラメータ設定
	 * @param request リクエスト
	 */
	@Override
	public void setParams(HttpServletRequest request) {
		super.setParams(request);
		txtQuitHour = request.getParameter(PRM_TXT_QUIT_HOUR);
		txtQuitMin = request.getParameter(PRM_TXT_QUIT_MIN);
		pltHalfHoliday = request.getParameter(PRM_PLT_HALF_HOLIDAY);
		txtWorkHour = request.getParameter(PRM_TXT_WORK_HOUR);
		txtWorkMin = request.getParameter(PRM_TXT_WORK_MIN);
		txtBreakHour = request.getParameter(PRM_TXT_BREAK_HOUR);
		txtBreakMin = request.getParameter(PRM_TXT_BREAK_MIN);
		pltLeaveEarlyReason = request.getParameter(PRM_PLT_LEAVE_EARLY_REASON);
		txtLeaveEarlyHour = request.getParameter(PRM_TXT_LEAVE_EARLY_HOUR);
		txtLeaveEarlyMin = request.getParameter(PRM_TXT_LEAVE_EARLY_MIN);
		pltLeaveEarlyCertificate = request.getParameter(PRM_PLT_LEAVE_EARLY_CERTIFICATE);
		txtLeaveEarlyComment = request.getParameter(PRM_TXT_LEAVE_EARLY_COMMENT);
		txtOverHour = request.getParameter(PRM_TXT_OVER_HOUR);
		txtOverMin = request.getParameter(PRM_TXT_OVER_MIN);
		txtWorkOnHolidayHour = request.getParameter(PRM_TXT_WORK_ON_HOLIDAY_HOUR);
		txtWorkOnHolidayMin = request.getParameter(PRM_TXT_WORK_ON_HOLIDAY_MIN);
		txtLateNightHour = request.getParameter(PRM_TXT_LATE_NIGHT_HOUR);
		txtLateNightMin = request.getParameter(PRM_TXT_LATE_NIGHT_MIN);
		ckbSyokuji = getCheckBoxParam(request.getParameter(PRM_CKB_SYOKUJI));
		ckbCyoku1 = getCheckBoxParam(request.getParameter(PRM_CKB_CYOKU1));
		ckbCyoku2 = getCheckBoxParam(request.getParameter(PRM_CKB_CYOKU2));
		ckbCyoku3 = getCheckBoxParam(request.getParameter(PRM_CKB_CYOKU3));
		ckbHoka1 = getCheckBoxParam(request.getParameter(PRM_CKB_HOKA1));
		ckbHoka2 = getCheckBoxParam(request.getParameter(PRM_CKB_HOKA2));
		ckbHoka3 = getCheckBoxParam(request.getParameter(PRM_CKB_HOKA3));
		ckbHoka4 = getCheckBoxParam(request.getParameter(PRM_CKB_HOKA4));
		ckbHoka5 = getCheckBoxParam(request.getParameter(PRM_CKB_HOKA5));
		
	}
	
	/**
	 * フィールド設定
	 * @param dto	対象DTO
	 * @throws MospException 
	 */
	public void setFields(MSyukkinboDto dto) {
		txtQuitHour = TimeUtil.convStringTimeToStringHour(dto.getTaJikoku());
		txtQuitMin = TimeUtil.convStringTimeToStringMinutes(dto.getTaJikoku());
		pltHalfHoliday = dto.getTHankyuKb();
		txtWorkHour = TimeUtil.convIntegerTimeToStringHour(dto.getKinmuJi());
		txtWorkMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getKinmuJi());
		txtBreakHour = TimeUtil.convIntegerTimeToStringHour(dto.getKyukeiJi());
		txtBreakMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getKyukeiJi());
		pltLeaveEarlyReason = dto.getSoRiyuu();
		txtLeaveEarlyHour = TimeUtil.convIntegerTimeToStringHour(dto.getSoJikan());
		txtLeaveEarlyMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getSoJikan());
		pltLeaveEarlyCertificate = dto.getSoSyoumei();
		txtLeaveEarlyComment = dto.getSoComent();
		txtOverHour = TimeUtil.convIntegerTimeToStringHour(dto.getZaJikan());
		txtOverMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getZaJikan());
		txtWorkOnHolidayHour = TimeUtil.convIntegerTimeToStringHour(dto.getKsJikan());
		txtWorkOnHolidayMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getKsJikan());
		txtLateNightHour = TimeUtil.convIntegerTimeToStringHour(dto.getSnJikan());
		txtLateNightMin = TimeUtil.convIntegerTimeToStringMinutes(dto.getSnJikan());
		ckbSyokuji = String.valueOf(dto.getSyokuji());
		ckbCyoku1 = String.valueOf(dto.getCyoku1());
		ckbCyoku2 = String.valueOf(dto.getCyoku2());
		ckbCyoku3 = String.valueOf(dto.getCyoku3());
		ckbHoka1 = String.valueOf(dto.getHoka1());
		ckbHoka2 = String.valueOf(dto.getHoka2());
		ckbHoka3 = String.valueOf(dto.getHoka3());
		ckbHoka4 = String.valueOf(dto.getHoka4());
		ckbHoka5 = String.valueOf(dto.getHoka5());
	}
	
	/**
	 * フィールド設定(DTOに対するVO情報のセット)
	 * @param dto	対象DTO
	 */
	@Override
	public void setDtoFields(MSyukkinboDto dto) {
		super.setDtoFields(dto);
		dto.setTaJikoku(TimeUtil.convStringTimeFormatted(txtQuitHour, txtQuitMin));
		dto.setTHankyuKb(pltHalfHoliday);
		dto.setKinmuJi(TimeUtil.convStringTimeToIntegerTime(txtWorkHour, txtWorkMin));
		dto.setKyukeiJi(TimeUtil.convStringTimeToIntegerTime(txtBreakHour, txtBreakMin));
		dto.setSoRiyuu(pltLeaveEarlyReason);
		dto.setSoJikan(TimeUtil.convStringTimeToIntegerTime(txtLeaveEarlyHour, txtLeaveEarlyMin));
		dto.setSoSyoumei(pltLeaveEarlyCertificate);
		dto.setSoComent(txtLeaveEarlyComment);
		dto.setZaJikan(TimeUtil.convStringTimeToIntegerTime(txtOverHour, txtOverMin));
		dto.setKsJikan(TimeUtil.convStringTimeToIntegerTime(txtWorkOnHolidayHour, txtWorkOnHolidayMin));
		dto.setSnJikan(TimeUtil.convStringTimeToIntegerTime(txtLateNightHour, txtLateNightMin));
		dto.setSyokuji(Integer.parseInt(ckbSyokuji));
		dto.setCyoku1(Integer.parseInt(ckbCyoku1));
		dto.setCyoku2(Integer.parseInt(ckbCyoku2));
		dto.setCyoku3(Integer.parseInt(ckbCyoku3));
		dto.setHoka1(Integer.parseInt(ckbHoka1));
		dto.setHoka2(Integer.parseInt(ckbHoka2));
		dto.setHoka3(Integer.parseInt(ckbHoka3));
		dto.setHoka4(Integer.parseInt(ckbHoka4));
		dto.setHoka5(Integer.parseInt(ckbHoka5));
		dto.setTaTimes(DateUtil.getDateTime(DateUtil.getNowDate()));
		dto.setSnRiyuu(CommonConst.NUM_ATTENDANCE_REQUEST);
		dto.setUpdtTimes(DateUtil.getDateTime(DateUtil.getNowDate()));
	}
	
	/**
	 * フィールド初期化
	 */
	public void initFields() {
		Date nowDate = new Date();
		txtQuitHour = String.valueOf(MospUtility.getHour(nowDate));
		txtQuitMin = String.valueOf(MospUtility.getMinute(nowDate));
		pltHalfHoliday = "";
		txtWorkHour = "0";
		txtWorkMin = "0";
		txtBreakHour = "0";
		txtBreakMin = "0";
		pltLeaveEarlyReason = "";
		txtLeaveEarlyHour = "0";
		txtLeaveEarlyMin = "0";
		pltLeaveEarlyCertificate = "";
		txtLeaveEarlyComment = "";
		txtOverHour = "0";
		txtOverMin = "0";
		txtWorkOnHolidayHour = "0";
		txtWorkOnHolidayMin = "0";
		txtLateNightHour = "0";
		txtLateNightMin = "0";
		ckbSyokuji = "0";
		ckbCyoku1 = "0";
		ckbCyoku2 = "0";
		ckbCyoku3 = "0";
		ckbHoka1 = "0";
		ckbHoka2 = "0";
		ckbHoka3 = "0";
		ckbHoka4 = "0";
		ckbHoka5 = "0";
	}
	
	/**
	 * ラベル表示項目セット
	 * @param dto	対象DTO
	 */
	public void setLabelInfo(MSyukkinboDto dto) {
		// 勤務形態名称のセット
		setLblWorkType(getCodeName(dto.getKinmu(), aryWorkType));
		// 実働時間のセット
		// 実働時間 = 勤務時間 - 休憩時間（残業休憩時間含む）
		int actual = 0;
		if (dto.getKinmuJi() != 0) {
			actual = dto.getKinmuJi() - dto.getKyukeiJi();
		}
		setLblActualHour(TimeUtil.convIntegerTimeToStringHour(actual));
		setLblActualMin(TimeUtil.convIntegerTimeToStringMinutes(actual));
	}
	
	/**
	 * フィールドの妥当性確認
	 * @throws MospException
	 */
	public void validate() throws MospException {
		// 妥当性確認開始時処理
		startValidation();
		// 必須確認
		checkRequired(txtQuitHour, NAM_QUIT_TIME, PRM_TXT_QUIT_HOUR);
		checkRequired(txtQuitMin, NAM_QUIT_TIME, PRM_TXT_QUIT_MIN);
		checkRequired(txtWorkHour, NAM_WORKING_TIME, PRM_TXT_WORK_HOUR);
		checkRequired(txtWorkMin, NAM_WORKING_TIME, PRM_TXT_WORK_MIN);
		checkRequired(txtBreakHour, NAM_INTERVAL_TIME, PRM_TXT_BREAK_HOUR);
		checkRequired(txtBreakMin, NAM_INTERVAL_TIME, PRM_TXT_BREAK_MIN);
		checkRequired(txtLeaveEarlyHour, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_HOUR);
		checkRequired(txtLeaveEarlyMin, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_MIN);
		checkRequired(txtOverHour, NAM_OVER_TIME, PRM_TXT_OVER_HOUR);
		checkRequired(txtOverMin, NAM_OVER_TIME, PRM_TXT_OVER_MIN);
		checkRequired(txtWorkOnHolidayHour, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_HOUR);
		checkRequired(txtWorkOnHolidayMin, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_MIN);
		checkRequired(txtLateNightHour, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_HOUR);
		checkRequired(txtLateNightMin, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_MIN);
		
		// 数字確認
		checkNumber(txtQuitHour, NAM_QUIT_TIME, PRM_TXT_QUIT_HOUR);
		checkNumber(txtQuitMin, NAM_QUIT_TIME, PRM_TXT_QUIT_MIN);
		checkNumber(txtWorkHour, NAM_WORKING_TIME, PRM_TXT_WORK_HOUR);
		checkNumber(txtWorkMin, NAM_WORKING_TIME, PRM_TXT_WORK_MIN);
		checkNumber(txtBreakHour, NAM_INTERVAL_TIME, PRM_TXT_BREAK_HOUR);
		checkNumber(txtBreakMin, NAM_INTERVAL_TIME, PRM_TXT_BREAK_MIN);
		checkNumber(txtLeaveEarlyHour, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_HOUR);
		checkNumber(txtLeaveEarlyMin, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_MIN);
		checkNumber(txtOverHour, NAM_OVER_TIME, PRM_TXT_OVER_HOUR);
		checkNumber(txtOverMin, NAM_OVER_TIME, PRM_TXT_OVER_MIN);
		checkNumber(txtWorkOnHolidayHour, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_HOUR);
		checkNumber(txtWorkOnHolidayMin, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_MIN);
		checkNumber(txtLateNightHour, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_HOUR);
		checkNumber(txtLateNightMin, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_MIN);
		
		// 長さ確認	
		checkLength(txtQuitHour, LEN_HOUR, NAM_QUIT_TIME, PRM_TXT_QUIT_HOUR);
		checkLength(txtQuitMin, LEN_MIN, NAM_QUIT_TIME, PRM_TXT_QUIT_MIN);
		checkLength(txtWorkHour, LEN_HOUR, NAM_WORKING_TIME, PRM_TXT_WORK_HOUR);
		checkLength(txtWorkMin, LEN_MIN, NAM_WORKING_TIME, PRM_TXT_WORK_MIN);
		checkLength(txtBreakHour, LEN_HOUR, NAM_INTERVAL_TIME, PRM_TXT_BREAK_HOUR);
		checkLength(txtBreakMin, LEN_MIN, NAM_INTERVAL_TIME, PRM_TXT_BREAK_MIN);
		checkLength(txtLeaveEarlyHour, LEN_HOUR, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_HOUR);
		checkLength(txtLeaveEarlyMin, LEN_MIN, NAM_LEAVE_EARLY_TIME, PRM_TXT_LEAVE_EARLY_MIN);
		checkLength(txtOverHour, LEN_HOUR, NAM_OVER_TIME, PRM_TXT_OVER_HOUR);
		checkLength(txtOverMin, LEN_MIN, NAM_OVER_TIME, PRM_TXT_OVER_MIN);
		checkLength(txtWorkOnHolidayHour, LEN_HOUR, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_HOUR);
		checkLength(txtWorkOnHolidayMin, LEN_MIN, NAM_WORK_ON_HOLIDAY, PRM_TXT_WORK_ON_HOLIDAY_MIN);
		checkLength(txtLateNightHour, LEN_HOUR, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_HOUR);
		checkLength(txtLateNightMin, LEN_MIN, NAM_LATE_NIGHT, PRM_TXT_LATE_NIGHT_MIN);
		
		checkLength(txtLeaveEarlyComment, LEN_COMMENT, NAM_LEAVE_EARLY_COMMENT, PRM_TXT_LEAVE_EARLY_COMMENT);
		
		// 妥当性確認終了時処理
		endValidation();
	}
	
	// アクセサメソッド
	public String getTxtQuitHour() {
		return txtQuitHour;
	}
	
	public String getTxtQuitMin() {
		return txtQuitMin;
	}
	
	public String getPltHalfHoliday() {
		return pltHalfHoliday;
	}
	
	public String getTxtWorkHour() {
		return txtWorkHour;
	}
	
	public String getTxtWorkMin() {
		return txtWorkMin;
	}
	
	public String getTxtBreakHour() {
		return txtBreakHour;
	}
	
	public String getTxtBreakMin() {
		return txtBreakMin;
	}
	
	public String getPltLeaveEarlyReason() {
		return pltLeaveEarlyReason;
	}
	
	public String getTxtLeaveEarlyHour() {
		return txtLeaveEarlyHour;
	}
	
	public String getTxtLeaveEarlyMin() {
		return txtLeaveEarlyMin;
	}
	
	public String getPltLeaveEarlyCertificate() {
		return pltLeaveEarlyCertificate;
	}
	
	public String getTxtLeaveEarlyComment() {
		return txtLeaveEarlyComment;
	}
	
	public String getTxtOverHour() {
		return txtOverHour;
	}
	
	public String getTxtOverMin() {
		return txtOverMin;
	}
	
	public String getTxtWorkOnHolidayHour() {
		return txtWorkOnHolidayHour;
	}
	
	public String getTxtWorkOnHolidayMin() {
		return txtWorkOnHolidayMin;
	}
	
	public String getTxtLateNightHour() {
		return txtLateNightHour;
	}
	
	public String getTxtLateNightMin() {
		return txtLateNightMin;
	}
	
	public String getCkbSyokuji() {
		return ckbSyokuji;
	}
	
	public String getCkbCyoku1() {
		return ckbCyoku1;
	}
	
	public String getCkbCyoku2() {
		return ckbCyoku2;
	}
	
	public String getCkbCyoku3() {
		return ckbCyoku3;
	}
	
	public String getCkbHoka1() {
		return ckbHoka1;
	}
	
	public String getCkbHoka2() {
		return ckbHoka2;
	}
	
	public String getCkbHoka3() {
		return ckbHoka3;
	}
	
	public String getCkbHoka4() {
		return ckbHoka4;
	}
	
	public String getCkbHoka5() {
		return ckbHoka5;
	}
	
	public String getEscTxtQuitHour() {
		return escapeHTML(txtQuitHour);
	}
	
	public String getEscTxtQuitMin() {
		return escapeHTML(txtQuitMin);
	}
	
	public String getEscPltHalfHoliday() {
		return escapeHTML(pltHalfHoliday);
	}
	
	public String getEscTxtWorkHour() {
		return escapeHTML(txtWorkHour);
	}
	
	public String getEscTxtWorkMin() {
		return escapeHTML(txtWorkMin);
	}
	
	public String getEscTxtBreakHour() {
		return escapeHTML(txtBreakHour);
	}
	
	public String getEscTxtBreakMin() {
		return escapeHTML(txtBreakMin);
	}
	
	public String getEscPltLeaveEarlyReason() {
		return escapeHTML(pltLeaveEarlyReason);
	}
	
	public String getEscTxtLeaveEarlyHour() {
		return escapeHTML(txtLeaveEarlyHour);
	}
	
	public String getEscTxtLeaveEarlyMin() {
		return escapeHTML(txtLeaveEarlyMin);
	}
	
	public String getEscPltLeaveEarlyCertificate() {
		return escapeHTML(pltLeaveEarlyCertificate);
	}
	
	public String getEscTxtLeaveEarlyComment() {
		return escapeHTML(txtLeaveEarlyComment);
	}
	
	public String getEscTxtOverHour() {
		return escapeHTML(txtOverHour);
	}
	
	public String getEscTxtOverMin() {
		return escapeHTML(txtOverMin);
	}
	
	public String getEscTxtWorkOnHolidayHour() {
		return escapeHTML(txtWorkOnHolidayHour);
	}
	
	public String getEscTxtWorkOnHolidayMin() {
		return escapeHTML(txtWorkOnHolidayMin);
	}
	
	public String getEscTxtLateNightHour() {
		return escapeHTML(txtLateNightHour);
	}
	
	public String getEscTxtLateNightMin() {
		return escapeHTML(txtLateNightMin);
	}
	
	public String getEscCkbSyokuji() {
		return getCheckBoxChecked(ckbSyokuji);
	}
	
	public String getEscCkbCyoku1() {
		return getCheckBoxChecked(ckbCyoku1);
	}
	
	public String getEscCkbCyoku2() {
		return getCheckBoxChecked(ckbCyoku2);
	}
	
	public String getEscCkbCyoku3() {
		return getCheckBoxChecked(ckbCyoku3);
	}
	
	public String getEscCkbHoka1() {
		return getCheckBoxChecked(ckbHoka1);
	}
	
	public String getEscCkbHoka2() {
		return getCheckBoxChecked(ckbHoka2);
	}
	
	public String getEscCkbHoka3() {
		return getCheckBoxChecked(ckbHoka3);
	}
	
	public String getEscCkbHoka4() {
		return getCheckBoxChecked(ckbHoka4);
	}
	
	public String getEscCkbHoka5() {
		return getCheckBoxChecked(ckbHoka5);
	}
	
	public String getEscLblWorkType() {
		return escapeHTML(lblWorkType);
	}
	
	public String getEscLblActualHour() {
		return escapeHTML(lblActualHour);
	}
	
	public String getEscLblActualMin() {
		return escapeHTML(lblActualMin);
	}
	
	public void setLblWorkType(String lblWorkType) {
		this.lblWorkType = lblWorkType;
	}
	
	public void setLblActualHour(String lblActualHour) {
		this.lblActualHour = lblActualHour;
	}
	
	public void setLblActualMin(String lblActualMin) {
		this.lblActualMin = lblActualMin;
	}
	
	public String[][] getAryAllowance() {
		return aryAllowance.clone();
	}
	
}
