|
@@ -3273,12 +3273,6 @@ void CYAServerDlg::log_card_inav_state(INAV_STATUS card_state, string card_id)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-int change_network_order_to_host(BYTE* DataBuffer)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
int CYAServerDlg::get_locate_msg_type(BYTE* DataBuffer)
|
|
|
{
|
|
|
if(NULL == DataBuffer)
|
|
@@ -3934,71 +3928,6 @@ int CYAServerDlg::get_map_path_nums(const int& start_reader_id,const int& end_re
|
|
|
return nRet;
|
|
|
}
|
|
|
|
|
|
-int CYAServerDlg::parse_json_data_request_counts_info(message::ptr const& data)
|
|
|
-{
|
|
|
- int req_type = -1;
|
|
|
- int area_id = -1;
|
|
|
- std::string req_user = "";
|
|
|
- std::string req_time = "";
|
|
|
- std::string req_task_id = "";
|
|
|
-
|
|
|
- map<string,message::ptr> data_map = data->get_map()[JSON_ROOT_KEY_DATA]->get_map();
|
|
|
-
|
|
|
- req_user = data_map[JSON_KEY_REQ_COUNTS_USER]->get_string();
|
|
|
- req_type = data_map[JSON_KEY_REQ_COUNTS_TYPE]->get_int();
|
|
|
- area_id = data_map[JSON_KEY_EVENT_AREA_ID]->get_int();
|
|
|
- req_time = data_map[JSON_KEY_REQ_COUNTS_TIME]->get_string();
|
|
|
- req_task_id = data_map[JSON_KEY_CALL_LIGHT_TASK_ID]->get_string();
|
|
|
-
|
|
|
- Json::Value ret_data;
|
|
|
-
|
|
|
- if (req_type == REQUEST_ALL_OVER_TIME_PERSON
|
|
|
- || req_type == REQUEST_SPECIAL_ERROR_PERSON
|
|
|
- || req_type == REQUEST_ALL_OVER_TIME_VEHICLE
|
|
|
- || req_type == REQUEST_ALL_OVER_PERSON
|
|
|
- || req_type == REQUEST_ALL_OVER_VEHICLE)
|
|
|
- {
|
|
|
- ret_data = get_json_count_list(req_type,0);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (area_id != 0)
|
|
|
- {
|
|
|
- ret_data = get_json_count_list(req_type,area_id);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ret_data = get_json_count_list(req_type,0);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (ret_data.size() > 0)
|
|
|
- {
|
|
|
- Json::Value root;
|
|
|
- root[JSON_ROOT_KEY_CMD] = JSON_KEY_RESPONSE_COUNTS_DETAIL;
|
|
|
- root[JSON_ROOT_KEY_VERSION] = INTERFACE_VERSION;
|
|
|
-
|
|
|
- Json::Value data;
|
|
|
- data[JSON_KEY_REQ_COUNTS_USER] = req_user;
|
|
|
- data[JSON_KEY_REQ_COUNTS_TYPE] = req_type;
|
|
|
- data[JSON_KEY_ALARM_AREA_ID] = area_id;
|
|
|
- data[JSON_KEY_ALARM_DETAIL] = ret_data;
|
|
|
- data[JSON_KEY_CALL_LIGHT_TASK_ID] = req_task_id;
|
|
|
- root[JSON_ROOT_KEY_DATA] = data;
|
|
|
- if (root.size() > 0)
|
|
|
- {
|
|
|
- std::string ret = "";
|
|
|
- ret = root.toFastString();
|
|
|
- if (ret != "")
|
|
|
- {
|
|
|
- send_json_data(JSON_CMD_VALUE_PUSH,ret);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
int CYAServerDlg::parse_json_data_reader_pos_change(message::ptr const& data)
|
|
|
{
|
|
|
init_reader();
|
|
@@ -6420,9 +6349,6 @@ void CYAServerDlg::OnBnSyncTime()
|
|
|
send_call_light(CC_SET_LIGHTS_STATE, 2, 1, 2,shape);
|
|
|
Sleep(LIGHT_CTRL_DELAY);
|
|
|
}*/
|
|
|
-
|
|
|
- //模拟发送并发数据
|
|
|
- simulation_send_data();
|
|
|
}
|
|
|
|
|
|
CYAServerDlg::~CYAServerDlg()
|
|
@@ -10813,8 +10739,7 @@ EnHandleResult CYAServerDlg::OnShutdown( ITcpServer* pSender )
|
|
|
return HR_OK;
|
|
|
}
|
|
|
|
|
|
-//_SOCK* CYAServerDlg::get_socket_by_count( DWORD dwConnID )
|
|
|
-std::shared_ptr<_SOCK> CYAServerDlg::get_socket_by_count( DWORD dwConnID )
|
|
|
+std::shared_ptr<_SOCK> CYAServerDlg::get_socket_by_Id( DWORD dwConnID )
|
|
|
{
|
|
|
SocketMap::iterator _sock = mp_socket_list.begin();
|
|
|
for(; _sock != mp_socket_list.end(); ++_sock){
|
|
@@ -11505,217 +11430,6 @@ int CYAServerDlg::GenerateAllDataJsonTest()
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int CYAServerDlg::simulation_send_data()
|
|
|
-{
|
|
|
- //从文件中读取数据
|
|
|
- std::string strFilePath = "";
|
|
|
- strFilePath = get_data_file_path();
|
|
|
- if (strFilePath == "")
|
|
|
- {
|
|
|
- AfxMessageBox(_T("路径为空!"));
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- ifstream in;
|
|
|
- in.open(strFilePath);
|
|
|
-
|
|
|
- if (!in.is_open())
|
|
|
- {
|
|
|
- CString str = _T("");
|
|
|
- str = strFilePath.c_str();
|
|
|
- AfxMessageBox(_T("无此配置文件"),IDOK);
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- char* pData = new char[LENGTH_SQL];
|
|
|
-
|
|
|
- //总的发送次数,json发送间隔(单位ms),发送类型(0,一个json包里;1,每个位置信息单独一个json包)
|
|
|
- int send_times = 0,send_interval = 0,send_type = 0;
|
|
|
- //卡总数,起始卡号,坐标x,坐标y,坐标z,坐标是否自增(1自增,0不自增),x自增间隔,y自增间隔,z自增间隔
|
|
|
- int card_totals = 0,start_card_num = 0,is_random = 0,map_id = 0,area_id = 0, dept_id = 0, state = 0,state_move = 0,state_biz = 0;
|
|
|
- double start_x = 0.0,start_y = 0.0,start_z = 0.0,random_min = 0.0,random_max = 0.0;
|
|
|
-
|
|
|
- struct Send_Card{
|
|
|
- std::string card_id;
|
|
|
- double x;
|
|
|
- double y;
|
|
|
- double z;
|
|
|
- Send_Card(){
|
|
|
- card_id = "";
|
|
|
- x = y = z = 0.0;
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- //读取配置
|
|
|
- while (!in.eof())
|
|
|
- {
|
|
|
- memset(pData,0,LENGTH_SQL*sizeof(char));
|
|
|
- in.getline(pData,LENGTH_SQL);
|
|
|
-
|
|
|
- std::string data = "";
|
|
|
- data = pData;
|
|
|
- std::vector<std::string> metaDatas = CFunctions::split(data,",",true);
|
|
|
- if (metaDatas[0] == "#")
|
|
|
- {
|
|
|
- //注释
|
|
|
- continue;
|
|
|
- }else if(metaDatas[0] == "config"){
|
|
|
- send_times = atoi(metaDatas[1].c_str());
|
|
|
- send_interval = atoi(metaDatas[2].c_str());
|
|
|
- send_type = atoi(metaDatas[3].c_str());
|
|
|
- is_random = atoi(metaDatas[4].c_str());
|
|
|
- random_min = atof(metaDatas[5].c_str());
|
|
|
- random_max = atof(metaDatas[6].c_str());
|
|
|
- //increment_z = atof(metaDatas[7].c_str());
|
|
|
- }else if (metaDatas[0] == "data")
|
|
|
- {
|
|
|
- card_totals = atoi(metaDatas[1].c_str());
|
|
|
- start_card_num = atoi(metaDatas[2].c_str());
|
|
|
- start_x = atof(metaDatas[3].c_str());
|
|
|
- start_y = atof(metaDatas[4].c_str());
|
|
|
- start_z = atof(metaDatas[5].c_str());
|
|
|
- map_id = atoi(metaDatas[6].c_str());
|
|
|
- area_id = atoi(metaDatas[7].c_str());
|
|
|
- dept_id = atoi(metaDatas[8].c_str());
|
|
|
- state = atoi(metaDatas[9].c_str());
|
|
|
- state_move = atoi(metaDatas[10].c_str());
|
|
|
- state_biz = atoi(metaDatas[11].c_str());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- std::vector<std::shared_ptr<Send_Card>> vt_cards;
|
|
|
- vt_cards.resize(0);
|
|
|
-
|
|
|
- for (int i = start_card_num;i < card_totals + start_card_num;i++)
|
|
|
- {
|
|
|
- std::shared_ptr<Send_Card> sp_card = std::make_shared<Send_Card>();
|
|
|
- sp_card->card_id = CFunctions::getstrwithzero(CT_PERSON, 3) + CFunctions::getstrwithzero(i, 10);
|
|
|
-
|
|
|
- if (is_random)
|
|
|
- {
|
|
|
- sp_card->x = start_x + CFunctions::random(random_min,random_max);
|
|
|
- sp_card->y = start_y + CFunctions::random(random_min,random_max);
|
|
|
- sp_card->z = start_z + CFunctions::random(random_min,random_max);
|
|
|
- }else{
|
|
|
- sp_card->x = start_x;
|
|
|
- sp_card->y = start_y;
|
|
|
- sp_card->z = start_z;
|
|
|
- }
|
|
|
-
|
|
|
- vt_cards.push_back(sp_card);
|
|
|
- }
|
|
|
-
|
|
|
- //构造数据
|
|
|
- std::string strSendData = "";
|
|
|
- for (int i = 0;i<send_times;i++)
|
|
|
- {
|
|
|
- Json::Value root;
|
|
|
- switch(send_type){
|
|
|
- case 0:
|
|
|
- strSendData = "";
|
|
|
- for (std::vector<std::shared_ptr<Send_Card>>::iterator it_card = vt_cards.begin();it_card != vt_cards.end();++it_card)
|
|
|
- {
|
|
|
- Json::Value pos_cards;
|
|
|
- Json::Value pos_card;
|
|
|
-
|
|
|
- //卡号
|
|
|
- pos_cards.append((*it_card)->card_id);
|
|
|
-
|
|
|
- //x,y坐标
|
|
|
- pos_cards.append(CFunctions::round((*it_card)->x, 2));
|
|
|
- pos_cards.append(CFunctions::round((*it_card)->y, 2));
|
|
|
-
|
|
|
- int ms = 1000; //转为ms
|
|
|
- //入井时间戳
|
|
|
- time_t ct = time(NULL);
|
|
|
- double t = *((int64_t*)&ct)*ms;
|
|
|
- pos_cards.append(t);
|
|
|
-
|
|
|
- //进入区域时间戳
|
|
|
- pos_cards.append(t);
|
|
|
-
|
|
|
- //最后接收时间戳
|
|
|
- pos_cards.append(t);
|
|
|
-
|
|
|
- //工作时长
|
|
|
- t = (int)difftime(time(NULL), ct)*ms;
|
|
|
- pos_cards.append(t);
|
|
|
-
|
|
|
- //地图编号
|
|
|
- pos_cards.append(map_id);
|
|
|
-
|
|
|
- //区域编号
|
|
|
- pos_cards.append(area_id);
|
|
|
-
|
|
|
- //部门编号
|
|
|
- pos_cards.append(dept_id);
|
|
|
-
|
|
|
- //状态
|
|
|
- pos_cards.append(state);
|
|
|
-
|
|
|
- //运行状态
|
|
|
- pos_cards.append(state_move);
|
|
|
-
|
|
|
- //业务状态
|
|
|
- pos_cards.append(state_biz);
|
|
|
-
|
|
|
- //速度
|
|
|
- pos_cards.append(0);
|
|
|
-
|
|
|
- if(!pos_cards.isNull()){
|
|
|
- root[JSON_ROOT_KEY_DATA].append(pos_cards);
|
|
|
- }
|
|
|
- }
|
|
|
- root[JSON_ROOT_KEY_CMD] = JSON_CMD_VALUE_POS_MAP;
|
|
|
- root[JSON_ROOT_KEY_VERSION] = INTERFACE_VERSION;
|
|
|
- strSendData = root.toFastString();
|
|
|
- //发送数据
|
|
|
- if (strSendData != "")
|
|
|
- {
|
|
|
- send_json_data(JSON_CMD_VALUE_PUSH,strSendData);
|
|
|
- Sleep(send_interval);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //发送数据
|
|
|
- if (strSendData != "")
|
|
|
- {
|
|
|
- send_json_data(JSON_CMD_VALUE_PUSH,strSendData);
|
|
|
- }else{
|
|
|
-
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-std::string CYAServerDlg::get_data_file_path()
|
|
|
-{
|
|
|
- TCHAR buf[MAX_PATH + 1];
|
|
|
- CString cstrTemp = _T(""),cstrFilePath = _T("");
|
|
|
-
|
|
|
- //首先获得应用程序exe文件路径
|
|
|
- ::GetModuleFileName(NULL,buf,sizeof(buf));
|
|
|
- cstrTemp = buf;
|
|
|
- int m=cstrTemp.ReverseFind('\\');
|
|
|
- if (m != -1)
|
|
|
- cstrTemp = cstrTemp.Left(m);
|
|
|
-
|
|
|
- //在往上一级,工程文件所在路径
|
|
|
- /*m = cstrTemp.ReverseFind('\\');
|
|
|
- if (m != -1)
|
|
|
- cstrTemp = cstrTemp.Left(m);*/
|
|
|
- cstrFilePath = cstrTemp + _T("\\offline_data\\simulation.log");
|
|
|
-
|
|
|
- std::string strFilePath = "";
|
|
|
- strFilePath = CFunctions::CString2char(cstrFilePath);
|
|
|
-
|
|
|
- return strFilePath;
|
|
|
-}
|
|
|
-
|
|
|
afx_msg LRESULT CYAServerDlg::OnWriteErrorLog(WPARAM wParam, LPARAM lParam)
|
|
|
{
|
|
|
LogMsg* pMsg = (LogMsg*)wParam;
|
|
@@ -12068,8 +11782,6 @@ void CYAServerDlg::deal_card_msg( std::shared_ptr<Card> card/*Card* card*/, bool
|
|
|
}
|
|
|
}
|
|
|
::GetLocalTime(&card->deal_time);
|
|
|
- ::GetLocalTime(&card->deal_reader_time);
|
|
|
- dw = ::GetTickCount();
|
|
|
save_card_postion(card);
|
|
|
card_enter_map(card); // 切换地图
|
|
|
card_enter_area(card);
|
|
@@ -13387,194 +13099,6 @@ std::string CYAServerDlg::get_json_count_area()
|
|
|
}
|
|
|
|
|
|
return ret;
|
|
|
-Json::Value CYAServerDlg::get_json_count_list(int req_type,int area_id)
|
|
|
-{
|
|
|
- std::string ret = "";
|
|
|
-
|
|
|
- Json::Value data;
|
|
|
- CardMap::iterator it_card;
|
|
|
-
|
|
|
- switch(req_type){
|
|
|
- case REQUEST_ALL:
|
|
|
- break;
|
|
|
- case REQUEST_ALL_OVER_TIME_PERSON:
|
|
|
- //人员井下超时
|
|
|
- for (EventMap::iterator it = mp_event_list->begin();it!=mp_event_list->end();++it)
|
|
|
- {
|
|
|
- if (it->second->ev_type == ET_CARD_OVER_TIME_PERSON && it->second->obj_type == OT_CARD)
|
|
|
- {
|
|
|
- it_card = mp_card_list_all.find(it->second->obj_id);
|
|
|
- if (it_card != mp_card_list_all.end() &&it_card->second->card_type == CT_PERSON)
|
|
|
- {
|
|
|
- ////找到满足此异常条件卡对象
|
|
|
- Json::Value card_value;
|
|
|
-
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_AREA_OVER_TIME_PERSON:
|
|
|
- //人员区域超时
|
|
|
- for (EventMap::iterator it = mp_event_list->begin();it!=mp_event_list->end();++it)
|
|
|
- {
|
|
|
- if (it->second->ev_type == ET_CARD_AREA_OVER_TIME_PERSON && it->second->obj_type == OT_CARD)
|
|
|
- {
|
|
|
- it_card = mp_card_list_all.find(it->second->obj_id);
|
|
|
- if (it_card != mp_card_list_all.end())
|
|
|
- {
|
|
|
- if (it_card->second->card_type == CT_PERSON)
|
|
|
- {
|
|
|
- if (area_id != 0 && area_id == it_card->second->area_id)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- else{
|
|
|
- //等于0 即全区域的,全区域的即为井下所有超时人员
|
|
|
- //std::string all_area = "";
|
|
|
- //for (AreaMap::iterator it_area = mp_area_list.begin();it_area != mp_area_list.end();++it_area)
|
|
|
- //{
|
|
|
- // all_area += get_json_count_list(ET_CARD_AREA_OVER_TIME_PERSON,it_area->second->area_id);
|
|
|
- //}
|
|
|
- //data.append(all_area);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- case REQUEST_SPECIAL_ERROR_PERSON:
|
|
|
- //特种作业人员异常报警详细列表
|
|
|
- for (EventMap::iterator it = mp_event_list->begin();it!=mp_event_list->end();++it)
|
|
|
- {
|
|
|
- //电量低
|
|
|
- //电量极低
|
|
|
- //人员进入限制区域
|
|
|
- //人员巡检异常
|
|
|
- if ((it->second->ev_type == ET_CARD_LOW_POWER
|
|
|
- ||it->second->ev_type == ET_CARD_LOW_POWER_SERIOUS
|
|
|
- ||it->second->ev_type == ET_CARD_AREA_FORBIDDEN_PERSON
|
|
|
- || it->second->ev_type == ET_CARD_PATROL_ERROR) && it->second->obj_type == OT_CARD)
|
|
|
- {
|
|
|
- it_card = mp_card_list_all.find(it->second->obj_id);
|
|
|
- if (it_card != mp_card_list_all.end())
|
|
|
- {
|
|
|
- if (it_card->second->card_type == CT_PERSON && it_card->second->occupation == "安检员")
|
|
|
- {
|
|
|
- //找到满足此异常条件卡对象
|
|
|
- Json::Value card_value;
|
|
|
-
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_ALL_OVER_TIME_VEHICLE:
|
|
|
- // 车辆井下超时
|
|
|
- for (EventMap::iterator it = mp_event_list->begin();it!=mp_event_list->end();++it)
|
|
|
- {
|
|
|
- if (it->second->ev_type == ET_CARD_OVER_TIME_VEHICLE && it->second->obj_type == OT_CARD)
|
|
|
- {
|
|
|
- it_card = mp_card_list_all.find(it->second->obj_id);
|
|
|
- if (it_card != mp_card_list_all.end())
|
|
|
- {
|
|
|
- if (it_card->second->card_type == CT_VEHICLE)
|
|
|
- {
|
|
|
- //找到满足此异常条件卡对象
|
|
|
- Json::Value card_value;
|
|
|
-
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_AREA_OVER_TIME_VEHICLE:
|
|
|
- // 车辆区域超时
|
|
|
- for (EventMap::iterator it = mp_event_list->begin();it!=mp_event_list->end();++it)
|
|
|
- {
|
|
|
- if (it->second->ev_type == ET_CARD_AREA_OVER_TIME_VEHICLE && it->second->obj_type == OT_CARD)
|
|
|
- {
|
|
|
- it_card = mp_card_list_all.find(it->second->obj_id);
|
|
|
- if (it_card != mp_card_list_all.end())
|
|
|
- {
|
|
|
- if (it_card->second->card_type == CT_VEHICLE)
|
|
|
- {
|
|
|
- if (area_id != 0 && area_id == it_card->second->area_id)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- else{
|
|
|
- //等于0 即全区域的,全区域的即为井下所有超时车辆
|
|
|
- //std::string all_area = "";
|
|
|
- //for (AreaMap::iterator it_area = mp_area_list.begin();it_area != mp_area_list.end();++it_area)
|
|
|
- //{
|
|
|
- // all_area += get_json_count_list(ET_CARD_AREA_OVER_TIME_PERSON,it_area->second->area_id);
|
|
|
- //}
|
|
|
- //data.append(all_area);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_ALL_OVER_PERSON:
|
|
|
- //井下人员超员,返回全部人员信息
|
|
|
- for (CardMap::iterator it_card = mp_card_list_down_person.begin();it_card != mp_card_list_down_person.end();++it_card)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_ALL_OVER_VEHICLE:
|
|
|
- //井下车辆超员,返回全部车辆信息
|
|
|
- for (CardMap::iterator it_card = mp_card_list_down_vehicle.begin();it_card != mp_card_list_down_vehicle.end();++it_card)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_card->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_AREA_OVER_PERSON:
|
|
|
- //区域人员超员,返回区域所有人员
|
|
|
- for (AreaMap::iterator it_area = mp_area_list.begin();it_area != mp_area_list.end();++it_area)
|
|
|
- {
|
|
|
- for (CardMap::iterator it_person = it_area->second->area_card_list_person->begin();it_person != it_area->second->area_card_list_person->end();++it_person)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_person->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- case REQUEST_AREA_OVER_VEHICLE:
|
|
|
- //区域车辆超员,返回区域所有车辆
|
|
|
- for (AreaMap::iterator it_area = mp_area_list.begin();it_area != mp_area_list.end();++it_area)
|
|
|
- {
|
|
|
- for (CardMap::iterator it_vehicle = it_area->second->area_card_list_vehicle->begin();it_vehicle != it_area->second->area_card_list_vehicle->end();++it_vehicle)
|
|
|
- {
|
|
|
- Json::Value card_value;
|
|
|
- card_value = get_card_info(it_vehicle->second);
|
|
|
- data.append(card_value);
|
|
|
- }
|
|
|
- }
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- if (data.size() > 0)
|
|
|
- {
|
|
|
- ret = data.toFastString();
|
|
|
- }
|
|
|
-
|
|
|
- return data;
|
|
|
}
|
|
|
|
|
|
void CYAServerDlg::parse_data_lights_state( BYTE* DataBuffer, int& nCurPos, int reader_id, unsigned short wChr )
|