Browse Source

修复up_mine协议中地图上传不准确造成的web不消失的bug

lixioayao 5 years ago
parent
commit
2a255573e3
1 changed files with 6 additions and 3 deletions
  1. 6 3
      module_service/area_business_person_attendance.cpp

+ 6 - 3
module_service/area_business_person_attendance.cpp

@@ -127,6 +127,9 @@ void area_business_person_attendance::_to_json_card_up_one(std::shared_ptr<card_
                                                            rapidjson::Value& out_datas, rapidjson::Document::AllocatorType& allocator)
 {
     auto mine_tool_ptr = card_ptr->get_mine_tool();
+    int map_id=0;
+    if(auto area_tool_ptr = card_ptr->get_area_tool())
+        map_id=area_tool_ptr->get_mapid();
 
     rapidjson::Value data(rapidjson::kArrayType);
     //卡号
@@ -151,18 +154,18 @@ void area_business_person_attendance::_to_json_card_up_one(std::shared_ptr<card_
     data.PushBack(t, allocator);
 
     //地图编号
-    data.PushBack(0, allocator);
+    data.PushBack(map_id, allocator);
     //区域编号
     data.PushBack(0, allocator);
     //部门编号
     data.PushBack(card_ptr->m_deptid, allocator);
 
     //状态
-    data.PushBack(0, allocator);
+    data.PushBack(card_ptr->m_pwr_stat, allocator);
     //运行状态
     data.PushBack(card_ptr->m_stat, allocator);
     //业务状态
-    data.PushBack(0, allocator);
+    data.PushBack(card_ptr->m_biz_stat, allocator);
     //速度
     data.PushBack(card_ptr->m_speed, allocator);