|
@@ -0,0 +1,40 @@
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
+<mapper namespace="com.qmth.exam.reserve.dao.StudentApplyDao">
|
|
|
|
+ <select id="page"
|
|
|
|
+ resultType="com.qmth.exam.reserve.bean.stdapply.StdApplyVO">
|
|
|
|
+ select a.id,s.name,s.identity_number
|
|
|
|
+ identityNumber,s.student_code
|
|
|
|
+ studentCode,o.name teachingName,es.name
|
|
|
|
+ agentName, p.start_time
|
|
|
|
+ startTime,p.end_time endTime,
|
|
|
|
+ r.name roomName, a.cancel,a.update_time
|
|
|
|
+ updateTime,u.name userName
|
|
|
|
+ from t_student s,t_category o,t_student_apply a
|
|
|
|
+ left join t_exam_site es on
|
|
|
|
+ es.id=a.exam_site_id
|
|
|
|
+ left join t_time_period
|
|
|
|
+ p on p.id=a.time_period_id
|
|
|
|
+ left join t_exam_room r on
|
|
|
|
+ r.id=a.exam_room_id
|
|
|
|
+ left join t_user u on u.id=a.user_id
|
|
|
|
+ where
|
|
|
|
+ a.student_id=s.id and s.category_id=o.id
|
|
|
|
+ <if test="req.teachingId != null">
|
|
|
|
+ and s.category_id=#{req.teachingId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="req.agentId != null">
|
|
|
|
+ and a.exam_site_id=#{req.agentId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="req.name != null and req.name !=''">
|
|
|
|
+ and s.name like concat('%',#{req.name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="req.identityNumber != null and req.identityNumber !=''">
|
|
|
|
+ and s.identity_number=#{req.identityNumber}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="req.studentCode != null and req.studentCode !=''">
|
|
|
|
+ and s.student_code=#{req.studentCode}
|
|
|
|
+ </if>
|
|
|
|
+ order by a.id
|
|
|
|
+ </select>
|
|
|
|
+</mapper>
|