wangliang 4 years ago
parent
commit
d88a0d72f6

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -65,6 +65,17 @@ public class TEExamQueryDto implements Serializable {
     @ApiModelProperty(name = "考场名称")
     @ApiModelProperty(name = "考场名称")
     private String roomName;
     private String roomName;
 
 
+    @ApiModelProperty(name = "监考状态,NOT_START:未开始,START:监考中,FINISHED:已结束")
+    private String monitorStatus;
+
+    public String getMonitorStatus() {
+        return monitorStatus;
+    }
+
+    public void setMonitorStatus(String monitorStatus) {
+        this.monitorStatus = monitorStatus;
+    }
+
     public String getRoomCode() {
     public String getRoomCode() {
         return roomCode;
         return roomCode;
     }
     }

+ 10 - 4
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -43,9 +43,11 @@
         if(t.updateName is not null, t.updateName, t.createName) as updateName,
         if(t.updateName is not null, t.updateName, t.createName) as updateName,
         if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
         if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
         t.enableIpLimit,
         t.enableIpLimit,
-        t.monitorVideoSource,
-        group_concat(distinct tees.room_code) as roomCode,
+        t.monitorVideoSource
+        <if test="type != null and type != '' and type == 'monitor'">
+        ,group_concat(distinct tees.room_code) as roomCode,
         group_concat(distinct tees.room_name) as roomName
         group_concat(distinct tees.room_name) as roomName
+        </if>
         from
         from
         (select t.id,
         (select t.id,
         t.code,
         t.code,
@@ -59,6 +61,7 @@
         t.update_time as updateTime,
         t.update_time as updateTime,
         t.enable_ip_limit as enableIpLimit,
         t.enable_ip_limit as enableIpLimit,
         t.monitor_video_source as monitorVideoSource,
         t.monitor_video_source as monitorVideoSource,
+        t.monitor_status as monitorStatus,
         TRUNCATE(t.progress,2) as progress,
         TRUNCATE(t.progress,2) as progress,
         (
         (
         select
         select
@@ -111,7 +114,9 @@
                 and t.enable = #{enable}
                 and t.enable = #{enable}
             </if>
             </if>
         </where> ) t
         </where> ) t
-        left join t_e_exam_student tees on tees.exam_id = t.id
+        <if test="type != null and type != '' and type == 'monitor'">
+            left join t_e_exam_student tees on tees.exam_id = t.id
+        </if>
             group by t.id,
             group by t.id,
             t.code,
             t.code,
             t.name,
             t.name,
@@ -124,7 +129,8 @@
             t.updateName,
             t.updateName,
             t.updateTime,
             t.updateTime,
             t.enableIpLimit,
             t.enableIpLimit,
-            t.monitorVideoSource
+            t.monitorVideoSource,
+            t.monitorStatus
          order by t.createTime desc
          order by t.createTime desc
     </select>
     </select>