area_business_work_rate.cpp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #include"area_business_work_rate.h"
  2. #include<memory>
  3. #include<string>
  4. #include"log.h"
  5. #include"card.h"
  6. #include"struct_def.h"
  7. //#include"three_rates.h"
  8. #include"area.h"
  9. #include"tool_time.h"
  10. struct work_rate_data:business_data
  11. {
  12. work_rate_data()
  13. {
  14. }
  15. };
  16. void area_business_work_rate::on_load_his(const std::shared_ptr<area_hover>&area_hover_ptr,
  17. const std::shared_ptr<card_location_base>&card_ptr,std::shared_ptr<business_data>&ptr)
  18. {
  19. }
  20. void area_business_work_rate::on_enter(const std::shared_ptr<area_hover>&area_hover_ptr,
  21. const std::shared_ptr<card_location_base>&card_ptr,std::shared_ptr<business_data>& ptr)
  22. {
  23. if(!card_ptr->is_person() || !three_rates_flag)return;
  24. auto card = std::make_shared<card_pos>();
  25. card->id = card_ptr->m_id;
  26. card->type = card_ptr->m_type;
  27. card->work_line = card_ptr->get_workline();
  28. card->identifier_id = card_ptr->m_cid;
  29. auto area = std::make_shared<area_data>();
  30. area->area_id = area_hover_ptr->id();
  31. area->is_work_area = area_hover_ptr->m_area->m_is_work_area;
  32. area->enter_time = area_hover_ptr->m_enter_time/1000;
  33. //three_rates::get_instance()->enter_area(card, area);
  34. }
  35. void area_business_work_rate::on_hover(const std::shared_ptr<area_hover>&area_hover_ptr,
  36. const std::shared_ptr<card_location_base>&card_ptr,std::shared_ptr<business_data> ptr)
  37. {
  38. }
  39. void area_business_work_rate::on_leave(const std::shared_ptr<area_hover>&area_hover_ptr,
  40. const std::shared_ptr<card_location_base>&card_ptr,std::shared_ptr<business_data> ptr)
  41. {
  42. if(!card_ptr->is_person() || !three_rates_flag)return;
  43. auto card = std::make_shared<card_pos>();
  44. card->id = card_ptr->m_id;
  45. card->type = card_ptr->m_type;
  46. card->work_line = card_ptr->get_workline();
  47. card->identifier_id = card_ptr->m_cid;
  48. auto area = std::make_shared<area_data>();
  49. area->area_id = area_hover_ptr->id();
  50. area->is_work_area = area_hover_ptr->m_area->m_is_work_area;
  51. area->leave_time = area_hover_ptr->m_last_time/1000;
  52. //three_rates::get_instance()->leave_area(card, area);
  53. }