| | |
| | | if(isVisitorList) {
|
| | | sql += " AND ( f.device_company_id != " + deviceCompanyId+" OR f.device_company_id IS NULL"+")";
|
| | | }else{
|
| | | sql += " AND f.device_company_id = " + deviceCompanyId;
|
| | | sql += " AND ( f.device_company_id = " + deviceCompanyId + " or a.visitor_or_attender='attender')";
|
| | | }
|
| | |
|
| | | if(searchText != null && !searchText.trim().isEmpty()) {
|
| | |
| | | ContentValues contentValues = new ContentValues();
|
| | | contentValues.put("visit_id",item.getVisitId());
|
| | | contentValues.put("visit_reason_id",item.getVisitReasonId());
|
| | | contentValues.put("visit_reason",item.getVisitReason());
|
| | | contentValues.put("remark",item.getRemark());
|
| | | contentValues.put("enter_time",item.getEnterTime());
|
| | | contentValues.put("exit_time",item.getExitTime());
|
| | |
| | | contentValues.put("is_synchron",item.getIsSynchron());
|
| | | contentValues.put("device_company_id",item.getDeviceCompanyId());
|
| | | contentValues.put("create_time",item.getCreateTime());
|
| | | contentValues.put("device_id", item.getDeviceId());
|
| | |
|
| | | long registerId = MainActivity.getInstance().db.insert("visit", "", contentValues);
|
| | | return registerId;
|