Explorar o código

修改升井json

daiyueteng %!s(int64=6) %!d(string=hai) anos
pai
achega
5a778575f9
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      module_service/module_attendance_person.h

+ 6 - 2
module_service/module_attendance_person.h

@@ -198,9 +198,10 @@ private:
         auto mine_tool_ptr = card_ptr->get_mine_tool();
 
         rapidjson::Document doc(rapidjson::kObjectType);
-        rapidjson::Value data(rapidjson::kArrayType);
+        rapidjson::Value datas(rapidjson::kArrayType);
         rapidjson::Document::AllocatorType& allocator=doc.GetAllocator();
 
+        rapidjson::Value data(rapidjson::kArrayType);
         //卡号
         std::string id = card_list::to_id64_str(card_ptr->m_type, card_ptr->m_id);
         tool_json::push_back(data, id, allocator);
@@ -238,9 +239,12 @@ private:
         //速度
         data.PushBack(card_ptr->m_speed, allocator);
 
+
+        datas.PushBack(data, allocator);
+
         doc.AddMember(JSON_ROOT_KEY_CMD,JSON_CMD_VALUE_UP_MINE, allocator);
         //doc.AddMember(JSON_ROOT_KEY_VERSION,INTERFACE_VERSION, allocator);
-        doc.AddMember(JSON_ROOT_KEY_DATA, data, allocator);
+        doc.AddMember(JSON_ROOT_KEY_DATA, datas, allocator);
 
         rapidjson::StringBuffer sb;
         rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(sb);