/*********************************************************************
*  All Rights reserved,Copyright (c) Fujitsu ,2011					 *
**********************************************************************
*＜プログラム内容＞
*	システム名			：eo顧客基幹システム
*	モジュール名		：JBSbatCHKsdkcpNkinSksi
*	ソースファイル名	：JBSbatCHKsdkcpNkinSksi.java
*	作成者				：富士通　
*	作成日				：2011年11月04日
*＜機能概要＞
*　コンビニ入金表作成部品です。
*＜修正履歴＞
*	バージョン	修正日		修正者		修正内容
*   v32.00.00	2017/04/27	FJ)西面		【ANK-2996-00-00】SMSを利用した即時決済
*   v45.00.00	2019/06/21	FJ)河邊		【OM-2019-0000568】決済代行入金表　入金取消集計誤り
*   v59.00.00	2022/04/18	FJ)吉田		【ANK-4160-00-00】SMBC即時決済入金会計システム化対応
*********************************************************************/
package eo.business.service;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import eo.business.common.JACbatDebugLogUtil;
import eo.business.common.JBSbatBusinessService;
import eo.business.common.JCHbatSeikyKaknoBusinessUtil;
import eo.business.util.file.JBSbatCHIFE039;
import eo.business.util.file.JBSbatCHIFM116;
import eo.business.util.table.JBSbatZM_M_CD_NM_KANRI;
import eo.common.constant.JACStrConst;
import eo.common.constant.JPCBatchMessageConstant;
import eo.common.constant.JZM0171Constant;
import eo.common.util.JCHCommonFormatUtil;
import eo.common.util.JCHStampDutyUtil;
import eo.common.util.JPCUtilCommon;
import eo.framework.application.JBSbatBusinessException;
import eo.framework.db.JBSbatSQLAccess;
import eo.framework.item.JBSbatCommonDBInterface;
import eo.framework.item.JBSbatCommonItem;
import eo.framework.item.JBSbatOutputItem;
import eo.framework.item.JBSbatServiceInterfaceMap;

/**
* (クラスの機能概要) <p>
*<BR>
* @author 富士通
*/
public class JBSbatCHKsdkcpNkinSksi extends JBSbatBusinessService
{
	/**▼▼▼▼▼▼ツールから生成した宣言です 開始▼▼▼▼▼▼*/
	/**▲▲▲▲▲▲ツールから生成した宣言です 終了▲▲▲▲▲▲*/

	/** 退避．キー項目１ */
	private String befSaveKey1 = null;
	
	/** 退避．キー項目２ */
	private String befSaveKey2 = null;
	
	/** 退避．キー項目３ */
	private String befSaveKey3 = null;
	
	/** 退避．キー項目４ */
	private String befSaveKey4 = null;
	
	/** 退避．キー項目５ */
	private String befSaveKey5 = null;
	
	/** 入力．キー項目１ */
	private String inSaveKey1 = null;
	
	/** 入力．キー項目２ */
	private String inSaveKey2 = null;
	
	/** 入力．キー項目３ */
	private String inSaveKey3 = null;
	
	/** 入力．キー項目４ */
	private String inSaveKey4 = null;
	
	/** 入力．キー項目５ */
	private String inSaveKey5 = null;
	
	/** ファイル編集用 */
	private HashMap<String, String> fileEdit = null;
	
	/** 集計項目（明細） */
	private HashMap<String, BigDecimal> shukMeisaiMap = null;
	
	/** 集計項目（小計） */
	private HashMap<String, BigDecimal> shukSyokeiMap = null;
	
	/** 集計項目（前月収納） */
	private HashMap<String, BigDecimal> shukLastShunoMap = null;
	
	/** 集計項目（当月収納） */
	private HashMap<String, BigDecimal> shukThisShunoMap = null;
	
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//	/** 集計項目（翌月収納） */
//	private HashMap<String, BigDecimal> shukNextShunoMap = null;
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
	
	/** 集計項目（収納補正） */
	private HashMap<String, BigDecimal> shukShunoHoseiMap = null;
	
	/** 集計項目（合計） */
	private HashMap<String, BigDecimal> shukGoukeiMap = null;
	
	/** コンビニ収納区分（ＣＰ） */
	private static final String CVS_SHUNO_DIV_NOMAL = "通常";
	
	/** コンビニ収納区分（リアル） */
	private static final String CVS_SHUNO_DIV_REAL = "リアル";
	
	/** 請求収納業務共通クラス */
	private JCHbatSeikyKaknoBusinessUtil chBusinessUtil = null;
	
	/** 編集用文字列（月度） */
	private static final String MONTH = "月度";
	
	/** 編集用 文字数制限値（２６） */
	private static final int MOJISUU_26 = 26;
	
	/** 編集用文字列（小計） */
	private static final String SMALL_SUM = "小計";
	
	/** 編集用文字列（合計（前月収納）） */
	private static final String GK_LAST_SUM = "合計（前月収納）";
	
	/** 編集用文字列（合計（合計（当月収納））） */
	private static final String GK_THIS_SUM = "合計（当月収納）";
	
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//	/** 編集用文字列（合計（翌月収納）） */
//	private static final String GK_NEXT_SUM = "合計（翌月収納）";
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
	
	/** 編集用文字列（合計（収納補正）） */
	private static final String GK_HOSEI_SUM = "合計（収納補正）";
	
	/** 編集用文字列（合計） */
	private static final String GK_GOUKEI_SUM = "合計";
	
	/** 固定値　BigDecimal 「0」*/
	private static final BigDecimal BIGDECIMAL_ZERO = new BigDecimal("0");
	
	/** 固定値　BigDecimal 「1」*/
	private static final BigDecimal BIGDECIMAL_ONE = new BigDecimal("1");
	
	/** グルーピングフラグ コンビニ会社名フラグ */
	private static boolean cvsStoreFlg = true;
	
	/** グルーピングフラグ 入金予定日フラグ */
	private static boolean nkinRsvdFlg = true;
	
	/** 収納管理帳票処理区分 */
	private HashMap<String, String> shunoKbnMap = null;

	/** テーブル(コード名称管理)*/
	private static final String D_TBL_NAME_ZM_M_CD_NM_KANRI = "ZM_M_CD_NM_KANRI";

	/** SQL定義キー(CH_SELECT_005)*/
	private static final String ZM_M_CD_NM_KANRI_CH_SELECT_005 = "CH_SELECT_005";

	/** テーブルアクセスクラス(コード名称管理)*/
	private JBSbatSQLAccess db_ZM_M_CD_NM_KANRI = null;

	/** 収入印紙判定金額 */
	private BigDecimal receiptAmnt = null;
	
	/** 収入印紙マスクラグ判定金額退避マップ */
	private Map<String, BigDecimal> inshiMaskAmntMap = new HashMap<String, BigDecimal> ();

	/**
	 * 初期処理
	 * @param JBSbatCommonItem commonItem　バッチ共通パラメータ電文
	 * @throws Exception
	 */
	public void initial(JBSbatCommonItem commonItem) throws Exception
	{
	/**▼▼▼▼▼▼業務サービスの初期処理を記述してください。▼▼▼▼▼▼*/
		/**▼▼▼▼▼▼ツールから生成した初期化のソースです 開始▼▼▼▼▼▼*/
		
		// 共通パラメータを設定します
		super.setCommonInfo(commonItem);
		/**▲▲▲▲▲▲ツールから生成した初期化のソースです 終了▲▲▲▲▲▲*/
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][initial]");
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][initial][opeDate=" + super.opeDate + "]");
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][initial][freeItem=" + super.freeItem + "]");

		// DBアクセスクラスを生成します
		db_ZM_M_CD_NM_KANRI = new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_M_CD_NM_KANRI);

		// 請求収納業務共通クラスのインスタンス生成
		chBusinessUtil = new JCHbatSeikyKaknoBusinessUtil(commonItem);
		
		// 退避情報初期化
		shukMeisaiMap 		= formSyukei();	// 集計項目（明細）
		shukSyokeiMap 		= formSyukei();	// 集計項目（小計）
		shukLastShunoMap	= formSyukei();	// 集計項目（前月収納）
		shukThisShunoMap 	= formSyukei();	// 集計項目（当月収納）
		// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//		shukNextShunoMap 	= formSyukei();	// 集計項目（翌月収納）
		// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
		shukShunoHoseiMap 	= formSyukei();	// 集計項目（収納補正）
		shukGoukeiMap 		= formSyukei();	// 集計項目（合計）
		
		// 収納管理帳票処理区分取得
		shunoKbnMap = makeShunoKikanMap(JZM0171Constant.CD01593);
		
		// コード「１」の場合は空文字を取得できるようにここでセットしておく
		shunoKbnMap.put("1", "");

		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][initial]");
	/**▲▲▲▲▲▲業務サービスの初期処理を記述してください。▲▲▲▲▲▲*/
	}
	
	/**
	 * 収納機関コードマップを作成します。
	 * @param cdSbt　コード種別コード
	 * @return HashMap<String, String>　収納機関コードマップ
	 * @throws Exception 業務サービス内で発生した例外全般
	 */
	private HashMap<String, String> makeShunoKikanMap(String cdSbt) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeShunoKikanMap]");
		
		JBSbatCommonDBInterface whereParam = new JBSbatCommonDBInterface();
		
		HashMap<String, String>retMap = new HashMap<String, String>();
		
		// コード種別コード
		whereParam.setValue(cdSbt);
		
		// 適用開始年月日
		whereParam.setValue(super.opeDate);
		
		// 適用終了年月日
		whereParam.setValue(super.opeDate);

		// SQL実行
		executeZM_M_CD_NM_KANRI_CH_SELECT_005(whereParam.getList().toArray());
		JBSbatCommonDBInterface selectMap = db_ZM_M_CD_NM_KANRI.selectNext(); 
		
		// 取得結果判定
		if (selectMap != null)
		{
			while (selectMap != null)
			{
				//収納機関マップに格納する
				//KEY（コード区分）:VALUE（コード区分名称）
				String cdDiv = selectMap.getString(JBSbatZM_M_CD_NM_KANRI.CD_DIV);
				retMap.put(cdDiv, selectMap.getString(JBSbatZM_M_CD_NM_KANRI.CD_DIV_NM));
				selectMap = db_ZM_M_CD_NM_KANRI.selectNext();
			}
		}
		else
		{
			// ログ出力（【最重要】ＤＢ未存在エラー）
			String[] msgParam = new String[]{ JBSbatZM_M_CD_NM_KANRI.TABLE_NAME, whereParam.getList().toString() + "(" + cdSbt + ")"};
			throw new JBSbatBusinessException(JPCBatchMessageConstant.ECHB0270CH, msgParam);
		}
		
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeShunoKikanMap]");

		return retMap;
	}

	/**
	 * 主処理
	 * @param inMap　入力電文
	 * @param outputInItem 入力情報
	 * @return JBSbatOutputItem　出力情報
	 * @throws Exception
	 */
	public JBSbatOutputItem execute(JBSbatServiceInterfaceMap inMap, JBSbatOutputItem outputInItem) throws Exception
	{
	/**▼▼▼▼▼▼業務サービスの主処理を記述してください。▼▼▼▼▼▼*/
		
		
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][execute]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][execute][inMap = " + inMap.getMap().toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 入力キー初期化
		inSaveKey1 = null;
		inSaveKey2 = null;
		inSaveKey3 = null;
		inSaveKey4 = null;
		inSaveKey5 = null;
		
		if(inMap != null)
		{
			// コンビニ入金情報．収納日を基準日として印紙対象金額を取得する
			String shunoYMD = inMap.getString(JBSbatCHIFM116.OUT_ORG_SHUNO_YMD);
			receiptAmnt = getInshiMaskAmount(shunoYMD);

			//入力・キー項目の作成
			makeKeySubject(inMap);
		}
		
		// コンビニ入金表作成処理
		// 1.退避．キー項目１ ≠ null、かつ 退避．キー項目１ ≠ 入力．キー項目１ の場合
		if(befSaveKey1 != null && !befSaveKey1.equals(inSaveKey1))
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case1[S]=" + inSaveKey1 + "]");
			
			// 明細出力処理
			outMap = makeOutputMeisai(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 小計出力処理
			outMap = makeOutputShokei(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 前月収納出力処理
			outMap = makeOutputLastMonth(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 当月収納出力処理
			outMap = makeOutputThisMonth(inMap);
			outputInItem.addOutMapList(outMap);
			
			// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//			// 翌月収納出力処理
//			outMap = makeOutputNextMonth(inMap);
//			outputInItem.addOutMapList(outMap);
			// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
			
			// 収納補正出力処理
			outMap = makeOutputHosei(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 合計出力処理
			outMap = makeOutputGoukei(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 退避情報初期化
			// 最終レコード以外の場合
			if (inMap != null)
			{
				befSaveKey1 		= null;			// 退避．キー項目１	
				befSaveKey2 		= null;			// 退避．キー項目２
				befSaveKey3 		= null;			// 退避．キー項目３
				befSaveKey4 		= null;			// 退避．キー項目４
				befSaveKey5 		= null;			// 退避．キー項目５
				shukMeisaiMap 		= formSyukei();	// 集計項目（明細）
				shukSyokeiMap 		= formSyukei();	// 集計項目（小計）
				shukLastShunoMap	= formSyukei();	// 集計項目（前月収納）
				shukThisShunoMap 	= formSyukei();	// 集計項目（当月収納）
				// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//				shukNextShunoMap 	= formSyukei();	// 集計項目（翌月収納）
				// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
				shukShunoHoseiMap 	= formSyukei();	// 集計項目（収納補正）
				shukGoukeiMap 		= formSyukei();	// 集計項目（合計）
				cvsStoreFlg 		= true;			// コンビニ会社名フラグ
				nkinRsvdFlg			= true;			// 入金予定日フラグ
				
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case1[E]=" + inSaveKey1 + "]");
		}
		// 2.退避．キー項目２ ≠ null、かつ 退避．キー項目２ ≠ 入力．キー項目２の場合
		else if(befSaveKey2 != null && !befSaveKey2.equals(inSaveKey2))
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case2[S]=" + inSaveKey2 + "]");
			
			// 明細出力処理
			outMap = makeOutputMeisai(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 小計出力処理
			outMap = makeOutputShokei(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 退避情報初期化
			// 最終レコード以外の場合
			if (inMap != null)
			{
			befSaveKey2 			= null;			// 退避．キー項目２
			befSaveKey3 			= null;			// 退避．キー項目３
			befSaveKey4 			= null;			// 退避．キー項目４
			befSaveKey5 			= null;			// 退避．キー項目５
			shukMeisaiMap 			= formSyukei();	// 集計項目（明細）
			shukSyokeiMap 			= formSyukei();	// 集計項目（小計）
			cvsStoreFlg 			= true;		// コンビニ会社名フラグ
			nkinRsvdFlg				= true;			// 入金予定日フラグ
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case2[E]=" + inSaveKey2 + "]");
		}
		// 3.退避．キー項目３ ≠ null、かつ 退避．キー項目３ ≠ 入力．キー項目３の場合
		else if(befSaveKey3 != null && !befSaveKey3.equals(inSaveKey3))
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case3[S]=" + inSaveKey3 + "]");
			
			// 明細出力処理
			outMap = makeOutputMeisai(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 小計出力処理
			outMap = makeOutputShokei(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 退避情報初期化
			// 最終レコード以外の場合
			if (inMap != null)
			{
			befSaveKey3 			= null;			// 退避．キー項目３
			befSaveKey4 			= null;			// 退避．キー項目４
			befSaveKey5 			= null;			// 退避．キー項目５
			shukMeisaiMap 			= formSyukei();	// 集計項目（明細）
			shukSyokeiMap 			= formSyukei();	// 集計項目（小計）
			cvsStoreFlg 			= false;		// コンビニ会社名フラグ
			nkinRsvdFlg				= true;		// 入金予定日フラグ
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case3[E]=" + inSaveKey3 + "]");
		}
		// 4.退避．キー項目４ ≠ null、かつ 退避．キー項目４ ≠ 入力．キー項目４の場合
		else if(befSaveKey4 != null && !befSaveKey4.equals(inSaveKey4))
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case4[S]=" + inSaveKey4 + "]");
			
			// 明細出力処理
			outMap = makeOutputMeisai(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 退避情報初期化
			// 最終レコード以外の場合
			if (inMap != null)
			{
			befSaveKey4 			= null;			// 退避．キー項目４
			befSaveKey5 			= null;			// 退避．キー項目５
			shukMeisaiMap 			= formSyukei();	// 集計項目（明細）
			cvsStoreFlg 			= false;		// コンビニ会社名フラグ
			nkinRsvdFlg				= false;		// 入金予定日フラグ
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case4[E]=" + inSaveKey4 + "]");
		}
		// 5.退避．キー項目５ ≠ null、かつ 退避．キー項目５ ≠ 入力．キー項目５の場合
		else if(befSaveKey5 != null && !befSaveKey5.equals(inSaveKey5))
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case5[S]=" + inSaveKey5 + "]");
			
			// 明細出力処理
			outMap = makeOutputMeisai(inMap);
			outputInItem.addOutMapList(outMap);
			
			// 退避情報初期化
			// 最終レコード以外の場合
			if (inMap != null)
			{
			befSaveKey5 			= null;			// 退避．キー項目５
			shukMeisaiMap 			= formSyukei();	// 集計項目（明細）
			cvsStoreFlg 			= false;		// コンビニ会社名フラグ
			nkinRsvdFlg				= false;		// 入金予定日フラグ
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][case5[E]=" + inSaveKey5 + "]");
		}
		
		// 集計処理
		// 最終レコード以外の場合
		if (inMap != null)
		{
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][shukei[S]]");
			
			// 集計項目（明細）の計算を行う
			shukMeisaiMap = doMeisaiSummary(inMap, shukMeisaiMap);
			
			// 集計項目（小計）， 集計項目（合計）の計算を行う
			shukSyokeiMap = doGoukeiSummary(inMap, shukSyokeiMap);
			shukGoukeiMap = doGoukeiSummary(inMap, shukGoukeiMap);
			
			// 入力．処理区分 ＝ "2"（オンライン）の場合，集計項目（収納補正）の計算を行う
			if (JACStrConst.TRN_DIV_ONLINE.equals(inMap.get(JBSbatCHIFM116.DIV_TRAN)))
			{
				// 集計項目（収納補正）の計算を行う
				shukShunoHoseiMap = doGoukeiSummary(inMap, shukShunoHoseiMap);
			}
			
			// 入力．処理区分 ＝ "1"（バッチ）の場合
			
			if (JACStrConst.TRN_DIV_BAT.equals(inMap.get(JBSbatCHIFM116.DIV_TRAN)))
			{
		
				// 入力．収納年月区分 ＝ "1"（前月収納）の場合，集計項目（前月収納）の計算を行う
				if (JACStrConst.SHUNO_YM_DIV_PRV.equals(inMap.get(JBSbatCHIFM116.SHUNO_DIV_YM)))
				{
					// 集計項目（前月収納）の計算を行う
					shukLastShunoMap = doGoukeiSummary(inMap, shukLastShunoMap);
				}
				
				// 入力．収納年月区分 ＝ "2"（当月収納）の場合，集計項目（当月収納）の計算を行う
				if (JACStrConst.SHUNO_YM_DIV_TOGETU.equals(inMap.get(JBSbatCHIFM116.SHUNO_DIV_YM)))
				{
					// 集計項目（当月収納）の計算を行う
					shukThisShunoMap = doGoukeiSummary(inMap, shukThisShunoMap);
				}
				
				// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//				// 入力．収納年月区分 ＝ "3"（翌月収納）の場合，集計項目（翌月収納）の計算を行う
//				if (JACStrConst.SHUNO_YM_DIV_NEXT.equals(inMap.get(JBSbatCHIFM116.SHUNO_DIV_YM)))
//				{
//					// 集計項目（翌月収納）の計算を行う
//					shukNextShunoMap = doGoukeiSummary(inMap, shukNextShunoMap);
//				}
				//// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
			}
			assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][execute][shukei[E]]");
		}
		
		// ファイル編集用情報退避
		// 最終レコード以外の場合
		if (inMap != null)
		{
			makeSaveInfo(inMap);
			
			//1件目のレコードの場合
			if(!outputInItem.isOutMapList())
			{
				outputInItem.addOutMapList(inMap);
				assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][execute]");
				return outputInItem;
			}
		}
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][execute]");
		return outputInItem;
	/**▲▲▲▲▲▲業務サービスの主処理を記述してください。▲▲▲▲▲▲*/
	}
	
	/**
	 * キー項目を作成します
	 * @param inMap　入力電文
	 * @throws Exception
	 */
	private void makeKeySubject(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeKeySubject]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeKeySubject][inMap=" + inMap.getMap().toString() + "]") : true;
		
		//キー項目１
		inSaveKey1 = makeStr(inMap.getString(JBSbatCHIFM116.SEIKY_YM), inMap
				.getString(JBSbatCHIFM116.SHUNOKIKAN_CD));
		
		//キー項目２
		inSaveKey2 = makeStr(inMap.getString(JBSbatCHIFM116.SEIKY_YM), inMap
				.getString(JBSbatCHIFM116.SHUNOKIKAN_CD), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK1));
		
		//キー項目３
		inSaveKey3 = makeStr(inMap.getString(JBSbatCHIFM116.SEIKY_YM), inMap
				.getString(JBSbatCHIFM116.SHUNOKIKAN_CD), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK1), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK2));
		
		//キー項目４
		inSaveKey4 = makeStr(inMap.getString(JBSbatCHIFM116.SEIKY_YM), inMap
				.getString(JBSbatCHIFM116.SHUNOKIKAN_CD), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK1), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK2), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK3));
		
		//キー項目５
		inSaveKey5 = makeStr(inMap.getString(JBSbatCHIFM116.SEIKY_YM), inMap
				.getString(JBSbatCHIFM116.SHUNOKIKAN_CD), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK1), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK2), inMap
				.getString(JBSbatCHIFM116.KEY_SHUK3), inMap
				.getString(JBSbatCHIFM116.DIV_TRAN));

		assert inSaveKey1 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeKeySubject][key1 = " + inSaveKey1 + "]") : true;
		assert inSaveKey2 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeKeySubject][key2 = " + inSaveKey2 + "]") : true;
		assert inSaveKey3 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeKeySubject][key3 = " + inSaveKey3 + "]") : true;
		assert inSaveKey4 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeKeySubject][key4 = " + inSaveKey4 + "]") : true;
		assert inSaveKey5 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeKeySubject][key5 = " + inSaveKey5 + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeKeySubject]");
	}
	
	/**
	 * 文字を連結します
	 * @param string　文字
	 * @return strBuf　連結した文字列
	 */
	private String makeStr(String ...string)
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeStr]");
		
		StringBuffer strBuf = new StringBuffer();
		for(String str:string){
			strBuf.append(str);
		}
		assert strBuf != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeStr][outputItem = " + strBuf.toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeStr]");
		
		return strBuf.toString();
	}
	
	/**
	 * 集計項目の初期化をします。
	 * @return shukeiMap　集計項目マップ
	 */
	private HashMap<String, BigDecimal> formSyukei()
	{
		
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][formSyukei]");
		
		HashMap<String, BigDecimal> shukeiMap = new HashMap<String, BigDecimal>();
		shukeiMap.put(JBSbatCHIFE039.KAI_PAGE_KEY, 		BIGDECIMAL_ZERO);	// 改ページキー
		shukeiMap.put(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, BIGDECIMAL_ZERO);	// コンビニ収納区分
		shukeiMap.put(JBSbatCHIFE039.KAIK_SUMUP_MON, 	BIGDECIMAL_ZERO);	// 会計計上月
		shukeiMap.put(JBSbatCHIFE039.CVSTORE_COMP_NM, 	BIGDECIMAL_ZERO);	// コンビニ会社名
		shukeiMap.put(JBSbatCHIFE039.NKIN__RSVD, 		BIGDECIMAL_ZERO);	// 入金予定日
		shukeiMap.put(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, BIGDECIMAL_ZERO);	// 収納日
		shukeiMap.put(JBSbatCHIFE039.MI_CNT, 			BIGDECIMAL_ZERO);	// 印紙税対象金額未満件数
		shukeiMap.put(JBSbatCHIFE039.MI_AMNT, 			BIGDECIMAL_ZERO);	// 印紙税対象金額未満金額
		shukeiMap.put(JBSbatCHIFE039.IJ_CNT, 			BIGDECIMAL_ZERO);	// 印紙税対象金額以上件数
		shukeiMap.put(JBSbatCHIFE039.IJ_AMNT, 			BIGDECIMAL_ZERO);	// 印紙税対象金額以上金額
		shukeiMap.put(JBSbatCHIFE039.GOKEI_CNT, 		BIGDECIMAL_ZERO);	// 合計件数
		shukeiMap.put(JBSbatCHIFE039.GOKEI_AMNT, 		BIGDECIMAL_ZERO);	// 合計金額
		shukeiMap.put(JBSbatCHIFE039.COMMENT, 			BIGDECIMAL_ZERO);	// コメント

		
		assert shukeiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][formSyukei][shukeiMap=" + shukeiMap.toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][formSyukei]");
		return shukeiMap;
	}
	
	/**
	 * コンビニ入金表（明細）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputMeisai(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputMeisai]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputMeisai][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputMeisai][shukMeisaiMap=" 
				+ shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);

		}
		else
		{
			// 上記以外の場合は、"CP"を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		
		// 2013/05/06 Otsuka end
		// コンビニ会社名
		// コンビニ会社名フラグ ＝ Trueの場合
		if(cvsStoreFlg)
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, getLCutString(fileEdit.get(JBSbatCHIFM116.SHUNO_CVSTORE_COMP_NM), MOJISUU_26));
		}
		
		// コンビニ会社名フラグ ≠ Trueの場合
		else
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, JACStrConst.KARA_MOJI);
		}
		
		// 入金予定日
		// 入金予定日フラグ ＝ Trueの場合
		if(nkinRsvdFlg)
		{
			outMap.set(JBSbatCHIFE039.NKIN__RSVD,  fileEdit.get(JBSbatCHIFM116.NKIN__RSVD));
		}
		
		// 入金予定日フラグ ≠ Trueの場合
		else
		{
			outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		}
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD,  fileEdit.get(JBSbatCHIFM116.OUT_ORG_SHUNO_YMD));
		
		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukMeisaiMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukMeisaiMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, shunoKbnMap.get(fileEdit.get(JBSbatCHIFM116.DIV_TRAN)));

		// 出力フラグ設定
		outMap.setOutFlg(true);
		
		//「""」で囲む
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputMeisai][outputItem = " 
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputMeisai]");

		return outMap;
	}
	
	/**
	 * コンビニ入金表（小計）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputShokei(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputShokei]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputShokei][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputShokei][shukMeisaiMap=" 
				+ shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
		}
		else
		{
			// 上記以外の場合は、""（空文字）を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		// 2013/05/06 Otsuka end

		// コンビニ会社名
		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, SMALL_SUM);
		
		// 入金予定日
		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);

		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukSyokeiMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukSyokeiMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);

		// 出力フラグ設定
		outMap.setOutFlg(true);
		
		//「""」で囲む
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputShokei][outputItem = " 
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputShokei]");

		return outMap;
	}
	
	/**
	 * コンビニ入金表（前月収納）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputLastMonth(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputLastMonth]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputLastMonth][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputLastMonth][shukMeisaiMap= " 
				+ shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
		}
		else 
		{
			// 上記以外の場合は、""（空文字）を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		// 2013/05/06 Otsuka end

		// コンビニ会社名
		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, GK_LAST_SUM);
		
		// 入金予定日
		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);

		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukLastShunoMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukLastShunoMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);

		// 出力フラグ設定
		outMap.setOutFlg(true);
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputLastMonth][outputItem = " 
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputLastMonth]");

		return outMap;
	}
	
	/**
	 * コンビニ入金表（当月収納）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputThisMonth(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputThisMonth]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputThisMonth][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputThisMonth][shukMeisaiMap= " 
				+ shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
		}
		else 
		{
			// 上記以外の場合は、""（空文字）を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		// 2013/05/06 Otsuka end

		// コンビニ会社名
		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, GK_THIS_SUM);
		
		// 入金予定日
		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);

		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukThisShunoMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukThisShunoMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);

		// 出力フラグ設定
		outMap.setOutFlg(true);
		
		//「""」で囲む
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputThisMonth][outputItem = " 
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputThisMonth]");

		return outMap;
	}
	
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL START
//	/**
//	 * コンビニ入金表（翌月収納）を作成します
//	 * @param inMap　入力電文
//	 * @return outMap　出力情報
//	 * @throws Exception
//	 */
//	private JBSbatServiceInterfaceMap makeOutputNextMonth(JBSbatServiceInterfaceMap inMap) throws Exception
//	{
//		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputNextMonth]");
//		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputNextMonth][inMap=" 
//				+ inMap.getMap().toString() + "]") : true;
//		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(
//				super.logPrint, "[S][makeOutputNextMonth][shukMeisaiMap=" + shukMeisaiMap.toString() + "]") : true;
//		
//		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
//		
//		// 改ページキー
//		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
//		
//		// コンビニ収納区分
//		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
//		{
//			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
//		}
//		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
//		{
//			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
//		}
//		else 
//		{
//			// 上記以外の場合は、""（空文字）を設定する。
//			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
//		}
//	
//		// 会計計上月
//		// 2013/05/06 Otsuka start
//		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
//		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
//		if(2 < seikiYm.length())
//		{
//			// ゼロサプレスを行う
//			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));
//
//			// 全角文字に変換して設定
//			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
//		}
//		// 2013/05/06 Otsuka end
//
//		// コンビニ会社名
//		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, GK_NEXT_SUM);
//		
//		// 入金予定日
//		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
//		
//		// 収納日
//		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);
//
//		// 印紙税対象金額未満件数
//		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
//		
//		// 印紙税対象金額未満金額
//		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
//		
//		// 印紙税対象金額以上件数
//		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
//		
//		// 印紙税対象金額以上金額
//		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
//		
//		// 合計件数
//		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukNextShunoMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
//		
//		// 合計金額
//		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukNextShunoMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
//		
//		// コメント
//		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);
//
//		// 出力フラグ設定
//		outMap.setOutFlg(true);
//		
//		//「""」で囲む
//		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));
//
//		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputNextMonth][outputItem = " 
//				+ outMap.getMap().toString() + "]") : true;
//		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputNextMonth]");
//
//		return outMap;
//	}
	// v59.00.00 2022/04/18 ANK-4160-00-00 DEL END
	

	/**
	 * コンビニ入金表（収納補正）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputHosei(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputHosei]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputHosei][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(
				super.logPrint, "[S][makeOutputHosei][shukMeisaiMap=" + shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
		}
		else 
		{
			// 上記以外の場合は、""（空文字）を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		// 2013/05/06 Otsuka end

		// コンビニ会社名
		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, GK_HOSEI_SUM);
		
		// 入金予定日
		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);

		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukShunoHoseiMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukShunoHoseiMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);

		// 出力フラグ設定
		outMap.setOutFlg(true);
		
		//「""」で囲む
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputHosei][outputItem = " 
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputHosei]");

		return outMap;
	}
	
	/**
	 * コンビニ入金表（合計）を作成します
	 * @param inMap　入力電文
	 * @return outMap　出力情報
	 * @throws Exception
	 */
	private JBSbatServiceInterfaceMap makeOutputGoukei(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputGoukei]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputGoukei][inMap=" + inMap.getMap().toString() + "]") : true;
		assert shukMeisaiMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeOutputGoukei][shukMeisaiMap= " 
				+ shukMeisaiMap.toString() + "]") : true;
		
		JBSbatServiceInterfaceMap outMap = new JBSbatServiceInterfaceMap();
		
		// 改ページキー
		outMap.set(JBSbatCHIFE039.KAI_PAGE_KEY, fileEdit.get(JBSbatCHIFE039.KAI_PAGE_KEY));
		
		// コンビニ収納区分
		if(JACStrConst.MAKER_CD_CP.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD)))
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_NOMAL);
		}
		else if(JACStrConst.MAKER_CD_REAL.equals(fileEdit.get(JBSbatCHIFM116.SHUNOKIKAN_CD))) 
		{
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, CVS_SHUNO_DIV_REAL);
		}
		else 
		{
			// 上記以外の場合は、""（空文字）を設定する。
			outMap.set(JBSbatCHIFE039.CVSTORE_SHUNO_DIV, JACStrConst.KARA_MOJI);
		}
	
		// 会計計上月
		// 2013/05/06 Otsuka start
		outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, JACStrConst.KARA_MOJI);
		String seikiYm = fileEdit.get(JBSbatCHIFM116.SEIKY_YM);
		if(2 < seikiYm.length())
		{
			// ゼロサプレスを行う
			String seikyMonth = JCHCommonFormatUtil.toZeroSuppress(seikiYm.substring(seikiYm.length() - 2));

			// 全角文字に変換して設定
			outMap.set(JBSbatCHIFE039.KAIK_SUMUP_MON, this.makeStr(chBusinessUtil.chgHanZenMoji(seikyMonth), MONTH));
		}
		// 2013/05/06 Otsuka end

		// コンビニ会社名
		outMap.set(JBSbatCHIFE039.CVSTORE_COMP_NM, GK_GOUKEI_SUM);
		
		// 入金予定日
		outMap.set(JBSbatCHIFE039.NKIN__RSVD, JACStrConst.KARA_MOJI);
		
		// 収納日
		outMap.set(JBSbatCHIFE039.OUT_ORG_SHUNO_YMD, JACStrConst.KARA_MOJI);

		// 印紙税対象金額未満件数
		outMap.set(JBSbatCHIFE039.MI_CNT, 		null);
		
		// 印紙税対象金額未満金額
		outMap.set(JBSbatCHIFE039.MI_AMNT,		null);
		
		// 印紙税対象金額以上件数
		outMap.set(JBSbatCHIFE039.IJ_CNT, 		null);
		
		// 印紙税対象金額以上金額
		outMap.set(JBSbatCHIFE039.IJ_AMNT, 		null);
		
		// 合計件数
		outMap.set(JBSbatCHIFE039.GOKEI_CNT, 	JPCUtilCommon.formatNumber(shukGoukeiMap.get(JBSbatCHIFE039.GOKEI_CNT).toString()));
		
		// 合計金額
		outMap.set(JBSbatCHIFE039.GOKEI_AMNT, 	JPCUtilCommon.formatNumber(shukGoukeiMap.get(JBSbatCHIFE039.GOKEI_AMNT).toString()));
		
		// コメント
		outMap.set(JBSbatCHIFE039.COMMENT, JACStrConst.KARA_MOJI);

		// 出力フラグ設定
		outMap.setOutFlg(true);
		
		//「""」で囲む
		outMap.setMap(JCHbatSeikyKaknoBusinessUtil.quote(outMap.getMap(), JACStrConst.DOUBLE_QUOTE, JACStrConst.DOUBLE_QUOTE));

		assert outMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeOutputGoukei][outputItem= "
				+ outMap.getMap().toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeOutputGoukei]");

		return outMap;
	}
	
	/**
	 * 対象文字列から指定桁数分の文字列を切出し取得する
	 * @param  value 対象文字列
	 * @param  length 桁数
	 * @return value 指定桁数の文字列
	 */
	private String getLCutString(String value, int length)
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][getLCutString]");
		String ret = JACStrConst.KARA_MOJI;

		if(length < value.length())
		{
			ret = value.substring(0, length);
		}
		else
		{
			ret = value;
		}
		assert ret != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][getLCutString][ret = "
				+ ret + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][getLCutString]");
		return ret;
	}
	
	/**
	 * 計算方法（明細）で集計項目を計算します
	 * @param inMap　入力電文
	 * @param inSyukMap　入力集計項目マップ
	 * @return syukMap　集計項目マップ
	 * @throws Exception 
	 */
	private HashMap<String, BigDecimal> doMeisaiSummary(JBSbatServiceInterfaceMap inMap, HashMap<String, BigDecimal> inSyukMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doMeisaiSummary]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doMeisaiSummary][inMap=" 	+ inMap.getMap().toString() + "]") : true;
		assert inSyukMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doMeisaiSummary][inMap=" + inSyukMap.toString() + "]") : true;
		HashMap<String, BigDecimal> syukMap = inSyukMap;
		
		// 合計件数＋　１
		syukMap.put(JBSbatCHIFE039.GOKEI_CNT, syukMap.get(
				JBSbatCHIFE039.GOKEI_CNT).add(BIGDECIMAL_ONE));
		
		// 合計金額＋　入力.入金額
		syukMap.put(JBSbatCHIFE039.GOKEI_AMNT, syukMap.get(
				JBSbatCHIFE039.GOKEI_AMNT).add(inMap.getBigDecimal(JBSbatCHIFM116.NYUKIN_AMNT)));
		
		assert syukMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][doMeisaiSummary][syukMap = " + syukMap.toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][doMeisaiSummary]");
		
		return syukMap;
	}
	
	/**
	 * 計算方法（合計）で集計項目を計算します
	 * @param inMap　入力電文
	 * @param inSyukMap　入力集計項目マップ
	 * @return syukMap　集計項目マップ
	 * @throws Exception
	 */
	private HashMap<String, BigDecimal> doGoukeiSummary(JBSbatServiceInterfaceMap inMap, HashMap<String, BigDecimal> inSyukMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doGoukeiSummary]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doGoukeiSummary][inMap=" 	+ inMap.getMap().toString() + "]") : true;
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][doGoukeiSummary][syukMap=" 	+ inSyukMap.toString() + "]") : true;
		
		HashMap<String, BigDecimal> syukMap = inSyukMap;
		
// OM-2019-0000568 2019/06/21 DEL START
//		//入力．処理区分 ≠ "3"（取消）の場合
//		if (!JACStrConst.TRN_DIV_CL.equals(inMap.get(JBSbatCHIFM116.DIV_TRAN)))
//		{
// OM-2019-0000568 2019/06/21 DEL END
			syukMap = doMeisaiSummary(inMap, syukMap);
// OM-2019-0000568 2019/06/21 DEL START
//		}
//		else
//		{
//			// 合計件数＋　１
//			syukMap.put(JBSbatCHIFE039.GOKEI_CNT, syukMap.get(
//					JBSbatCHIFE039.GOKEI_CNT).add(BIGDECIMAL_ONE));
//			
//			// 合計金額‐　入力.入金額
//			syukMap.put(JBSbatCHIFE039.GOKEI_AMNT, syukMap.get(
//					JBSbatCHIFE039.GOKEI_AMNT).subtract(inMap.getBigDecimal(JBSbatCHIFM116.NYUKIN_AMNT)));
//			
//		}
// OM-2019-0000568 2019/06/21 DEL END
		assert syukMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][doGoukeiSummary][syukMap = " + syukMap.toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][doGoukeiSummary]");
		return syukMap;		
	}
	
	/**
	 * ファイル編集用情報を退避します
	 * @param inMap　入力電文
	 * @throws Exception 
	 */
	private void makeSaveInfo(JBSbatServiceInterfaceMap inMap) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeSaveInfo]");
		assert inMap != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][makeSaveInfo][inMap=" + inMap.getMap().toString() + "]") : true;
		
		//退避・キー項目
		befSaveKey1 = inSaveKey1;
		befSaveKey2 = inSaveKey2;
		befSaveKey3 = inSaveKey3;
		befSaveKey4 = inSaveKey4;
		befSaveKey5 = inSaveKey5;
		
		//ファイル編集用情報
		fileEdit = new HashMap<String, String>();
		
		//退避．会計年月
		fileEdit.put(JBSbatCHIFM116.SEIKY_YM, inMap.getString(JBSbatCHIFM116.SEIKY_YM));
		
		//退避．収納機関コード
		fileEdit.put(JBSbatCHIFM116.SHUNOKIKAN_CD, inMap.getString(JBSbatCHIFM116.SHUNOKIKAN_CD));
		
		//退避．集計キー１
		fileEdit.put(JBSbatCHIFM116.KEY_SHUK1, inMap.getString(JBSbatCHIFM116.KEY_SHUK1));
		
		//退避．集計キー２
		fileEdit.put(JBSbatCHIFM116.KEY_SHUK2, inMap.getString(JBSbatCHIFM116.KEY_SHUK2));
		
		//退避．集計キー３
		fileEdit.put(JBSbatCHIFM116.KEY_SHUK3, inMap.getString(JBSbatCHIFM116.KEY_SHUK3));
		
		//退避．処理区分
		fileEdit.put(JBSbatCHIFM116.DIV_TRAN, inMap.getString(JBSbatCHIFM116.DIV_TRAN));
		
		//退避．収納年月区分
		fileEdit.put(JBSbatCHIFM116.SHUNO_DIV_YM, inMap.getString(JBSbatCHIFM116.SHUNO_DIV_YM));
		
		//退避．コンビニ会社名
		String shunoCvstoreCompNm = inMap.getString(JBSbatCHIFM116.SHUNO_CVSTORE_COMP_NM);
		if(shunoCvstoreCompNm.length() > 15)
		{
			fileEdit.put(JBSbatCHIFM116.SHUNO_CVSTORE_COMP_NM, shunoCvstoreCompNm.substring(0, 15));
		}
		else
		{
			fileEdit.put(JBSbatCHIFM116.SHUNO_CVSTORE_COMP_NM, shunoCvstoreCompNm);
		}
		
		//退避．コンビニ収納区分
		fileEdit.put(JBSbatCHIFM116.SHUNO_DIV_CVSTORE, inMap.getString(JBSbatCHIFM116.SHUNO_DIV_CVSTORE));
		
		//退避．収納日
		fileEdit.put(JBSbatCHIFM116.NKIN__RSVD, JPCUtilCommon.formatDate(inMap.getString(JBSbatCHIFM116.NKIN__RSVD)));
		
		//退避．収納日
		fileEdit.put(JBSbatCHIFM116.OUT_ORG_SHUNO_YMD, JPCUtilCommon.formatDate(inMap.getString(JBSbatCHIFM116.OUT_ORG_SHUNO_YMD)));
		
		//退避．改ページキー
		fileEdit.put(JBSbatCHIFE039.KAI_PAGE_KEY, makeStr(inMap.getString(JBSbatCHIFM116.SHUNO_DIV_CVSTORE), inMap.getString(JBSbatCHIFM116.SEIKY_YM)));
		
		assert befSaveKey1 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][key1 = " + befSaveKey1 + "]") : true;
		assert befSaveKey2 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][key2 = " + befSaveKey2 + "]") : true;
		assert befSaveKey3 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][key3 = " + befSaveKey3 + "]") : true;
		assert befSaveKey4 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][key4 = " + befSaveKey4 + "]") : true;
		assert befSaveKey5 != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][key5 = " + befSaveKey5 + "]") : true;
		assert fileEdit != null ? JACbatDebugLogUtil.printDebugLog(super.logPrint, "[L][makeSaveInfo][fileEdit = " + fileEdit.toString() + "]") : true;
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][makeSaveInfo]");
	}
	

	/**
	 * SQLKEY(CH_SELECT_005)でDBアクセスを行います。<br>
	 * <p>
	 * <b>処理フロー</b><br>
	 * <pre>
	 * 1.引数でバイント変数を設定します。<br>
	 *
	 * 2.DBアクセスを実行します。<br>
	 * 
	 * 3.メソッドの呼び出し方です。<br>
	 *		引数:
	 *		param:順にバイント変数の値をparam配列に入れます。バイント変数は以下に説明します。
	 *		 	コード種別コード
	 *		 	適用開始年月日
	 *		 	適用終了年月日
	 * </pre>
	 * <p>
	 * @param param バイント変数の値配列。
	 * @throws Exception 業務サービス内で発生した例外全般。
	 */
	private void executeZM_M_CD_NM_KANRI_CH_SELECT_005(Object[] param) throws Exception
	{
		// バイント変数のリストを生成します
		JBSbatCommonDBInterface paramList = new JBSbatCommonDBInterface();
		paramList.setValue(param[0].toString());
		paramList.setValue(param[1].toString());
		paramList.setValue(param[2].toString());

		// DBアクセスを実行します
		db_ZM_M_CD_NM_KANRI.selectBySqlDefine(paramList, ZM_M_CD_NM_KANRI_CH_SELECT_005);
	}
	
	/**
	 * 印紙対象金額取得
	 * 
	 * @param baseDate 基準年月日（YYYYMMDD）
	 * @return BigDecimal 印紙対象金額
	 * @throws Exception 
	 */
	private BigDecimal getInshiMaskAmount(String baseDate) throws Exception
	{
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][getInshiMaskAmount]");
		
		String baseDateYM = baseDate.substring(0, 6);
		BigDecimal receiptAmnt = inshiMaskAmntMap.get(baseDateYM);
		if(receiptAmnt == null)
		{
			// 未取得の場合は取得してMapに退避する
			receiptAmnt = new BigDecimal(JCHStampDutyUtil.getTaxableAmount(JACStrConst.CALLER_BATCH, commonItem.getConnection(), baseDate));
			inshiMaskAmntMap.put(baseDateYM, receiptAmnt);
		}
		
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][getInshiMaskAmount]");
		return receiptAmnt;
	}

	/**
	 * 業務サービス終了処理
	 * @throws Exception
	 */
	public void terminal() throws Exception
	{
	/**▼▼▼▼▼▼業務サービスの終了処理を記述してください。▼▼▼▼▼▼*/
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[S][terminal]");
		/**▼▼▼▼▼▼ツールから生成した終了処理のソースです 開始▼▼▼▼▼▼*/
		/**▲▲▲▲▲▲ツールから生成した終了処理のソースです 終了▲▲▲▲▲▲*/
		chBusinessUtil.close();
		assert JACbatDebugLogUtil.printDebugLog(super.logPrint, "[E][terminal]");
	/**▲▲▲▲▲▲業務サービスの終了処理を記述してください。▲▲▲▲▲▲*/
	}

	/**▼▼▼▼▼▼ツールから生成したメソッドです 開始▼▼▼▼▼▼*/
	/**▲▲▲▲▲▲ツールから生成したメソッドです 終了▲▲▲▲▲▲*/
}
