|
@@ -19,6 +19,7 @@
|
|
|
|
|
|
extern config_file config;
|
|
|
int person::m_limit_detained_time=config.get("service.detained_time",10);
|
|
|
+int person::m_auto_up_mine_time=config.get("service.auto_up_mine_time",20);
|
|
|
person::person(const std::string &type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,int32_t level_id,uint32_t cid,int wl,const std::string &sname,const std::string &dname,int worketype_id)
|
|
|
:card_location_base(type,cardid,needdisplay,t,deptid,level_id,cid)
|
|
|
,m_workLine(wl)
|
|
@@ -142,13 +143,12 @@ void person::on_timer()
|
|
|
m_area_tool->on_point(shared_from_this(),pt);
|
|
|
m_biz_stat=get_stat();
|
|
|
}
|
|
|
-
|
|
|
+ print_card_detained();
|
|
|
if(m_upmine_flag.load())
|
|
|
{
|
|
|
m_upmine_flag=0;
|
|
|
m_area_tool->on_leave(shared_from_this());
|
|
|
}
|
|
|
- print_card_detained();
|
|
|
}
|
|
|
//***********************************************
|
|
|
//整点打印入井超过设定时长(默认10h)
|
|
@@ -177,6 +177,9 @@ void person::print_card_detained()
|
|
|
|
|
|
log_warn("[card_detained]卡号:%03d%010d,分站:%d,入井时间点:%s,入井时长:%d小时%d分钟,(%.2f,%.2f)是否在处在井底范围内:%s,最后接收时间点:%s,进入盲区时长:%d小时%d分钟,是否低电量告警:%s,低电量开始时间点:%s",
|
|
|
m_type,m_id,m_area_tool->get_site_id(),enter_time.c_str(),min/60,min%60,x,y,dist<limit_dist?"True":"False",last_time.c_str(),lmin/60,lmin%60,event_power?"Ture":"False",alarm_time.c_str());
|
|
|
+ //超过设置的时长后,开始自动升井
|
|
|
+ if(work_time > static_cast<uint64_t>(person::m_auto_up_mine_time*60*60*1000))
|
|
|
+ inc_upmine_flag();
|
|
|
}
|
|
|
}
|
|
|
point person::getSmoothPoint(uint64_t& t)
|