lixioayao пре 6 година
родитељ
комит
1aaa4e4930
3 измењених фајлова са 10 додато и 9 уклоњено
  1. 6 2
      area.cpp
  2. 2 5
      card_base.cpp
  3. 2 2
      module_service/area_business_person_dwell_checker.cpp

+ 6 - 2
area.cpp

@@ -264,9 +264,11 @@ void area_list::init_monkeycar_area(int id)
 
         int over_time_person = 0;
         DBRes.GetField( "over_time_person",over_time_person, Error );
+        over_time_person*=60;
 
         int over_time_vehicle = 0;
         DBRes.GetField( "over_time_vehicle",over_time_vehicle, Error );
+        voer_time_vehicle*=60;
 
         std::string path;
         DBRes.GetField( "path",path, Error );
@@ -402,9 +404,11 @@ void area_list::init_from_db(int id/*=-1*/)
 
         int over_time_person = 0;
         DBRes.GetField( "over_time_person",over_time_person, Error );
+        over_time_person*=60;
 
         int over_time_vehicle = 0;
         DBRes.GetField( "over_time_vehicle",over_time_vehicle, Error );
+        over_time_vehicle*=60;
 
         std::string over_speed_vehicle;
         DBRes.GetField( "over_speed_vehicle",over_speed_vehicle, Error );
@@ -459,9 +463,9 @@ void area_list::init_from_db(int id/*=-1*/)
                 log_info("point:area_id:%d--x:%.2f,y:%.2f",area_id,p.x,p.y);
 
             log_info("基础数据 增加或修改区域成功:区域id:%d,over_count_person:%d over_time_person:%d,scale:%.2f,map_id:%d\
-                     ,area_type_id:%d,over_count_vehicle:%d,over_time_vehicle:%d",
+                     ,area_type_id:%d,over_count_vehicle:%d,over_time_vehicle:%d,b_type:%d",
                      id,over_count_person, over_time_person,scale,map_id,area_type_id,
-                     over_count_vehicle,over_time_vehicle);
+                     over_count_vehicle,over_time_vehicle,b_type);
 
 			if(newobj)
 			{

+ 2 - 5
card_base.cpp

@@ -89,13 +89,10 @@ void card_location_base::upt_card_pos(YA::_CARD_POS_&cp, point &pt)
     point _p;
     if(pt.empty())
     {
-        _p=*this;
-        pt=_p;
+         _p=*this;pt=_p;
     }
     else
-	{
-       	 _p=pt;
-	}
+         _p=pt;
 	cp.x = tool_other::round(_p.x,3);
 	cp.y = tool_other::round(_p.y,3);
 	//cp.z = pt.z;

+ 2 - 2
module_service/area_business_person_dwell_checker.cpp

@@ -31,8 +31,8 @@ void area_business_person_dwell_checker::on_hover(const std::shared_ptr<area_hov
     if(!c->is_person()||a->m_enter_time==0)
       return;
 
-	double limit_val = a->m_area->m_limit_person_second;
-	double cur_val = ( tool_time::now_to_seconds() - a->m_enter_time / 1000);
+	int limit_val = a->m_area->m_limit_person_second;
+	int cur_val = ( tool_time::now_to_seconds() - a->m_enter_time / 1000);
 	EVENT_TYPE evType = a->m_area->is_mine() ? EVENT_TYPE::ET_CARD_OVER_TIME_PERSON : EVENT_TYPE::ET_CARD_AREA_OVER_TIME_PERSON;
 	if (limit_val < cur_val)
     {