staff.proto 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. syntax = "proto3";
  2. // package声明符,用来防止不同的消息类型有命名冲突
  3. package v1;
  4. // 用于生成指定语言go的包名称
  5. option go_package = "smart-site-management-gateway/pb/v1";
  6. message LatestStaffDataRequest{
  7. int64 project_id = 1;
  8. }
  9. message LaststStaffData {
  10. // 工号
  11. string work_no = 1;
  12. // 打卡时间
  13. string recog_time = 2;
  14. // 进出
  15. int32 in_out = 3;
  16. // 照片
  17. string photo = 4;
  18. string name = 5;
  19. }
  20. message LatestStaffDataReply{
  21. // 工号
  22. string work_no = 1;
  23. // 打卡时间
  24. string recog_time = 2;
  25. // 进出
  26. int32 in_out = 3;
  27. // 照片
  28. string photo = 4;
  29. string name = 5;
  30. string group = 6;
  31. string work_type = 7;
  32. }
  33. message WorkTypeStatistics{
  34. // 工种
  35. string work_type = 1;
  36. // 总人数
  37. int64 total = 2;
  38. // 出勤人数
  39. int64 attendance = 3;
  40. int64 id = 4;
  41. }
  42. message StaffWorkTypeStatisticsRequest{
  43. int64 project_id = 1;
  44. }
  45. message StaffWorkTypeStatisticsReply{
  46. repeated WorkTypeStatistics list = 1;
  47. }
  48. message StaffTypeStatistics{
  49. // 员工类型
  50. string staff_type = 1;
  51. // 总人数
  52. int64 total = 2;
  53. // 出勤人数
  54. int64 attendance = 3;
  55. int32 type_code = 4;
  56. }
  57. message StaffTypeStatisticsRequest{
  58. int64 project_id = 1;
  59. }
  60. message StaffTypeStatisticsReply{
  61. repeated StaffTypeStatistics list = 1;
  62. int64 total_attendance = 2;
  63. int64 total_in = 3;
  64. }
  65. message LaborCompanyStatistics{
  66. // 员工类型
  67. string labor_company = 1;
  68. // 总人数
  69. int64 total = 2;
  70. // 出勤人数
  71. int64 attendance = 3;
  72. // 管理人员
  73. int64 manager_attendance = 4;
  74. // 劳务人员
  75. int64 labor_attendance = 5;
  76. }
  77. message LaborCompanyStatisticsRequest{
  78. int64 project_id = 1;
  79. }
  80. message LaborCompanyStatisticsReply{
  81. repeated LaborCompanyStatistics list = 1;
  82. }
  83. message StaffListRequest {
  84. int64 project_id = 1;
  85. int32 page = 2;
  86. int32 page_size = 3;
  87. string filter = 4;
  88. }
  89. message StaffListItem {
  90. int64 id = 1;
  91. int64 project_id = 2;
  92. // 工号
  93. string work_no = 3;
  94. // 姓名
  95. string name = 4;
  96. // 身分证
  97. string id_cert = 5;
  98. // 性别
  99. string gender = 6;
  100. // 员工类型
  101. string staff_type = 7;
  102. // 生日
  103. string birthday = 8;
  104. // 住址
  105. string address = 9;
  106. // 发证机关
  107. string id_issue = 10;
  108. // 证件有效期
  109. string id_period = 11;
  110. // 证件照片
  111. string id_photo = 12;
  112. // 现场人员红外照片
  113. string inf_photo = 13;
  114. // 现场人员可见光照片
  115. string photo = 14;
  116. // 设备编码
  117. string sn = 15;
  118. // 工种
  119. string work_type = 16;
  120. // 0 新增,1已下发(待确认) 2 已下发(成功) 3 待删除
  121. int32 status = 17;
  122. // 劳务公司
  123. string labor_company = 18;
  124. // 班组
  125. string group = 19;
  126. // 是否删除
  127. bool is_delete = 20;
  128. string created_at = 21;
  129. }
  130. message StaffListReply {
  131. int64 total = 1;
  132. int32 page = 2;
  133. int32 page_size = 3;
  134. repeated StaffListItem list = 4;
  135. }
  136. message StaffAttendanceRequest {
  137. int64 project_id = 1;
  138. int32 page = 2;
  139. int32 page_size = 3;
  140. string filter = 4;
  141. int64 start = 5;
  142. int64 end = 6;
  143. }
  144. message StaffAttendanceDesc {
  145. // 打卡时间
  146. string time = 1;
  147. // 进出
  148. string in_out = 2;
  149. bool is_in = 3;
  150. }
  151. message StaffAttendanceItem {
  152. int64 id = 1;
  153. string gender = 2;
  154. string name = 3;
  155. string work_type = 4;
  156. string staff_type = 5;
  157. string work_no = 6;
  158. string date = 7;
  159. // 一天的考勤记录
  160. repeated StaffAttendanceDesc list = 8;
  161. }
  162. message StaffAttendanceReply {
  163. int64 total = 1;
  164. int32 page = 2;
  165. int32 page_size = 3;
  166. repeated StaffAttendanceItem list = 4;
  167. }