| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加访客记录
|
| | | */
|
| | | public void add(OfflineVisitItem entity) {
|
| | | String sql =
|
| | | "INSERT INTO visit (\n" +
|
| | | " visit_id,\n" +
|
| | | " visit_reason_id,\n" +
|
| | | " remark,\n" +
|
| | | " enter_time,\n" +
|
| | | " exit_time,\n" +
|
| | | " visitor_type_id,\n" +
|
| | | " visitor_id,\n" +
|
| | | " visitor_company_id,\n" +
|
| | | " visitee_id,\n" +
|
| | | " visitee_company_id,\n" +
|
| | | " current_state_id,\n" +
|
| | | " warning,\n" +
|
| | | " update_time,\n" +
|
| | | " is_synchron,\n" +
|
| | | " device_company_id\n" +
|
| | | ")\n" +
|
| | | "VALUES\n" +
|
| | | " (\n" +
|
| | | " '"+entity.getVisitId()+"', "+
|
| | | " '"+entity.getVisitReasonId()+"', "+
|
| | | " '"+entity.getRemark()+"', "+
|
| | | " '"+entity.getEnterTime()+"', "+
|
| | | " '"+entity.getExitTime()+"', "+
|
| | | " '"+entity.getVisitorTypeId()+"', "+
|
| | | " '"+entity.getVisitorId()+"', "+
|
| | | " '"+entity.getVisitorCompanyId()+"', "+
|
| | | " '"+entity.getVisiteeId()+"', "+
|
| | | " '"+entity.getVisiteeCompanyId()+"', "+
|
| | | " '"+entity.getCurrentStateId()+"', "+
|
| | | " '"+entity.getWarning()+"', "+
|
| | | " '"+entity.getUpdateTime()+"', "+
|
| | | " '"+entity.getIsSynchron()+"', "+
|
| | | " '"+entity.getDeviceCompanyId()+"' "+
|
| | | " )";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | | }
|
| | |
|
| | | public boolean hasOfflineCheckInData() {
|
| | | Cursor c = MainActivity.getInstance().db.rawQuery("select count(*) from visit", new String[]{});
|
| | | c.moveToFirst();
|