Browse Source

单科设置信息

ywx
雍文秀 1 month ago
parent
commit
075309091f

+ 18
- 0
smarking/src/main/java/com/xhkjedu/smarking/controller/exam/MsSubjectController.java View File

@@ -202,4 +202,22 @@ public class MsSubjectController {
202 202
         });
203 203
         return new ResultVo(0, "获取成功", msSubjectService.listForSel(examid, handleid));
204 204
     }
205
+
206
+    /**
207
+     * @Description 单科设置信息
208
+     * @Date 2024/12/3 17:56
209
+     * @Author YWX
210
+     * @Param [msSubject]
211
+     * @Return com.xhkjedu.vo.ResultVo
212
+     **/
213
+    @PostMapping("/get_set")
214
+    public ResultVo getSet(@RequestBody MsSubject msSubject) {
215
+        Integer examid = msSubject.getExamid();
216
+        String subjectid = msSubject.getSubjectid();
217
+        N_Utils.validation(new Object[]{
218
+                examid, "考试id", 1
219
+                , subjectid, "科目id", 2
220
+        });
221
+        return new ResultVo(0, "获取成功", msSubjectService.getSet(examid, subjectid));
222
+    }
205 223
 }

+ 3
- 0
smarking/src/main/java/com/xhkjedu/smarking/mapper/exam/MsSubjectMapper.java View File

@@ -68,4 +68,7 @@ public interface MsSubjectMapper extends TkMapper<MsSubject> {
68 68
 
69 69
     //修改试卷结构后更改后续操作状态
70 70
     int updatePaperFollowup(@Param("mpid")Integer mpid);
71
+
72
+    //单科设置信息
73
+    Map getSet(@Param("examid") Integer examid,@Param("subjectid") String subjectid);
71 74
 }

+ 11
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/exam/MsSubjectService.java View File

@@ -129,4 +129,15 @@ public class MsSubjectService {
129 129
             return new ArrayList<>();
130 130
         }
131 131
     }
132
+
133
+    /**
134
+     * @Description 单科设置信息
135
+     * @Date 2024/12/3 17:56
136
+     * @Author YWX
137
+     * @Param [examid, subjectid]
138
+     * @Return java.util.Map
139
+     **/
140
+    public Map getSet(Integer examid, String subjectid) {
141
+        return msSubjectMapper.getSet(examid, subjectid);
142
+    }
132 143
 }

+ 18
- 0
smarking/src/main/resources/mapper/exam/MsSubjectMapper.xml View File

@@ -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

Loading…
Cancel
Save