Browse Source

超员配置是否为0,0则不会进行告警

daiyueteng 6 years ago
parent
commit
f33577e238
1 changed files with 11 additions and 0 deletions
  1. 11 0
      module_service/module_area_over_person.h

+ 11 - 0
module_service/module_area_over_person.h

@@ -31,6 +31,12 @@ public:
     void on_enter(std::shared_ptr<card_location_base> card_ptr,std::shared_ptr<area_hover>&c)
     {
         auto area_ptr = c->m_area;
+        //超员配置是否为0,0则不会进行告警
+        if(0 == area_ptr->m_limit_person_count)
+        {
+            return;
+        }
+
         if(area_ptr->m_limit_person_count <= area_ptr->m_person_count)//超员
         {
             auto ev_ptr = event_list::instance()->get(static_cast<uint32_t>(area_ptr->id()), ET_AREA_OVER_COUNT_PERSON);
@@ -69,6 +75,11 @@ public:
     void on_leave(std::shared_ptr<card_location_base> card_ptr,std::shared_ptr<area_hover>&c)
     {
         auto area_ptr = c->m_area;
+        //超员配置是否为0,0则不会进行告警
+        if(0 == area_ptr->m_limit_person_count)
+        {
+            return;
+        }
 
         if(area_ptr->m_limit_person_count > area_ptr->m_person_count)//没有超员
         {