area_business_person_attendance.h 1.7 KB

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