area_business_person_attendance.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _area_business_person_attendance_hpp_
  2. #define _area_business_person_attendance_hpp_
  3. #include"area_business.h"
  4. #include<rapidjson/document.h>
  5. #include<rapidjson/prettywriter.h>
  6. #include<rapidjson/stringbuffer.h>
  7. #include<websocket/sio/sio_client.h>
  8. struct area_business_person_attendance:area_business
  9. {
  10. //记录进入时间等信息,开始考勤
  11. void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  12. void on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  13. //记录离开考勤区域信息,结束考勤
  14. void on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  15. // ///升井或收到web的删除卡命令 site_ptr==nullptr表示收到web的删除卡命令
  16. // /// 保存考勤记录,发升井json,清理卡
  17. // static void up_mine(std::shared_ptr<card_location_base> card_ptr, bool is_web_delete);
  18. /**
  19. * @brief 手工升井函数
  20. */
  21. static void handle_up_mine(sio::message::ptr const& data);
  22. private:
  23. ///升井json
  24. static void _to_json_card_up_one(std::shared_ptr<card_location_base> card_ptr,
  25. rapidjson::Value& out_datas, rapidjson::Document::AllocatorType& allocator);
  26. };
  27. #endif // AREA_BUSINESS_CAR_ATTENDANCE_H