示例#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
  public void reset(SubsidenceTotalData bean) {

    if (bean == null) {
      return;
    }

    final IAccessDatabase mDatabase = getCurrentDb();

    if (mDatabase == null) {
      return;
    }

    String sql =
        "update SubsidenceTotalData set Coordinate = \"\", SurveyTime = \"\" ,DataStatus = 0 ,MEASNo = 0 ,Info = \"\" where ID = ? ";

    mDatabase.execute(sql, SQLiteParamUtils.toParamemter(bean.getID()));
  }