|
@@ -21,6 +21,8 @@
|
|
#include "visit.h"
|
|
#include "visit.h"
|
|
#include "his_location.h"
|
|
#include "his_location.h"
|
|
#include "three_rates.h"
|
|
#include "three_rates.h"
|
|
|
|
+#include "mine_module/MineCardManager.h"
|
|
|
|
+
|
|
extern config_file config;
|
|
extern config_file config;
|
|
//一张卡一个ct的所有不同天线的信息
|
|
//一张卡一个ct的所有不同天线的信息
|
|
struct one_ct_message_handle
|
|
struct one_ct_message_handle
|
|
@@ -856,8 +858,21 @@ void card_list::load_his_card_postion_from_db()
|
|
auto str = tool_time::to_str_ex( tool_time::to_ms(mine_tool_ptr->m_attendance_start_time));
|
|
auto str = tool_time::to_str_ex( tool_time::to_ms(mine_tool_ptr->m_attendance_start_time));
|
|
std_debug("加载考勤,考勤开始时间: %s, 卡id=%d,卡type=%d", str.c_str(), card_ptr->m_id, card_ptr->m_type);
|
|
std_debug("加载考勤,考勤开始时间: %s, 卡id=%d,卡type=%d", str.c_str(), card_ptr->m_id, card_ptr->m_type);
|
|
log_info("加载考勤,考勤开始时间: %s, 卡id=%d,卡type=%d", str.c_str(), card_ptr->m_id, card_ptr->m_type);
|
|
log_info("加载考勤,考勤开始时间: %s, 卡id=%d,卡type=%d", str.c_str(), card_ptr->m_id, card_ptr->m_type);
|
|
|
|
+
|
|
|
|
+ //还在考勤中表示,还在井下(初始化话数据)
|
|
|
|
+ if(card_ptr->is_person())
|
|
|
|
+ {
|
|
|
|
+ CMineCardManager::instance()->OnPersonDown(card_ptr,true);
|
|
|
|
+ }
|
|
|
|
+ if(card_ptr->is_vehicle())
|
|
|
|
+ {
|
|
|
|
+ CMineCardManager::instance()->OnVehicleDown(card_ptr,true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //初始化后检查是否超员
|
|
|
|
+ CMineCardManager::instance()->OnPersonOvercrowdingWarning();
|
|
|
|
+ CMineCardManager::instance()->OnVehicleOvercrowdingWarning();
|
|
|
|
|
|
auto area_map = area_list::instance()->m_map;
|
|
auto area_map = area_list::instance()->m_map;
|
|
for(auto&iter: area_map)
|
|
for(auto&iter: area_map)
|
|
@@ -1006,11 +1021,11 @@ void card_list::load_his_card_postion_staff()
|
|
YADB::CDBResultSet DBRes;
|
|
YADB::CDBResultSet DBRes;
|
|
sDBConnPool.Query(sql,DBRes,Error);
|
|
sDBConnPool.Query(sql,DBRes,Error);
|
|
if(!Error.empty())
|
|
if(!Error.empty())
|
|
- log_error("load_his_card_postion_vehicle列表 Error,%s",Error.c_str());
|
|
|
|
|
|
+ log_error("load_his_card_postion_staff列表 Error,%s",Error.c_str());
|
|
uint64_t nCount = DBRes.GetRecordCount( Error );
|
|
uint64_t nCount = DBRes.GetRecordCount( Error );
|
|
if (nCount > 0)
|
|
if (nCount > 0)
|
|
{
|
|
{
|
|
- log_info( "load_his_card_postion_vehicle. The record count=%ld\n", nCount );
|
|
|
|
|
|
+ log_info( "load_his_card_postion_staff. The record count=%ld\n", nCount );
|
|
|
|
|
|
while ( DBRes.GetNextRecod(Error) )
|
|
while ( DBRes.GetNextRecod(Error) )
|
|
{
|
|
{
|