コード例 #1
0
  public int buttonEvent(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      String button,
      ErrorMessages msgs,
      EventManager manager) {
    ctx.setRequestAtrribute("CLIENTNO", strClientNO);
    ctx.setRequestAtrribute("flag", strFlag);

    if (button != null && button.equals(SessionAttributes.REQUEST_BUTTON_ADD_NAME)) {
      trigger(manager, "CMCAP2", null);
    }
    if (button != null && button.equals(SessionAttributes.REQUEST_EDIT_BUTTON_VALUE)) {
      trigger(manager, "CMCAP2", null);
    }
    return 0;
  }
コード例 #2
0
  public int buttonEvent(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      String button,
      ErrorMessages msgs,
      EventManager manager) {

    if (button != null && button.equals("CONFIRMBUTTON")) {
      if (doConfirm(ctx, conn, instance, msgs, true) == 0) {
        ctx.setRequestAtrribute("msg", "此笔放款记录已审核通过!");
        ctx.setRequestAtrribute("flag", "1");
        ctx.setRequestAtrribute("isback", "0");
        ctx.setTarget("/showinfo.jsp");
        instance.setReadonly(true);

      } else {
        return -1;
      }
    } else if (button != null && button.equals("DISMISSALBUTTON")) {
      if (doConfirm(ctx, conn, instance, msgs, false) == 0) {
        ctx.setRequestAtrribute("msg", "此笔放款记录已驳回!");
        ctx.setRequestAtrribute("flag", "1");
        ctx.setRequestAtrribute("isback", "0");
        ctx.setTarget("/showinfo.jsp");
        instance.setReadonly(true);

      } else {
        return -1;
      }
    }

    return 0;
  }
コード例 #3
0
ファイル: CMIndvClient.java プロジェクト: fordream/zhan-cms
  public int buttonEvent(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      String button,
      ErrorMessages msgs,
      EventManager manager) {
    // String CLIENTNO = instance.getStringValue("CLIENTNO");
    String CLIENTNO = strClientNo;
    // String CLIENTNO = ctx.getParameter("CLIENTNO");
    if (CLIENTNO == null || CLIENTNO.length() < 1 || CLIENTNO.equals("自动生成")) {
      System.out.println(CLIENTNO);
      msgs.add("请确定个人客户资料信息已经存在!");
      return -1;
    }
    // setRequestAtrribute
    ctx.setRequestAtrribute("flag", flag);
    ctx.setRequestAtrribute("CLIENTNO", CLIENTNO);

    if (button.equals("CMINDVRELA")) {
      trigger(manager, "100012", null);
    } else if (button.equals("BMRQL")) {
      trigger(manager, "BMRQL1", null);
    } else if (button.equals("BMCREDITLMAINTPAGE")) {
      trigger(manager, "BMCREDITLMAINTPAGE", null);
    } else if (button.equals("PHOTO")) {
      // ctx.setRequestAtrribute("PHOTONO",ctx.getParameter("PHOTONO"));
      ctx.setRequestAtrribute("TABLENAME", "CMINDVCLIENT");
      ctx.setRequestAtrribute("WHERECONDITION", "clientno='" + CLIENTNO + "'");
      ctx.setRequestAtrribute("title", "个人客户图片");
      ctx.setRequestAtrribute("flag", this.flag);
      ctx.setTarget("/photo/photo.jsp");
    } else if (button.equals("CREDIT")) {
      RecordSet rs =
          conn.executeQuery("select id from CMINDVCLIENT where clientno='" + CLIENTNO + "'");
      if (!rs.next()) {
        msgs.add("取得id失败!");
        return -1;
      }
      String id = rs.getString("ID");
      ctx.setRequestAtrribute("ID", id);
      trigger(manager, "GUARANTORCREDITLIST", null);
      return 0;
    }

    /**
     * else if (button.equals("CMINDVASSET")) { trigger(manager, "100013", null); } else if
     * (button.equals("CMINDVDEBT")) { trigger(manager, "100014", null); } else if
     * (button.equals("CMINDVDEBTPAYMENT")) { trigger(manager, "100015", null); }
     */
    return 0;
  }
コード例 #4
0
ファイル: FDSysWHList.java プロジェクト: fordream/zhan-cms
  public int buttonEvent(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      String button,
      ErrorMessages msgs,
      EventManager manager) {

    /*
            ctx.setAttribute("SUPERFORMID", instance.getFormid());
            ctx.setAttribute("BUTTONNAME", button);

            if (button != null && button.equals(SessionAttributes.REQUEST_EDIT_BUTTON_VALUE)) {
                ctx.setAttribute("BUTTONNAME", ctx.getParameter(SessionAttributes.CLICK_COLUMN_NAME));
                trigger(manager, "FDCUTPAYDETLPAGE", null);
            }
    */

    // check
    if (button != null && (button.equals("CHECKBUTTON"))) {

      try {

        String sql =
            "select gthtb_htbh,gthtb_dwbh,xdkhzd_khmc,gthtb_qsrq,gthtb_dqrq,gthtb_htje,gthtb_tyckzh,gthtb_htnm "
                + "from gthtb@haier_shengchan a,xdkhzd@haier_shengchan b "
                + " where a.gthtb_dwbh=b.xdkhzd_khbh "
                + " and (a.gthtb_htbh like 'GC%' or  a.gthtb_htbh like 'GQ%' or  a.gthtb_htbh like 'GSQ%' or  a.gthtb_htbh like 'GT%' ) "
                + " and (a.gthtb_htbh != 'GQ20090405' and a.gthtb_htbh != 'GQ20090728') "
                + " and a.gthtb_tyckzh='801000026101041001' ";

        logger.info("SQL=" + sql);
        RecordSet rs = conn.executeQuery(sql);

        int count = 0;
        msgs.add("<br>帐号检查结果如下:");
        while (rs.next()) {
          String dwbh = rs.getString("gthtb_dwbh");
          String actno = rs.getString("gthtb_tyckzh");
          String htbh = rs.getString("gthtb_htbh");
          String khmc = rs.getString("xdkhzd_khmc");

          String promptStr = dwbh + " " + khmc + " " + htbh + " " + actno;

          count++;
          msgs.add("<br>" + count + ":" + promptStr);

          /*
          if (dwbh.startsWith("GC")) {
              if (!"801000026701041001".equals(actno)) {
                  count++;
                  msgs.add("<br>" + count + ":" + promptStr);
              }
          } else if (dwbh.startsWith("GQ")) {
              if (!"801000026701041001".equals(actno)) {
                  count++;
                  msgs.add("<br>" + count + ":" + promptStr);
              }
          } else if (dwbh.startsWith("GSQ")) {
              if (!"801000026701041001".equals(actno)) {
                  count++;
                  msgs.add("<br>" + count + ":" + promptStr);
              }
          } else if (dwbh.startsWith("GT")) {
              if ("GT001".equals(dwbh)) {
                  if (!"801000026701041001".equals(actno)) {
                      count++;
                      msgs.add("<br>" + count + ":" + promptStr);
                  }
              } else {
                  if (!"801000026101041001".equals(actno)) {
                      count++;
                      msgs.add("<br>" + count + ":" + promptStr);
                  }
              }
          }
          */
        }
        if (count == 0) {
          msgs.add("<br>未发现帐号错误!");
        }
        msgs.add("<br>检查完成。");
      } catch (Exception e) {
        Debug.debug(e);
        msgs.add("帐号检查时出现问题,请通知系统管理人员!");
        return 0;
      } finally {
        ctx.setRequestAtrribute("msg", msgs.getAllMessages());
        ctx.setRequestAtrribute("flag", "1");
        ctx.setRequestAtrribute("isback", "0");
        ctx.setTarget("/showinfo.jsp");
        instance.setReadonly(true);
      }
    }
    // 设定帐号
    if (button != null && (button.equals("PROCESSBUTTON"))) {
      // rigger(manager, "FDSYSWHLIST", null);
      try {
        String sql =
            "update  gthtb@haier_shengchan a "
                + " set a.gthtb_tyckzh = '801000026701041001' "
                + " where (a.gthtb_dwbh like 'GC%' or  a.gthtb_dwbh like 'GQ%' or  a.gthtb_dwbh like 'GSQ%' or  a.gthtb_dwbh like 'GT%' ) "
                + " and (a.gthtb_htbh != 'GQ20090405' and a.gthtb_htbh != 'GQ20090728') "
                + " and a.gthtb_tyckzh='801000026101041001' ";
        conn.setAuto(false);
        conn.begin();
        int rtn = conn.executeUpdate(sql);
        msgs.add("已成功更新 " + rtn + " 笔同业存款帐号。");
        conn.commit();
      } catch (Exception e) {
        conn.rollback();
        logger.error(e);
        msgs.add("同业帐号更新时出现问题,请通知系统管理人员!");
        return 0;
      } finally {
        ctx.setRequestAtrribute("msg", msgs.getAllMessages());
        ctx.setRequestAtrribute("flag", "1");
        ctx.setRequestAtrribute("isback", "0");
        ctx.setTarget("/showinfo.jsp");
        instance.setReadonly(true);
      }
    }

    return 0;
  }
コード例 #5
0
ファイル: CMIndvClient.java プロジェクト: fordream/zhan-cms
  public int postInsertOk(
      SessionContext ctx,
      DatabaseConnection conn,
      FormInstance instance,
      ErrorMessages msgs,
      EventManager manager) {
    if (this.isG) {
      return conn.executeUpdate(
          "delete from cmguarantor where id='" + ctx.getParameter("ID") + "'");
    }

    if (this.initClientNo == null) {
      return 0;
    }

    MyDB.getInstance().addDBConn(conn);
    int ret = 0;
    try {
      UserManager um = (UserManager) ctx.getAttribute(SystemAttributeNames.USER_INFO_NAME);
      String OPERATOR = null;
      OPERATOR = um.getUserName();

      String clientno = null;

      if (this.initClientNo != null) {
        if (currClientNo == null) {
          msgs.add("客户号码未发现,请重做交易!");
          return -1;
        } else {
          ret = ClientMigration.clientMrig(initClientNo, currClientNo, OPERATOR);
          if (ret >= 0) {
            /** I comment following line temporarily to speed up perfomance JGO on 20040905 */
            // ret = CMClientMan.updateClientCatAndType(currClientNo, OPERATOR);
            ret = 0;
          }
          if (ret < 0) {
            String msg = PropertyManager.getProperty("" + ret);
            if (msg == null) {
              msg = "" + ret;
            }
            ctx.setRequestAtrribute("title", "客户信息移行");
            ctx.setRequestAtrribute("msg", "处理失败:" + msg);
            ctx.setRequestAtrribute("flag", "0");
            ctx.setTarget("/showinfo.jsp");
          } else {
            ctx.setRequestAtrribute("title", "客户信息移行");
            ctx.setRequestAtrribute("msg", "处理成功完成!");
            ctx.setRequestAtrribute("flag", "1");
            ctx.setTarget("/showinfo.jsp");
          }
        }
      }
    } catch (Exception e) {
      if (Debug.isDebugMode) {
        e.printStackTrace();
      }
      ret = -1;
    } finally {
      MyDB.getInstance().releaseDBConn();
      return ret;
    }
  }