|
@@ -724,6 +724,7 @@ void area_tool::on_point(const std::shared_ptr<card_location_base>& c,const poin
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
while(c1!=ce)
|
|
|
{
|
|
|
if((*c1)->m_area->get_frozen_count()==0)
|
|
@@ -767,11 +768,15 @@ void area_tool::on_point(const std::shared_ptr<card_location_base>& c,const poin
|
|
|
strAreaInfo += tmpArea;
|
|
|
}
|
|
|
}
|
|
|
- char sql[1024] = {0};
|
|
|
- std::string _time=tool_time::to_str_ex(c->time_());
|
|
|
- snprintf(sql, 1024, "REPLACE INTO rt_location (card_id, site_id,cur_time, x, y, z, state, area_info) VALUES (%s, %d,'%s',%lf, %lf, %lf, 0, '%s');",
|
|
|
- tool_other::type_id_to_str(c->m_type, c->m_id).c_str(), m_site->id(),_time.c_str(), pt.x, pt.y, pt.z, strAreaInfo.c_str());
|
|
|
- db_tool::PushAsync(sql);
|
|
|
+
|
|
|
+ if(!strAreaInfo.empty())
|
|
|
+ {
|
|
|
+ char sql[1024] = {0};
|
|
|
+ std::string _time=tool_time::to_str_ex(c->time_());
|
|
|
+ snprintf(sql, 1024, "REPLACE INTO rt_location (card_id, site_id,cur_time, x, y, z, state, area_info) VALUES (%s, %d,'%s',%lf, %lf, %lf, 0, '%s');",
|
|
|
+ tool_other::type_id_to_str(c->m_type, c->m_id).c_str(), m_site->id(),_time.c_str(), pt.x, pt.y, pt.z, strAreaInfo.c_str());
|
|
|
+ db_tool::PushAsync(sql);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -779,8 +784,10 @@ void area_tool::on_leave(const std::shared_ptr<card_location_base>& c)
|
|
|
{
|
|
|
for(const auto& t:m_hover_list)
|
|
|
{
|
|
|
- t->m_area->on_leave(t, c);
|
|
|
+ t->m_area->on_leave(t, c);
|
|
|
}
|
|
|
+
|
|
|
+ m_hover_list.clear(); //手动升井、自动升井清除该卡区域列表
|
|
|
}
|
|
|
|
|
|
void area_tool::set_area_info(int mapid,double scale,int areaid,const point &pt,uint64_t t,int type)
|