123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef MINE_H
- #define MINE_H
- #include <unordered_map>
- #include "db_api/CDBConnPool.h"
- #include <log.h>
- #include "common.h"
- struct mine_tool
- {
- mine_tool():
- m_over_speed_count(0)
- ,m_normal_speed_count(0)
- ,m_status_call(0)
- ,m_stat_attendance(AS_INIT)
- ,m_attendance_start_time(std::chrono::seconds(0))
- {
- }
- int m_over_speed_count;
- int m_normal_speed_count;
-
- int m_status_call;
-
- int m_stat_attendance;
-
- std::chrono::system_clock::time_point m_attendance_start_time;
- void on_point(uint32_t card_id, int32_t type, int vehicle_category_id);
- uint64_t get_down_time();
- uint64_t get_work_time();
- int32_t is_on_duty();
- bool is_attendance()
- {
- return AS_ATTENDANCE == m_stat_attendance;
- }
- };
- #endif
|