系统题目分数详情

beetlsql3-dev
Mlxa0324 2 years ago
parent 0acb53e8b7
commit df86f4250b

@ -442,7 +442,6 @@ CREATE TABLE `general_question_log` (
`question_analysis` varchar(1000) DEFAULT NULL COMMENT '解析',
`is_tuck` int(2) DEFAULT NULL COMMENT '是否收藏夹',
`is_error_favorite` int(2) DEFAULT NULL COMMENT '是否错题库',
`general_question_log_create_time` datetime COMMENT '创建时间',
`general_question_log_update_time` datetime COMMENT '修改时间',
`general_question_log_finish_time` int(10) default 1 COMMENT '总用时(分钟)',
`general_question_log_reply` varchar(300) default 1 COMMENT '评语',

@ -1,6 +1,7 @@
package com.ibeetl.jlw.dao;
import com.ibeetl.jlw.entity.GeneralQuestionLog;
import com.ibeetl.jlw.entity.GeneralQuestionLogScoreDetailsInfo;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLog;
import com.ibeetl.jlw.web.query.GeneralQuestionLogQuery;
import org.beetl.sql.core.engine.PageQuery;
@ -48,5 +49,11 @@ public interface GeneralQuestionLogDao extends BaseMapper<GeneralQuestionLog> {
PageQuery<TeacherOpenCourseQuestionLog> studentScoreList(PageQuery query);
/**
*
* @param query
* @return
*/
PageQuery<GeneralQuestionLogScoreDetailsInfo> getQuestionLogScoreDetailsInfo(PageQuery query);
}

@ -0,0 +1,64 @@
package com.ibeetl.jlw.entity;
import com.ibeetl.admin.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* ()
* @author lx
*/
@Data
@EqualsAndHashCode(callSuper=false)
public class GeneralQuestionLogScoreDetailsInfo extends BaseEntity {
/**
* ID
*/
private Long studentId ;
/**
*
*/
private String studentName ;
/**
*
*/
private String studentSn ;
/**
* ID
*/
private Long classId;
/**
*
*/
private Long className;
/**
*
*/
private Long questionCount;
/**
*
*/
private Long finishCount;
/**
*
*/
private Long successCount;
/**
*
*/
private Long errorCount;
/**
* 100
*/
private Float successRate;
/**
*
*/
private Float studentScore;
/**
*
*/
private Float finishProgress;
}

@ -723,5 +723,12 @@ public class GeneralQuestionLogService extends CoreBaseService<GeneralQuestionLo
updateBatchTemplate(logSet);
}
/**
*
* @param query
* @return
*/
public PageQuery<GeneralQuestionLogScoreDetailsInfo> getQuestionLogScoreDetailsInfo(PageQuery query) {
return generalQuestionLogDao.getQuestionLogScoreDetailsInfo(query);
}
}

@ -20,6 +20,7 @@ import com.ibeetl.jlw.entity.GeneralQuestionLog;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.service.GeneralQuestionLogService;
import com.ibeetl.jlw.web.query.GeneralQuestionLogQuery;
import com.ibeetl.jlw.web.query.GeneralQuestionLogScoreDetailsInfoQuery;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@ -226,16 +227,15 @@ public class GeneralQuestionLogController{
return JsonResult.success();
}
// /**
// * 查询分数详细信息
// * @param query 题目分数查询实体
// * @return
// */
// @PostMapping(API + "/scoreDetailInfo.do")
// public JsonResult scoreDetailInfo(GeneralQuestionLogScoreDetailsInfoQuery query) {
// generalQuestionLogService.getQuestionLogScoreDetailsInfo(query.getPageQuery());
// return JsonResult.success();
// }
/**
*
* @param query
* @return
*/
@PostMapping(API + "/scoreDetailInfo.do")
public JsonResult<PageQuery> scoreDetailInfo(@Validated GeneralQuestionLogScoreDetailsInfoQuery query) {
return JsonResult.success(generalQuestionLogService.getQuestionLogScoreDetailsInfo(query.getPageQuery()));
}
/**
*

@ -236,7 +236,7 @@ public class TeacherOpenCourseQuestionLogController {
* @return
*/
@PostMapping(API + "/scoreDetailInfo.do")
public JsonResult scoreDetailInfo(TeacherOpenCourseQuestionLogScoreDetailsInfoQuery query) {
public JsonResult scoreDetailInfo(@Validated TeacherOpenCourseQuestionLogScoreDetailsInfoQuery query) {
teacherOpenCourseQuestionLogService.getQuestionLogScoreDetailsInfo(query.getPageQuery());
return JsonResult.success();
}

@ -27,7 +27,7 @@ public class GeneralQuestionLogScoreDetailsInfoQuery extends PageParam {
/**
* ID
*/
private Long generalMergeCourseInfoId;
private Long courseInfoId;
/**
* ID

@ -1171,3 +1171,45 @@ studentScoreList
ta.student_name,
t.general_question_setting_id
)tz
getQuestionLogScoreDetailsInfo
===
* 查询学生详细得分信息,查询分数详细信息
select
t.student_id,
ta.student_name,
ta.student_sn,
ta.class_id,
tb.class_name,
count(distinct(t.general_resources_question_snapshot_id)) as question_count,
sum(case when t.general_question_log_update_time is not null then 1 else 0 end) as finish_count,
sum(case when t.general_question_log_update_time is not null and t.question_score = t.student_score then 1 else 0 end) as success_count,
sum(case when t.general_question_log_update_time is not null and t.question_score <> t.student_score then 1 else 0 end) as error_count,
sum(case when t.general_question_log_update_time is not null and t.question_score = t.student_score then 1 else 0 end) / IF(count(distinct(t.general_resources_question_snapshot_id)) = 0, 1, count(distinct(t.general_resources_question_snapshot_id))) * 100 as success_rate,
sum(case when t.general_question_log_update_time is not null and t.question_score = t.student_score then t.question_score else ifnull(t.student_score, 0) end) as student_score,
sum(case when t.general_question_log_update_time is not null then 1 else 0 end) / IF(count(distinct(t.general_resources_question_snapshot_id)) = 0, 1, count(distinct(t.general_resources_question_snapshot_id))) finish_progress
from
general_question_log t
left join general_resources_question_snapshot tc on tc.general_resources_question_snapshot_id = t.general_resources_question_snapshot_id
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where
1 = 1
and t.general_question_setting_id = #generalQuestionSettingId#
@if(!isEmpty(courseInfoId)){
and tc.business_course_info_id = #courseInfoId#
@}
@if(!isEmpty(studentOrName)){
and (ta.student_name like #'%'+studentOrName+'%'# or ta.student_sn like #'%'+studentOrName+'%'#)
@}
@if(!isEmpty(classId)){
and ta.class_id =#classId#
@}
GROUP BY
t.student_id,
ta.student_name,
ta.student_sn,
ta.class_id,
tb.class_name

Loading…
Cancel
Save