Parcourir la source

删除学生试卷中checked字段

ywx
王宁 il y a 1 mois
Parent
révision
4acba25d6e

+ 0
- 2
smarking/src/main/java/com/xhkjedu/smarking/mapper/stupaper/MsPaperStudentQuestionMapper.java Voir le fichier

@@ -32,8 +32,6 @@ public interface MsPaperStudentQuestionMapper extends TkMapper<MsPaperStudentQue
32 32
     List<MsPaperStudentQuestion> listStuQuestionsByMpsid(@Param("mpsid") Integer mpsid);
33 33
     //学生考试-提交试卷-修改未提交试题为已批阅
34 34
     int updateStuQuestionsNoCommit(@Param("mpsid") Integer mpsid,@Param("timestamp") Integer timestamp);
35
-    //学生考试-提交试卷-获取试卷中未批改试题数量
36
-    Integer getStuQuestionNoCheckedNum(@Param("mpsid") Integer mpsid);
37 35
 
38 36
     //试卷答案-客观题-批量更新学生提交指定试题是否需要重新批改
39 37
     Integer updateBatchStuQuesNeeddeal(@Param("mpid") Integer mpid,@Param("list")List<MsPaperQtypeQuestion> list);

+ 0
- 2
smarking/src/main/java/com/xhkjedu/smarking/model/stupaper/MsPaperStudent.java Voir le fichier

@@ -31,8 +31,6 @@ public class MsPaperStudent extends BaseBean {
31 31
     private Integer studentid;
32 32
     //学生考试状态0未进场1已进场2已交卷3缺考
33 33
     private Integer sstate;
34
-    //批阅状态0默认1待批阅2批阅中3已批阅
35
-    private Integer checked;
36 34
     //试题数量
37 35
     private Integer pnum;
38 36
     //试卷总分

+ 0
- 1
smarking/src/main/java/com/xhkjedu/smarking/service/exam/MsExamService.java Voir le fichier

@@ -246,7 +246,6 @@ public class MsExamService {
246 246
                 es.setSubjectid(subjectid);
247 247
                 es.setStudentid(studentId);
248 248
                 es.setSstate(0);
249
-                es.setChecked(0);
250 249
                 es.setPnum(pnum);
251 250
                 es.setPscore(pscore);
252 251
                 es.setStuscore(0.0);

+ 0
- 1
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsTemplateService.java Voir le fichier

@@ -288,7 +288,6 @@ public class MsTemplateService {
288 288
             es.setSubjectid(subjectid);
289 289
             es.setStudentid(stuid);
290 290
             es.setSstate(0);
291
-            es.setChecked(0);
292 291
             es.setPnum(paper.getPnum());
293 292
             es.setPscore(paper.getPscore());
294 293
             es.setStuscore(0.0);

+ 0
- 6
smarking/src/main/java/com/xhkjedu/smarking/service/scan/MsScanbatchPaperService.java Voir le fichier

@@ -237,7 +237,6 @@ public class MsScanbatchPaperService {
237 237
         ps.setBatchid(null);
238 238
         ps.setMspid(null);
239 239
         ps.setSstate(0);
240
-        ps.setChecked(0);
241 240
         ps.setStuscore(0.0);
242 241
         ps.setStuscoretype(0);
243 242
         ps.setHasbad(0);
@@ -263,7 +262,6 @@ public class MsScanbatchPaperService {
263 262
             return -1;
264 263
         }
265 264
 
266
-        int checknum = 0;//记录试卷中已批改题块数量
267 265
         double stuPaperScore = 0.0;//学生试卷得分
268 266
         List<MsPaperStudentBlock>  saveBlockList = new ArrayList<>();// 保存学生题块信息
269 267
         List<MsPaperStudentQuestion> saveQuesList = new ArrayList<>();//保存学生提交试题
@@ -311,7 +309,6 @@ public class MsScanbatchPaperService {
311 309
                     stuQuestion.setChecked(3);//客观题自动批阅
312 310
                     stuQuestion.setFirstccore(queAnswer.getStuscore());
313 311
                     stuQuestion.setFirstcime(queAnswer.getFirstcime());
314
-                    checknum++;
315 312
                     stuPaperScore = MarkingUtil.add(stuPaperScore, stuQuestion.getStuscore());
316 313
 
317 314
                     saveQuesList.add(stuQuestion);
@@ -355,9 +352,6 @@ public class MsScanbatchPaperService {
355 352
         if(msScanbatchPaper.getViolated() == 1){
356 353
             msPaperStudent.setHasbad(1);
357 354
         }
358
-        if(checknum == saveQuesList.size()){
359
-            msPaperStudent.setChecked(3);
360
-        }
361 355
 
362 356
         //批量修改试卷题块、试题信息
363 357
         msPaperStudentBlockMapper.updateBatchStuBlock(saveBlockList);

+ 0
- 6
smarking/src/main/java/com/xhkjedu/smarking/service/stupaper/MsPaperStudentService.java Voir le fichier

@@ -286,12 +286,6 @@ public class MsPaperStudentService {
286 286
 
287 287
         //更改未提交试题的批阅状态为已批改
288 288
         msPaperStudentQuestionMapper.updateStuQuestionsNoCommit(mpsid,timestamp);
289
-        Integer nocheckedNum = msPaperStudentQuestionMapper.getStuQuestionNoCheckedNum(mpsid);
290
-        int checked = 1;
291
-        if (nocheckedNum == 0) {
292
-            checked = 3;//试卷中所有试题都批完后标识试卷已批改
293
-        }
294
-        ps.setChecked(checked);
295 289
         ps.setEndtime(timestamp);
296 290
         ps.setSstate(2);
297 291
 

+ 2
- 2
smarking/src/main/resources/mapper/stupaper/MsPaperStudentMapper.xml Voir le fichier

@@ -204,7 +204,7 @@
204 204
     </select>
205 205
     <!--学生考试-提交试卷-->
206 206
     <update id="updateStudentPaper">
207
-        update ms_paper_student set endtime=#{ps.endtime},sstate=#{ps.sstate},stuscoretype=1,checked=#{ps.checked}
207
+        update ms_paper_student set endtime=#{ps.endtime},sstate=#{ps.sstate},stuscoretype=1
208 208
         ,stuscore=(SELECT SUM(IFNULL(q.stuscore,0)) FROM ms_paper_student_question q WHERE q.mpsid=#{ps.mpsid})
209 209
         <if test="ps.costtime==null and ps.costtime==0">
210 210
             ,costtime=(SELECT SUM(IFNULL(q.costtime,0)) FROM ms_paper_student_question q WHERE q.mpsid=#{ps.mpsid})
@@ -240,7 +240,7 @@
240 240
 
241 241
     <!--扫描异常-清空学生扫描试卷信息-->
242 242
     <update id="updateStuPaperForScanErrorClear">
243
-        update ms_paper_student set sstate=0,checked=0,stuscore=0.0,stuscoretype=0,hasbad=0,batchid=null,mspid=null,
243
+        update ms_paper_student set sstate=0,stuscore=0.0,stuscoretype=0,hasbad=0,batchid=null,mspid=null,
244 244
                                     paperfront=null,paperback=null,pagenum=0 where mpsid=#{mpsid}
245 245
     </update>
246 246
     <!--扫描异常-缺考异常-更改状态-->

+ 0
- 4
smarking/src/main/resources/mapper/stupaper/MsPaperStudentQuestionMapper.xml Voir le fichier

@@ -67,10 +67,6 @@
67 67
         UPDATE ms_paper_student_question SET costtime=0,checked=3,stuscore=0,firstccore=0,firstcime=#{timestamp}
68 68
         WHERE mpsid=#{mpsid} AND answered=0 and checked=0
69 69
     </update>
70
-    <!--学生考试-提交试卷-获取试卷中未批改试题数量-->
71
-    <select id="getStuQuestionNoCheckedNum" resultType="java.lang.Integer">
72
-        SELECT count(*) FROM ms_paper_student_question WHERE mpsid=#{mpsid} AND (checked=1 or checked=2)
73
-    </select>
74 70
 
75 71
     <!--试卷答案-客观题-批量更新学生提交指定试题是否需要重新批改-->
76 72
     <update id="updateBatchStuQuesNeeddeal">

Chargement…
Annuler
Enregistrer