|
@@ -4482,11 +4482,6 @@ std::string CYAServerDlg::get_json_all_special_area_data()
|
|
|
|
|
|
for (CardMap::iterator it_card = mp_card_list_all.begin();it_card != mp_card_list_all.end();++it_card)
|
|
|
{
|
|
|
- if (PDT_DOWN == it_card->second->pos_state)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
Json::Value val_card;
|
|
|
Json::Value val_cards;
|
|
|
|
|
@@ -4508,9 +4503,12 @@ std::string CYAServerDlg::get_json_all_special_area_data()
|
|
|
val_cards.append(t);
|
|
|
|
|
|
//接收时间戳
|
|
|
- val_cards.append(0);
|
|
|
+ t = *((int64_t*)&it_card->second->rec_time)*ms;
|
|
|
+ val_cards.append(t);
|
|
|
+
|
|
|
//工作时长
|
|
|
- val_cards.append(0);
|
|
|
+ t = (int)difftime(it_card->second->rec_time, it_card->second->down_time)*ms;
|
|
|
+ val_cards.append(t);
|
|
|
|
|
|
//地图编号
|
|
|
val_cards.append(it_card->second->map_id);
|
|
@@ -4991,9 +4989,6 @@ std::string CYAServerDlg::get_json_card_position(std::shared_ptr<Card> card)
|
|
|
if(cnt > 0){
|
|
|
root[JSON_ROOT_KEY_CMD] = JSON_CMD_VALUE_POS_MAP;
|
|
|
ret = root.toFastString().c_str();
|
|
|
- CString str;
|
|
|
- str = ret.c_str();
|
|
|
- TRACE(str);
|
|
|
}
|
|
|
|
|
|
return ret;
|
|
@@ -5112,14 +5107,9 @@ std::string CYAServerDlg::get_json_drivingface_card_position(std::shared_ptr<Car
|
|
|
if(cnt > 0){
|
|
|
root[JSON_ROOT_KEY_CMD] = JSON_CMD_DRIVING_FACE_STATE;
|
|
|
ret = root.toFastString().c_str();
|
|
|
- CString str;
|
|
|
- str = ret.c_str();
|
|
|
- TRACE(str);
|
|
|
- debug_print_syslog(0, "Send driving face json: %S.", str);
|
|
|
}
|
|
|
|
|
|
return ret;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -5179,10 +5169,6 @@ std::string CYAServerDlg::get_json_position_all()
|
|
|
default:
|
|
|
break;
|
|
|
}*/
|
|
|
- /*pos_card[JSON_KEY_CORDINATE_X] = CFunctions::round(it->second->x, 2);
|
|
|
- pos_cards.append(pos_card[JSON_KEY_CORDINATE_X]);
|
|
|
- pos_card[JSON_KEY_CORDINATE_Y] = CFunctions::round(it->second->y, 2);
|
|
|
- pos_cards.append(pos_card[JSON_KEY_CORDINATE_Y]);*/
|
|
|
|
|
|
int ms = 1000; //转为ms
|
|
|
//入井时间戳
|
|
@@ -5218,7 +5204,7 @@ std::string CYAServerDlg::get_json_position_all()
|
|
|
AreaMap::iterator it_area_cur = mp_area_list.find(it->second->area_id);
|
|
|
if(it_area_cur != mp_area_list.end())
|
|
|
{
|
|
|
- if (it_area_cur->second->is_att!=1)
|
|
|
+ if (it_area_cur->second->is_att !=1)
|
|
|
{
|
|
|
pos_cards.append(it->second->area_id);
|
|
|
}else{
|