public JsonPack postArrival(
      String token, // 用户token
      String uuid, // task的uuid
      String imageLengthList, // 表示图片大小的数组(可支持多张图片)用分号分隔的方式依次存放了各图片的字节数。例如:13242314;29282
      InputStream pic // 图片数据, //见方法说明
      ) throws Exception {

    DefaultHttpClient client = null;
    try {
      client = AbstractHttpApi.createHttpClientForUpload();
      HttpPost httpPost =
          mHttpApi.createHttpPost(
              fullUrl(URL_API_POST_ARRIVAL),
              pic,
              new BasicNameValuePair("token", token),
              new BasicNameValuePair("imageLengthList", imageLengthList),
              new BasicNameValuePair("uuid", uuid));
      JsonPack jsonPack = mHttpApi.doHttpRequest(httpPost);
      return jsonPack;
    } catch (Exception e) {
      throw e;
    } finally {
      if (client != null) {
        try {
          client.getConnectionManager().shutdown();
        } catch (Exception e) {

        }
      }
    }
  }
  /**
   * 客户签到提交数据
   *
   * @param token
   * @param uuid
   * @param imageLengthArray 图片大小 例如:13242314
   * @param pic 图片数据
   * @return 成功JsonPack.re=200
   * @throws Exception
   */
  public JsonPack PostUserSign_SC(
      String token, // 用户token
      String uuid, // task的uuid
      String imageLengthList, // 表示图片大小
      InputStream pic // 图片数据, //见方法说明
      ) throws Exception {

    DefaultHttpClient client = null;
    try {
      client = AbstractHttpApi.createHttpClientForUpload();
      HttpPost httpPost =
          mHttpApi.createHttpPost(
              fullUrl(URL_API_POST_Sign),
              pic,
              new BasicNameValuePair("token", token),
              new BasicNameValuePair("imageLengthList", imageLengthList),
              new BasicNameValuePair("uuid", uuid));
      JsonPack jsonPack = mHttpApi.doHttpRequest(httpPost);
      return jsonPack;
    } catch (Exception e) {
      throw e;
    } finally {
      if (client != null) {
        try {
          client.getConnectionManager().shutdown();
        } catch (Exception e) {

        }
      }
    }
  }
  // 获得用户首页的信息,返回MainPageInfoDTO
  // 如果没有数据更新,MainPageInfoDTO.needUpdateTag=false
  public JsonPack getMainPageInfo(
      String token, // 用户token
      long timestamp // 每次回传上次接收到的MainPageInfoDTO里的timestamp
          ,
      String latitude,
      String longitude,
      String acquisition_at)
      throws Exception {
    DefaultHttpClient client = null;
    try {
      client = AbstractHttpApi.createHttpClient();
      HttpPost httpGet =
          mHttpApi.createHttpPost(
              fullUrl(URL_API_GET_MAIN_PAGE_INFO),
              new BasicNameValuePair("token", token),
              new BasicNameValuePair("latitide", latitude),
              new BasicNameValuePair("longitude", longitude),
              new BasicNameValuePair("acquisition_at", acquisition_at));
      JsonPack jsonPack = mHttpApi.doHttpRequest(client, httpGet);

      return jsonPack;
    } catch (Exception e) {
      JsonPack jsonPack = new JsonPack();
      jsonPack.setRe(-1);
      return jsonPack;
    } finally {
      if (client != null) {
        try {
          client.getConnectionManager().shutdown();
        } catch (Exception e) {

        }
      }
    }
  }
  /**
   * 客户抵达餐厅提交数据
   *
   * @param token
   * @param uuid
   * @param tableNum
   * @param peopleNum
   * @param typeTag
   * @param imageLengthArray 用逗号分隔的方式依次存放了各图片的字节数。例如:13242314,29282
   * @param pic 图片数据,目前最多两张图片。
   * @return 成功JsonPack.re=200
   * @throws Exception
   */
  public JsonPack postSFGuestArrival(
      String token, // 用户token
      String uuid, // task的uuid
      String tableNum, // 桌台号
      int peopleNum, // 就餐人数
      int typeTag, // 餐位类型 1:大厅,2:包房
      String memo, // 抽查备注,最大长度250
      int haschild,
      int ispricesame,
      int hassuperwine,
      int usecashcoupon,
      int arrivelate,
      String imageLengthList, // 表示图片大小的数组(可支持多张图片)用分号分隔的方式依次存放了各图片的字节数。例如:13242314;29282
      InputStream pic // 见方法说明
      ) throws Exception {
    DefaultHttpClient client = null;
    try {
      client = AbstractHttpApi.createHttpClientForUpload();
      HttpPost httpPost =
          mHttpApi.createHttpPost(
              fullUrl(URL_API_POST_SF_GUEST_ARRIVAL),
              pic,
              new BasicNameValuePair("token", token),
              new BasicNameValuePair("uuid", uuid),
              new BasicNameValuePair("tableNum", tableNum),
              new BasicNameValuePair("peopleNum", String.valueOf(peopleNum)),
              new BasicNameValuePair("imageLengthList", imageLengthList),
              new BasicNameValuePair("typeTag", String.valueOf(typeTag)),
              new BasicNameValuePair("memo", String.valueOf(memo)),
              new BasicNameValuePair("haschild", String.valueOf(haschild)),
              new BasicNameValuePair("hassuperwine", String.valueOf(hassuperwine)),
              new BasicNameValuePair("arrivelate", String.valueOf(arrivelate)),
              new BasicNameValuePair("usecashcoupon", String.valueOf(usecashcoupon)),
              new BasicNameValuePair("ispricesame", String.valueOf(ispricesame)));
      JsonPack jsonPack = mHttpApi.doHttpRequest(httpPost);
      return jsonPack;
    } catch (Exception e) {
      throw e;
    } finally {
      if (client != null) {
        try {
          client.getConnectionManager().shutdown();
        } catch (Exception e) {

        }
      }
    }
  }
  /**
   * 客户抵达餐厅提交数据
   *
   * @param token
   * @param uuid
   * @param tableNum
   * @param peopleNum
   * @param typeTag
   * @param imageLengthArray 用逗号分隔的方式依次存放了各图片的字节数。例如:13242314,29282
   * @param pic 图片数据,目前最多两张图片。
   * @return 成功JsonPack.re=200
   * @throws Exception
   */
  public JsonPack postRescueCompleteUpload(
      String token, // 用户token
      String uuid, // task的uuid
      String tableNum, // 桌台号
      int peopleNum, // 就餐人数
      int typeTag, // 餐位类型 1:大厅,2:包房
      String memo, // 抽查备注,最大长度250
      String imageLengthList, // 表示图片大小的数组(可支持多张图片)用分号分隔的方式依次存放了各图片的字节数。例如:13242314;29282
      InputStream pic // 见方法说明
          ,
      String latitude,
      String longitude,
      String acquisition_at)
      throws Exception {
    DefaultHttpClient client = null;
    try {
      client = AbstractHttpApi.createHttpClientForUpload();
      HttpPost httpPost =
          mHttpApi.createHttpPost(
              fullUrl(url_api_rescue_upload),
              pic,
              new BasicNameValuePair("token", token),
              new BasicNameValuePair("uuid", uuid),
              new BasicNameValuePair("tableNum", tableNum),
              new BasicNameValuePair("peopleNum", String.valueOf(peopleNum)),
              new BasicNameValuePair("imageLengthList", imageLengthList),
              new BasicNameValuePair("typeTag", String.valueOf(typeTag)),
              new BasicNameValuePair("memo", String.valueOf(memo)),
              new BasicNameValuePair("latitide", latitude),
              new BasicNameValuePair("longitude", longitude),
              new BasicNameValuePair("acquisition_at", acquisition_at));
      JsonPack jsonPack = mHttpApi.doHttpRequest(httpPost);
      return jsonPack;
    } catch (Exception e) {
      throw e;
    } finally {
      if (client != null) {
        try {
          client.getConnectionManager().shutdown();
        } catch (Exception e) {

        }
      }
    }
  }