RealExam.java 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. package com.ruoyi.sim.domain;
  2. import java.util.Date;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import org.apache.commons.lang3.builder.ToStringBuilder;
  5. import org.apache.commons.lang3.builder.ToStringStyle;
  6. import com.ruoyi.common.annotation.Excel;
  7. import com.ruoyi.common.core.domain.BaseEntity;
  8. /**
  9. * 考试对象 sim_real_exam
  10. * <p>
  11. * <p>
  12. * 教员常量密码:JY2025@wwee
  13. *
  14. * @author tom
  15. * @date 2024-12-15
  16. */
  17. public class RealExam extends BaseEntity {
  18. private static final long serialVersionUID = 1L;
  19. /**
  20. * 考试ID
  21. */
  22. private Long examId;
  23. /**
  24. * 考试集合ID
  25. */
  26. @Excel(name = "考试集合ID")
  27. private Long examCollectionId;
  28. /**
  29. * 模拟器类型
  30. */
  31. @Excel(name = "模拟器类型")
  32. private String simType;
  33. /**
  34. * 学员ID/用户ID
  35. */
  36. @Excel(name = "学员ID/用户ID")
  37. private Long userId;
  38. /**
  39. * 座ID
  40. */
  41. @Excel(name = "座ID")
  42. private Long seatId;
  43. /**
  44. * 模拟器ID
  45. */
  46. @Excel(name = "模拟器ID")
  47. private Long simId;
  48. /**
  49. * 考试状态:[0]-未登录,[1]-已登录,[2]-模拟器检查并下发故障中,[3]:模拟器检查OK可开考,[4]-答题中,[5]-已交卷,[6]-计算成绩中,[7]-获取到成绩报告,[80]-教师标记缺考,[81]-登录未开始答题,[90]-模拟器异常结束
  50. */
  51. @Excel(name = "考试状态:[0]-未登录,[1]-已登录,[2]-模拟器检查并下发故障中,[3]:模拟器检查OK可开考,[4]-答题中,[5]-已交卷,[6]-计算成绩中,[7]-获取到成绩报告,[80]-教师标记缺考,[81]-登录未开始答题,[90]-模拟器异常结束")
  52. private String examStatus;
  53. /**
  54. * 总分:累加扣分和计算出总分
  55. */
  56. @Excel(name = "总分:累加扣分和计算出总分")
  57. private Long totalScore;
  58. /**
  59. * 扣分总计,不计超时扣分
  60. */
  61. @Excel(name = "扣分总计,不计超时扣分")
  62. private Long deductionTotalScore;
  63. /**
  64. * 考试实际开始时间(毫秒)
  65. */
  66. @JsonFormat(pattern = "yyyy-MM-dd")
  67. @Excel(name = "考试实际开始时间(毫秒)", width = 30, dateFormat = "yyyy-MM-dd")
  68. private Date startTime;
  69. /**
  70. * 考试实际结束时间(毫秒)
  71. */
  72. @JsonFormat(pattern = "yyyy-MM-dd")
  73. @Excel(name = "考试实际结束时间(毫秒)", width = 30, dateFormat = "yyyy-MM-dd")
  74. private Date endTime;
  75. /**
  76. * 登录时间
  77. */
  78. @JsonFormat(pattern = "yyyy-MM-dd")
  79. @Excel(name = "登录时间", width = 30, dateFormat = "yyyy-MM-dd")
  80. private Date loginTime;
  81. /**
  82. * 登出时间
  83. */
  84. @JsonFormat(pattern = "yyyy-MM-dd")
  85. @Excel(name = "登出时间", width = 30, dateFormat = "yyyy-MM-dd")
  86. private Date logoutTime;
  87. public void setExamId(Long examId) {
  88. this.examId = examId;
  89. }
  90. public Long getExamId() {
  91. return examId;
  92. }
  93. public void setExamCollectionId(Long examCollectionId) {
  94. this.examCollectionId = examCollectionId;
  95. }
  96. public Long getExamCollectionId() {
  97. return examCollectionId;
  98. }
  99. public void setSimType(String simType) {
  100. this.simType = simType;
  101. }
  102. public String getSimType() {
  103. return simType;
  104. }
  105. public void setUserId(Long userId) {
  106. this.userId = userId;
  107. }
  108. public Long getUserId() {
  109. return userId;
  110. }
  111. public void setSeatId(Long seatId) {
  112. this.seatId = seatId;
  113. }
  114. public Long getSeatId() {
  115. return seatId;
  116. }
  117. public void setSimId(Long simId) {
  118. this.simId = simId;
  119. }
  120. public Long getSimId() {
  121. return simId;
  122. }
  123. public void setExamStatus(String examStatus) {
  124. this.examStatus = examStatus;
  125. }
  126. public String getExamStatus() {
  127. return examStatus;
  128. }
  129. public void setTotalScore(Long totalScore) {
  130. this.totalScore = totalScore;
  131. }
  132. public Long getTotalScore() {
  133. return totalScore;
  134. }
  135. public void setDeductionTotalScore(Long deductionTotalScore) {
  136. this.deductionTotalScore = deductionTotalScore;
  137. }
  138. public Long getDeductionTotalScore() {
  139. return deductionTotalScore;
  140. }
  141. public void setStartTime(Date startTime) {
  142. this.startTime = startTime;
  143. }
  144. public Date getStartTime() {
  145. return startTime;
  146. }
  147. public void setEndTime(Date endTime) {
  148. this.endTime = endTime;
  149. }
  150. public Date getEndTime() {
  151. return endTime;
  152. }
  153. public void setLoginTime(Date loginTime) {
  154. this.loginTime = loginTime;
  155. }
  156. public Date getLoginTime() {
  157. return loginTime;
  158. }
  159. public void setLogoutTime(Date logoutTime) {
  160. this.logoutTime = logoutTime;
  161. }
  162. public Date getLogoutTime() {
  163. return logoutTime;
  164. }
  165. @Override
  166. public String toString() {
  167. return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
  168. .append("examId", getExamId())
  169. .append("examCollectionId", getExamCollectionId())
  170. .append("simType", getSimType())
  171. .append("userId", getUserId())
  172. .append("seatId", getSeatId())
  173. .append("simId", getSimId())
  174. .append("examStatus", getExamStatus())
  175. .append("totalScore", getTotalScore())
  176. .append("deductionTotalScore", getDeductionTotalScore())
  177. .append("startTime", getStartTime())
  178. .append("endTime", getEndTime())
  179. .append("loginTime", getLoginTime())
  180. .append("logoutTime", getLogoutTime())
  181. .append("createBy", getCreateBy())
  182. .append("createTime", getCreateTime())
  183. .append("updateBy", getUpdateBy())
  184. .append("updateTime", getUpdateTime())
  185. .append("remark", getRemark())
  186. .toString();
  187. }
  188. // -------------------------------- tom add --------------------------------
  189. public static long EXAM_TIMEOUT_LIMIT = 1000 * 60 * 5;
  190. public interface State {
  191. String NOT_LOGGED_IN = "0";
  192. String LOGGED_IN = "1";
  193. String SIM_WRITING = "2";
  194. String SIM_PREPARE_OK = "3";
  195. String ANSWERING = "4";
  196. String SUBMITTED = "5";
  197. String CALCULATING_SCORE = "6";
  198. String GOT_REPORT = "7";
  199. String ABSENCE_BY_TEACHER = "80";
  200. String LOGIN_NOT_STARTED_ANSWERING_QUESTIONS = "81";
  201. String SIMULATOR_ERROR = "90";
  202. }
  203. }