1
0

forbid_staff_down_mine.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // Created by Administrator on 2019/3/5.
  3. // 禁止制定人员下井
  4. //
  5. #ifndef WORKSPACE_FORBID_STAFF_DOWN_MINE_H
  6. #define WORKSPACE_FORBID_STAFF_DOWN_MINE_H
  7. #include "write-copy.h"
  8. #include <string>
  9. #include <map>
  10. #include <list>
  11. struct SForbidStaffInfo
  12. {
  13. int staff_id;
  14. int db_id;
  15. time_t start_time;
  16. time_t end_time;
  17. int state; //状态 0 = 无效 1 = 有效
  18. SForbidStaffInfo()
  19. {
  20. db_id = 0;
  21. staff_id = 0;
  22. start_time = 0;
  23. end_time = 0;
  24. state = 0;
  25. }
  26. };
  27. struct SForbidStaffList
  28. {
  29. int staff_id ;
  30. std::list<SForbidStaffInfo> forbidList;
  31. };
  32. struct forbid_staff_down_mine
  33. :single_base<forbid_staff_down_mine,int,std::shared_ptr<SForbidStaffList>>
  34. {
  35. public:
  36. // 根据数据库中的自增长id
  37. void init_forbid_staff(int id = -1,int etype=-1);
  38. // 根据数据库中的自增长id
  39. void del_forbid_data(int id,int staff_id);
  40. //是否禁止状态
  41. bool IsForbid(int staff_id,time_t cur_time);
  42. };
  43. #endif //WORKSPACE_FORBID_STAFF_DOWN_MINE_H