haogh 1 éve
szülő
commit
9ea2ca2aba

+ 3 - 0
src/main/java/com/qmth/exam/reserve/bean/stdapply/StudentApplyReq.java

@@ -32,4 +32,7 @@ public class StudentApplyReq extends PagerReq {
 
     @ApiModelProperty("结束日期")
     private Long endDate;
+
+    @ApiModelProperty("任务ID")
+    private Long taskId;
 }

+ 4 - 0
src/main/java/com/qmth/exam/reserve/service/impl/StudentApplyServiceImpl.java

@@ -116,6 +116,10 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
 
     @Override
     public PageResult<StudentApplyVO> page(StudentApplyReq req) {
+        if (req.getTaskId() == null) {
+            ApplyTaskEntity task = getApplyTask();
+            req.setTaskId(task.getId());
+        }
         IPage<StudentApplyVO> iPage = this.baseMapper
                 .page(new Page<StudentApplyVO>(req.getPageNumber(), req.getPageSize()), req);
         return PageUtil.of(iPage);

+ 4 - 2
src/main/resources/mapper/StudentApplyMapper.xml

@@ -8,8 +8,7 @@
         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
+        r.name roomName, a.cancel,a.update_time updateTime,u.name userName,a.seat_number seatNumber
         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
@@ -37,6 +36,9 @@
         <if test="req.endDate != null and req.endDate !=''">
             and p.start_time&lt;= #{req.endDate}
         </if>
+        <if test="req.taskId != null and req.taskId !=''">
+            and s.apply_task_id=#{req.taskId}
+        </if>
         order by a.id
     </select>