zxcasd

package jp.co.kisnet.prj.web.idsoi210;

import java.security.Principal;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import jp.co.kisnet.base.constants.ClsExecConst;
import jp.co.kisnet.base.constants.LogConst;
import jp.co.kisnet.base.dto.MessageDto;
import jp.co.kisnet.base.dto.PagerConditionDto;
import jp.co.kisnet.base.dto.ResultDto;
import jp.co.kisnet.base.dto.SelectDto;
import jp.co.kisnet.base.login.data.UserInfo;
import jp.co.kisnet.base.util.LoginUtil;
import jp.co.kisnet.base.util.MessageUtils;
import jp.co.kisnet.base.util.PagerUtil;
import jp.co.kisnet.base.util.StringUtil;
import jp.co.kisnet.prj.constants.FpConstants;
import jp.co.kisnet.prj.constants.FpMapConstants;
import jp.co.kisnet.prj.entity.Knmtant;
import jp.co.kisnet.prj.util.BlocksetUtil;
import jp.co.kisnet.prj.web.idsoi210.constants.Idsoi210Const;
import jp.co.kisnet.prj.web.idsoi210.form.Idsoi2101Frm;
import jp.co.kisnet.prj.web.mspi120.constants.Mspi120Const;
import jp.co.kisnet.prj.web.mspi120.constants.Mspi120MapConstants;
import jp.co.kisnet.prj.web.mspi120.dto.Mspi120SessionDto;
import jp.co.kisnet.prj.web.mspi120.form.Mspi1201Frm;
import jp.co.kisnet.prj.web.programSelect.dto.FPPgCallDto;
import jp.co.kisnet.prj.web.programSelect.util.PgCallUtil;
import net.arnx.jsonic.JSON;

/**
 * パッキング入力:画面コントローラークラス
 * 
 * @author jyo
 */
@Controller
@RequestMapping("/prj/idsoi210/idsoi210")
public class Idsoi210Ctrl extends AbstIdsoi210Ctrl {

    /**
     * 画面1FORM 画面遷移時、ボタン押下時等 Controller内のメソッドが走る前に呼ばれるメソッド ここでセッション内からFORMの情報を取り出し
     * そのFORMに対して、サブミット時に送られてくるFORMの情報が上書きされる 未入力項目は空文字、Disabled項目はNULLで受け取る
     * Disabled項目は上書きされないため、Disabled時の分岐等の考慮は不要
     */
    @ModelAttribute("myForm")
    Idsoi2101Frm getIdsoi2101Frm() {
        return sessionDto.getIdsoi2101Frm();
    }

    /** 画面タイトル */
    @ModelAttribute("header_title")
    String getHeaderTitle() {
        return MessageUtils.getLabelValue(Idsoi210Const.LABEL_KEY_WINDOW_TITLE_1);
    }

    /** JavaScriptを設定 */
    @ModelAttribute("javaScript")
    String javaScript() {
        List<String[]> list = new ArrayList<String[]>();
        String dispid = Idsoi210Const.LABEL_KEY_DISP1_ID;
        // 契約番号検索(フォーカスアウトがない)
        list.add(new String[]{BlocksetUtil.CTRNO            // 部品ID
                            , dispid                    // 画面ID
                            , "ctrno"                    // 項目ID
                            , "ctrcd"                    // 移送項目ID
                            , null                        // DB項目ID ※コード検索用
                            , null                        // DBテーブルID ※コード検索用
                            , null                        // 個別条件 ※コード検索用
                            , null                        // 権限フラグ ※コード検索用
                            , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
                            });
        // 契約番号枝番
        list.add(new String[]{BlocksetUtil.CTREDANO            // 部品ID
                , dispid                    // 画面ID
                , "ctredano"                    // 項目ID
                , "ctredano,ctrcd"            // 移送項目ID
                , null                        // DB項目ID ※コード検索用
                , null                        // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        // 契約先コード
        list.add(new String[]{BlocksetUtil.CTRCD            // 部品ID
                , dispid                    // 画面ID
                , "ctrcd"                    // 項目ID
                , "ctrnm1,ctrnm2"            // 移送項目ID
                , "CTRCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 輸出者コード
        list.add(new String[]{BlocksetUtil.EXPCD            // 部品ID
                , dispid                    // 画面ID
                , "expcd"                    // 項目ID
                , "expnm1,expnm2,expnm3,expnm4,expnm5,,exptel,expfax,,,,,expnm6,expnm7"            // 移送項目ID
                , "EXPCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 輸出者名称1
              list.add(new String[] { BlocksetUtil.EXPNM1 // 部品ID
                      , dispid // 画面ID
                      , "expnm1" // 項目ID
                      , "expcd" // 移送項目ID
                      , null // DB項目ID ※コード検索用
                      , null // DBテーブルID ※コード検索用
                      , null // 個別条件 ※コード検索用
                      , null // 権限フラグ ※コード検索用
                      , "detail" // 明細名
              });
              
        // 輸入者コード
        list.add(new String[]{BlocksetUtil.IMPCD1            // 部品ID
                , dispid                    // 画面ID
                , "impcd"                    // 項目ID
                , "impnm1,impnm2,impnm3,impnm4,impnm5,,,,,,,,impnm6,impnm7"            // 移送項目ID
                , "IMPCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 輸入者名称1
              list.add(new String[] { BlocksetUtil.IMPNM1 // 部品ID
                      , dispid // 画面ID
                      , "impnm1" // 項目ID
                      , "impcd" // 移送項目ID
                      , null // DB項目ID ※コード検索用
                      , null // DBテーブルID ※コード検索用
                      , null // 個別条件 ※コード検索用
                      , null // 権限フラグ ※コード検索用
                      , "detail" // 明細名
              });
              
        // 決済先コード
        list.add(new String[]{BlocksetUtil.PAYCD3            // 部品ID
                , dispid                    // 画面ID
                , "paycd"                    // 項目ID
                , "paynm1,paynm2,paynm3,paynm4,paynm5,paynm6,,,,,,paynm7"            // 移送項目ID
                , "PAYCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });

        // 決済先名称1
          list.add(new String[] { BlocksetUtil.PAYNM1 // 部品ID
                  , dispid // 画面ID
                  , "paynm1" // 項目ID
                  , "paycd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
          });
              
        // NOTIFYコード
        list.add(new String[]{BlocksetUtil.NTFYCD1            // 部品ID
                , dispid                    // 画面ID
                , "ntfycd"                    // 項目ID
                , "ntfynm1,ntfynm2"            // 移送項目ID
                , "NTFYCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                        // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });

        // NOTIFY名称1
         list.add(new String[] { BlocksetUtil.NTFYNM1 // 部品ID
                  , dispid // 画面ID
                  , "ntfynm1" // 項目ID
                  , "ntfycd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
          });
              
        // 出港地コード検索
        list.add(new String[]{BlocksetUtil.ETDCD            // 部品ID
                , dispid                    // 画面ID
                , "etdcd"                    // 項目ID
                , "etdnm"            // 移送項目ID
                , "ETDCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , "KNMPLAC.LANGKBN = \" \""    // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 出港地名称
         list.add(new String[] { BlocksetUtil.ETDNM // 部品ID
                  , dispid // 画面ID
                  , "etdnm" // 項目ID
                  , "etdcd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
         });
              
        // 仕向地コード検索
        list.add(new String[]{BlocksetUtil.DESTCD            // 部品ID
                , dispid                    // 画面ID
                , "destcd"                    // 項目ID
                , "destnm"            // 移送項目ID
                , "DESTCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , "KNMPLAC.LANGKBN = \" \""    // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });

        // 仕向地名称
         list.add(new String[] { BlocksetUtil.DESTNM // 部品ID
                  , dispid // 画面ID
                  , "destnm" // 項目ID
                  , "destcd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
         });
              
        // 経由地コード検索
        list.add(new String[]{BlocksetUtil.TRANCD            // 部品ID
                , dispid                    // 画面ID
                , "trancd"                    // 項目ID
                , "trannm"                    // 移送項目ID
                , "TRANCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , "KNMPLAC.LANGKBN = \" \""    // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 経由地名称
         list.add(new String[] { BlocksetUtil.TRANNM // 部品ID
                  , dispid // 画面ID
                  , "trannm" // 項目ID
                  , "trancd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
         });
              
        // 船社マスタ検索
        list.add(new String[]{BlocksetUtil.CARCD            // 部品ID
                , dispid                    // 画面ID
                , "carcd"                    // 項目ID
                , "carnm"                    // 移送項目ID
                , "TRANCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                      // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 船社名称
          list.add(new String[] { BlocksetUtil.CARNM // 部品ID
                  , dispid // 画面ID
                  , "carnm" // 項目ID
                  , "carcd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
          });
              
        // 船名コード検索
        list.add(new String[]{BlocksetUtil.VSLCD1            // 部品ID
                , dispid                    // 画面ID
                , "vslcd"                    // 項目ID
                , "vslnm"                    // 移送項目ID
                , "VSLCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                       // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 船名名称
         list.add(new String[] { BlocksetUtil.VSLNM // 部品ID
                  , dispid // 画面ID
                  , "vslnm" // 項目ID
                  , "vslcd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
         });
         
        // 搬入先コード検索
        list.add(new String[]{BlocksetUtil.CARRCD            // 部品ID
                , dispid                    // 画面ID
                , "carrcd"                    // 項目ID
                , "carrnm"                    // 移送項目ID
                , "CARRCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                       // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // 搬入先名称
         list.add(new String[] { BlocksetUtil.CARRNM // 部品ID
                  , dispid // 画面ID
                  , "carrnm" // 項目ID
                  , "carrcd" // 移送項目ID
                  , null // DB項目ID ※コード検索用
                  , null // DBテーブルID ※コード検索用
                  , null // 個別条件 ※コード検索用
                  , null // 権限フラグ ※コード検索用
                  , "detail" // 明細名
          });
              
        // 荷姿コード検索
        list.add(new String[]{BlocksetUtil.PKGCD            // 部品ID
                , dispid                    // 画面ID
                , "pkgcd"                    // 項目ID
                , ",pkgnm"                    // 移送項目ID
                , "PKGCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , "KNMPKCD.LANGKBN = ' '"                       // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
        
        // MARKコード検索
        list.add(new String[]{BlocksetUtil.MARKCD            // 部品ID
                , dispid                    // 画面ID
                , "markcd"                    // 項目ID
                , "mark1,mark2,mark3,mark4,mark5,mark6,mark7,mark8,mark9,mark10,"
                        + "mark11,mark12,mark13,mark14,mark15,mark16,mark17,mark18"
                        + ",mark19,mark20"    // 移送項目ID
                , "MARKCD"                    // DB項目ID ※コード検索用
                , "KNFPKGH_IDS"                // DBテーブルID ※コード検索用
                , null                       // 個別条件 ※コード検索用
                , null                        // 権限フラグ ※コード検索用
                , null                        // モード : "2" (ヘッダ部管理No.検索で使う)
        });
         
        // MARK1
         list.add(new String[] { BlocksetUtil.MARK1 // 部品ID
                 , dispid // 画面ID
                 , "mark1" // 項目ID
                 , "markcd" // 移送項目ID
                 , null // DB項目ID ※コード検索用
                 , null // DBテーブルID ※コード検索用
                 , null // 個別条件 ※コード検索用
                 , null // 権限フラグ ※コード検索用
                 , "detail" // 明細名
         });
         
        // 資材品番
         list.add(new String[] { BlocksetUtil.MATECD // 部品ID
                 , dispid // 画面ID
                 , "matenm" // 項目ID
                 , "matecd" // 移送項目ID
                 , null // DB項目ID ※コード検索用
                 , null // DBテーブルID ※コード検索用
                 , null // 個別条件 ※コード検索用
                 , null // 権限フラグ ※コード検索用
                 , "detail" // 明細名
         });
        return BlocksetUtil.set(list);
    }

    /*
     * ================================================ 
     * ショートカットキー用
     * ================================================
     */
    /** 更新 ShortCutKey */
//    @ModelAttribute("keyUpd")
//    public String getKeyUpd() { return sessionDto.getStCutKeyUpd(); }
//
//    /** 印刷 ShortCutKey */
//    @ModelAttribute("keyPrn")
//    public String getKeyPrn() { return sessionDto.getStCutKeyPrn(); }
//
//    /** 再印刷 ShortCutKey */
//    @ModelAttribute("keyRePrn")
//    public String getKeyRePrn() { return sessionDto.getStCutKeyRePrn(); }
//
//    /** プレビュー ShortCutKey */
//    @ModelAttribute("keyPrev")
//    public String getKeyPrev() { return sessionDto.getStCutKeyPrev(); }
//
//    /** 削除 ShortCutKey */
//    @ModelAttribute("keyDel")
//    public String getKeyDel() { return sessionDto.getStCutKeyDel(); }
//
//    /** キャンセル ShortCutKey */
//    @ModelAttribute("keyCan")
//    public String getKeyCan() { return sessionDto.getStCutKeyCan(); }
//
//    /** コード検索 ShortCutKey */
//    @ModelAttribute("keyCdSrc")
//    public String getKeyCdSrc() { return sessionDto.getStCutKeyCdSrc(); }
//
//    /** 検索 ShortCutKey */
//    @ModelAttribute("keySrc")
//    public String getKeySrc() { return sessionDto.getStCutKeySrc(); }
//
//    /** HOME ShortCutKey */
//    @ModelAttribute("keyHome")
//    public String getKeyHome() { return sessionDto.getStCutKeyHome(); }

    /*
     * =============================================================================
     * 本画面独自のボタン押下時メソッド
     * =============================================================================
     */

    /**
     * 明細のページングボタン押下時処理
     * 
     * @param model
     * @param form
     * @param nextPage
     */
//    @RequestMapping(params = "doPaging")
//    public void doPaging(Model model, @ModelAttribute("myForm") Mspi1201Frm form, String nextPage) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        MessageUtils.loadMessages();
//        MessageUtils.display(model, MessageUtils.getMessages());
//
//        PagerConditionDto pagerDto = sessionDto.getMspi1201Frm().getCtnrPagerDto();
//        // 表示ページを次のページへ変更
//        pagerDto.setPageNumber(StringUtil.stringToInt(nextPage));
//        sessionDto.getMspi1201Frm().setDetailPageIndex(PagerUtil.filterIndex(sessionDto.getMspi1201Frm().getDetail(), pagerDto));
//
//        hdnValueSet(model);
//
//    }
//
//    /*
//     * =============================================================================
//     * ==== KbaseCtrlで定義されているボタン押下時メソッドの実装
//     * =============================================================================
//     * ====
//     */
//    /**
//     * {@inheritDoc}
//     * 
//     * @see jp.co.kisnet.base.controller.KbaseCtrl#initProcOne(org.springframework.ui.Model,
//     *      java.util.Locale, java.security.Principal, java.lang.Object)
//     */
//    @Override
//    protected void initProcOne(Model model, Locale locale, Principal principal, Object form) {
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//
//        // 引数Mapの設定
//        args.put(LogConst.LOG_PROC_TYPE, LogConst.COM_LOGKBN_START);
//        args.put(ClsExecConst.PG_ID, Mspi120Const.PROGRAM_ID);
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//
//        callBasicSvc(model, "INIT", resultDto, args, msgList);
//
//        // セッションへの移送
//        sessionDto = (Mspi120SessionDto) args.get(Mspi120MapConstants.FP_MSPI120_SESSION);
//
//        MessageUtils.addMessages(msgList);
//
//        // @ModelAttributeで移送している項目で、initProcOne内で書き換えられた値の移送
//        model.addAttribute("bumcdItems", sessionDto.getBumcdItems());
//        model.addAttribute("syubetcdItems", sessionDto.getSyubetcdItems());
//        model.addAttribute("atukaicdItems", sessionDto.getAtukaicdItems());
//        model.addAttribute("blprnkbnItems", sessionDto.getBlprnkbnItems());
//        model.addAttribute("fmprnkbnItems", sessionDto.getFmprnkbnItems());
//        model.addAttribute("setDispOrderItems", sessionDto.getSetDispOrderItems());
//        model.addAttribute("setPatternItems", sessionDto.getSetPatternItems());
//        model.addAttribute("keyExcel", sessionDto.getStCutKeyExcel());
//        model.addAttribute("keyCan", sessionDto.getStCutKeyCan());
//        model.addAttribute("keyCdSrc", sessionDto.getStCutKeyCdSrc());
//        model.addAttribute("keySrc", sessionDto.getStCutKeySrc());
//        model.addAttribute("keyDel", sessionDto.getStCutKeyDel());
//        model.addAttribute("keyHome", sessionDto.getStCutKeyHome());
//        model.addAttribute("myForm", sessionDto.getMspi1201Frm());
//        
//        
//        // 明細1ページ行数
//        model.addAttribute("detailPageLine", sessionDto.getDetailPageLine());
//        model.addAttribute("warnKbn", sessionDto.getWarnKbn());
//
//        setDetailInfoToSession(1);
//        
//        // PG遷移してきた場合
//        FPPgCallDto pgCallDto = PgCallUtil.getPgCallInfo(Mspi120Const.PROGRAM_ID);
//        if (pgCallDto != null) {
//
//            String eikbncd = pgCallDto.getEikbncd();
//            String sino = pgCallDto.getSino();
//            String hblno = pgCallDto.getHblno();            
//            String seicd = pgCallDto.getSeicd();
//            String touksei = pgCallDto.getTouksei();
//            String seinm1 = pgCallDto.getSeinm1();
//            String seinm2 = pgCallDto.getSeinm2();
//            String shpcd = pgCallDto.getShpcd();
//            String shpnm1 = pgCallDto.getShpnm1();
//            String shpnm2 = pgCallDto.getShpnm2();
//            String vslcd = pgCallDto.getVslcd();
//            String vslnm = pgCallDto.getVslnm();
//            String voyno = pgCallDto.getVoyno();
//            String etaetddate = pgCallDto.getEtaetddate();
//            String eitancd = pgCallDto.getEitancd();
//            String eitannm = pgCallDto.getEitannm();
//            String gyotancd = pgCallDto.getGyotancd();
//            String gyotannm = pgCallDto.getGyotannm();
//            if (StringUtil.isEmpty(eikbncd)) {
//                UserInfo userInfo = LoginUtil.getUserInfo();
//                Knmtant knmtant = (Knmtant)userInfo.getUserProperties(FpConstants.USER_INFO_KNMTANT);
//                eikbncd = knmtant.getEikbncd();
//            }
//            
//            // チェック結果DTOの初期化
//            searchArgsSet();
//            
//            sessionDto.getMspi1201Frm().setEikbncd(eikbncd);
//            sessionDto.getMspi1201Frm().setSino(sino);
//            sessionDto.setNovccDispConfFlg(true);
//            sessionDto.setHblno(hblno);
//            sessionDto.setSeicd(seicd);
//            sessionDto.setTouksei(touksei);
//            sessionDto.setSeinm1(seinm1);
//            sessionDto.setSeinm2(seinm2);
//            sessionDto.setShpcd(shpcd);
//            sessionDto.setShpnm1(shpnm1);
//            sessionDto.setShpnm2(shpnm2);
//            sessionDto.setVslcd(vslcd);
//            sessionDto.setVslnm(vslnm);
//            sessionDto.setVoyno(voyno);
//            sessionDto.setEtaetddate(etaetddate);
//            sessionDto.setEitancd(eitancd);
//            sessionDto.setEitannm(eitannm);
//            sessionDto.setGyotancd(gyotancd);
//            sessionDto.setGyotannm(gyotannm);
//            
//            // search処理
//            search(model);
//
//            model.addAttribute("javaScript", javaScript());
//        }
//        model.addAttribute("myForm", sessionDto.getMspi1201Frm());
//
//    }
//
//
//    /*
//     * =============================================================================
//     * 本画面独自のボタン押下時メソッド
//     * =============================================================================
//     */
//
//    /**
//     * 項目設定ボタン押下時処理
//     * 
//     * @param model
//     * @param form
//     * @throws Exception
//     */
//    @RequestMapping(params = "doGetFld")
//    public String doGetFld(Model model, @ModelAttribute("myForm") Object form) throws Exception {
//        // メニューの状態をセッションに保存する
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        MessageUtils.clearMessages();
//
//        // チェック結果DTOの初期化
//        ptnsetArgsSet();
//
//        // 項目設定処理
//        ptnset(model);
//
//        return null;
//    }
//
//    /**
//     * 印刷ボタン押下
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doPrint")
//    public String doPrint(Model model, @ModelAttribute("myForm") Mspi1201Frm form) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        printArgsSet();
//
//        if (!print(model)) {
//            return null;
//        }
//        return null;
//    }
//
//    /**
//     * 再印刷ボタン押下
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doReprint")
//    public String doRePrint(Model model, @ModelAttribute("myForm") Object form) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        MessageUtils.clearMessages();
//        // 再印刷ボタン押下フラグ
//        sessionDto.setReprintFlg(true);
//
//        reprintArgsSet();
//
//        if(!reprint(model)) return null;
//
//        return null;
//
//    }
//
//    /**
//     * 印刷処理(プリンタ選択画面のOKボタン押下後処理)
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doPrintSetAfter")
//    public String doPrintSetAfter(Model model, @ModelAttribute("myForm") Object form,
//            @RequestParam("chkListId") String chkListId, @RequestParam("retPrtId") String retPrtId) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        String[] chkList = chkListId.split(",");
//        String[] retPrt = retPrtId.split(",");
//        if (chkList.length == 1) {
//            // 梱包完了書出力区分
//            sessionDto.setKnfpaccompdkbn(chkList[0]);
//            // 梱包完了書フォームコード
//            sessionDto.setKnfpaccompdFrmCd(retPrt[0]);
//        }
//
//        if(!print(model)) return null;
//
//        return null;
//    }
//    
//    /**
//     * プリンタ選択後の処理
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doReprintSetAfter")
//    public String doReprintSetAfter(Model model, @ModelAttribute("myForm") Object form,
//            @RequestParam("chkListId") String chkListId, @RequestParam("retPrtId") String retPrtId) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        String[] chkList = chkListId.split(",");
//        String[] retPrt = retPrtId.split(",");
//        if (chkList.length == 1) {
//            // 梱包完了書出力区分
//            sessionDto.setKnfpaccompdkbn(chkList[0]);
//            // 梱包完了書フォームコード
//            sessionDto.setKnfpaccompdFrmCd(retPrt[0]);
//        }
//
//        // 再印刷処理の続き
//        if (!reprint(model)) return null;
//
//        return null;
//    }
//
//    /**
//     * プレビューボタン押下
//     * @param model
//     * @param form
//     * @throws Exception
//     */
//    @RequestMapping(params = "doPreview")
//    public String doPreview(Model model, @ModelAttribute("myForm") Object form) throws Exception {
//
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        MessageUtils.clearMessages();
//
//        // 引数Map作成
//        prvwArgsSet();
//
//        // EXCEL処理
//        if(!prvw(model)) return null;
//
//        return null;
//
//    }
//    
//    /**
//     * 複写元管理No.の展開ボタン押下時処理
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doCopySinoLoad")
//    public String doCopySinoLoad(Model model, @ModelAttribute("myForm") Mspi1201Frm form, @RequestParam("warnKbn") int warnKbn) throws Exception {
//
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//
//        if(!copyseinoLoad(model)) return null;
//
//        return null;
//    }
//    
//    /**
//     * 複写元管理No.の展開ボタン押下時処理
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doCopysinoLoadWarnAfter")
//    public String doCopysinoLoadWarnAfter(Model model, @ModelAttribute("myForm") Mspi1201Frm form, @RequestParam("warnKbn") int warnKbn) throws Exception {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // 警告メッセージでOK押下の場合
//        if (warnKbn > 0) {
//            sessionDto.setWarnKbn(0);
//            model.addAttribute("warnKbn", sessionDto.getWarnKbn());
//            sessionDto.setWarnMsgId(null);
//            sessionDto.setWarnMsgArgs(null);
//            if (warnKbn != 1) {
//                return null;
//            }
//        } else {
//            return null;
//        }
//
//        if(!copyseinoLoad(model)) return null;
//
//        return null;
//    }
//    
//    /**
//     * 書類ボタン押下時処理
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doDoc")
//    protected String doDoc(Model model, @ModelAttribute("myForm") Object form) throws Exception {
//
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//        
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 請求先書類展開処理
//        if(!doDocOpen(model)) return null;
//
//        return null;
//    }
//    
//    /**
//     * 荷主先書類ボタン押下時処理(立替情報)
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doShpDoc")
//    protected String doExpDoc(Model model, @ModelAttribute("myForm") Object form) throws Exception {
//
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 荷主先書類展開処理
//        if(!doShpDocOpen(model)) return null;
//
//        model.addAttribute("javaScript", javaScript());
//        return null;
//    }
//    
//    /**
//     * 行追加処理(明細)
//     * 
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doAddDetail")
//    public void doAddDetail(Model model, @ModelAttribute("myForm") Mspi1201Frm form) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        // BasicSvc実行
//        callBasicSvc(model, FpConstants.EXEC_ROWADD, resultDto, args, msgList);
//
//        // ページ情報
//        PagerConditionDto pagerDto = new PagerConditionDto(sessionDto.getDetailPageLine());
//        // 現在ページ設定
//        int linesize = sessionDto.getMspi1201Frm().getDetail().size();
//        int page = 0;
//        if (linesize % sessionDto.getDetailPageLine() == 0) {
//            page = linesize / sessionDto.getDetailPageLine();
//        } else {
//            page = linesize / sessionDto.getDetailPageLine() + 1;
//        }
//        pagerDto.setPageNumber(page);
//        // 1ページ分のインデックスを設定
//        sessionDto.getMspi1201Frm().setCtnrPagerDto(pagerDto);
//        sessionDto.getMspi1201Frm()
//                .setDetailPageIndex(PagerUtil.filterIndex(sessionDto.getMspi1201Frm().getDetail(), pagerDto));
//
//        MessageUtils.addMessages(msgList);
//        MessageUtils.saveMessages();
//
//        // 1頁分の追加となるので常に0行目
//        sessionDto.setDetailFocusLine(0);
//
//        hdnValueSet(model);
//        // メッセージの表示
//        MessageUtils.display(model, MessageUtils.getMessages());
//    }
//    
//    /**
//     * 行複写処理(明細)
//     * 
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doCopyDetail")
//    public void doCopyDetail(Model model, @ModelAttribute("myForm") Mspi1201Frm form) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        // BasicSvc実行
//        callBasicSvc(model, FpConstants.EXEC_COPYROW, resultDto, args, msgList);
//
//        setDetailInfoToSession(1);
//    }
//    
//    /**
//     * 行削除処理(明細)
//     * 
//     * @param model
//     * @param form
//     */
//    @RequestMapping(params = "doDelDetail")
//    public void doDelDetail(Model model, @ModelAttribute("myForm") Mspi1201Frm form) {
//        _menuSvc.setMenuState();
//        _menuSvc.createCategoryItems(model);
//
//        // チェック結果DTOの初期化
//        initResultAndArgs();
//
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        // BasicSvc実行
//        callBasicSvc(model, FpConstants.EXEC_DELROW, resultDto, args, msgList);
//
//        setDetailInfoToSession(1);
//    }
//
//    /**
//     * 複写元管理No.の展開処理
//     * @param model
//     */
//    protected boolean copyseinoLoad(Model model) {
//
//        boolean ret = false;
//
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        // BasicSvc実行
//        if(!callBasicSvc(model, "LOAD", resultDto, args, msgList)) {
//            hdnValueSet(model);
//            return ret;
//        }
//
//        // チェック結果がNGの場合
//        if("NG".equals(resultDto.getProcKbn())) {
//            MessageUtils.addMessages(msgList);
//            MessageUtils.saveMessages();
//            // NG時の処理があれば記述
//        }
//
//        // チェック結果がOKの場合
//        if("OK".equals(resultDto.getProcKbn())) {
//            ret = true;
//            MessageUtils.saveMessages();
//            MessageUtils.addMessages(msgList);
//            // DR
//            Mspi1201Frm frm = sessionDto.getMspi1201Frm();
//            // コンテナNo.明細
//            PagerConditionDto ctrnPagerDto = new PagerConditionDto(sessionDto.getSeiDetailPageLine());
//            // 現在ページ設定
//            ctrnPagerDto.setPageNumber(1);
//            // 1ページ分のインデックスを設定
//            frm.setCtnrPagerDto(ctrnPagerDto);
//            frm.setDetailPageIndex(PagerUtil.filterIndex(sessionDto.getMspi1201Frm().getDetail(), ctrnPagerDto));
//        }
//        
//        // チェック結果がWARNの場合
//        if("WARN".equals(resultDto.getProcKbn())) {
//            for (MessageDto messageDto : msgList) {
//                if (StringUtil.equalsString(Mspi120Const.WARN, messageDto.getMsgType())) {
//                    sessionDto.setWarnKbn(1);
//                    model.addAttribute("clickBtn", "doCopysinoLoadWarnAfter");
//                    sessionDto.setWarnMsgId(messageDto.getMsgId());
//                    sessionDto.setWarnMsgArgs(messageDto.getArgs());
//                    break;
//                }
//            }
//        }
//
//        // JavaScriptメッセージの設定
//        model.addAttribute("jsMessages", getJsMessages());
//        model.addAttribute("warnKbn", sessionDto.getWarnKbn());
//        MessageUtils.saveMessages();
//
//        hdnValueSet(model);
//        // メッセージの表示
//        MessageUtils.display(model, MessageUtils.getMessages());
//
//        return true;
//    }
//    
//    /**
//     * 書類展開処理
//     */
//    protected boolean doDocOpen(Model model) {
//
//        boolean ret = false;
//
//        // 結果DTO
//        ResultDto resultDto = new ResultDto();
//        sessionDto.setResultDto(resultDto);
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//
//        // BasicSvc実行
//        if(!callBasicSvc(model, "SINO_DOCSTORE", resultDto, args, msgList)) {
//            // メッセージの表示
//            MessageUtils.addMessages(msgList);
//            dispMsg(model);
//            return ret;
//        }
//
//        // 画面起動の場合
//        if("SEARCH".equals(resultDto.getProcKbn())) {
//            for(int i = 0; i < msgList.size(); i++) {
//                if(FpConstants.MSGSTATUS_S.equals(msgList.get(i).getMsgStatus())) {
//                    msgList.remove(i);
//                    model.addAttribute("popupId", (String)args.get(FpMapConstants.FP_POPUP_ID));
//                    sessionDto.getMspi1201Frm().setDocPopup(JSON.encode(args.get(FpMapConstants.FP_POPUP_ARGS)));
//
//                    break;
//                }
//            }
//        }
//
//        // メッセージの表示
//        MessageUtils.addMessages(msgList);
//        dispMsg(model);
//
//        return ret;
//    }
//    
//    /**
//     * 荷主先書類展開処理
//     */
//    protected boolean doShpDocOpen(Model model) {
//
//        boolean ret = false;
//
//        // 結果DTO
//        ResultDto resultDto = new ResultDto();
//        sessionDto.setResultDto(resultDto);
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//
//        // BasicSvc実行
//        if(!callBasicSvc(model, "SHP_DOCSTORE", resultDto, args, msgList)) {
//            hdnValueSet(model);
//            // メッセージの表示
//            MessageUtils.addMessages(msgList);
//            dispMsg(model);
//            return ret;
//        }
//
//        // 画面起動の場合
//        if("SEARCH".equals(resultDto.getProcKbn())) {
//            for(int i = 0; i < msgList.size(); i++) {
//                if(FpConstants.MSGSTATUS_S.equals(msgList.get(i).getMsgStatus())) {
//                    msgList.remove(i);
//                    model.addAttribute("popupId", (String)args.get(FpMapConstants.FP_POPUP_ID));
//                    sessionDto.getMspi1201Frm().setShpDocPopup(JSON.encode(args.get(FpMapConstants.FP_POPUP_ARGS)));
//
//                    break;
//                }
//            }
//        }
//
//        hdnValueSet(model);
//        // メッセージの表示
//        MessageUtils.addMessages(msgList);
//        dispMsg(model);
//
//        return ret;
//    }
//
//    /** 子画面選択ボタン押下処理 */
//    @RequestMapping(params = "doAfterMspi1202SearchSelButton")
//    public String doAfterMspi1202SearchSelButton(Model model, @ModelAttribute("myForm") Mspi1201Frm form) {
//
//        doAfterMspi1202ResultAndArgs();
//        // OK処理
//        if (!doAfterMspi1202SearchProc(model))
//            return null;
//
//        return null;
//    }
//    
//    /**
//     * チェック結果DTO 引数Mapの初期化
//     */
//    protected void doAfterMspi1202ResultAndArgs() {
//
//        initResultAndArgs();
//
//        Map<String, Object> args = sessionDto.getArgs();
//        // 引数Mapの設定
//        args.put(LogConst.LOG_PROC_TYPE, LogConst.COM_LOGKBN_UPDATE);
//        args.put(Mspi120MapConstants.FP_MSPI120_SESSION, sessionDto);
//        args.put(FpMapConstants.FPIkkanryopChkSvc_TANKA_FLG, true);
//    }
//    
//    /**
//     * 子画面選択ボタン押下処理
//     * 
//     * @param model
//     */
//    private boolean doAfterMspi1202SearchProc(Model model) {
//
//        boolean ret = false;
//
//        // 結果DTO
//        ResultDto resultDto = sessionDto.getResultDto();
//        // 引数Map
//        Map<String, Object> args = sessionDto.getArgs();
//        // メッセージリスト
//        List<MessageDto> msgList = new ArrayList<MessageDto>();
//
//        // BasicSvc実行
//        if (!callBasicSvc(model, "TANKA_SELLINK", resultDto, args, msgList)) {
//            // メッセージの表示
//            dispMsg(model);
//            return ret;
//        }
//
//        // チェック結果がNGの場合
//        if ("NG".equals(resultDto.getProcKbn())) {
//            MessageUtils.addMessages(msgList);
//            // NG時の処理があれば記述
//        }
//
//        // チェック結果がOKの場合
//        if ("OK".equals(resultDto.getProcKbn())) {
//            ret = true;
//            MessageUtils.addMessages(msgList);
//
//            // 閉じるフラグ
//        }
//
//        // チェック結果がWARNの場合
//        if ("WARN".equals(resultDto.getProcKbn())) {
//            for (MessageDto messageDto : msgList) {
//                if (StringUtil.equalsString(Mspi120Const.WARN, messageDto.getMsgType())) {
//                    sessionDto.setWarnKbn(1);
//                    sessionDto.setWarnMsgId(messageDto.getMsgId());
//                    sessionDto.setWarnMsgArgs(messageDto.getArgs());
//                    model.addAttribute("clickBtn", "doOkWarnAfter");
//                    model.addAttribute("warnKbn", "1");
//                    model.addAttribute("jsMessages", getJsMessages());
//                    break;
//                }
//            }
//        }
//
//        // メッセージの表示
//        dispMsg(model);
//
//        return ret;
//    }
}

  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值