2
0

2 Incheckningar 0eb5cd3b87 ... e42cb485c0

Upphovsman SHA1 Meddelande Datum
  zhuyf e42cb485c0 Merge branch 'xcjk' of http://121.42.8.157:13000/software-l/server into xcjk 2 år sedan
  zhuyf 5573bbce19 fix bug 2 år sedan
2 ändrade filer med 6 tillägg och 2 borttagningar
  1. 1 1
      card_car.cpp
  2. 5 1
      event.cpp

+ 1 - 1
card_car.cpp

@@ -229,7 +229,7 @@ void car::handle_anti_coll(const point& pt, const int& sid)
             //}
             ++i;
         }
-		desc += "]"
+		desc += "]";
         log_info("[anti_coll] the distance's list between person and vehicle : %s", desc.c_str());
 		event_tool::instance()->handle_event(OT_CARD, ET_PERSON_VEHICLE_ANTI_COLLISION, id, min_d, cur_v, true, DT_COMMON, desc);
     }

+ 5 - 1
event.cpp

@@ -757,7 +757,11 @@ void event_list::_ev_to_node_v(std::shared_ptr<ya_event> ev_ptr,
     tool_json::add_member(ev, JSON_KEY_EVENT_EVENT_ID, std::to_string(ev_ptr->m_id), allocator);
     ev.AddMember(JSON_KEY_EVENT_TYPE_ID,ev_ptr->m_ev_type, allocator);
 
-    tool_json::add_member(ev, JSON_KEY_EVENT_OBJ_ID, ev_ptr->m_obj_id, allocator);
+	if(ev_ptr->m_ev_type == ET_PERSON_VEHICLE_ANTI_COLLISION){
+		tool_json::add_member(ev, JSON_KEY_EVENT_OBJ_ID, ev_ptr->m_desc, allocator);
+	}else{
+		tool_json::add_member(ev, JSON_KEY_EVENT_OBJ_ID, ev_ptr->m_obj_id, allocator);
+	}
     ev.AddMember(JSON_KEY_EVENT_X,ev_ptr->x, allocator);
     ev.AddMember(JSON_KEY_EVENT_Y,ev_ptr->y, allocator);