Пример #1
0
  // 是否存在测量数据
  public boolean checkRawSheetIndexHasData(int sheetId) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return false;
    }

    String sql = "select * from SubsidenceTotalData where SheetId = ?";
    String[] args = SQLiteParamUtils.toParamemter(sheetId);

    List<SubsidenceTotalData> list = mDatabase.queryObjects(sql, args, SubsidenceTotalData.class);

    if (list == null || list.isEmpty()) {
      return false;
    }

    for (SubsidenceTotalData data : list) {

      if (!StringUtils.isEmpty(data.getCoordinate())) {
        return true;
      }
    }

    return false;
  }
Пример #2
0
  /**
   * 查询 本次测量(MEASNo)及之后的所有相同断面和相同测点类型的测点信息
   *
   * @param chainageId 断面里程ID
   * @param pntType 测点类型
   * @param MEASNo 本次测量是第几次测量
   * @return 查询到的测点信息List
   */
  public List<SubsidenceTotalData> queryInfoAfterMEASNo(
      String chainageId, String pntType, int MEASNo) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql =
        "select * from SubsidenceTotalData where"
            + " chainageId=\'"
            + chainageId
            + "\'"
            + " AND pntType=\'"
            + pntType
            + "\'"
            + " AND MEASNo >= "
            + String.valueOf(MEASNo)
            + " AND DataStatus != "
            + String.valueOf(AlertUtils.POINT_DATASTATUS_DISCARD)
            + " order by MEASNo ASC";

    return mDatabase.queryObjects(sql, SubsidenceTotalData.class);
  }
Пример #3
0
  public List<SubsidenceTotalData> queryAllOrderByMEASNoDesc(String pntType) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql = "select * from SubsidenceTotalData where PntType=? ORDER BY MEASNo DESC";
    String[] args = new String[] {pntType};

    return mDatabase.queryObjects(sql, args, SubsidenceTotalData.class);
  }
Пример #4
0
  // 记录单下,该断面的测量数据
  public List<SubsidenceTotalData> querySubsidenceTotalDatas(String sheetId, String chainageId) {

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return null;
    }

    String sql =
        "select * from SubsidenceTotalData where SheetId = ? and ChainageId = ? order by MEASNo asc";

    return mDatabase.queryObjects(
        sql,
        new String[] {String.valueOf(sheetId), String.valueOf(chainageId)},
        SubsidenceTotalData.class);
  }