xuxiuxi
2017-08-01 21500d7529fe258fd35316ddf294a406781d9f4d
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/sqlite/CheckInDao.java
@@ -69,7 +69,7 @@
                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()) {
@@ -244,6 +244,7 @@
        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());
@@ -258,6 +259,7 @@
        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;