| | |
| | | FROM t_exam_paper e |
| | | LEFT JOIN t_exam_paper_department s on s.exam_paper_id = e.id |
| | | <where> |
| | | and e.deleted=0 and s.deleted = 0 |
| | | and e.deleted=0 |
| | | and e.task_exam_id is null |
| | | and s.department_id = |
| | | #{level} |
| | | and e.paper_type=#{paperType} |
| | | </where> |
| | | group by e.id |
| | |
| | | </if> |
| | | <if test="examPaperType == 3 "> |
| | | </if> |
| | | <foreach item="examPaperType" collection="examPaperType"> |
| | | <if test="examPaperType == 4 "> |
| | | and #{dateTime} between e.limit_start_time and e.limit_end_time |
| | | </if> |
| | | </foreach> |
| | | <if test="examPaperType == 4 "> |
| | | and #{dateTime} between e.limit_start_time and e.limit_end_time |
| | | </if> |
| | |
| | | SELECT e.id,e.name,e.limit_start_time,e.limit_end_time |
| | | FROM t_exam_paper e |
| | | LEFT JOIN t_exam_paper_user u on u.exam_paper_id = e.id |
| | | where |
| | | <where> |
| | | e.deleted=0 and u.deleted = 0 and e.type = 0 |
| | | and u.user_id = #{userId} ORDER BY e.id desc ) t |
| | | and u.user_id = #{userId} |
| | | and e.paper_type in |
| | | <foreach item="examPaperType" collection="examPaperType" open="(" separator="," |
| | | close=")"> |
| | | #{examPaperType} |
| | | </foreach> |
| | | <foreach item="examPaperType" collection="examPaperType"> |
| | | <if test="examPaperType == 4 "> |
| | | and #{dateTime} between e.limit_start_time and e.limit_end_time |
| | | </if> |
| | | </foreach> |
| | | </where> |
| | | ORDER BY e.id desc ) t |
| | | </select> |
| | | |
| | | |