|
@@ -9,6 +9,12 @@
|
9
|
9
|
on duplicate key update taskorder=#{s.taskorder},checktype=#{s.checktype}
|
10
|
10
|
</foreach>
|
11
|
11
|
</insert>
|
|
12
|
+ <!--保存或更新单个任务-->
|
|
13
|
+ <insert id="save">
|
|
14
|
+ insert into ms_paper_check_teacher_task (mpid, mblockid, teacherid, taskorder, mpsbid, checktype, createtime)
|
|
15
|
+ values (#{s.mpid},#{s.mblockid},#{s.teacherid},#{s.taskorder},#{s.mpsbid},#{s.checktype},#{s.createtime})
|
|
16
|
+ on duplicate key update taskorder=#{s.taskorder},checktype=#{s.checktype}
|
|
17
|
+ </insert>
|
12
|
18
|
<!--批量更新任务信息-->
|
13
|
19
|
<update id="batchUpdate">
|
14
|
20
|
update ms_paper_check_teacher_task
|
|
@@ -69,6 +75,7 @@
|
69
|
75
|
<result property="blockorder" column="blockorder"/>
|
70
|
76
|
<result property="bqnum" column="bqnum"/>
|
71
|
77
|
<result property="checktype" column="checktype"/>
|
|
78
|
+ <result property="checkstate" column="checkstate"/>
|
72
|
79
|
<result property="totalNum" column="totalNum"/>
|
73
|
80
|
<result property="checkedNum" column="checkedNum"/>
|
74
|
81
|
<result property="uncheckedNum" column="uncheckedNum"/>
|
|
@@ -81,13 +88,14 @@
|
81
|
88
|
where u.userid = mct.teacherid and mct.mblockid = #{mblockid}
|
82
|
89
|
</select>
|
83
|
90
|
<select id="listByBlock" resultMap="blockResultMap">
|
84
|
|
- select pc.mblockid,pb.blockname,pb.bqscore,pb.blockorder,pb.bqnum
|
85
|
|
- ,pc.checktype,count(pctt.mpcttid) as totalNum,count(if(pctt.checkstate=3,1,null)) as checkedNum
|
|
91
|
+ select pb.mblockid,pb.blockname,pb.bqscore,pb.blockorder,pb.bqnum
|
|
92
|
+ ,pc.checktype,pc.checkstate,count(pctt.mpcttid) as totalNum,count(if(pctt.checkstate=3,1,null)) as checkedNum
|
86
|
93
|
,count(if(pctt.checkstate!=3,1,null))as uncheckedNum
|
|
94
|
+ ,(select group_concat(pbbq.bqn separator '、') from ms_paper_block_question pbbq where pbbq.mblockid = pb.mblockid) as bqn
|
87
|
95
|
from ms_paper_check pc left join ms_paper_check_teacher_task pctt on pc.mpid = pctt.mpid
|
88
|
|
- left join ms_paper_block pb on pc.mblockid = pb.mblockid
|
89
|
|
- where pc.mpid=#{mpid}
|
90
|
|
- group by pc.mblockid
|
|
96
|
+ right join ms_paper_block pb on pc.mblockid = pb.mblockid
|
|
97
|
+ where pb.mpid=#{mpid} and pb.blocktype= 2
|
|
98
|
+ group by pb.mblockid
|
91
|
99
|
order by pb.blockorder
|
92
|
100
|
</select>
|
93
|
101
|
<!--阅卷进度-按题块-查看详情-->
|
|
@@ -194,7 +202,7 @@
|
194
|
202
|
from ms_subject s inner join ms_exam e on s.examid = e.examid
|
195
|
203
|
inner join ms_paper_check pc on pc.msid = s.msid
|
196
|
204
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid
|
197
|
|
- inner join ms_paper_student_block psb on psb.mblockid = pc.mblockid and psb.mpid = pc.mpid
|
|
205
|
+ inner join ms_paper_student_block psb on psb.mblockid = pc.mblockid and psb.mpid = pc.mpid and psb.checked!=0
|
198
|
206
|
where e.schoolid=#{param.schoolid} and s.checkstate=1 and e.deleted=1 and pc.dispenseway=2 and pc.correcttype=3
|
199
|
207
|
group by s.msid
|
200
|
208
|
<if test="param.checktype==0">having 100>checkrate</if>
|
|
@@ -208,7 +216,7 @@
|
208
|
216
|
from ms_subject s inner join ms_exam e on s.examid = e.examid
|
209
|
217
|
inner join ms_paper_check pc on pc.msid = s.msid
|
210
|
218
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid
|
211
|
|
- inner join ms_paper_student_question psb on psb.mptqid = pc.mblockid and psb.mpid = pc.mpid
|
|
219
|
+ inner join ms_paper_student_question psb on psb.mptqid = pc.mblockid and psb.mpid = pc.mpid and psb.checked!=0
|
212
|
220
|
where e.schoolid=#{param.schoolid} and s.checkstate=1 and e.deleted=1 and pc.dispenseway=2 and pc.correcttype=2
|
213
|
221
|
group by s.msid
|
214
|
222
|
<if test="param.checktype==0">having 100>checkrate</if>
|
|
@@ -223,7 +231,7 @@
|
223
|
231
|
inner join ms_paper_check pc on pc.msid = s.msid
|
224
|
232
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid=pc.mpid
|
225
|
233
|
inner join ms_class_student cs on cs.examid = e.examid and cs.subjectid = s.subjectid and cs.classid = pct.mblockid
|
226
|
|
- inner join ms_paper_student_question psb on psb.studentid = cs.studentid and psb.mpid = pc.mpid
|
|
234
|
+ inner join ms_paper_student_question psb on psb.studentid = cs.studentid and psb.mpid = pc.mpid and psb.checked!=0
|
227
|
235
|
where e.schoolid=#{param.schoolid} and s.checkstate=1 and e.deleted=1 and pc.dispenseway=2 and pc.correcttype=1
|
228
|
236
|
group by s.msid
|
229
|
237
|
<if test="param.checktype==0">having 100>checkrate</if>
|
|
@@ -252,7 +260,7 @@
|
252
|
260
|
,count(distinct if(psb.firstcime is null,psb.mpsbid,null))+count(distinct if(pc.checktype=2 and psb.secondctime is null,psb.mpsbid,null)) as totalUncheckedNum
|
253
|
261
|
,count(distinct if((psb.firstcime is not null and psb.firstcid=#{param.handleid}) or (psb.secondctime is not null and psb.secondcid=#{param.handleid}),psb.mpsbid,null)) as myCheckedNum
|
254
|
262
|
,count(distinct if(((psb.firstcime is null and psb.firstcid=#{param.handleid})
|
255
|
|
- or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked!=2
|
|
263
|
+ or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked in(1,2)
|
256
|
264
|
,psb.mpsbid,null)) as myUncheckedNum
|
257
|
265
|
from ms_paper_check pc left join ms_paper_student_block psb on psb.mblockid = pc.mblockid and psb.mpid = pc.mpid
|
258
|
266
|
and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or pc.dispenseway=2)
|
|
@@ -266,11 +274,11 @@
|
266
|
274
|
select pb.qorder,pb.qn
|
267
|
275
|
,pc.mblockid,pc.checktype,pc.dispenseway,pc.numtype
|
268
|
276
|
,count(distinct psb.mpsqid)*pc.checktype as totalNum
|
269
|
|
- ,count(distinct if(psb.firstcime is not null,psb.mpsqid,null))+count(distinct if(psb.secondctime is not null,psb.mpsqid,null)) as totalCheckedNum
|
|
277
|
+ ,count(distinct if(psb.firstcime>0,psb.mpsqid,null))+count(distinct if(psb.secondctime>0,psb.mpsqid,null)) as totalCheckedNum
|
270
|
278
|
,count(distinct if(psb.firstcime is null,psb.mpsqid,null))+count(distinct if(pc.checktype=2 and psb.secondctime is null,psb.mpsqid,null)) as totalUncheckedNum
|
271
|
|
- ,count(distinct if((psb.firstcime is not null and psb.firstcid=#{param.handleid}) or (psb.secondctime is not null and psb.secondcid=#{param.handleid}),psb.mpsqid,null)) as myCheckedNum
|
|
279
|
+ ,count(distinct if((psb.firstcime>0 and psb.firstcid=#{param.handleid}) or (psb.secondctime>0 and psb.secondcid=#{param.handleid}),psb.mpsqid,null)) as myCheckedNum
|
272
|
280
|
,count(distinct if(((psb.firstcime is null and psb.firstcid=#{param.handleid})
|
273
|
|
- or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked!=2
|
|
281
|
+ or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked in(1,2)
|
274
|
282
|
,psb.mpsqid,null)) as myUncheckedNum
|
275
|
283
|
from ms_paper_check pc left join ms_paper_student_question psb on psb.mptqid = pc.mblockid and psb.mpid = pc.mpid
|
276
|
284
|
and (psb.firstcid = #{param.handleid} or psb.secondcid = #{param.handleid} or pc.dispenseway=2) and psb.answered=1
|
|
@@ -288,7 +296,7 @@
|
288
|
296
|
,count(distinct if(psb.firstcime is null,psb.mpsqid,null))+count(distinct if(pc.checktype=2 and psb.secondctime is null,psb.mpsqid,null)) as totalUncheckedNum
|
289
|
297
|
,count(distinct if((psb.firstcime is not null and psb.firstcid=#{param.handleid}) or (psb.secondctime is not null and psb.secondcid=#{param.handleid}),psb.mpsqid,null)) as myCheckedNum
|
290
|
298
|
,count(distinct if(((psb.firstcime is null and psb.firstcid=#{param.handleid})
|
291
|
|
- or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked!=2
|
|
299
|
+ or (psb.secondctime is null and psb.secondcid=#{param.handleid}) or pc.dispenseway=2) and psb.checked in(1,2)
|
292
|
300
|
,psb.mpsqid,null)) as myUncheckedNum
|
293
|
301
|
from ms_paper_check pc inner join ms_class c on pc.mblockid = c.classid
|
294
|
302
|
inner join ms_class_student cs on c.examid=cs.examid and c.subjectid=cs.subjectid and pc.mblockid=cs.classid
|
|
@@ -354,7 +362,7 @@
|
354
|
362
|
,pc.checkstate,pc.correcttype,pc.mpid
|
355
|
363
|
from ms_paper_check pc inner join ms_paper_student_block psb on psb.mblockid = pc.mblockid and psb.mpid = pc.mpid
|
356
|
364
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid = pc.mpid and pct.teacherid = #{param.handleid}
|
357
|
|
- where pc.checkstate=1 and psb.checked!=2 and pc.mpid=#{param.mpid}
|
|
365
|
+ where pc.checkstate=1 and psb.checked in(1,2) and pc.mpid=#{param.mpid}
|
358
|
366
|
group by pc.mblockid
|
359
|
367
|
order by pc.mpcid
|
360
|
368
|
</select>
|
|
@@ -376,13 +384,15 @@
|
376
|
384
|
,psb.firstccore,psb.secondcscore,psb.firstccores,psb.secondcscores
|
377
|
385
|
from ms_paper_student_block psb
|
378
|
386
|
where psb.mpid=#{param.mpid} and psb.mblockid = #{param.mblockid}
|
379
|
|
- and (psb.checked=1 or (psb.checked=2 and (psb.firstcid=#{param.teacherid}
|
|
387
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=#{param.teacherid} and psb.firstcime is null)
|
380
|
388
|
<if test="param.checktype==2">
|
381
|
|
- or psb.secondcid=#{param.teacherid}
|
|
389
|
+ or (psb.secondcid=#{param.teacherid} and psb.secondctime is null)
|
|
390
|
+ or (psb.firstcid!=#{param.teacherid} and psb.secondcid is null)
|
|
391
|
+ or (psb.secondcid!=#{param.teacherid} and psb.firstcid is null)
|
382
|
392
|
</if>
|
383
|
393
|
)))
|
384
|
394
|
and psb.hasproblem=0
|
385
|
|
- order by field(psb.checked,1,0,2)
|
|
395
|
+ order by field(psb.checked,2,1,3)
|
386
|
396
|
limit 1
|
387
|
397
|
</if>
|
388
|
398
|
</select>
|
|
@@ -394,13 +404,14 @@
|
394
|
404
|
<result property="mblockid" column="mblockid"/>
|
395
|
405
|
<result property="mpid" column="mpid"/>
|
396
|
406
|
<result property="checktype" column="checktype"/>
|
|
407
|
+ <result property="checkstate" column="checkstate"/>
|
397
|
408
|
<result property="totalNum" column="totalNum"/>
|
398
|
409
|
<result property="checkedNum" column="checkedNum"/>
|
399
|
410
|
<result property="uncheckedNum" column="uncheckedNum"/>
|
400
|
411
|
<collection property="teachers" select="listCheckTeacher" column="mblockid"/>
|
401
|
412
|
</resultMap>
|
402
|
413
|
<select id="listByQuestion" resultMap="questionResultMap">
|
403
|
|
- select q.qorder,q.qn,q.qscore,q.mptqid as mblockid,q.mpid,pc.checktype
|
|
414
|
+ select q.qorder,q.qn,q.qscore,q.mptqid as mblockid,q.mpid,pc.checktype,pc.checkstate
|
404
|
415
|
,count(distinct psq.mpsqid) as totalNum
|
405
|
416
|
,count(if(psq.firstcime is not null or psq.secondctime is not null,psq.mpsqid,null)) as checkedNum
|
406
|
417
|
,count(if(psq.firstcime is null or (pc.checktype=2 and psq.secondctime is null),psq.mpsqid,null)) as uncheckedNum
|
|
@@ -445,13 +456,14 @@
|
445
|
456
|
<result property="mblockid" column="mblockid"/>
|
446
|
457
|
<result property="mpid" column="mpid"/>
|
447
|
458
|
<result property="checktype" column="checktype"/>
|
|
459
|
+ <result property="checkstate" column="checkstate"/>
|
448
|
460
|
<result property="totalNum" column="totalNum"/>
|
449
|
461
|
<result property="checkedNum" column="checkedNum"/>
|
450
|
462
|
<result property="uncheckedNum" column="uncheckedNum"/>
|
451
|
463
|
<collection property="teachers" select="listCheckTeacher" column="mblockid"/>
|
452
|
464
|
</resultMap>
|
453
|
465
|
<select id="listByClass" resultMap="classResultMap">
|
454
|
|
- select c.classname,c.classid as mblockid,pc.mpid,pc.checktype
|
|
466
|
+ select c.classname,c.classid as mblockid,pc.mpid,pc.checktype,pc.checkstate
|
455
|
467
|
,count(distinct psq.mpsqid) as totalNum
|
456
|
468
|
,count(if(psq.firstcime is not null or psq.secondctime is not null,psq.mpsqid,null)) as checkedNum
|
457
|
469
|
,count(if(psq.firstcime is null or (pc.checktype=2 and psq.secondctime is null),psq.mpsqid,null)) as uncheckedNum
|
|
@@ -481,7 +493,7 @@
|
481
|
493
|
,pc.checkstate,pc.correcttype,pc.mpid
|
482
|
494
|
from ms_paper_check pc inner join ms_paper_student_question psb on psb.mptqid = pc.mblockid and psb.mpid = pc.mpid
|
483
|
495
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid = pc.mpid and pct.teacherid = #{param.handleid}
|
484
|
|
- where pc.checkstate=1 and psb.checked!=2 and pc.mpid=#{param.mpid}
|
|
496
|
+ where pc.checkstate=1 and psb.checked in(1,2) and pc.mpid=#{param.mpid}
|
485
|
497
|
group by pc.mblockid
|
486
|
498
|
order by pc.mpcid
|
487
|
499
|
</select>
|
|
@@ -503,13 +515,15 @@
|
503
|
515
|
,psb.firstccore,psb.secondcscore
|
504
|
516
|
from ms_paper_student_question psb
|
505
|
517
|
where psb.mpid=#{param.mpid} and psb.mptqid = #{param.mblockid}
|
506
|
|
- and (psb.checked=1 or (psb.checked=2 and (psb.firstcid=#{param.teacherid}
|
|
518
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=#{param.teacherid} and psb.firstcime is null)
|
507
|
519
|
<if test="param.checktype==2">
|
508
|
|
- or psb.secondcid=#{param.teacherid}
|
|
520
|
+ or (psb.secondcid=#{param.teacherid} and psb.secondctime is null)
|
|
521
|
+ or (psb.firstcid!=#{param.teacherid} and psb.secondcid is null)
|
|
522
|
+ or (psb.secondcid!=#{param.teacherid} and psb.firstcid is null)
|
509
|
523
|
</if>
|
510
|
524
|
)))
|
511
|
525
|
and psb.hasproblem=0
|
512
|
|
- order by field(psb.checked,1,0,2)
|
|
526
|
+ order by field(psb.checked,2,1,3)
|
513
|
527
|
limit 1
|
514
|
528
|
</if>
|
515
|
529
|
</select>
|
|
@@ -519,7 +533,7 @@
|
519
|
533
|
,pc.checkstate,pc.correcttype,pc.mpid
|
520
|
534
|
from ms_paper_check pc inner join ms_paper_student_question psb on psb.mpid = pc.mpid
|
521
|
535
|
inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid = pc.mpid and pct.teacherid = #{param.handleid}
|
522
|
|
- where pc.checkstate=1 and psb.checked!=2 and pc.mpid=#{param.mpid}
|
|
536
|
+ where pc.checkstate=1 and psb.checked in(1,2) and pc.mpid=#{param.mpid}
|
523
|
537
|
group by pc.mblockid
|
524
|
538
|
order by pc.mpcid
|
525
|
539
|
</select>
|
|
@@ -541,13 +555,15 @@
|
541
|
555
|
,psb.firstccore,psb.secondcscore
|
542
|
556
|
from ms_paper_student_question psb inner join ms_class c on psb.mpid=c.mpid
|
543
|
557
|
where psb.mpid=#{param.mpid} and c.classid = #{param.mblockid}
|
544
|
|
- and (psb.checked=1 or (psb.checked=2 and (psb.firstcid=#{param.teacherid}
|
|
558
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=#{param.teacherid} and psb.firstcime is null)
|
545
|
559
|
<if test="param.checktype==2">
|
546
|
|
- or psb.secondcid=#{param.teacherid}
|
|
560
|
+ or (psb.secondcid=#{param.teacherid} and psb.secondctime is null)
|
|
561
|
+ or (psb.firstcid!=#{param.teacherid} and psb.secondcid is null)
|
|
562
|
+ or (psb.secondcid!=#{param.teacherid} and psb.firstcid is null)
|
547
|
563
|
</if>
|
548
|
564
|
)))
|
549
|
565
|
and psb.hasproblem=0
|
550
|
|
- order by field(psb.checked,1,0,2),psb.mptqid
|
|
566
|
+ order by field(psb.checked,2,1,3),psb.mptqid
|
551
|
567
|
limit 1
|
552
|
568
|
</if>
|
553
|
569
|
</select>
|
|
@@ -619,7 +635,7 @@
|
619
|
635
|
order by pctt.taskorder desc
|
620
|
636
|
</select>
|
621
|
637
|
<!--教师阅卷-历史详情-->
|
622
|
|
- <select id="detailCorrect" resultType="java.util.Map">
|
|
638
|
+ <select id="detailHistory" resultType="java.util.Map">
|
623
|
639
|
select psq.stuanswer,pctt.checkscore,pctt.hasproblem,pctt.problemtype,pctt.problemcomm
|
624
|
640
|
,pctt.mpid,pctt.mblockid,pctt.mpsbid,pctt.mptqid,pctt.taskorder
|
625
|
641
|
from ms_paper_check_teacher_task pctt
|
|
@@ -629,6 +645,7 @@
|
629
|
645
|
<if test="param.correcttype!=3">
|
630
|
646
|
inner join ms_paper_student_question psq on pctt.mpsbid=psq.mpsqid
|
631
|
647
|
</if>
|
|
648
|
+ where pctt.mpcttid=#{param.mpcttid}
|
632
|
649
|
</select>
|
633
|
650
|
<!--教师阅卷-平均分-->
|
634
|
651
|
<select id="avgScore" resultType="java.util.Map">
|
|
@@ -643,27 +660,35 @@
|
643
|
660
|
</select>
|
644
|
661
|
<!--教师阅卷-待批阅数量-->
|
645
|
662
|
<select id="getPendingCorrectNum" resultType="java.lang.Integer">
|
646
|
|
- select count(if(pc.correcttype=3,if(pc.dispenseway=2
|
647
|
|
- ,(select psb.mpsbid from ms_paper_student_block psb
|
648
|
|
- where psb.mpid=pct.mpid and psb.mblockid=pct.mblockid and psb.checked!=2 and psb.hasproblem=0 and psb.firstcid!=pct.teacherid and psb.secondcid!=pct.teacherid)
|
649
|
|
- ,(select pctt.mpcttid from ms_paper_check_teacher_task pctt where pctt.mpid = pc.mpid and pctt.teacherid = #{param.handleid} and pctt.checkstate!=3)
|
|
663
|
+ select sum(a.num) from(select if(pc.correcttype=3,if(pc.dispenseway=2
|
|
664
|
+ ,(select count(psb.mpsbid) from ms_paper_student_block psb
|
|
665
|
+ where psb.mpid=pct.mpid and psb.mblockid=pct.mblockid and psb.hasproblem=0
|
|
666
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=pct.teacherid and psb.firstcime is null)
|
|
667
|
+ or (psb.secondcid=pct.teacherid and psb.secondctime is null)))))
|
|
668
|
+ ,(select count(pctt.mpcttid) from ms_paper_check_teacher_task pctt where pctt.mpid = pc.mpid and pctt.teacherid = #{param.handleid} and pctt.checkstate!=3)
|
650
|
669
|
),if(pc.dispenseway=2
|
651
|
|
- ,(select psb.mpsqid from ms_paper_student_question psb
|
652
|
|
- where psb.mpid=pct.mpid and psb.mblockid=pct.mblockid and psb.checked!=2 and psb.hasproblem=0 and psb.firstcid!=pct.teacherid and psb.secondcid!=pct.teacherid)
|
653
|
|
- ,(select pctt.mpcttid from ms_paper_check_teacher_task pctt where pctt.mpid = pc.mpid and pctt.teacherid = #{param.handleid} and pctt.checkstate!=3)
|
654
|
|
- ))) as num
|
|
670
|
+ ,if(pc.correcttype=2,(select count(psb.mpsqid) from ms_paper_student_question psb
|
|
671
|
+ where psb.mpid=pct.mpid and psb.mptqid=pct.mblockid and psb.hasproblem=0
|
|
672
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=pct.teacherid and psb.firstcime is null)
|
|
673
|
+ or (psb.secondcid=pct.teacherid and psb.secondctime is null)))))
|
|
674
|
+ ,(select count(psb.mpsqid) from ms_paper_student_question psb
|
|
675
|
+ inner join ms_class c on c.examid=psb.examid and c.subjectid=psb.subjectid and c.classid=pct.mblockid
|
|
676
|
+ inner join ms_class_student cs on c.examid=cs.examid and c.subjectid=cs.subjectid and pc.mblockid=cs.classid
|
|
677
|
+ where psb.mpid=pct.mpid and psb.mptqid=pct.mblockid and psb.hasproblem=0 and psb.studentid=cs.studentid
|
|
678
|
+ and (psb.checked=1 or (psb.checked=2 and ((psb.firstcid=pct.teacherid and psb.firstcime is null)
|
|
679
|
+ or (psb.secondcid=pct.teacherid and psb.secondctime is null))))))
|
|
680
|
+ ,(select count(pctt.mpcttid) from ms_paper_check_teacher_task pctt where pctt.mpid = pc.mpid and pctt.teacherid = #{param.handleid} and pctt.checkstate!=3)
|
|
681
|
+ )) as num
|
655
|
682
|
from ms_paper_check pc inner join ms_paper_check_teacher pct on pc.mblockid = pct.mblockid and pct.mpid = pc.mpid
|
656
|
|
- where pc.checkstate=1 and pct.teacherid = #{param.handleid}
|
|
683
|
+ where pc.checkstate=1 and pct.teacherid = #{param.handleid}) as a
|
657
|
684
|
</select>
|
658
|
685
|
<!--教师阅卷-待仲裁数量-->
|
659
|
686
|
<select id="getPendingArbitrateNum" resultType="java.lang.Integer">
|
660
|
|
- select count(case when pc.correcttype=3 then(select psb.mpsbid from ms_paper_student_block psb
|
|
687
|
+ select sum(a.num) from(select if(pc.correcttype=3,(select count(psb.mpsbid) from ms_paper_student_block psb
|
661
|
688
|
where psb.mpid=pc.mpid and psb.mblockid=pc.mblockid and psb.arbitratestate=1)
|
662
|
|
- when pc.correcttype=2 then (select psb.mpsqid from ms_paper_student_question psb
|
663
|
|
- where psb.mpid=pc.mpid and psb.mptqid=pc.mblockid and psb.arbitratestate=1)
|
664
|
|
- else (select psb.mpsqid from ms_paper_student_question psb inner join ms_class_student c on psb.examid=c.examid and psb.subjectid=c.subjectid and psb.studentid=c.studentid
|
665
|
|
- where psb.mpid=pc.mpid and c.classid=pc.mblockid and psb.arbitratestate=1) end) as num
|
|
689
|
+ ,(select count(psb.mpsqid) from ms_paper_student_question psb
|
|
690
|
+ where psb.mpid=pc.mpid and psb.mptqid=pc.mblockid and psb.arbitratestate=1)) as num
|
666
|
691
|
from ms_paper_check pc
|
667
|
|
- where pc.checkstate=1 and pc.arbitrateid = #{param.handleid}
|
|
692
|
+ where pc.checkstate=1 and pc.arbitrateid = #{param.handleid}) as a
|
668
|
693
|
</select>
|
669
|
694
|
</mapper>
|