wangliang 4 年之前
父节点
当前提交
9e6b43fbcf

+ 12 - 8
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateWarnInfoController.java

@@ -13,8 +13,6 @@ import com.qmth.themis.business.dto.response.TIeWarningNotifyDto;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.entity.TIeInvigilateWarnInfo;
 import com.qmth.themis.business.enums.RoleEnum;
-import com.qmth.themis.business.service.TBExamInvigilateUserService;
-import com.qmth.themis.business.service.TEExamStudentService;
 import com.qmth.themis.business.service.TIeInvigilateWarnInfoService;
 import com.qmth.themis.business.service.TOeExamRecordService;
 import com.qmth.themis.business.util.RedisUtil;
@@ -28,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
@@ -114,20 +113,25 @@ public class TIeInvigilateWarnInfoController {
         return ResultUtil.ok(tIeInvigilateWarnInfoService.warningMessage(examId, userId, tbUser.getOrgId()));
     }
 
-    @ApiOperation(value = "预警修改阅状态接口")
+    @ApiOperation(value = "预警修改阅状态接口")
     @RequestMapping(value = "/save/status", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     @Transactional
     public Result saveWarnStatus(@ApiJsonObject(name = "saveWarnStatus", value = {
-            @ApiJsonProperty(key = "warningId", type = "long", example = "1", description = "预警id", required = true)
+            @ApiJsonProperty(key = "warningId", type = "long", example = "1", description = "预警id", required = true),
+            @ApiJsonProperty(key = "approveStatus", type = "long", example = "1", description = "审阅状态,0:未阅,1:已阅", required = true)
     }) @ApiParam(value = "监考员信息", required = true) @RequestBody Map<String, Object> mapParameter) {
-        if (Objects.isNull(mapParameter.get("warningId")) || Objects.equals(mapParameter.get("warningId"), "")) {
+        if (Objects.isNull(mapParameter.get("warningIds")) || Objects.equals(mapParameter.get("warningIds"), "")) {
             throw new BusinessException("预警id不能为空");
         }
-        Long warningId = Long.parseLong(String.valueOf(mapParameter.get("warningId")));
+        List<Long> warningIds = (List<Long>) mapParameter.get("warningIds");
+        if (Objects.isNull(mapParameter.get("approveStatus")) || Objects.equals(mapParameter.get("approveStatus"), "")) {
+            throw new BusinessException("审阅状态不能为空");
+        }
+        Integer approveStatus = Integer.parseInt(String.valueOf(mapParameter.get("approveStatus")));
         UpdateWrapper<TIeInvigilateWarnInfo> tIeInvigilateWarnInfoUpdateWrapper = new UpdateWrapper<>();
-        tIeInvigilateWarnInfoUpdateWrapper.lambda().set(TIeInvigilateWarnInfo::getApproveStatus, 1)
-                .eq(TIeInvigilateWarnInfo::getId, warningId);
+        tIeInvigilateWarnInfoUpdateWrapper.lambda().set(TIeInvigilateWarnInfo::getApproveStatus, approveStatus)
+                .in(TIeInvigilateWarnInfo::getId, warningIds);
         tIeInvigilateWarnInfoService.update(tIeInvigilateWarnInfoUpdateWrapper);
         return ResultUtil.ok(Collections.singletonMap("success", true));
     }

+ 22 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListHistoryBean.java

@@ -72,6 +72,28 @@ public class InvigilateListHistoryBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Date updateTime;
 
+    @ApiModelProperty(name = "科目代码")
+    private String courseCode;
+
+    @ApiModelProperty(name = "联系电话")
+    private String mobileNumber;
+
+    public String getMobileNumber() {
+        return mobileNumber;
+    }
+
+    public void setMobileNumber(String mobileNumber) {
+        this.mobileNumber = mobileNumber;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
     public String getExamName() {
         return examName;
     }

+ 33 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListVideoBean.java

@@ -67,6 +67,39 @@ public class InvigilateListVideoBean implements Serializable {
     @ApiModelProperty(name = "更新时间")
     private Date updateTime;
 
+    @ApiModelProperty(name = "答题进度")
+    private Double progress;
+
+    @ApiModelProperty(name = "剩余时间")
+    private String remainTime;
+
+    @ApiModelProperty(name = "新增预警")
+    private Integer warningNew;
+
+    public Integer getWarningNew() {
+        return warningNew;
+    }
+
+    public void setWarningNew(Integer warningNew) {
+        this.warningNew = warningNew;
+    }
+
+    public String getRemainTime() {
+        return remainTime;
+    }
+
+    public void setRemainTime(String remainTime) {
+        this.remainTime = remainTime;
+    }
+
+    public Double getProgress() {
+        return progress;
+    }
+
+    public void setProgress(Double progress) {
+        this.progress = progress;
+    }
+
     public String getExamName() {
         return examName;
     }

+ 11 - 0
themis-business/src/main/java/com/qmth/themis/business/bean/backend/InvigilateListWarningBean.java

@@ -17,6 +17,9 @@ import java.util.Date;
 @ApiModel("预警提醒返回对象")
 public class InvigilateListWarningBean implements Serializable {
 
+    @ApiModelProperty(name = "预警id")
+    private Long warningId;
+
     @ApiModelProperty(name = "考试id")
     private Long examId;
 
@@ -77,6 +80,14 @@ public class InvigilateListWarningBean implements Serializable {
     @ApiModelProperty(value = "审阅状态,0:未阅,1:已阅")
     private Integer approveStatus;
 
+    public Long getWarningId() {
+        return warningId;
+    }
+
+    public void setWarningId(Long warningId) {
+        this.warningId = warningId;
+    }
+
     public String getRoomName() {
         return roomName;
     }

+ 2 - 1
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -13,7 +13,8 @@
             teer.exam_student_id as examStudentId,
             teer.exam_record_id as examRecordId,
             tees.course_code as courseCode,
-            tees.course_name as courseName
+            tees.course_name as courseName,
+            teer.exam_id as examId
         from
             t_e_exam_reexam teer
             left join t_e_exam_student tees on

+ 14 - 16
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -172,12 +172,8 @@
 	<select id="invigilatePageList"
 		resultType="com.qmth.themis.business.bean.backend.InvigilateListBean">
 		<include refid="invigilatePageHead" />
-		,(select count(1) from t_ie_invigilate_warn_info tiiwi where
-		tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as
-		warningNew
-		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds)
-		second), interval teea.max_duration_seconds / 60 - t.duration_seconds
-		minute),'%H:%i:%s') as remainTime
+		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
+		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
 		<include refid="invigilatePageMiddle" />
 		<include refid="invigilatePageFoot" />
 		<if test="paperDownload != null and paperDownload != ''">
@@ -190,6 +186,8 @@
 		resultType="com.qmth.themis.business.bean.backend.InvigilateListVideoBean">
 		<include refid="invigilatePageHead" />
 		,t.monitor_live_url as monitorLiveUrl
+		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
+		,date_format(date_sub(date_add(teea.start_time, interval IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) second), interval teea.max_duration_seconds / 60 - t.duration_seconds minute),'%H:%i:%s') as remainTime
 		<include refid="invigilatePageMiddle" />
 		<include refid="invigilatePageFoot" />
 		<if test="paperDownload != null and paperDownload != ''">
@@ -200,12 +198,9 @@
 
 	<select id="invigilatePagePatrolList"
 		resultType="com.qmth.themis.business.bean.backend.InvigilateListPatrolBean">
-		select * from(
-		<include refid="invigilatePageHead" />
-		,(select count(1) from t_ie_invigilate_exception_info tiiei where
-		tiiei.exam_record_id = t.id) as exceptionCount
-		,(select count(1) from t_ie_invigilate_warn_info tiiwi where
-		tiiwi.exam_record_id = t.id and tiiwi.`type` =
+		select * from(<include refid="invigilatePageHead" />
+		,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = t.id) as exceptionCount
+		,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.`type` =
 		'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
 		<include refid="invigilatePageMiddle" />
 		<include refid="invigilatePageFoot" />
@@ -232,6 +227,7 @@
 	<select id="invigilatePageWarningList"
 		resultType="com.qmth.themis.business.bean.backend.InvigilateListWarningBean">
 		select * from(select
+		tiiwi.id as warningId,
 		tee.id as examId,
 		tee.name as examName,
 		teea.id as examActivityId,
@@ -380,13 +376,13 @@
 		order by tees.room_code
 	</select>
 
-	<select id="invigilatePageListHistory"
-		resultType="com.qmth.themis.business.bean.backend.InvigilateListHistoryBean">
+	<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.backend.InvigilateListHistoryBean">
 		<include refid="invigilatePageHead" />
+		,tes.mobile_number as mobileNumber
 		<include refid="invigilatePageMiddle" />
+		left join t_e_student tes on s.student_id = tes.id
 		<include refid="invigilatePageFoot" />
-		<if
-			test="breachStatus != null and breachStatus != '' or breachStatus == 0">
+		<if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
 			and t.breach_status = #{breachStatus}
 		</if>
 		<if test="finishType != null and finishType != ''">
@@ -415,6 +411,7 @@
 		</if>
 		group by f.exam_activity_id
 	</select>
+
 	<select id="getDoneCountByDay" resultType="java.util.Map">
 		select DATE_FORMAT(f.first_prepare_time, '%Y-%m-%d') AS day,
 		count(DISTINCT(f.exam_student_id)) count from t_oe_exam_record f
@@ -437,6 +434,7 @@
 		select count(1) from t_oe_exam_record f
 		where f.exam_id = #{examId}
 	</select>
+
 	<select id="getListByExamIdAndStartId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
 		select f.* from t_oe_exam_record f
 		where f.exam_id = #{examId} and f.id>#{startId}