12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #ifndef AREA_BUSINESS_CAR_ATTENDANCE_H
- #define AREA_BUSINESS_CAR_ATTENDANCE_H
- #include"area_business.h"
- class area_business_car_attendance:public area_business
- {
- public:
- area_business_car_attendance();
- virtual int area_business_type()
- {
- return 6;
- }
- //记录进入时间等信息,结束考勤,根据离开的时间和距离,判断是否记录一条新的考勤记录
- void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
- void on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
- //记录离开考勤区域信息,开始考勤
- void on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
- // static void init_attendance_area_from_db();
- // ///area_hover_ptr==nullptr 表示接收到 web的删除卡命令
- // static void save_attendance(const std::shared_ptr<card_location_base>& card_ptr, const std::shared_ptr<area_hover> area_hover_ptr);
- //private:
- // bool is_not_attendance_area(int area_id, int vehicle_type_id)
- // {
- // return m_map.end() != m_map.find(to_list_id(area_id, vehicle_type_id));
- // }
- // uint64_t to_list_id(int area_id, int vehicle_type_id)
- // {
- // return (static_cast<uint64_t>(area_id)<<32) | static_cast<uint64_t>(vehicle_type_id);
- // }
- // ///area_id<<32| vehicle_type_id; att_rule_id
- // std::unordered_map<uint64_t, int> m_map;
- };
- #endif // AREA_BUSINESS_CAR_ATTENDANCE_H
|