|
@@ -94,23 +94,13 @@ 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_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());
|
|
|
+ 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)"
|
|
|
+ " VALUES (%d,%s,%d,'%s',%d,'%s','%s',%d);";
|
|
|
+ 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);
|
|
|
|
|
|
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;
|
|
|
}
|
|
|
}
|
|
@@ -158,9 +148,6 @@ 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())
|
|
@@ -171,7 +158,6 @@ void person::on_timer()
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
- m_frist_iris_recognition_timeval = "";
|
|
|
|
|
|
YA::_CARD_POS_ cp;
|
|
|
uint64_t _time=0;
|
|
@@ -261,15 +247,3 @@ void person::get_card(bool f)
|
|
|
return ;
|
|
|
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 = "";
|
|
|
- }
|
|
|
-}
|