|
@@ -131,6 +131,24 @@
|
131
|
131
|
from ms_subject s left join t_user u on s.teacherid=u.userid
|
132
|
132
|
where examid=#{examid}
|
133
|
133
|
</select>
|
|
134
|
+ <!--单科设置信息-->
|
|
135
|
+ <select id="getSet" resultType="java.util.Map">
|
|
136
|
+ select s.msid,s.subjectid,s.subjectname,s.sdate,s.begintime,s.endtime,s.pstate,s.checkset,s.checkstate,s.invigilatestate
|
|
137
|
+ ,count(distinct if(ps.batchid is not null,ps.mpsid,null)) as scannum
|
|
138
|
+ ,count(distinct pb.mblockid) as blocknum
|
|
139
|
+ ,count(distinct if(tb.localcoor is null or tb.localcoor='',tb.mblockid,null)) as wkxnum
|
|
140
|
+ ,count(distinct if(pc.dispenseway!=0,pc.mblockid,null)) as ysznum
|
|
141
|
+ ,count(distinct if(pb.blocktype=2,pb.mblockid,null))-count(distinct if(pc.dispenseway!=0,pc.mblockid,null)) as wsznum
|
|
142
|
+ ,count(distinct if(psb.arbitratestate in(1,2),psb.mpsbid,null)) as arbitratenum
|
|
143
|
+ ,count(distinct if(psb.hasproblem in(1,2),psb.mpsbid,null)) as problemnum
|
|
144
|
+ from ms_subject s left join ms_paper_student ps on s.msid = ps.msid
|
|
145
|
+ left join ms_paper_block pb on pb.mpid = ps.mpid
|
|
146
|
+ left join ms_template t on t.mpid=ps.mpid
|
|
147
|
+ left join ms_template_block tb on tb.mtid=t.mtid
|
|
148
|
+ left join ms_paper_check pc on pc.mpid=ps.mpid
|
|
149
|
+ left join ms_paper_student_block psb on psb.mpsid=ps.mpsid and psb.mblockid=pb.mblockid
|
|
150
|
+ where s.examid=#{examid} and s.subjectid=#{subjectid}
|
|
151
|
+ </select>
|
134
|
152
|
<!--定时任务-科目结束考试-->
|
135
|
153
|
<update id="updateEndSubject">
|
136
|
154
|
update ms_subject ms
|