xuxiuxi
2017-07-23 8d434f2a76348a759486cb7a95042a211bcc81db
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/sqlite/RegisterDao.java
@@ -39,7 +39,9 @@
        contentValues.put("gender_id", item.getGenderId());
        contentValues.put("country_id", item.getCountryId());
        contentValues.put("province", item.getProvince());
        contentValues.put("city", item.getCompanyId());
        contentValues.put("city", item.getCity());
        contentValues.put("companyId", item.getCompanyId());
        contentValues.put("company", item.getCompany());
        contentValues.put("birthday", item.getBirthday());
        contentValues.put("tel", item.getTel());
        contentValues.put("mobile_phone", item.getMobilePhone());
@@ -82,13 +84,13 @@
    }
    public boolean hasOfflineVisitorRegisterData() {
        Cursor c = Config.sqlMap.getDb().rawQuery("select count(*) from register", new String[]{});
        Cursor c = MainActivity.getInstance().db.rawQuery("select count(*) from register", new String[]{});
        c.moveToFirst();
        return c.getInt(0) > 0 ? true : false;
    }
    public boolean hasOfflineAttenderRegisterData() {
        Cursor c = Config.sqlMap.getDb().rawQuery("select count(*) from register", new String[]{});
        Cursor c = MainActivity.getInstance().db.rawQuery("select count(*) from register", new String[]{});
        c.moveToFirst();
        return c.getInt(0) > 0 ? true : false;
    }
@@ -164,10 +166,8 @@
    public void removeOfflineVisitorRegister(OfflineVisitorRegisterItem item) {
        try {
            String sql = "delete from register where visitor_id='"+item.getRegisterId()+"' AND a.is_synchron = 'N'";
            SQLiteDatabase db = Config.sqlMap.getDb();
            db.beginTransaction();
            SQLiteDatabase db = MainActivity.getInstance().db;
            db.execSQL(sql);
            db.endTransaction();
            item.deleteFiles();
        }
        catch (Exception e) {