123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // Created by Administrator on 2019/3/5.
- // 禁止制定人员下井
- //
- #ifndef WORKSPACE_FORBID_STAFF_DOWN_MINE_H
- #define WORKSPACE_FORBID_STAFF_DOWN_MINE_H
- #include "write-copy.h"
- #include <string>
- #include <map>
- #include <list>
- struct SForbidStaffInfo
- {
- int staff_id;
- int db_id;
- time_t start_time;
- time_t end_time;
- int state; //状态 0 = 无效 1 = 有效
- SForbidStaffInfo()
- {
- db_id = 0;
- staff_id = 0;
- start_time = 0;
- end_time = 0;
- state = 0;
- }
- };
- struct SForbidStaffList
- {
- int staff_id ;
- std::list<SForbidStaffInfo> forbidList;
- };
- struct forbid_staff_down_mine
- :single_base<forbid_staff_down_mine,int,std::shared_ptr<SForbidStaffList>>
- {
- public:
- // 根据数据库中的自增长id
- void init_forbid_staff(int id = -1,int etype=-1);
- // 根据数据库中的自增长id
- void del_forbid_data(int id,int staff_id);
- //是否禁止状态
- bool IsForbid(int staff_id,time_t cur_time);
- };
- #endif //WORKSPACE_FORBID_STAFF_DOWN_MINE_H
|