area_business_person_attendance.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. int area_business_type()
  11. {
  12. return 5;
  13. }
  14. //记录进入时间等信息,开始考勤
  15. void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  16. void on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  17. //记录离开考勤区域信息,结束考勤
  18. void on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  19. // ///升井或收到web的删除卡命令 site_ptr==nullptr表示收到web的删除卡命令
  20. // /// 保存考勤记录,发升井json,清理卡
  21. // static void up_mine(std::shared_ptr<card_location_base> card_ptr, bool is_web_delete);
  22. /**
  23. * @brief 手工升井函数
  24. */
  25. static void handle_up_mine(sio::message::ptr const& data);
  26. private:
  27. ///升井json
  28. static void _to_json_card_up_one(std::shared_ptr<card_location_base> card_ptr,
  29. rapidjson::Value& out_datas, rapidjson::Document::AllocatorType& allocator);
  30. };
  31. #endif // AREA_BUSINESS_CAR_ATTENDANCE_H