Ejemplo n.º 1
0
  /**
   * <br>
   * [機 能] 初期表示処理 <br>
   * [解 説] <br>
   * [備 考]
   *
   * @param map マップ
   * @param form フォーム
   * @param req リクエスト
   * @param res レスポンス
   * @param con コネクション
   * @return ActionForward フォワード
   * @throws Exception 実行時例外
   */
  private ActionForward __doInit(
      ActionMapping map,
      Sml140knForm form,
      HttpServletRequest req,
      HttpServletResponse res,
      Connection con)
      throws Exception {

    Sml140knParamModel paramMdl = new Sml140knParamModel();
    paramMdl.setParam(form);
    Sml140knBiz biz = new Sml140knBiz(con);
    biz.getInitData(getRequestModel(req), paramMdl);
    // 年選択、月選択の入力チェックを行う
    biz.updateEgnoreYearMonth(paramMdl);
    paramMdl.setFormData(form);

    return map.getInputForward();
  }
Ejemplo n.º 2
0
  /**
   * <br>
   * [機 能] 確定ボタンクリック時 <br>
   * [解 説] <br>
   * [備 考]
   *
   * @param map ActionMapping
   * @param form フォーム
   * @param req リクエスト
   * @param res レスポンス
   * @param con コネクション
   * @return forward アクションフォワード
   * @throws Exception 実行時例外
   */
  public ActionForward __doDelete(
      ActionMapping map,
      Sml140knForm form,
      HttpServletRequest req,
      HttpServletResponse res,
      Connection con)
      throws Exception {

    ActionForward forward = null;

    if (!isTokenValid(req, true)) {
      log__.info("2重投稿");
      forward = getSubmitErrorPage(map, req);
      return forward;
    }

    con.setAutoCommit(false);
    boolean commit = false;
    RequestModel reqMdl = getRequestModel(req);

    try {

      Sml140knParamModel paramMdl = new Sml140knParamModel();
      paramMdl.setParam(form);
      Sml140knBiz biz = new Sml140knBiz(con);
      biz.updateSyudoDelSetting(reqMdl, paramMdl);
      paramMdl.setFormData(form);

      GsMessage gsMsg = new GsMessage(reqMdl);
      String delete = gsMsg.getMessage("cmn.delete");

      // ログ出力処理
      SmlAccountModel sacMdl = new SmlAccountModel();
      SmlAccountDao sacDao = new SmlAccountDao(con);
      sacMdl = sacDao.select(form.getSml140AccountSid());

      String accountName = sacMdl.getSacName();

      if (paramMdl.getSml140SelKbn() != GSConstSmail.ACCOUNT_SEL) {
        accountName = gsMsg.getMessage("wml.wml120.01");
      }

      SmlCommonBiz smlBiz = new SmlCommonBiz(con, reqMdl);
      smlBiz.outPutLog(
          map,
          reqMdl,
          delete,
          GSConstLog.LEVEL_INFO,
          "アカウント:"
              + accountName
              + "\n[value]"
              + form.getSml140JdelKbn()
              + "-"
              + form.getSml140JYear()
              + "-"
              + form.getSml140JMonth()
              + ", "
              + form.getSml140SdelKbn()
              + "-"
              + form.getSml140SYear()
              + "-"
              + form.getSml140SMonth()
              + ", "
              + form.getSml140WdelKbn()
              + "-"
              + form.getSml140WYear()
              + "-"
              + form.getSml140WMonth()
              + ", "
              + form.getSml140DdelKbn()
              + "-"
              + form.getSml140DYear()
              + "-"
              + form.getSml140DMonth());
      commit = true;

      forward = __doCompDsp(map, form, req, res);
      return forward;

    } catch (SQLException e) {
      log__.error("SQLException", e);
      throw e;
    } finally {
      if (commit) {
        con.commit();
      } else {
        JDBCUtil.rollback(con);
      }
    }
  }