|
@@ -22,6 +22,7 @@
|
|
|
#include <rapidjson/document.h>
|
|
|
#include <rapidjson/pointer.h>
|
|
|
#include "wsClientMgr.h"
|
|
|
+
|
|
|
struct card_sensor
|
|
|
{
|
|
|
card_sensor(int32_t wid,const point &p,const std::string &cid)
|
|
@@ -113,6 +114,7 @@ struct card_sensor
|
|
|
int reader_id(){return sid;}
|
|
|
void push_back(int32_t sensor_id){sensorId_list.push_back(sensor_id);}
|
|
|
};
|
|
|
+
|
|
|
struct card_sensor_mgr
|
|
|
{
|
|
|
void push(int32_t wid,int32_t sid,const point &p,const std::string & cardid)
|
|
@@ -150,7 +152,11 @@ struct staffer_num_business
|
|
|
}
|
|
|
uint32_t get_staff_num() const { return m_staff_num.load();}
|
|
|
private:
|
|
|
- void reset(){m_staff_num=0;m_staff_num_real=0;}
|
|
|
+ void reset()
|
|
|
+ {
|
|
|
+ m_staff_num=0;
|
|
|
+ m_staff_num_real=0;
|
|
|
+ }
|
|
|
// 井下考勤并且要显示的人数
|
|
|
std::atomic<uint32_t> m_staff_num{0};
|
|
|
// 井下总人数
|
|
@@ -246,12 +252,14 @@ struct rear_end_collision_prevented_business
|
|
|
std::map<uint64_t,car_data> m_map;
|
|
|
std::map<std::string,vInfo> m_CloserVehicle;
|
|
|
};
|
|
|
+
|
|
|
mine_business::mine_business()
|
|
|
{
|
|
|
m_staffer_num_ptr.reset(new staffer_num_business);
|
|
|
m_reverse_alarm_ptr.reset(new reverse_alarm_business);
|
|
|
m_rear_ended_ptr.reset(new rear_end_collision_prevented_business);
|
|
|
}
|
|
|
+
|
|
|
mine_business* mine_business::inst()
|
|
|
{
|
|
|
static mine_business mb;
|
|
@@ -387,9 +395,8 @@ void reverse_alarm_business::load_working_sensor()
|
|
|
|
|
|
m_working_sensor[card_id]=sensor_id;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
//前端修改数据库表,dat_sensor dat_drivingface,dat_drivingface_vehicle的时候,需要加载.
|
|
|
void reverse_alarm_business::load_sensor()
|
|
|
{
|