xiangpei
2024-03-28 0f431b52e0936456bd165d9553761bfd8a5a0517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
package com.mindskip.xzs.domain;
 
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
import com.mindskip.xzs.utility.ExamUtil;
 
import java.io.Serializable;
import java.util.Date;
import java.util.List;
 
/**
 * @version 2.2.0
 * @description: 题目
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
public class Question implements Serializable {
 
    private static final long serialVersionUID = 8826266720383164363L;
 
    private Integer id;
 
    /**
     * 题目类型
     */
    private Integer questionType;
 
    /**
     * 学科
     */
    private Integer subjectId;
 
    /**
     * 分数
     */
    private Integer score;
 
    /**
     * 年级
     */
    private Integer gradeLevel;
 
    /**
     * 难度
     */
    private Integer difficult;
 
    /**
     * 标答
     */
    private String correct;
 
    /**
     * 题目内容
     */
    private Integer infoTextContentId;
 
    /**
     * 创建人
     */
    private Integer createUser;
 
    /**
     * 状态
     */
    private Integer status;
 
    /**
     * 创建时间
     */
    private Date createTime;
 
    /**
     * 是否删除
     */
    private Boolean deleted;
 
    /**
     * Gets id.
     *
     * @return the id
     */
    public Integer getId() {
        return id;
    }
 
    /**
     * Sets id.
     *
     * @param id the id
     */
    public void setId(Integer id) {
        this.id = id;
    }
 
    /**
     * Gets question type.
     *
     * @return the question type
     */
    public Integer getQuestionType() {
        return questionType;
    }
 
    /**
     * Sets question type.
     *
     * @param questionType the question type
     */
    public void setQuestionType(Integer questionType) {
        this.questionType = questionType;
    }
 
    /**
     * Gets subject id.
     *
     * @return the subject id
     */
    public Integer getSubjectId() {
        return subjectId;
    }
 
    /**
     * Sets subject id.
     *
     * @param subjectId the subject id
     */
    public void setSubjectId(Integer subjectId) {
        this.subjectId = subjectId;
    }
 
    /**
     * Gets score.
     *
     * @return the score
     */
    public Integer getScore() {
        return score;
    }
 
    /**
     * Sets score.
     *
     * @param score the score
     */
    public void setScore(Integer score) {
        this.score = score;
    }
 
    /**
     * Gets grade level.
     *
     * @return the grade level
     */
    public Integer getGradeLevel() {
        return gradeLevel;
    }
 
    /**
     * Sets grade level.
     *
     * @param gradeLevel the grade level
     */
    public void setGradeLevel(Integer gradeLevel) {
        this.gradeLevel = gradeLevel;
    }
 
    /**
     * Gets difficult.
     *
     * @return the difficult
     */
    public Integer getDifficult() {
        return difficult;
    }
 
    /**
     * Sets difficult.
     *
     * @param difficult the difficult
     */
    public void setDifficult(Integer difficult) {
        this.difficult = difficult;
    }
 
    /**
     * Gets correct.
     *
     * @return the correct
     */
    public String getCorrect() {
        return correct;
    }
 
    /**
     * Sets correct.
     *
     * @param correct the correct
     */
    public void setCorrect(String correct) {
        this.correct = correct == null ? null : correct.trim();
    }
 
    /**
     * Gets info text content id.
     *
     * @return the info text content id
     */
    public Integer getInfoTextContentId() {
        return infoTextContentId;
    }
 
    /**
     * Sets info text content id.
     *
     * @param infoTextContentId the info text content id
     */
    public void setInfoTextContentId(Integer infoTextContentId) {
        this.infoTextContentId = infoTextContentId;
    }
 
    /**
     * Gets create user.
     *
     * @return the create user
     */
    public Integer getCreateUser() {
        return createUser;
    }
 
    /**
     * Sets create user.
     *
     * @param createUser the create user
     */
    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }
 
    /**
     * Gets status.
     *
     * @return the status
     */
    public Integer getStatus() {
        return status;
    }
 
    /**
     * Sets status.
     *
     * @param status the status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }
 
    /**
     * Gets create time.
     *
     * @return the create time
     */
    public Date getCreateTime() {
        return createTime;
    }
 
    /**
     * Sets create time.
     *
     * @param createTime the create time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
 
    /**
     * Gets deleted.
     *
     * @return the deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }
 
    /**
     * Sets deleted.
     *
     * @param deleted the deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }
 
 
    /**
     * Sets correct from vm.
     *
     * @param correct      the correct
     * @param correctArray the correct array
     */
    public void setCorrectFromVM(String correct, List<String> correctArray) {
        int qType = this.getQuestionType();
        if (qType == QuestionTypeEnum.MultipleChoice.getCode()) {
            String correctJoin = ExamUtil.contentToString(correctArray);
            this.setCorrect(correctJoin);
        } else {
            this.setCorrect(correct);
        }
    }
}