|
@@ -67,7 +67,6 @@ void person::clear()
|
|
|
m.cmd=CMD_CLEAR;m.cardid=m_type<<32|m_id;
|
|
|
cardMgr::instance()->tryPut(m);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
void person::set_area_info(int mapid,double scale,int areaid,uint64_t t,int type)
|
|
@@ -95,10 +94,23 @@ void person::IKSDK_DB(int sid)
|
|
|
}
|
|
|
std::string card_id = tool_other::type_id_to_str(m_type,m_id);
|
|
|
std::string st = tool_time::to_str(now);
|
|
|
+ if (m_frist_iris_recognition_timeval == "")
|
|
|
+ {
|
|
|
+ m_frist_iris_recognition_timeval = st;
|
|
|
+ }
|
|
|
+
|
|
|
char nsql[256]={0};
|
|
|
- const char*sql="REPLACE INTO his_att_interface (staff_id,card_id,reader_id,staff_name,dept_name,upt_time,low_power_warn) VALUES (%d,%s,%d,'%s','%s','%s',%d);";
|
|
|
- snprintf(nsql,256,sql,m_cid,card_id.c_str(),sid,m_stafferName.c_str(),m_deptName.c_str(),st.c_str(),f);
|
|
|
+ const char*sql="REPLACE INTO his_att_interface (staff_id,card_id,reader_id,staff_name,dept_id,dept_name,upt_time,low_power_warn,frist_write_time)"
|
|
|
+ " VALUES (%d,%s,%d,'%s',%d,'%s','%s',%d,'%s');";
|
|
|
+ snprintf(nsql,256,sql,m_cid,card_id.c_str(),sid,m_stafferName.c_str(),m_deptid,m_deptName.c_str(),st.c_str(),f,m_frist_iris_recognition_timeval.c_str());
|
|
|
+
|
|
|
db_tool::PushAsync(nsql);
|
|
|
+
|
|
|
+ m_old_iris_recognition_timeval = m_iris_recognition_timeval;
|
|
|
+ if(m_old_iris_recognition_timeval == 0)
|
|
|
+ {
|
|
|
+ m_old_iris_recognition_timeval = now;
|
|
|
+ }
|
|
|
m_iris_recognition_timeval = now;
|
|
|
}
|
|
|
}
|
|
@@ -146,6 +158,9 @@ void person::on_timer()
|
|
|
return ;
|
|
|
}
|
|
|
m_1sto2s=false;
|
|
|
+
|
|
|
+ check_frist_iris_recognition_time();
|
|
|
+
|
|
|
if(!m_mine_tool->m_is_attendance)
|
|
|
{
|
|
|
if(m_upmine_flag.load())
|
|
@@ -156,6 +171,8 @@ void person::on_timer()
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ m_frist_iris_recognition_timeval = "";
|
|
|
+
|
|
|
YA::_CARD_POS_ cp;
|
|
|
uint64_t _time=0;
|
|
|
point pt = getSmoothPoint(_time);
|
|
@@ -245,3 +262,14 @@ void person::get_card(bool f)
|
|
|
mine_business::inst()->fetch_add(m_display);
|
|
|
}
|
|
|
|
|
|
+void person::check_frist_iris_recognition_time()
|
|
|
+{
|
|
|
+ if (m_frist_iris_recognition_timeval.length() < 4)
|
|
|
+ {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ if (time(nullptr) - m_iris_recognition_timeval > 10)
|
|
|
+ {
|
|
|
+ m_frist_iris_recognition_timeval = "";
|
|
|
+ }
|
|
|
+}
|