area_business_person_attendance.h 1.5 KB

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