|
@@ -266,7 +266,7 @@ void area_list::init_from_db(int id/*=-1*/)
|
|
|
{
|
|
|
std::string sql = "SELECT a.area_id, a.name, a.map_id, a.area_type_id, a.path,b.scale, \
|
|
|
over_count_person, over_count_vehicle, over_time_person, over_time_vehicle, \
|
|
|
- over_speed_vehicle, is_attendance,business_type \
|
|
|
+ over_speed_vehicle, is_attendance,business_type, a.is_work_area\
|
|
|
FROM dat_area a,dat_map b\
|
|
|
where a.map_id = b.map_id and area_id not in \
|
|
|
(select monkeycar_base_info_id from dat_monkeycar_base_info)";
|
|
@@ -330,6 +330,9 @@ void area_list::init_from_db(int id/*=-1*/)
|
|
|
uint32_t b_type =0;
|
|
|
DBRes.GetField( "business_type",b_type, Error );
|
|
|
|
|
|
+ int is_work_area = 0;
|
|
|
+ DBRes.GetField( "is_work_area",is_work_area, Error );
|
|
|
+
|
|
|
log_info("init_area : id:%d,path:%s",area_id, path.c_str());
|
|
|
|
|
|
if(-1 == id)
|
|
@@ -338,6 +341,7 @@ void area_list::init_from_db(int id/*=-1*/)
|
|
|
ap->m_limit_vehicle_second = over_time_vehicle;
|
|
|
ap->m_limit_vehicle_count = over_count_vehicle;
|
|
|
ap->m_over_speed_vehicle = over_speed_vehicle;
|
|
|
+ ap->m_is_work_area = is_work_area;
|
|
|
|
|
|
ap->m_bound=init_path(path);
|
|
|
for(const auto &p : ap->m_bound)
|
|
@@ -355,6 +359,7 @@ void area_list::init_from_db(int id/*=-1*/)
|
|
|
tmp_ptr->update(over_count_person, over_time_person,scale,map_id,area_type_id, over_count_vehicle,over_time_vehicle);
|
|
|
tmp_ptr->m_bound=init_path(path);
|
|
|
tmp_ptr->m_over_speed_vehicle = over_speed_vehicle;
|
|
|
+ tmp_ptr->m_is_work_area = is_work_area;
|
|
|
for(const auto &p : tmp_ptr->m_bound)
|
|
|
log_info("point:area_id:%d--x:%.2f,y:%.2f",area_id,p.x,p.y);
|
|
|
|