1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef MINE_H
- #define MINE_H
- #include <unordered_map>
- #include <log.h>
- #include <chrono>
- #include "common.h"
- #include <memory>
- struct card_location_base;
- struct mine_tool
- {
- mine_tool()
- {
- clear();
- }
- void clear()
- {
- m_over_speed_count=0;
- m_over_speed_count=0;
- m_normal_speed_count=0;
- m_status_call=0;
- m_is_attendance=false;
- m_attendance_start_time=std::chrono::system_clock::time_point(std::chrono::seconds(0));
- m_is_overtime=false;
- m_overtime=std::chrono::system_clock::time_point(std::chrono::seconds(0));
-
- }
- int m_over_speed_count;
- int m_normal_speed_count;
-
- int m_status_call;
-
- bool m_is_attendance;
-
- std::chrono::system_clock::time_point m_attendance_start_time;
-
- bool m_is_overtime;
-
- std::chrono::system_clock::time_point m_overtime;
- void on_point(uint32_t card_id, int32_t type, int vehicle_category_id);
-
- void on_check_overtime(uint32_t card_id, int32_t type);
- uint64_t get_down_time();
- uint64_t get_work_time();
- int32_t is_on_duty();
- };
- #endif
|