/**
   * Title: betOrderInfoShow<br>
   * Description: <br>
   * (这里用一句话描述这个方法的作用)<br>
   *
   * @return String
   */
  public String betOrderCashInfoShow() {

    try {
      this.initPageParam();
      LotteryManagerInterf termManager =
          ApplicationContextUtils.getService(
              "busLotteryManagerService", LotteryManagerInterf.class);
      List<BusBetOrderDomain> retOrderList = null;
      if (this.page == 0) {
        this.page = 1;
      }
      if (this.perPageNumber == 0) {
        this.perPageNumber = defaultPerPageNumber;
      }
      this.totalNumber =
          termManager.getCanCashOrderInfosCount(this.getP_lotteryId(), this.getP_termNo_begin());
      retOrderList =
          termManager.getCanCashOrderInfoS(
              this.getP_lotteryId(), this.getP_termNo_begin(), this.page, this.perPageNumber);

      this.orderList.setPageNumber(this.page);
      this.orderList.setPerPage(this.perPageNumber);
      this.orderList.setFullListSize(this.totalNumber);
      this.orderList.setList(retOrderList);
    } catch (LotteryException e) {
      e.printStackTrace();
      this.setEx_code(e.getType());
      this.setEx_reason(e.getMessage());
      return ERROR;
    } catch (Exception ex) {
      ex.printStackTrace();
      this.setEx_code(99999);
      this.setEx_reason(ex.getMessage());
      return ERROR;
    }

    return SUCCESS;
  }
  /**
   * Title: betOrderAllCash<br>
   * Description: <br>
   * <br>
   * 全部订单兑奖方法
   *
   * @return String
   */
  @SuppressWarnings("unchecked")
  public String betOrderAllCash() {
    CashResult cashResultBean = new CashResult();
    try {
      HttpServletRequest request = ServletActionContext.getRequest();
      String loginIp = "";
      try {
        loginIp = getIpAddr(request);
      } catch (Exception e) {
        e.printStackTrace();
      }

      Map<String, String> cashNum = new HashMap<String, String>();
      Map<String, String> dbLog = new HashMap<String, String>();
      AdminUser adminUser = (AdminUser) this.getSession().get("tlt.loginuser");
      dbLog.put("userId", String.valueOf(adminUser.getUserId()));
      dbLog.put("userName", String.valueOf(adminUser.getName()));
      dbLog.put("userKey", loginIp);

      cashNum.put("cashTotalNum", "0"); // 兑奖总条数
      cashNum.put("cashCurNum", "0"); // 当前已经兑奖条数
      cashNum.put("cashPersent", "0"); // 当前已经兑奖条数
      this.getSession().put("tlt.cashNum." + this.getP_lotteryId(), cashNum);

      if (StringUtils.isEmpty(this.getP_lotteryId())
          || StringUtils.isEmpty(this.getP_termNo_begin())
          || "0".equals(this.getP_lotteryId())
          || "0".equals(this.getP_termNo_begin())) {
        throw new LotteryException(999999, "兑奖时彩种和彩期不能为空!");
      }

      cashResultBean.setLotteryName(
          LotteryTools.getLotteryName(Integer.parseInt(this.getP_lotteryId())));
      /*
       * 调用兑奖方法兑奖
       */
      CashPrizeInterf cashManager =
          ApplicationContextUtils.getService("busLotteryCashPrizeService", CashPrizeInterf.class);
      // 兑奖
      Map<String, String> cashResult =
          cashManager.cashAutoOrder(
              Integer.parseInt(this.getP_lotteryId()), this.getP_termNo_begin(), cashNum, dbLog);
      /*
       * 统计兑奖结果
       */
      if (cashResult != null) {
        cashResultBean.setTotal_orders(cashResult.get("total_orders"));
        cashResultBean.setTotal_tz_prize(cashResult.get("total_tz_prize"));
        cashResultBean.setSucess_orders(cashResult.get("sucess_orders"));
        cashResultBean.setSucess_tz_prize(cashResult.get("sucess_tz_prize"));
        cashResultBean.setFail_orders(cashResult.get("fail_orders"));
        cashResultBean.setFail_tz_prize(cashResult.get("fail_tz_prize"));
        cashResultBean.setZj_orders(cashResult.get("zj_orders"));
        cashResultBean.setZj_prize(cashResult.get("zj_prize"));
      }
      // 处理追号
      Map<String, String> zhuHaoResult =
          cashManager.dealNotTicketOrder(
              Integer.parseInt(this.getP_lotteryId()), this.getP_termNo_begin(), dbLog);
      /*
       * 统计追号结果
       */
      if (zhuHaoResult != null) {
        cashResultBean.setZh_nextTerm(zhuHaoResult.get("nextTerm"));
        cashResultBean.setZh_total_num(zhuHaoResult.get("total_num"));
        cashResultBean.setZh_sucess_num(zhuHaoResult.get("sucess_num"));
        cashResultBean.setZh_fail_num(zhuHaoResult.get("fail_num"));
        cashResultBean.setZh_sucess_bet_num(zhuHaoResult.get("sucess_bet_num"));
        cashResultBean.setZh_sucess_limit_num(zhuHaoResult.get("sucess_limit_num"));
      }
      // 更新彩期状态
      Map<String, String> upTermResult =
          cashManager.updateCashTermStatus(
              Integer.parseInt(this.getP_lotteryId()), this.getP_termNo_begin(), dbLog);
      if (upTermResult != null) {
        cashResultBean.setOld_term_status(upTermResult.get("old_status"));
        cashResultBean.setNew_term_status(upTermResult.get("new_status"));
      }
    } catch (LotteryException e) {
      e.printStackTrace();
      cashResultBean.setEx_code(e.getType());
      cashResultBean.setEx_reason(e.getMessage());
    } catch (Exception ex) {
      ex.printStackTrace();
      cashResultBean.setEx_code(99999);
      cashResultBean.setEx_reason(ex.getMessage());
    }
    this.jsonString = JSONObject.fromObject(cashResultBean).toString();
    return "ajaxjson";
  }