Esempio n. 1
0
  /**
   * 页面初始化/查询
   *
   * @return
   */
  public String init() {
    ActionContext.getContext()
        .getSession()
        .put(Constants.CURRENT_LOCATION, getText("sim.manage.location"));

    try {
      Map<String, String> map = new HashMap<String, String>();
      map.put("simNumber", SearchUtil.formatSpecialChar(simNumber));
      map.put("phoneNumber", SearchUtil.formatSpecialChar(phoneNumber));

      int totalCount = 0;
      totalCount = service.getCount("SimManage.getCount", map);
      Page pageObj = new Page(page, totalCount, pageSize, url, param);
      this.pageBar = PageHelper.getPageBar(pageObj);

      simList =
          (List<SimInfo>)
              service.getObjectsByPage(
                  "SimManage.getSimInfos", map, pageObj.getStartOfPage(), pageSize);

      if (simList != null && simList.size() == 0) {
        // 无SIM卡信息
        addActionError(getText("common.no.data"));
        return ERROR;
      }

      // 显示操作成功信息
      if (null != message) {
        addActionMessage(getText(message));
      }

    } catch (BusinessException e) {
      super.addActionError(getText("info.db.error"));
      log.error("Query sim infos error:" + e.getMessage());
      return ERROR;
    } catch (Exception e) {
      super.addActionError(getText("info.db.error"));
      log.error("Query sim infos error:" + e.getMessage());
      return ERROR;
    } finally {
      setOperationType(Constants.SELECT, ModuleId.CLW_M_CS_SIM_QUERY_MID);
      addOperationLog("查询SIM卡信息");
    }

    return SUCCESS;
  }
Esempio n. 2
0
 /**
  * 转向详情页面
  *
  * @return
  */
 public String showDriverDurationDetailPage() {
   try {
     detailObj = new DriverStatInfo();
     HttpServletRequest request =
         (HttpServletRequest)
             ActionContext.getContext().get(org.apache.struts2.StrutsStatics.HTTP_REQUEST);
     String id = request.getParameter("id");
     String name = request.getParameter("name");
     name = SearchUtil.formatSpecialChar(java.net.URLDecoder.decode(name, "utf-8"));
     String cardid = request.getParameter("cardid");
     String duration = request.getParameter("duration");
     duration = SearchUtil.formatSpecialChar(java.net.URLDecoder.decode(duration, "utf-8"));
     String mileage = request.getParameter("mileage");
     detailObj.setDriverId(id);
     detailObj.setDriverName(name);
     detailObj.setDriverCardId(cardid);
     detailObj.setDriverDuration(duration);
     detailObj.setDriverMileage(mileage);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return SUCCESS;
 }