Browse Source

呼叫callcardlist不发送分站

lixioayao 5 years ago
parent
commit
f89351d6a9
2 changed files with 9 additions and 7 deletions
  1. 6 4
      module_service/module_call.cpp
  2. 3 3
      module_service/module_call.h

+ 6 - 4
module_service/module_call.cpp

@@ -39,12 +39,14 @@ bool module_call::call_user::is_timeout()
 
 void module_call::to_node_element(rapidjson::Value& out_elemet,
                                   const std::shared_ptr<call_card> card_ptr,
-                                  rapidjson::Document::AllocatorType& allocator)
+                                  rapidjson::Document::AllocatorType& allocator,bool f)
 {
     tool_json::push_back(out_elemet, card_ptr->user_name, allocator);
     tool_json::push_back(out_elemet, card_ptr->to_id64_str(), allocator);
+    uint32_t sid= card_ptr->stationid;
+    if(f)sid=0;
 
-    out_elemet.PushBack(card_ptr->stationid, allocator);
+    out_elemet.PushBack(sid, allocator);
     out_elemet.PushBack(tool_time::to_ms(card_ptr->call_time), allocator);
 
     out_elemet.PushBack(card_ptr->call_type_id, allocator);
@@ -62,7 +64,7 @@ void module_call::run()
         return ;
     }
     //转发给web
-    swsClientMgr.send(JSON_CMD_VALUE_PUSH, to_call_card_list_json(arr));
+    //swsClientMgr.send(JSON_CMD_VALUE_PUSH, to_call_card_list_json(arr));
 
     //将呼叫命令发送给标识卡终端
     call_site_map site_map;
@@ -302,7 +304,7 @@ void module_call::response_accept_call(std::vector<call_card_ptr> cards)
     rapidjson::Value node_cards(rapidjson::kArrayType);
 
     //组装json发送给web
-    to_node_array(node_cards, cards, allocator);
+    to_node_array(node_cards, cards, allocator,false);
 
     doc.AddMember(JSON_ROOT_KEY_CMD,JSON_CMD_VALUE_CALL_CARD_RESPONSE, allocator);
     doc.AddMember(JSON_ROOT_KEY_VERSION, INTERFACE_VERSION, allocator);

+ 3 - 3
module_service/module_call.h

@@ -313,10 +313,10 @@ private:
     */
     static void to_node_element(rapidjson::Value& out_elemet,
                                 const std::shared_ptr<call_card> card_ptr,
-                                rapidjson::Document::AllocatorType& allocator);
+                                rapidjson::Document::AllocatorType& allocator,bool f);
     static void to_node_array(rapidjson::Value& out_array,
                               const std::vector<std::shared_ptr<call_card>> cards,
-                              rapidjson::Document::AllocatorType& allocator)
+                              rapidjson::Document::AllocatorType& allocator,bool f=true)
     {
         std::vector<std::shared_ptr<call_card>>::size_type i;
 
@@ -329,7 +329,7 @@ private:
 
             rapidjson::Value node_card(rapidjson::kArrayType);
 
-            to_node_element(node_card, cards[i], allocator);
+            to_node_element(node_card, cards[i], allocator,f);
 
             out_array.PushBack(node_card, allocator);
         }