1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef MINE_H
- #define MINE_H
- /**
- * @brief 矿井里相关的业务
- * @author 戴月腾
- * @date 2018-09-24
- */
- #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;
- ///CALL_NONE(0):没有呼叫,CALL_ING(2):正在呼叫,CALL_SUCCESSED(1):呼叫成功
- int m_status_call;
- ///考勤状态 0初始状态 1 没在考勤 2 考勤;参看ATTENDANCE_STATUS
- 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);
- bool is_attendance()
- {
- return AS_ATTENDANCE == m_stat_attendance;
- }
- };
- #endif // MINE_H
|