/**
   * @Function onEventRefreshPayDetailData @Description 根据请求条件 调用消费明细接口 @Input
   * entity:请求参数实体类数据 @Return 无返回值
   */
  public void onEventRefreshPayDetailData(MenuRefreshEventEntity entity) {
    // 排序方式
    if (!Handler_String.isBlank(entity.getMenuKindCode())
        && !Handler_String.isBlank(entity.getMenuKindName())) {
      cardType = Integer.parseInt(entity.getMenuKindCode());
      textview_title.setText(entity.getMenuKindName());
      mapList.clear();
      pageNo = 1;
      // 设置输入参数
      if (entity.getMenuKindCode().equals("0")) {
        filtermap.put("cardType", "");
      } else {
        filtermap.put("cardType", entity.getMenuKindCode());
      }
      filtermap.put("pageNo", pageNo + "");
      filtermap.put("pageCount", UrlParams.PAGESIZE + "");

      showDialog(); // 打开模式层
      // 调用消费明细信息接口
      FastHttpHander.ajaxString(
          Url.METHOD_CARDCONSUMEARRAY, Handler_Json.beanToJson(filtermap), internetConfig, this);
    }

    foodTopDown.setImageResource(R.drawable.arrow_down_white);
  }
  /** @Function init @Description 初始化方法 初始化控件 @Input 无 @Return 无返回值 */
  @InjectInit
  public void init() {
    textview_title.setVisibility(View.VISIBLE);
    getSupportActionBar().setTitle("");
    title_center_layout.setVisibility(View.VISIBLE);
    foodTopDown.setVisibility(View.VISIBLE);
    eventBus.register(this, "onEventRefreshPayDetailData");
    cardType = 99; // 默认筛选条件是间夜消费
    // 初始化消费筛选列表
    setPayDetailFilterDataList();
    internetConfig = new InternetConfig();
    internetConfig.setKey(1);
    intent = getIntent();
    // 消费信息查询条件
    filtermap =
        (Map<String, String>) Handler_Json.JsonToHashMap(intent.getStringExtra("payDetailFilter"));
    filtermap.put("pageNo", pageNo + "");
    filtermap.put("pageCount", UrlParams.PAGESIZE + "");
    pageUtil = new PageUtil();

    adapter =
        new HotelCardPayDetailAdapter(
            hotelcard_pay_detail_list, mapList, R.layout.mem_hotelcard_pay_detail);
    hotelcard_pay_detail_list.setAdapter(adapter);
    showDialog(); // 打开模式层
    // 调用消费明细信息接口
    FastHttpHander.ajaxString(
        Url.METHOD_CARDCONSUMEARRAY,
        intent.getStringExtra("payDetailFilter"),
        internetConfig,
        this);
  }
  /**
   * @Function pageRefresh @Description 分页
   *
   * @input type:1:向下翻页 2,向上翻页
   * @return 无返回值
   */
  @InjectPullRefresh
  public void pageRefresh(int type) {
    // 消费列表接口分页
    Ioc.getIoc().getLogger().i("红树林卡消费接口:[" + Url.METHOD_CARDCONSUMEARRAY + "]");
    internetConfig.setKey(1);
    switch (type) {
      case InjectView.PULL: // 向下翻页
        pageNo++;
        if (pageNo > count) {
          pageUtil.isEndDownPage(); // 结束翻页
          return;
        }
        // 设置输入参数
        filtermap.put("pageNo", pageNo + "");
        filtermap.put("pageCount", UrlParams.PAGESIZE + "");
        showDialog();
        // 调用后接口
        FastHttpHander.ajaxString(
            Url.METHOD_CARDCONSUMEARRAY, Handler_Json.beanToJson(filtermap), internetConfig, this);

        break;
      case InjectView.DOWN:
        pageUtil.isEndDownPage();
        break;
    }
  }
예제 #4
0
 /** 订单详情(多组查询) */
 private void orderGroupDetailResult(String orderIdList) {
   showDialog();
   JsonObject json = new JsonObject();
   json.addProperty("orderIdList", orderIdList);
   InternetConfig config1 = new InternetConfig();
   config1.setKey(11);
   // 未支付订单查询
   FastHttpHander.ajaxString(Url.ORDER_DETAIL_ARRAY, json.toString(), config1, this);
 }
예제 #5
0
 /**
  * * 验证登录状态
  *
  * @param ticket 登录票据
  */
 private void checkTicket(String ticket) {
   showDialog();
   String url = Url.MEM_TICKET_VALID;
   JsonObject json = new JsonObject();
   json.addProperty("ticket", ticket);
   InternetConfig config = new InternetConfig();
   config.setKey(9);
   FastHttpHander.ajaxString(url, json.toString(), config, this);
 }
예제 #6
0
 /** 取消订单接口 */
 private void cancelOrder() {
   showDialog();
   JsonObject jsonParam = new JsonObject();
   jsonParam.addProperty("orderNoList", group.get(groupPosition).getOrderNoGroup());
   Ioc.getIoc().getLogger().i("取消预订接口参数:" + jsonParam.toString());
   InternetConfig config = new InternetConfig();
   config.setKey(27);
   FastHttpHander.ajaxString(
       Url.HOTELRESERVE_ACCURATE_CLEARRESERVE, jsonParam.toString(), config, this);
 }
예제 #7
0
  private void ajaxImgList() {

    InternetConfig config = new InternetConfig();
    JsonObject json = new JsonObject();
    json.addProperty("hotelCode", rd.getHotelCode());
    //		json.addProperty("roomTypeCode", rd.getRoomTypeCode());
    //		json.addProperty("includeLayoutPic", "1");
    //		json.addProperty("includePic", "1");
    FastHttpHander.ajaxString(Url.HOTELRESERVE_ASSET_BULIDING_ARRAY, json.toString(), config, this);
  }
예제 #8
0
 /** 未支付订单查询 */
 private void ajaxOrder() {
   showDialog();
   JsonObject json = new JsonObject();
   json.addProperty("pageNo", page);
   json.addProperty("pageCount", 100);
   json.addProperty("statusKind", 1);
   InternetConfig config1 = new InternetConfig();
   config1.setKey(10);
   // 未支付订单查询
   FastHttpHander.ajaxString(Url.MEMBER_ORDER_ARRAY, json.toString(), config1, this);
 }
예제 #9
0
 // 获取会员信息
 private void getMemInfo() {
   internetConfig = new InternetConfig();
   Ioc.getIoc().getLogger().i("调用后台获取个人信息接口:[" + Url.METHOD_MEMBERINFO + "]");
   internetConfig.setKey(1);
   Map<String, String> map = new HashMap<>();
   map.put("proceedsPhone", "");
   internetConfig.setHead(FastHttp.inHeaders());
   // 调用后台个人信息接口
   FastHttpHander.ajaxString(
       Url.METHOD_MEMBERINFO, Handler_Json.beanToJson(map), internetConfig, this);
 }
예제 #10
0
 /**
  * *********************************************** @Title: getMsgList @Description: TODO(获取消息列表)
  * 设定文件
  *
  * @return void 返回类型
  * @throws
  * @date 2015-2-6 ***********************************************
  */
 private void getMsgList() {
   // showDialog();
   String url = Url.SERVICE_MSG_ARRAY_URL;
   JsonObject json = new JsonObject();
   json.addProperty("pageNo", pageNo);
   json.addProperty("pageCount", 10);
   json.addProperty("msgTime", "");
   InternetConfig config = new InternetConfig();
   config.setKey(1);
   config.setHead(CommonUtils.inHeaders());
   FastHttpHander.ajaxString(url, json.toString(), config, this);
 }
예제 #11
0
 /**
  * **********************************************
  *
  * @return void 返回类型
  * @throws @Title: ajaxPOST @Description: (酒店介绍 图片列表 请求操作) 设定文件
  * @date 2014-11-19 ***********************************************
  */
 private void ajaxPOST() {
   rd = (ReservationDto) MapVo.get("reservtion");
   if (rd == null) {
     Toast.makeText(activity, "数据异常,请重新选择酒店及入住时间", Toast.LENGTH_SHORT).show();
   } else {
     if (rd.getHotelCode() != null && rd.getHotelCode() != "") {
       String jsonParams = "{'hotelCode':" + rd.getHotelCode() + "}";
       InternetConfig config = new InternetConfig();
       config.setKey(111);
       FastHttpHander.ajaxString(Url.HOTELRESERVE_ASSET_BULIDING_ARRAY, jsonParams, config, this);
     } else {
       Toast.makeText(activity, "数据异常,请重新选择酒店及入住时间", Toast.LENGTH_SHORT).show();
     }
   }
 }
예제 #12
0
  /** 自动验证成功的方法 */
  @Override
  public void onValidationSucceeded() {
    showDialog("登录中...");
    Ioc.getIoc().getLogger().i("登录前端验证成功");
    // Toast.makeText(this, "前端验证通过", Toast.LENGTH_SHORT).show();

    loginMap = new HashMap<String, String>();
    loginMap.put("account", login_name.getText().toString().trim());
    loginMap.put("password", login_pwd.getText().toString().trim());

    // 验证手机是否联网
    if (!Handler_Network.isNetworkAvailable(this)) {
      Toast.makeText(this, ErrorMsgEnum.NET_ERROR.getName(), Toast.LENGTH_SHORT).show();
      return;
    }
    config = new InternetConfig();
    config.setKey(R.raw.client);
    config.setHead(CommonUtils.inHeaders());
    Ioc.getIoc().getLogger().i("调用后台登录接口:[" + Url.METHOD_LOGIN + "]");
    // 调用后台登录接口
    FastHttpHander.ajaxString(Url.METHOD_LOGIN, Handler_Json.beanToJson(loginMap), config, this);
  }
예제 #13
0
 /**
  * **********************************************
  *
  * @param page 设定文件
  * @return void 返回类型
  * @throws @Title: ajaxRoomList @Description: TODO(获取房间列表)
  * @date 2014-11-19 ***********************************************
  */
 private void ajaxRoomList(int page) {
   RoomResourceParamDto rrpd = new RoomResourceParamDto();
   rrpd.setStartDate(rd.getStartDate());
   rrpd.setEndDate(rd.getEndDate());
   rrpd.setHotelCode(rd.getHotelCode());
   rrpd.setCardNo(rd.getCardNo());
   rrpd.setPageNo(page + "");
   rrpd.setPageCount("5");
   ArrayList<HashMap<String, String>> conditions =
       (ArrayList<HashMap<String, String>>) MapVo.get("conditions");
   if (conditions != null) {
     rrpd.setBuildingCode(conditions.get(3).get("text_type_code") + "");
     rrpd.setFloorCode(conditions.get(4).get("text_type_code") + "");
     rrpd.setInfarIntro(conditions.get(2).get("text_type_code") + "");
     rrpd.setRoomTypeCode(conditions.get(0).get("text_type_code") + "");
     rrpd.setViewCode(conditions.get(1).get("text_type_code") + "");
     rrpd.setRoomIdxRange(conditions.get(5).get("text_type_code") + "");
   }
   InternetConfig config = new InternetConfig();
   config.setKey(1);
   String json = Handler_Json.beanToJson(rrpd);
   Ioc.getIoc().getLogger().i(json);
   FastHttpHander.ajaxString(Url.HOTELRESERVE_ASSET_RECOMMENDROOMARRAY, json, config, this);
 }
예제 #14
0
 /**
  * 异步 post请求 有参数 默认下载配置
  *
  * @param url 请求url
  * @param jsonParams 请求参数 jsonString
  * @param object 回调函数
  * @return void
  * @author mars 2013-5-20 下午2:51:48
  */
 public static void ajax(String url, String jsonParams, Object object) {
   ajaxString(url, jsonParams, InternetConfig.defaultConfig(), object);
 }
예제 #15
0
 /**
  * 异步post定时轮询 有参数
  *
  * @param url
  * @param params jsonString
  * @param object
  * @return void
  * @author mars 2013-6-8 下午2:06:54
  */
 public static void ajax(String url, String params, AjaxTimeCallBack object) {
   InternetConfig config = InternetConfig.defaultConfig();
   config.setRequest_type(InternetConfig.request_post);
   ajaxString(url, params, config, object);
 }
예제 #16
0
 private void ajaxVersion() {
   InternetConfig in = new InternetConfig();
   in.setKey(13);
   FastHttpHander.ajaxString(Url.MEM_VERSIONS, null, in, this);
 }