zouxuan 5 年之前
父節點
當前提交
7a9f174f1e

+ 11 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dto/ExamCertificationDto.java

@@ -46,6 +46,17 @@ public class ExamCertificationDto{
     @ApiModelProperty(value = "考试内容")
     private String songJson;
 
+    @ApiModelProperty(value = "呼叫时长")
+    private Integer callTime;
+
+    public Integer getCallTime() {
+        return callTime;
+    }
+
+    public void setCallTime(Integer callTime) {
+        this.callTime = callTime;
+    }
+
     public String getBaseExamName() {
         return baseExamName;
     }

+ 8 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamCertificationServiceImpl.java

@@ -5,6 +5,7 @@ import com.keao.edu.auth.api.client.SysUserFeignService;
 import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.dal.BaseDAO;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
+import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
 import com.keao.edu.user.api.entity.Student;
 import com.keao.edu.user.dao.*;
 import com.keao.edu.user.dto.BasicNeedCheckingDetailDto;
@@ -122,6 +123,13 @@ public class ExamCertificationServiceImpl extends BaseServiceImpl<Long, ExamCert
 		examCertificationDto.setCertificatePhoto(student.getCertificatePhoto());
 		StudentExamResult studentExamResult = studentExamResultDao.findByRegistrationId(examRegistrationId);
 		examCertificationDto.setConfirmStatus(studentExamResult.getConfirmStatus());
+		if(studentExamResult.getIsFinishedExam() == 1){
+			ExamRoomStudentRelation studentExamRoom = examRoomStudentRelationDao.getStudentExamRoom(examRegistrationId);
+			if(studentExamRoom.getCallTime() != null){
+				examCertificationDto.setCallTime(DateUtil.secondsBetween(studentExamRoom.getCallTime(),new Date()));
+				DateUtil.secondsBetween(studentExamRoom.getCallTime(),new Date());
+			}
+		}
 		return examCertificationDto;
 	}
 

+ 1 - 2
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomStudentRelationServiceImpl.java

@@ -61,8 +61,6 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 	@Autowired
 	private ExamRegistrationDao examRegistrationDao;
 	@Autowired
-	private ExamTeacherSalaryService examTeacherSalaryService;
-	@Autowired
 	private ImFeignService imFeignService;
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
@@ -705,6 +703,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 		ExamRoomStudentRelation examRoomStudentRelation = examRoomStudentRelationDao.get(nextExamRoomStudentRelationId);
 		//开启学员房间入口
 		examRoomStudentRelation.setClassroomSwitch(1);
+		examRoomStudentRelation.setCallTime(new Date());
 		examRoomStudentRelationDao.update(examRoomStudentRelation);
 		HashMap<Integer, String> map = new HashMap<>(1);
 		map.put(examRoomStudentRelation.getStudentId(),examRoomStudentRelation.getStudentId().toString());

+ 4 - 0
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRoomStudentRelationMapper.xml

@@ -16,6 +16,7 @@
 		<result column="sign_in_time_" property="signInTime" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
+		<result column="call_time_" property="callTime" />
 		<result column="tenant_id_" property="tenantId" />
 	</resultMap>
 
@@ -78,6 +79,9 @@
 			<if test="studentId != null">
 				student_id_ = #{studentId},
 			</if>
+			<if test="callTime != null">
+				call_time_ = #{callTime},
+			</if>
 				update_time_ = NOW()
 		</set> WHERE id_ = #{id}
 	</update>

+ 11 - 0
edu-user/edu-user-client-api/src/main/java/com/keao/edu/user/api/entity/ExamRoomStudentRelation.java

@@ -31,11 +31,22 @@ public class ExamRoomStudentRelation extends  ExamRoom{
 
 	private java.util.Date updateTime;
 
+	@ApiModelProperty(value = "呼叫时间")
+	private java.util.Date callTime;
+
 	private String tenantId;
 
 	@ApiModelProperty(value = "房间是否开启")
 	private Integer classroomSwitch;
 
+	public Date getCallTime() {
+		return callTime;
+	}
+
+	public void setCallTime(Date callTime) {
+		this.callTime = callTime;
+	}
+
 	public Date getSignInTime() {
 		return signInTime;
 	}