Exemplo n.º 1
0
 /** 获取监测点类型信息 */
 public void getMPTypeInfo() {
   Message message = Message.obtain();
   HashMap<String, Object> param = new HashMap<String, Object>();
   String loginName = DataSharedUtil.getSharedPreferences().getString("loginName", null);
   param.put("loginName", loginName);
   IDataCallBack dataCallBack =
       new IDataCallBack() {
         @Override
         public void getData(HashMap<String, Object> resultMap) {
           if (resultMap != null) {
             if (ICSToast.operateResult(resultMap)) {
               dataList = (ArrayList<HashMap<String, Object>>) resultMap.get("dataList");
               if (dataList != null) {
                 setAdapterData();
               }
             }
           }
         }
       };
   param.put("callBack", dataCallBack);
   param.put("fragmentId", fragmentIdUUId);
   message.obj = param;
   message.what = Constant.get_m_p_type_id;
   WorkerThread.sendMessage(message, getActivity());
 }
  /**
   * 获取业务数据
   *
   * @param int startLocation 获取数据的开始位置,从0开始
   * @param int dataNumber 获取数据的条数
   */
  private void getDatailsData(int startLocation, int dataNumber) {
    // 判断当前获取数据线程是否可用
    if (!WorkerThread.isHandleAvailable(activity)) {
      return;
    }
    if (loadDataFlag) { // 只有在没有加载数据时才能继续获取数据
      return;
    }
    // 将标记改为正在加载数据
    loadDataFlag = true;
    Message message = Message.obtain();
    HashMap<String, Object> param = new HashMap<String, Object>();
    String loginName = DataSharedUtil.getSharedPreferences().getString("loginName", null);
    param.put("loginName", loginName);
    param.put("timeType", timeType);
    param.put("startTime", startTime);
    param.put("endTime", endTime);
    param.put("mCode", mCode);
    param.put("queryTime", getQueryTime(startLocation));
    param.put("startLocation", startLocation);
    param.put("dataNumber", dataNumber);

    param.put("callBack", new DataCallBackImpl(dataNumber));
    String fragmentIdUUId = Constant.fragmentIdUUId;
    param.put("fragmentId", fragmentIdUUId);
    message.obj = param;
    message.what = Constant.get_highway_scale_statistics_details_id;
    WorkerThread.sendMessage(message, activity);
  }
Exemplo n.º 3
0
  /**
   * 修改派单状态
   *
   * @param int status 状态;1、申请 2、 维修中3、已完成4、已评价5、撤单
   */
  private void changeOrderStatus(int status, String description) {
    Message message = Message.obtain();
    HashMap<String, Object> param = new HashMap<String, Object>();
    String loginName = DataSharedUtil.getSharedPreferences().getString("loginName", null);
    param.put("loginName", loginName);
    param.put("orderId", bundle.getString("orderId"));
    param.put("status", status);
    param.put("description", description);

    param.put("callBack", new ChageCallBackImpl());
    String fragmentId = bundle.getString("fragmentId");
    param.put("fragmentId", fragmentId);
    message.obj = param;
    message.what = Constant.chage_maintain_order_status_id;
    WorkerThread.sendMessage(message, activity);
  }