beetlsql3-dev
Mlxa0324 2 years ago
parent 0b221bb9c4
commit 69ada510aa

@ -56,6 +56,30 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe610;</span>
<div class="name">排课管理icon-13</div>
<div class="code-name">&amp;#xe610;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xebda;</span>
<div class="name">排课管理icon-13-copy</div>
<div class="code-name">&amp;#xebda;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60e;</span>
<div class="name">用户中心</div>
<div class="code-name">&amp;#xe60e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xebd9;</span>
<div class="name">用户中心-copy</div>
<div class="code-name">&amp;#xebd9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe8ac;</span>
<div class="name">编辑</div>
@ -471,9 +495,9 @@
>@font-face {
font-family: 'iconfont';
src:
url('iconfont.woff2?t=1666804680754') format('woff2'),
url('iconfont.woff?t=1666804680754') format('woff'),
url('iconfont.ttf?t=1666804680754') format('truetype');
url('iconfont.woff2?t=1669983915241') format('woff2'),
url('iconfont.woff?t=1669983915241') format('woff'),
url('iconfont.ttf?t=1669983915241') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -499,6 +523,42 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont layui-extend-paikeguanliicon-"></span>
<div class="name">
排课管理icon-13
</div>
<div class="code-name">.layui-extend-paikeguanliicon-
</div>
</li>
<li class="dib">
<span class="icon iconfont layui-extend-paikeguanliicon--copy"></span>
<div class="name">
排课管理icon-13-copy
</div>
<div class="code-name">.layui-extend-paikeguanliicon--copy
</div>
</li>
<li class="dib">
<span class="icon iconfont layui-extend-icon-user-light"></span>
<div class="name">
用户中心
</div>
<div class="code-name">.layui-extend-icon-user-light
</div>
</li>
<li class="dib">
<span class="icon iconfont layui-extend-icon-user-light-copy"></span>
<div class="name">
用户中心-copy
</div>
<div class="code-name">.layui-extend-icon-user-light-copy
</div>
</li>
<li class="dib">
<span class="icon iconfont layui-extend-bianji"></span>
<div class="name">
@ -1120,6 +1180,38 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#layui-extend-paikeguanliicon-"></use>
</svg>
<div class="name">排课管理icon-13</div>
<div class="code-name">#layui-extend-paikeguanliicon-</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#layui-extend-paikeguanliicon--copy"></use>
</svg>
<div class="name">排课管理icon-13-copy</div>
<div class="code-name">#layui-extend-paikeguanliicon--copy</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#layui-extend-icon-user-light"></use>
</svg>
<div class="name">用户中心</div>
<div class="code-name">#layui-extend-icon-user-light</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#layui-extend-icon-user-light-copy"></use>
</svg>
<div class="name">用户中心-copy</div>
<div class="code-name">#layui-extend-icon-user-light-copy</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#layui-extend-bianji"></use>

@ -2,9 +2,9 @@
font-family: "iconfont"; /* Project id 3695701 */
/* Color fonts */
src:
url('iconfont.woff2?t=1666804680754') format('woff2'),
url('iconfont.woff?t=1666804680754') format('woff'),
url('iconfont.ttf?t=1666804680754') format('truetype');
url('iconfont.woff2?t=1669983915241') format('woff2'),
url('iconfont.woff?t=1669983915241') format('woff'),
url('iconfont.ttf?t=1669983915241') format('truetype');
}
.iconfont {
@ -15,6 +15,22 @@
-moz-osx-font-smoothing: grayscale;
}
.layui-extend-paikeguanliicon-:before {
content: "\e610";
}
.layui-extend-paikeguanliicon--copy:before {
content: "\ebda";
}
.layui-extend-icon-user-light:before {
content: "\e60e";
}
.layui-extend-icon-user-light-copy:before {
content: "\ebd9";
}
.layui-extend-bianji:before {
content: "\e8ac";
}

@ -5,6 +5,34 @@
"css_prefix_text": "layui-extend-",
"description": "",
"glyphs": [
{
"icon_id": "6678515",
"name": "排课管理icon-13",
"font_class": "paikeguanliicon-",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "33208948",
"name": "排课管理icon-13-copy",
"font_class": "paikeguanliicon--copy",
"unicode": "ebda",
"unicode_decimal": 60378
},
{
"icon_id": "12696079",
"name": "用户中心",
"font_class": "icon-user-light",
"unicode": "e60e",
"unicode_decimal": 58894
},
{
"icon_id": "33207024",
"name": "用户中心-copy",
"font_class": "icon-user-light-copy",
"unicode": "ebd9",
"unicode_decimal": 60377
},
{
"icon_id": "11372640",
"name": "编辑",

File diff suppressed because it is too large Load Diff

@ -491,3 +491,5 @@ DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
alter table question_log_summary comment '学生-题目日志-分析汇总';
ALTER TABLE teacher_open_course_question_setting ADD COLUMN teacher_open_course_merge_course_info_id bigint(20) COMMENT '关联的章节ID仅章节练习有值';

@ -11,7 +11,6 @@ import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update;
import org.springframework.stereotype.Repository;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
@ -51,5 +50,5 @@ public interface TeacherOpenCourseQuestionSettingDao extends BaseMapper<TeacherO
* @Author: 87966
* @Date: 2022/11/30 14:33
*/
QuestionSettingScoreInfoVO getQuestionSettingScoreInfo(@NotNull Long questionSettingId, @NotNull Long studentId);
// QuestionSettingScoreInfoVO getQuestionSettingScoreInfo(@NotNull Long questionSettingId, @NotNull Long studentId);
}

@ -1,11 +1,18 @@
package com.ibeetl.jlw.entity;
import cn.hutool.core.util.NumberUtil;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.annotation.DictDeep;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.ibeetl.jlw.enums.QuestionBusinessTypeEnum;
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.InsertIgnore;
import org.beetl.sql.annotation.entity.UpdateIgnore;
import org.beetl.sql.fetch.annotation.FetchOne;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@ -15,6 +22,8 @@ import java.util.Date;
* --
* gen by Spring Boot2 Admin 2022-12-04
*/
@Data
@EqualsAndHashCode(callSuper=false)
public class QuestionLogSummary extends BaseEntity{
//学生做题日志汇总ID
@ -50,6 +59,15 @@ public class QuestionLogSummary extends BaseEntity{
//人员ID学生ID等等
private Long personId ;
/**
*
*/
@UpdateIgnore
@InsertIgnore
@FetchOne("personId")
@DictDeep
private Student studentInfo;
//关联的做题日志IDs
@ -100,6 +118,12 @@ public class QuestionLogSummary extends BaseEntity{
private String finishTime ;
// 完成进度
@InsertIgnore
@UpdateIgnore
private float finishProgress;
//组织ID
private Long orgId ;
@ -107,279 +131,22 @@ public class QuestionLogSummary extends BaseEntity{
//用户ID
private Long userId ;
public QuestionLogSummary(){
}
/**ID
*@return
*/
public Long getQuestionLogSummaryId(){
return questionLogSummaryId;
}
/**ID
*@param questionLogSummaryId
*/
public void setQuestionLogSummaryId(Long questionLogSummaryId){
this.questionLogSummaryId = questionLogSummaryId;
}
/**ID
*@return
*/
public Long getQuestionSettingId(){
return questionSettingId;
}
/**ID
*@param questionSettingId
*/
public void setQuestionSettingId(Long questionSettingId){
this.questionSettingId = questionSettingId;
}
/**
*@return
*/
public String getQuestionSettingName(){
return questionSettingName;
}
/**
*@param questionSettingName
*/
public void setQuestionSettingName(String questionSettingName){
this.questionSettingName = questionSettingName;
}
/** ResourcesQuestionSnapshotFromTypeEnum
*@return
*/
public ResourcesQuestionSnapshotFromTypeEnum getQuestionSettingType(){
return questionSettingType;
}
/** ResourcesQuestionSnapshotFromTypeEnum
*@param questionSettingType
*/
public void setQuestionSettingType(ResourcesQuestionSnapshotFromTypeEnum questionSettingType){
this.questionSettingType = questionSettingType;
}
/**
*@return
*/
public QuestionBusinessTypeEnum getQuestionLogSummaryFromType(){
return questionLogSummaryFromType;
}
/**
*@param questionLogSummaryFromType
*/
public void setQuestionLogSummaryFromType(QuestionBusinessTypeEnum questionLogSummaryFromType){
this.questionLogSummaryFromType = questionLogSummaryFromType;
}
/**
*@return
*/
public BigDecimal getQuestionSettingTotalScore(){
return questionSettingTotalScore;
}
/**
*@param questionSettingTotalScore
*/
public void setQuestionSettingTotalScore(BigDecimal questionSettingTotalScore){
this.questionSettingTotalScore = questionSettingTotalScore;
}
/**IDID
*@return
*/
public Long getPersonId(){
return personId;
}
/**IDID
*@param personId
*/
public void setPersonId(Long personId){
this.personId = personId;
}
/**IDs
*@return
*/
public String getQuestionLogIds(){
return questionLogIds;
}
/**IDs
*@param questionLogIds
*/
public void setQuestionLogIds(String questionLogIds){
this.questionLogIds = questionLogIds;
}
/**
*@return
*/
public Integer getQuestionLogSummaryQuestionTotalCount(){
return questionLogSummaryQuestionTotalCount;
}
/**
*@param questionLogSummaryQuestionTotalCount
*/
public void setQuestionLogSummaryQuestionTotalCount(Integer questionLogSummaryQuestionTotalCount){
public void setQuestionLogSummaryQuestionTotalCount(Integer questionLogSummaryQuestionTotalCount) {
this.questionLogSummaryQuestionTotalCount = questionLogSummaryQuestionTotalCount;
tryCalcFinishProgress();
}
/**
*@return
*/
public Integer getQuestionLogSummaryStudentDoCount(){
return questionLogSummaryStudentDoCount;
}
/**
*@param questionLogSummaryStudentDoCount
*/
public void setQuestionLogSummaryStudentDoCount(Integer questionLogSummaryStudentDoCount){
public void setQuestionLogSummaryStudentDoCount(Integer questionLogSummaryStudentDoCount) {
this.questionLogSummaryStudentDoCount = questionLogSummaryStudentDoCount;
tryCalcFinishProgress();
}
/**
*@return
*/
public Integer getQuestionLogSummarySuccessCount(){
return questionLogSummarySuccessCount;
}
/**
*@param questionLogSummarySuccessCount
*/
public void setQuestionLogSummarySuccessCount(Integer questionLogSummarySuccessCount){
this.questionLogSummarySuccessCount = questionLogSummarySuccessCount;
}
/**
*@return
*/
public Integer getQuestionLogSummaryErrorCount(){
return questionLogSummaryErrorCount;
}
/**
*@param questionLogSummaryErrorCount
*/
public void setQuestionLogSummaryErrorCount(Integer questionLogSummaryErrorCount){
this.questionLogSummaryErrorCount = questionLogSummaryErrorCount;
}
/**,100
*@return
*/
public BigDecimal getQuestionLogSummarySuccessRate(){
return questionLogSummarySuccessRate;
}
/**,100
*@param questionLogSummarySuccessRate
*/
public void setQuestionLogSummarySuccessRate(BigDecimal questionLogSummarySuccessRate){
this.questionLogSummarySuccessRate = questionLogSummarySuccessRate;
}
/**
*@return
*/
public BigDecimal getQuestionLogSummaryCurrentPassRate(){
return questionLogSummaryCurrentPassRate;
}
/**
*@param questionLogSummaryCurrentPassRate
*/
public void setQuestionLogSummaryCurrentPassRate(BigDecimal questionLogSummaryCurrentPassRate){
this.questionLogSummaryCurrentPassRate = questionLogSummaryCurrentPassRate;
}
/**
*@return
*/
public Integer getQuestionLogSummaryIsPass(){
return questionLogSummaryIsPass;
}
/**
*@param questionLogSummaryIsPass
*/
public void setQuestionLogSummaryIsPass(Integer questionLogSummaryIsPass){
this.questionLogSummaryIsPass = questionLogSummaryIsPass;
}
/**1 2
*@return
*/
public Integer getQuestionLogSummaryStatus(){
return questionLogSummaryStatus;
}
/**1 2
*@param questionLogSummaryStatus
*/
public void setQuestionLogSummaryStatus(Integer questionLogSummaryStatus){
this.questionLogSummaryStatus = questionLogSummaryStatus;
}
/**
*@return
*/
public Date getQuestionLogSummaryAddTime(){
return questionLogSummaryAddTime;
}
/**
*@param questionLogSummaryAddTime
*/
public void setQuestionLogSummaryAddTime(Date questionLogSummaryAddTime){
this.questionLogSummaryAddTime = questionLogSummaryAddTime;
}
/**ID
*@return
*/
public Long getOrgId(){
return orgId;
}
/**ID
*@param orgId
*/
public void setOrgId(Long orgId){
this.orgId = orgId;
}
/**ID
*@return
*/
public Long getUserId(){
return userId;
}
/**ID
*@param userId
*/
public void setUserId(Long userId){
this.userId = userId;
}
public Long getFinishSecondTime() {
return finishSecondTime;
}
public void setFinishSecondTime(Long finishSecondTime) {
this.finishSecondTime = finishSecondTime;
}
public String getFinishTime() {
return finishTime;
}
public void setFinishTime(String finishTime) {
this.finishTime = finishTime;
}
public BigDecimal getQuestionLogSummaryStudentTotalScore() {
return questionLogSummaryStudentTotalScore;
}
public void setQuestionLogSummaryStudentTotalScore(BigDecimal questionLogSummaryStudentTotalScore) {
this.questionLogSummaryStudentTotalScore = questionLogSummaryStudentTotalScore;
}
private void tryCalcFinishProgress() {
Integer totalCount = this.questionLogSummaryQuestionTotalCount;
Integer doCount = this.questionLogSummaryStudentDoCount;
if (null != doCount && null != totalCount && totalCount > 0) {
this.finishProgress = NumberUtil.round(NumberUtil.mul(NumberUtil.div(doCount , totalCount), 100), 2).floatValue();
}
}
}

@ -52,7 +52,7 @@ public class TeacherOpenCourseMergeResourcesQuestion extends BaseEntity {
private Long teacherOpenCourseMergeCourseInfoId ;
//题型(1单选 2多选 3判断 4填空 5分析)
@ExcelSelector(fixedSelector = {"单选"+ID_SEPARATOR+"1", "多选"+ID_SEPARATOR+"2", "判断"+ID_SEPARATOR+"3" })
@ExcelSelector(fixedSelector = {"单选"+ID_SEPARATOR+"1", "多选"+ID_SEPARATOR+"2", "判断"+ID_SEPARATOR+"3", "填空"+ID_SEPARATOR+"4", "分析"+ID_SEPARATOR+"5" })
@ExcelProperty(value = "题型", index = 2)
private Integer questionType ;

@ -1,7 +1,5 @@
package com.ibeetl.jlw.entity;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.annotation.DictEnum;
import com.ibeetl.admin.core.entity.BaseEntity;
@ -105,6 +103,10 @@ public class TeacherOpenCourseQuestionSetting extends BaseEntity {
//创建时间
private Date teacherOpenCourseQuestionSettingAddTime ;
//关联的章节ID仅章节练习有值
private Long teacherOpenCourseMergeCourseInfoId;
//组织ID
@ -125,46 +127,6 @@ public class TeacherOpenCourseQuestionSetting extends BaseEntity {
@InsertIgnore
private Map fileQuestionInfo;
// 题目总数量
@FetchSql("select count(1) from resources_question_snapshot t " +
"where t.question_status = 1 " +
"and t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# ")
@UpdateIgnore
@InsertIgnore
private int questionCount;
// 平均答对数量
@FetchSql("select sum( ifnull(t.student_score, 0) > 0) / count(DISTINCT(t.student_id)) \n" +
"from teacher_open_course_question_log t \n" +
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' " +
" AND t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# ")
@UpdateIgnore
@InsertIgnore
private Integer avgSuccessCount;
// 平均答错数量
@FetchSql("select sum( ifnull(t.student_score, 0) <= 0) / count(DISTINCT(t.student_id)) \n" +
"from teacher_open_course_question_log t \n" +
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' " +
" AND t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# ")
@UpdateIgnore
@InsertIgnore
private Integer avgErrorCount;
// 平均正确率 100最大
@UpdateIgnore
@InsertIgnore
private float avgSuccessRate;
// 平均得分
@FetchSql("select sum(ifnull(t.student_score, 0) ) / count(DISTINCT(t.student_id)) \n" +
"from teacher_open_course_question_log t \n" +
"where t.teacher_open_course_question_log_status = 1 and t.question_log_add_type = 'FINALLY_SUBMIT' " +
" AND t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# ")
@UpdateIgnore
@InsertIgnore
private float avgScore;
// 关联的班级列表
@FetchSql("select \n" +
"@if(strUtil.equalsIgnoreCase(teacherOpenCourseQuestionSettingId+'', 'ALL')) { \n" +
@ -183,13 +145,13 @@ public class TeacherOpenCourseQuestionSetting extends BaseEntity {
private String teacherOpenCourseQuestionSettingSchoolClassNames;
// 快照ID
@FetchSql("select t.*, null as question_answer " +
"from resources_question_snapshot t where t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# \n" +
"and t.question_status = 1 \n"
)
@UpdateIgnore
@InsertIgnore
private List<ResourcesQuestionSnapshot> resourcesQuestionSnapshotList;
// @FetchSql("select t.*, null as question_answer " +
// "from resources_question_snapshot t where t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId# \n" +
// "and t.question_status = 1 \n"
// )
// @UpdateIgnore
// @InsertIgnore
// private List<ResourcesQuestionSnapshot> resourcesQuestionSnapshotList;
/**
*
@ -228,21 +190,4 @@ public class TeacherOpenCourseQuestionSetting extends BaseEntity {
)
private String resourcesQuestionIdPlural;
public void setAvgSuccessCount(Integer avgSuccessCount) {
this.avgSuccessCount = avgSuccessCount;
tryToUpdateAvgSuccessRate();
}
public void setAvgErrorCount(Integer avgErrorCount) {
this.avgErrorCount = avgErrorCount;
tryToUpdateAvgSuccessRate();
}
private void tryToUpdateAvgSuccessRate() {
if(ObjectUtil.isAllNotEmpty(this.avgSuccessCount, this.avgErrorCount)) {
Integer avgTotalCount = this.avgErrorCount + this.avgSuccessCount;
avgTotalCount = avgTotalCount.equals(0) ? 1 : avgTotalCount;
this.avgSuccessRate = NumberUtil.round(NumberUtil.mul(NumberUtil.div(this.avgSuccessCount, avgTotalCount), 100), 2).floatValue();
}
}
}

@ -26,7 +26,7 @@ import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.PRE_SUBMIT;
public class QuestionLogAddDTO {
/**
* ID
* ID
*/
@NotNull(message = "题目配置ID")
private Long questionSettingId;

@ -1,7 +1,11 @@
package com.ibeetl.jlw.entity.vo;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import com.ibeetl.admin.core.entity.BaseEntity;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
/**
/**
@ -13,6 +17,7 @@ import lombok.Data;
* @version: 1.0
*/
@Data
@FieldNameConstants
public class TeacherOpenCourseQuestionSettingAnalysisVO extends BaseEntity {
/**
@ -40,5 +45,32 @@ public class TeacherOpenCourseQuestionSettingAnalysisVO extends BaseEntity {
*/
private String totalSchoolClassCount;
// TODO 还差几个指标 明天搞
/**
*
*/
private String avgQuestionLogSummaryStudentDoCount;
/**
*
*/
private String avgQuestionLogSummarySuccessRate;
/**
*
*/
private String avgQuestionLogSummaryIsPass;
/**
*
*/
private String avgFinishSecondTime;
/**
*
*/
private String avgFinishTime;
public void setAvgFinishSecondTime(String avgFinishSecondTime) {
this.avgFinishSecondTime = avgFinishSecondTime;
if (StrUtil.isNotBlank(avgFinishSecondTime) && NumberUtil.isNumber(avgFinishSecondTime)) {
setAvgFinishTime(DateUtil.secondToTime(NumberUtil.toBigDecimal(avgFinishSecondTime).intValue()));
}
}
}

@ -769,7 +769,7 @@ public class GeneralQuestionLogService extends CoreBaseService<GeneralQuestionLo
}
// 是否通过及格率 TODO 及格率要查询数据库 这里先写死
BigDecimal passRateSetting = new BigDecimal("0.6");
boolean isPass = NumberUtil.isGreaterOrEqual(NumberUtil.mul(questionTotalScore, passRateSetting), myTotalScore);
boolean isPass = NumberUtil.isGreaterOrEqual(myTotalScore, NumberUtil.mul(questionTotalScore, passRateSetting));
questionLogSummary.setQuestionSettingId(questionSettingId);
questionLogSummary.setQuestionSettingName(questionSettingName);
@ -855,7 +855,7 @@ public class GeneralQuestionLogService extends CoreBaseService<GeneralQuestionLo
// generalQuestionSettingId类似试卷ID题目日志里会出现重复的试卷ID
// 逻辑删除之前的题目日志,防止学生做题统计数据异常
// 保证试卷是最新的
// 考试逻辑删除记录,作业或者章节测试都是直接删除记录。
// 考试逻辑删除记录,作业或者章节练习都是直接删除记录。
// 强制发题
if (isReSend) {
logicDeleteBySettingIds(questionSettingId.toString());

@ -557,13 +557,13 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
* IDID
*
* @param copyToList
* @param initcourseInfoIdPair ID
* @param initCourseInfoIdPair ID
*/
public Map<Long, Long> batchUpdateArrayListSomeMergeId(List<TeacherOpenCourseMergeCourseInfo> copyToList,
// 不能为空但是可以传递empty的Map
@NotNull(message = "初始化ID对不能为空") Map<Long, Long> initcourseInfoIdPair) {
@NotNull(message = "初始化ID对不能为空") Map<Long, Long> initCourseInfoIdPair) {
Map<Long, Long> courseInfoIdPair = new HashMap<>(initcourseInfoIdPair);
Map<Long, Long> courseInfoIdPair = new HashMap<>(initCourseInfoIdPair);
// 查找列表中所有的ID
Set<Long> mergeCourseInfoIdSet = copyToList.stream()

@ -88,7 +88,34 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
public PageQuery<TeacherOpenCourseQuestionLog>queryByConditionQuery(PageQuery query){
PageQuery ret = teacherOpenCourseQuestionLogDao.queryByConditionQuery(query);
queryListAfter(ret.getList());
List<TeacherOpenCourseQuestionLog> list = ret.getList();
queryListAfter(list);
Map<Long, List<Student>> studentMap = new HashMap<>();
if (ObjectUtil.isNotEmpty(list)) {
String studentIds = list.stream().map(TeacherOpenCourseQuestionLog::getStudentId).map(Object::toString).collect(joining(","));
List<Student> studentList = studentDao.getByIds(studentIds);
dictParser(studentList);
if (ObjectUtil.isNotEmpty(studentList)) {
studentMap.putAll(studentList.stream().collect(groupingBy(Student::getStudentId)));
}
list.forEach(item -> {
List<Student> students = studentMap.get(item.getStudentId());
if (ObjectUtil.isNotEmpty(students)) {
Student student = students.get(0);
// 学生编号
item.set("studentSn", student.getStudentSn());
item.set("studentName", student.getStudentName());
SchoolClass schoolClass = student.getSchoolClass();
// 班级
if(null != schoolClass) {
item.set("className", schoolClass.getClassName());
}
}
});
}
return ret;
}
@ -570,7 +597,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
}
// 是否通过及格率 TODO 及格率要查询数据库 这里先写死
BigDecimal passRateSetting = new BigDecimal("0.6");
boolean isPass = NumberUtil.isGreaterOrEqual(NumberUtil.mul(questionTotalScore, passRateSetting), myTotalScore);
boolean isPass = NumberUtil.isGreaterOrEqual(myTotalScore, NumberUtil.mul(questionTotalScore, passRateSetting));
questionLogSummary.setQuestionSettingId(questionSettingId);
questionLogSummary.setQuestionSettingName(questionSettingName);
questionLogSummary.setQuestionSettingType(snapshotFromTypeEnum);
@ -658,7 +685,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
// teacherOpenCourseQuestionSettingId类似试卷ID题目日志里会出现重复的试卷ID
// 逻辑删除之前的题目日志,防止学生做题统计数据异常
// 保证试卷是最新的
// 考试逻辑删除记录,作业或者章节测试都是直接删除记录。
// 考试逻辑删除记录,作业或者章节练习都是直接删除记录。
// 强制发题
if (isReSend) {
logicDeleteBySettingIds(questionSettingId.toString());

@ -5,6 +5,7 @@ import cn.hutool.core.collection.ConcurrentHashSet;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.lang.func.Func1;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.jlw.util.EnumUtil;
@ -19,7 +20,6 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.*;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.dto.QuestionSettingDTO;
import com.ibeetl.jlw.entity.vo.QuestionSettingScoreInfoVO;
import com.ibeetl.jlw.entity.vo.TeacherOpenCourseQuestionSettingAnalysisVO;
import com.ibeetl.jlw.enums.*;
import com.ibeetl.jlw.web.query.*;
@ -35,6 +35,7 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Nullable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@ -129,7 +130,7 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
teacherOpenCourseQuestionSetting.setUserId(teacherOpenCourseQuestionSettingQuery.getUserId());
teacherOpenCourseQuestionSetting.setOrgId(teacherOpenCourseQuestionSettingQuery.getOrgId());
// 验证唯一
verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
// verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
}
insertBatch(teacherOpenCourseQuestionSettingList);
}
@ -141,7 +142,7 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
TeacherOpenCourseQuestionSetting teacherOpenCourseQuestionSetting = teacherOpenCourseQuestionSettingQuery.pojo();
// 验证唯一
verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
// verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
teacherOpenCourseQuestionSettingDao.insert(teacherOpenCourseQuestionSetting);
teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingId(teacherOpenCourseQuestionSetting.getTeacherOpenCourseQuestionSettingId());
@ -155,7 +156,7 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
public String edit(TeacherOpenCourseQuestionSettingQuery teacherOpenCourseQuestionSettingQuery){
// 验证唯一
verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
// verifyUniqueChapterExercise(teacherOpenCourseQuestionSettingQuery);
String msg = "";
TeacherOpenCourseQuestionSetting teacherOpenCourseQuestionSetting = teacherOpenCourseQuestionSettingQuery.pojo();
@ -245,19 +246,51 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
* @param student
*/
public void setMyQuestionLogScoreInfo(List<TeacherOpenCourseQuestionSetting> list, Student student) {
if (ObjectUtil.isAllNotEmpty(list, student)) {
Long studentId = student.getStudentId();
list.forEach(item -> {
Long questionSettingId = item.getTeacherOpenCourseQuestionSettingId();
QuestionSettingScoreInfoVO scoreInfo = teacherOpenCourseQuestionSettingDao.getQuestionSettingScoreInfo(questionSettingId, studentId);
if (null != scoreInfo) {
Optional.ofNullable(list).orElse(Collections.emptyList()).forEach(item -> {
Long questionSettingId = item.getTeacherOpenCourseQuestionSettingId();
if (ObjectUtil.isNotEmpty(student)) {
Long studentId = student.getStudentId();
QuestionLogSummaryQuery logSummaryQuery = new QuestionLogSummaryQuery();
logSummaryQuery.setPersonId(studentId);
logSummaryQuery.setQuestionLogSummaryStatus(1);
logSummaryQuery.setQuestionSettingId(questionSettingId);
List<QuestionLogSummary> logSummaryList = questionLogSummaryDao.getValuesByQueryNotWithPermission(logSummaryQuery);
// 我的得分,完成时间
if (ObjectUtil.isNotEmpty(logSummaryList)) {
QuestionLogSummary scoreInfo = logSummaryList.get(0);
item.set("finishTime", scoreInfo.getFinishTime());
item.set("finishSecondTime", scoreInfo.getFinishSecondTime());
item.set("myScore", scoreInfo.getMyScore());
item.set("myScore", scoreInfo.getQuestionLogSummaryStudentTotalScore());
item.set("mySuccessRate", scoreInfo.getQuestionLogSummarySuccessRate());
item.set("mySuccessCount", scoreInfo.getQuestionLogSummarySuccessCount());
item.set("myErrorCount", scoreInfo.getQuestionLogSummaryErrorCount());
}
});
}
}
QuestionLogSummaryQuery logSummaryQuery2 = new QuestionLogSummaryQuery();
logSummaryQuery2.setQuestionLogSummaryStatus(1);
logSummaryQuery2.setQuestionSettingId(questionSettingId);
List<QuestionLogSummary> logSummaryList2 = questionLogSummaryDao.getValuesByQueryNotWithPermission(logSummaryQuery2);
// 平均及格率,平均得分等等
if (ObjectUtil.isNotEmpty(logSummaryList2)) {
BigDecimal studentTotalScore = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryStudentTotalScore).reduce(BigDecimal::add).get();
int passTotalCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryIsPass).reduce(Integer::sum).get();
int questionTotalCount = logSummaryList2.get(0).getQuestionLogSummaryQuestionTotalCount();
int totalSuccessCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessCount).reduce(Integer::sum).get();
int totalErrorCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryErrorCount).reduce(Integer::sum).get();
BigDecimal totalSuccessRate = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessRate).reduce(BigDecimal::add).get();
int logSummarySize = logSummaryList2.size();
item.set("avgScore", NumberUtil.div(studentTotalScore, logSummarySize, 1));
item.set("avgPassRate", NumberUtil.div(passTotalCount, logSummarySize, 1));
item.set("questionCount", questionTotalCount);
item.set("avgSuccessCount", NumberUtil.div(totalSuccessCount, logSummarySize, 1));
item.set("avgErrorCount", NumberUtil.div(totalErrorCount, logSummarySize, 1));
item.set("avgSuccessRate", NumberUtil.div(totalSuccessRate, logSummarySize, 1));
}
});
}
public TeacherOpenCourseQuestionSetting getInfo (Long teacherOpenCourseQuestionSettingId){
@ -300,6 +333,8 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
// 设置章节练习的默认配置并设置开课ID
settingQuery.setChapterExerciseDefault().setTeacherOpenCourseId(teacherOpenCourseId);
settingQuery.setTeacherOpenCourseQuestionSettingName(teacherOpenCourseMergeCourseInfoQuery.getCourseInfoName());
// 关联上课程章节ID如果没有则会添加Null
settingQuery.setTeacherOpenCourseMergeCourseInfoId(teacherOpenCourseMergeCourseInfoQuery.getTeacherOpenCourseMergeCourseInfoId());
settingQuery.setQuestionSettingOptions(new ArrayList<>(questionSettingOptions));
switch (copyFrom) {

@ -47,6 +47,7 @@ import static cn.jlw.util.CacheUserUtil.getStudent;
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
import static com.ibeetl.admin.core.util.ExcelUtil.write;
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.FINALLY_SUBMIT;
/**
* -
@ -102,7 +103,7 @@ public class GeneralQuestionLogController extends BaseController {
}
/**
* -
* -
* <li> </li>
*
* @param questionLogAddDTO
@ -297,6 +298,7 @@ public class GeneralQuestionLogController extends BaseController {
// 只查询收藏到错题库的题目
query.setPara("isErrorFavorite", true);
query.setPara("generalQuestionSettingIdPlural", questionSettingIds);
query.setPara("questionLogAddType", FINALLY_SUBMIT);
return JsonResult.success(generalQuestionLogService.queryByConditionQuery(query));
}

@ -1,6 +1,8 @@
package com.ibeetl.jlw.web;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.jlw.Interceptor.GetFile;
import cn.jlw.Interceptor.RFile;
import cn.jlw.Interceptor.SCoreUser;
@ -9,12 +11,14 @@ import cn.jlw.validate.ValidateConfig;
import com.ibeetl.admin.core.annotation.Function;
import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.util.BeanCopyUtil;
import com.ibeetl.admin.core.util.TimeTool;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.FileEntity;
import com.ibeetl.jlw.entity.QuestionLogSummary;
import com.ibeetl.jlw.service.QuestionLogSummaryService;
import com.ibeetl.jlw.web.query.QuestionLogSummaryQuery;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -37,11 +41,10 @@ import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
import static com.ibeetl.admin.core.util.ExcelUtil.write;
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
/**
@ -97,6 +100,36 @@ public class QuestionLogSummaryController{
}
}
/**
*
* @param condition
* @return
*/
@SneakyThrows
@GetMapping(API + "/export.do")
public void export(HttpServletResponse resp, QuestionLogSummaryQuery condition) {
/** 构建表头 */
Map<String, String> header = new LinkedHashMap<>(11);
header.put("studentName", "学生姓名");
header.put("studentSn", "学生学号");
header.put("className", "班级");
header.put("questionLogSummaryQuestionTotalCount", "题目总数量");
header.put("questionLogSummaryStudentDoCount", "已完成题目数量");
header.put("questionLogSummarySuccessCount", "答对数量");
header.put("questionLogSummaryErrorCount", "答错数量");
header.put("questionLogSummarySuccessRate", "正确率");
header.put("questionLogSummaryStudentTotalScore", "得分");
header.put("finishProgress", "进度(%");
condition.setQuestionLogSummaryStatus(1);
List<QuestionLogSummary> list = questionLogSummaryService.getValuesByQueryNotWithPermission(condition);
List<Map<String, Object>> maps = BeanCopyUtil.baseEntity2MapWithParallel(list);
String filename = StrUtil.format("题目日志汇总-导出 {}.xlsx", DateUtil.now());
write(resp, filename,"Sheet1", header.values(), convertData(header.keySet(), maps));
}
/* 后台页面 */

@ -587,11 +587,10 @@ public class ResourcesQuestionController{
* @param courseId
* @return
*/
@GetMapping(MODEL + "/getGroupQuestionTypeCount.json")
@GetMapping(MODEL + "/questionTypeGroupInfo.json")
@Function("resourcesQuestion.query")
@ResponseBody
public JsonResult<List<QuestionTypeCountVO>> getGroupQuestionTypeCount(@RequestParam(required = false) Long courseId) {
public JsonResult<List<QuestionTypeCountVO>> questionTypeGroupInfo(@RequestParam(required = false) Long courseId) {
return JsonResult.success(resourcesQuestionService.getGroupQuestionTypeCount(courseId));
}
}

@ -478,7 +478,6 @@ public class TeacherOpenCourseMergeResourcesQuestionController extends BaseContr
*/
@PostMapping(API + "/questionTypeGroupInfo.do")
public JsonResult questionTypeGroupInfo(Long teacherOpenCourseId, @SCoreUser CoreUser coreUser) {
return JsonResult.success(teacherOpenCourseMergeResourcesQuestionService.getGroupQuestionTypeCount(teacherOpenCourseId));
}
@ -502,6 +501,7 @@ public class TeacherOpenCourseMergeResourcesQuestionController extends BaseContr
/**
* : <br>
*
* excel
* @param file
* @return {@link JsonResult}
* @Author: 87966

@ -2,6 +2,7 @@ package com.ibeetl.jlw.web;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.Interceptor.TStudent;
@ -33,11 +34,10 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.*;
import java.util.stream.Collectors;
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
import static cn.jlw.util.CacheUserUtil.getStudent;
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
import static com.ibeetl.admin.core.util.ExcelUtil.write;
@ -69,6 +69,7 @@ public class TeacherOpenCourseQuestionLogController {
return JsonResult.failMessage("请登录后再操作");
}else{
PageQuery page = condition.getPageQuery();
condition.setQuestionLogAddType(defaultIfNull(condition.getQuestionLogAddType(), FINALLY_SUBMIT));
teacherOpenCourseQuestionLogService.queryByConditionQuery(page);
return JsonResult.success(page);
}
@ -110,7 +111,7 @@ public class TeacherOpenCourseQuestionLogController {
}
/**
* -
* -
* <li> </li>
*
* @param questionLogAddDTO
@ -345,6 +346,45 @@ public class TeacherOpenCourseQuestionLogController {
write(resp, filename,"Sheet1", header.values(), convertData(header.keySet(), maps));
}
/**
*
* @param condition
* @return
*/
@SneakyThrows
@GetMapping(API + "/zyDetailExport.do")
public void zyDetailExport(HttpServletResponse resp, TeacherOpenCourseQuestionLogQuery condition) {
/** 构建表头 */
Map<String, String> header = new LinkedHashMap<>(11);
header.put("studentName", "学生姓名");
header.put("studentSn", "学生学号");
header.put("className", "班级");
header.put("questionStem", "题干");
header.put("questionTypeText", "题型");
header.put("teacherOpenCourseQuestionLogAnswer", "我的选项");
header.put("questionAnswer", "答案");
header.put("studentScore", "得分");
List<TeacherOpenCourseQuestionLog> datas = new ArrayList<>();
PageQuery pageQuery = condition.getPageQuery();
condition.setTeacherOpenCourseQuestionLogStatus(1);
condition.setQuestionLogAddType(FINALLY_SUBMIT);
pageQuery.setPageSize(Integer.MAX_VALUE);
pageQuery.setPageNumber(1L);
PageQuery<TeacherOpenCourseQuestionLog> teacherOpenCourseQuestionLogPageQuery = teacherOpenCourseQuestionLogService.queryByConditionQuery(pageQuery);
if (ObjectUtil.isNotEmpty(teacherOpenCourseQuestionLogPageQuery)) {
datas = teacherOpenCourseQuestionLogPageQuery.getList().stream().filter(item -> null != item.get("studentName")).collect(Collectors.toList());
}
List<Map<String, Object>> maps = BeanCopyUtil.baseEntity2MapWithParallel(datas);
String filename = StrUtil.format("题目日志详情-导出 {}.xlsx", DateUtil.now());
write(resp, filename,"Sheet1", header.values(), convertData(header.keySet(), maps));
}
/**
* : <br>
* LOCK

@ -72,6 +72,13 @@ public class QuestionLogSummaryQuery extends PageParam {
private String _given;//指定更新的特定字段,多个逗号隔开
// 扩展字段
// 学生姓名或者学号
private String studentSnOrName;
// 班级IDs
private String schoolClassIdPlural;
public Long getQuestionLogSummaryId(){
return questionLogSummaryId;
}
@ -286,4 +293,20 @@ public class QuestionLogSummaryQuery extends PageParam {
public void setQuestionLogSummaryStudentTotalScore(BigDecimal questionLogSummaryStudentTotalScore) {
this.questionLogSummaryStudentTotalScore = questionLogSummaryStudentTotalScore;
}
public String getStudentSnOrName() {
return studentSnOrName;
}
public void setStudentSnOrName(String studentSnOrName) {
this.studentSnOrName = studentSnOrName;
}
public String getSchoolClassIdPlural() {
return schoolClassIdPlural;
}
public void setSchoolClassIdPlural(String schoolClassIdPlural) {
this.schoolClassIdPlural = schoolClassIdPlural;
}
}

@ -8,6 +8,8 @@ import com.ibeetl.jlw.entity.TeacherOpenCourseMergeResourcesQuestion;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
/**
*
*/
@ -164,7 +166,7 @@ public class TeacherOpenCourseMergeResourcesQuestionQuery extends PageParam {
pojo.setQuestionOptionE(this.getQuestionOptionE());
pojo.setQuestionAnswer(this.getQuestionAnswer());
pojo.setQuestionAnalysis(this.getQuestionAnalysis());
pojo.setQuestionStatus(this.getQuestionStatus());
pojo.setQuestionStatus(defaultIfNull(this.getQuestionStatus(), 1));
pojo.setUserId(this.getUserId());
pojo.setOrgId(this.getOrgId());
return pojo;

@ -5,6 +5,7 @@ import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.web.query.PageParam;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLog;
import com.ibeetl.jlw.enums.QuestionLogAddTypeEnum;
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
import lombok.*;
import lombok.experimental.Accessors;
@ -124,6 +125,19 @@ public class TeacherOpenCourseQuestionLogQuery extends PageParam {
private String _given;//指定更新的特定字段,多个逗号隔开
// 扩展字段
// 学生姓名或者学号
private String studentSnOrName;
// 班级IDs
private String schoolClassIdPlural;
// 题目配置来源类型
private ResourcesQuestionSnapshotFromTypeEnum questionSettingType;
public TeacherOpenCourseQuestionLog pojo(){
TeacherOpenCourseQuestionLog pojo = new TeacherOpenCourseQuestionLog();
pojo.setTeacherOpenCourseQuestionLogId(this.getTeacherOpenCourseQuestionLogId());

@ -70,6 +70,8 @@ public class TeacherOpenCourseQuestionSettingQuery extends PageParam {
private Integer teacherOpenCourseQuestionSettingStatus;
@Query(name = "创建时间", display = false)
private Date teacherOpenCourseQuestionSettingAddTime;
@Query(name = "关联的章节ID仅章节练习有值", display = false)
private Long teacherOpenCourseMergeCourseInfoId;
@Query(name = "组织ID", display = false)
private Long orgId;
@Query(name = "用户ID", display = false)
@ -115,7 +117,7 @@ public class TeacherOpenCourseQuestionSettingQuery extends PageParam {
pojo.setTeacherOpenCourseQuestionSettingFile(this.getTeacherOpenCourseQuestionSettingFile());
pojo.setTeacherOpenCourseQuestionSettingPushStatus(defaultIfNull(this.getTeacherOpenCourseQuestionSettingPushStatus(), UN_PUSH));
pojo.setTeacherOpenCourseQuestionSettingStatus(defaultIfNull(this.getTeacherOpenCourseQuestionSettingStatus(), 1));
pojo.setTeacherOpenCourseQuestionSettingAddTime(this.getTeacherOpenCourseQuestionSettingAddTime());
pojo.setTeacherOpenCourseQuestionSettingAddTime(defaultIfNull(this.getTeacherOpenCourseQuestionSettingAddTime(), new Date()));
pojo.setTeacherOpenCourseQuestionSettingRequire(this.getTeacherOpenCourseQuestionSettingRequire());
pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId());

@ -929,83 +929,10 @@ getQuestionTestSimpleInfo
AND t.general_question_setting_push_status = 1
AND t.general_question_setting_status = 1
AND t.general_question_setting_type = #generalQuestionSettingType#
AND t.general_id = #teacherOpenCourseId#
AND t.business_type = 'FROM_SYSTEM'
AND t.business_id in (select ba.course_info_id from course_info ba where ba.course_info_parent_id = #courseInfoParentId#)
@pageIgnoreTag() {
ORDER BY
t.general_question_setting_name ASC
@}
questionTestResults
===
* 教师端-题目的练习详情
SELECT
@pageTag(){
z.*
@}
FROM
(SELECT
t.student_id,
t.student_sn,
t.student_name,
th.class_name,
@ // 完成用时
max(TIMEDIFF( te.general_question_log_update_time , te.general_question_log_add_time )) AS finish_time,
@ // 题目总数
count(td.general_resources_question_snapshot_id) AS question_total_count,
@ // 正确的题数
count(case when te.question_score > 0 then 1 else 0 end) AS correct_count,
@ // 错误的题数
count(case when te.question_score = 0 then 1 else 0 end) AS wrong_count,
@ // 正确率 100为最大值
count(case when te.question_score > 0 then 1 else 0 end)
/ IF(count(td.general_resources_question_snapshot_id) = 0,1, count(td.general_resources_question_snapshot_id)) * 100 AS correct_rate,
@ // 该学生的总得分
sum(IFNULL(te.question_score, 0)) AS total_score
FROM
student t
LEFT JOIN general_merge_student tc ON tc.student_id = t.student_id
LEFT JOIN teacher_open_course ta ON ta.business_id = tc.business_id
LEFT JOIN general_question_setting tb ON tb.business_id = ta.business_id
LEFT JOIN general_resources_question_snapshot td ON td.general_question_setting_id = tb.general_question_setting_id
LEFT JOIN general_question_log te ON te.general_question_setting_id = tb.general_question_setting_id
LEFT JOIN school_class th ON th.class_id = t.class_id
@if(!isEmpty(schoolClassIds)) {
LEFT JOIN school_class ti ON ti.business_id = ta.business_id
@}
@if(!isEmpty(courseInfoId)) {
LEFT JOIN course_info tj ON tj.business_id = ta.business_id
@}
WHERE
1 = 1
AND ta.general_status = 1
AND tb.general_question_setting_status = 1
AND tc.general_school_class_merge_student_status = 1
AND td.question_status = 1
AND te.general_question_log_status = 1
AND th.class_status = 1
@if(!isEmpty(schoolClassIds)) {
AND ti.school_class_status = 1
@}
@if(!isEmpty(courseInfoId)) {
AND tj.course_info_status = 1
@}
@ // 开课关联的班级ID
@if(!isEmpty(schoolClassIds)) {
AND FIND_IN_SET(ti.school_class_id, #schoolClassIds#)
@}
@if(!isEmpty(studentSnOrStudentName)) {
AND CONCAT( t.student_sn, t.student_name ) LIKE #'%' + studentSnOrStudentName + '%'#
@}
@if(!isEmpty(courseInfoId)) {
AND tj.course_info_id = #courseInfoId#
@}
@if(!isEmpty(generalQuestionSettingId)) {
AND tb.general_question_setting_id = #generalQuestionSettingId#
@}
GROUP BY
t.student_id,
t.student_sn,
t.student_name,
th.class_name
) z

@ -4,9 +4,14 @@ queryByCondition
select
@pageTag(){
t.*
t.*,
ta.student_name,
ta.student_sn,
tb.class_name
@}
from question_log_summary t
inner join student ta on ta.student_id = t.person_id and ta.student_status = 1
inner join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where 1=1
@//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("questionLogSummary.query")#
@ -88,6 +93,12 @@ queryByCondition
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
queryByConditionQuery
@ -96,9 +107,14 @@ queryByConditionQuery
select
@pageTag(){
t.*
t.*,
ta.student_name,
ta.student_sn,
tb.class_name
@}
from question_log_summary t
inner join student ta on ta.student_id = t.person_id and ta.student_status = 1
inner join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where 1=1
@if(!isEmpty(questionLogSummaryId)){
and t.question_log_summary_id =#questionLogSummaryId#
@ -178,6 +194,12 @@ queryByConditionQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@ -356,8 +378,13 @@ getQuestionLogSummaryValues
* 根据不为空的参数进行查询
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from question_log_summary t
inner join student ta on ta.student_id = t.person_id and ta.student_status = 1
inner join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where 1=1
@if(!isEmpty(questionLogSummaryId)){
and t.question_log_summary_id =#questionLogSummaryId#
@ -425,8 +452,13 @@ getValuesByQuery
* 根据不为空的参数进行查询
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from question_log_summary t
inner join student ta on ta.student_id = t.person_id and ta.student_status = 1
inner join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where 1=1 and #function("questionLogSummary.query")#
@if(!isEmpty(questionLogSummaryId)){
and t.question_log_summary_id =#questionLogSummaryId#
@ -506,6 +538,12 @@ getValuesByQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
getValuesByQueryNotWithPermission
@ -513,8 +551,13 @@ getValuesByQueryNotWithPermission
* 根据不为空的参数进行查询(不包含权限)
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from question_log_summary t
inner join student ta on ta.student_id = t.person_id and ta.student_status = 1
inner join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
where 1=1
@if(!isEmpty(questionLogSummaryId)){
and t.question_log_summary_id =#questionLogSummaryId#
@ -594,6 +637,12 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@ -701,6 +750,12 @@ getExcelValues
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
)
UNION ALL
(
@ -800,6 +855,12 @@ getExcelValues
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
)
)t

@ -37,18 +37,6 @@ queryByCondition
@if(!isEmpty(stem)){
and t.stem =#stem#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if(!isEmpty(myOptions)){
and t.my_options =#myOptions#
@}
@if(!isEmpty(rightKey)){
and t.right_key =#rightKey#
@}
@if(!isEmpty(theoryStatus)){
and t.theory_status =#theoryStatus#
@}
@if(!isEmpty(theoryScore)){
and t.theory_score =#theoryScore#
@}
@ -118,18 +106,6 @@ queryByConditionQuery
@if(!isEmpty(stem)){
and t.stem =#stem#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if(!isEmpty(myOptions)){
and t.my_options =#myOptions#
@}
@if(!isEmpty(rightKey)){
and t.right_key =#rightKey#
@}
@if(!isEmpty(theoryStatus)){
and t.theory_status =#theoryStatus#
@}
@if(!isEmpty(theoryScore)){
and t.theory_score =#theoryScore#
@}
@ -214,34 +190,6 @@ updateGivenByIds
stem = #stem# ,
@}
@}
@if(contain("questionType",_given)){
@if(isEmpty(questionType)){
question_type = null ,
@}else{
question_type = #questionType# ,
@}
@}
@if(contain("myOptions",_given)){
@if(isEmpty(myOptions)){
my_options = null ,
@}else{
my_options = #myOptions# ,
@}
@}
@if(contain("rightKey",_given)){
@if(isEmpty(rightKey)){
right_key = null ,
@}else{
right_key = #rightKey# ,
@}
@}
@if(contain("theoryStatus",_given)){
@if(isEmpty(theoryStatus)){
theory_status = null ,
@}else{
theory_status = #theoryStatus# ,
@}
@}
@if(contain("theoryScore",_given)){
@if(isEmpty(theoryScore)){
theory_score = null ,
@ -312,18 +260,6 @@ getStudentHandsOnTaskStepValues
@if(!isEmpty(stem)){
and t.stem =#stem#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if(!isEmpty(myOptions)){
and t.my_options =#myOptions#
@}
@if(!isEmpty(rightKey)){
and t.right_key =#rightKey#
@}
@if(!isEmpty(theoryStatus)){
and t.theory_status =#theoryStatus#
@}
@if(!isEmpty(theoryScore)){
and t.theory_score =#theoryScore#
@}
@ -379,18 +315,6 @@ getValuesByQuery
@if(!isEmpty(stem)){
and t.stem =#stem#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if(!isEmpty(myOptions)){
and t.my_options =#myOptions#
@}
@if(!isEmpty(rightKey)){
and t.right_key =#rightKey#
@}
@if(!isEmpty(theoryStatus)){
and t.theory_status =#theoryStatus#
@}
@if(!isEmpty(theoryScore)){
and t.theory_score =#theoryScore#
@}
@ -458,18 +382,6 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(stem)){
and t.stem =#stem#
@}
@if(!isEmpty(questionType)){
and t.question_type =#questionType#
@}
@if(!isEmpty(myOptions)){
and t.my_options =#myOptions#
@}
@if(!isEmpty(rightKey)){
and t.right_key =#rightKey#
@}
@if(!isEmpty(theoryStatus)){
and t.theory_status =#theoryStatus#
@}
@if(!isEmpty(theoryScore)){
and t.theory_score =#theoryScore#
@}

@ -3,9 +3,19 @@ queryByCondition
* 根据不为空的参数进行分页查询
select
@pageTag(){
t.*
t.*,
ta.student_name,
ta.student_sn,
tb.class_name
@}
@}
from teacher_open_course_question_log t
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where 1=1
@//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("teacherOpenCourseQuestionLog.query")#
@ -98,7 +108,7 @@ queryByCondition
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -112,6 +122,17 @@ queryByCondition
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@if(!isEmpty(questionSettingType)){
and tc.teacher_open_course_question_setting_type = #questionSettingType#
and tc.teacher_open_course_question_setting_status = 1
and tc.teacher_open_course_question_setting_push_status = 1
@}
queryByConditionQuery
@ -119,9 +140,18 @@ queryByConditionQuery
* 根据不为空的参数进行分页查询(无权限)
select
@pageTag(){
t.*
t.*,
ta.student_name,
ta.student_sn,
tb.class_name
@}
from teacher_open_course_question_log t
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where 1=1
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@ -212,7 +242,7 @@ queryByConditionQuery
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -226,6 +256,18 @@ queryByConditionQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@if(!isEmpty(questionSettingType)){
and tc.teacher_open_course_question_setting_type = #questionSettingType#
and tc.teacher_open_course_question_setting_status = 1
and tc.teacher_open_course_question_setting_push_status = 1
@}
studentScoreList
@ -334,7 +376,7 @@ studentScoreList
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -348,6 +390,18 @@ studentScoreList
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@if(!isEmpty(questionSettingType)){
and tc.teacher_open_course_question_setting_type = #questionSettingType#
and tc.teacher_open_course_question_setting_status = 1
and tc.teacher_open_course_question_setting_push_status = 1
@}
group by
t.student_id,
ta.student_sn,
@ -488,8 +542,17 @@ getTeacherOpenCourseQuestionLogValues
* 根据不为空的参数进行查询
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from teacher_open_course_question_log t
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where 1=1
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@ -531,7 +594,7 @@ getTeacherOpenCourseQuestionLogValues
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -546,8 +609,17 @@ getValuesByQuery
* 根据不为空的参数进行查询
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from teacher_open_course_question_log t
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where 1=1 and #function("teacherOpenCourseQuestionLog.query")#
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@ -605,7 +677,7 @@ getValuesByQuery
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -619,6 +691,18 @@ getValuesByQuery
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@if(!isEmpty(questionSettingType)){
and tc.teacher_open_course_question_setting_type = #questionSettingType#
and tc.teacher_open_course_question_setting_status = 1
and tc.teacher_open_course_question_setting_push_status = 1
@}
getValuesByQueryNotWithPermission
@ -626,8 +710,17 @@ getValuesByQueryNotWithPermission
* 根据不为空的参数进行查询
select t.*
select t.*,
ta.student_name,
ta.student_sn,
tb.class_name
from teacher_open_course_question_log t
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where 1=1
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
@ -685,7 +778,7 @@ getValuesByQueryNotWithPermission
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
@}
@if(!isEmpty(questionLogAddType)){
and t.question_log_add_type =#questionLogAddType#
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@ -699,6 +792,18 @@ getValuesByQueryNotWithPermission
@if(!isEmpty(userIdPlural)){
and find_in_set(t.user_id,#userIdPlural#)
@}
@if(!isEmpty(studentSnOrName)){
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
@}
@if(!isEmpty(schoolClassIdPlural)){
and find_in_set(ta.class_id, #schoolClassIdPlural#)
@}
@if(!isEmpty(questionSettingType)){
and tc.teacher_open_course_question_setting_type = #questionSettingType#
and tc.teacher_open_course_question_setting_status = 1
and tc.teacher_open_course_question_setting_push_status = 1
@}
getQuestionLogScoreDetailsInfo
@ -726,8 +831,12 @@ getQuestionLogScoreDetailsInfo
from
teacher_open_course_question_log t
left join resources_question_snapshot tc on tc.resources_question_snapshot_id = t.resources_question_snapshot_id
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
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
@ // 如果关联类型不为空,则关联题目配置表
@if(!isEmpty(questionSettingType)){
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
@}
where
1 = 1
and t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId#

@ -73,6 +73,9 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseQuestionSettingRequire)){
and t.teacher_open_course_question_setting_require =#teacherOpenCourseQuestionSettingRequire#
@}
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.teacher_open_course_merge_course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@ -160,6 +163,9 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseQuestionSettingRequire)){
and t.teacher_open_course_question_setting_require =#teacherOpenCourseQuestionSettingRequire#
@}
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.teacher_open_course_merge_course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@ -318,6 +324,13 @@ updateGivenByIds
teacher_open_course_question_setting_require = #teacherOpenCourseQuestionSettingRequire# ,
@}
@}
@if(contain("teacherOpenCourseMergeCourseInfoId",_given)){
@if(isEmpty(teacherOpenCourseMergeCourseInfoId)){
teacher_open_course_merge_course_info_id = null ,
@}else{
teacher_open_course_merge_course_info_id = #teacherOpenCourseMergeCourseInfoId# ,
@}
@}
@if(contain("orgId",_given)){
@if(isEmpty(orgId)){
org_id = null ,
@ -398,6 +411,9 @@ getTeacherOpenCourseQuestionSettingValues
@if(!isEmpty(teacherOpenCourseQuestionSettingRequire)){
and t.teacher_open_course_question_setting_require =#teacherOpenCourseQuestionSettingRequire#
@}
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.teacher_open_course_merge_course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@ -477,6 +493,9 @@ getValuesByQuery
@if(!isEmpty(teacherOpenCourseQuestionSettingRequire)){
and t.teacher_open_course_question_setting_require =#teacherOpenCourseQuestionSettingRequire#
@}
@if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){
and t.teacher_open_course_merge_course_info_id =#teacherOpenCourseMergeCourseInfoId#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@ -490,7 +509,7 @@ getValuesByQuery
and find_in_set(t.user_id,#userIdPlural#)
@}
analysis
analysisOld
===
* 题目配置,统计分析接口
@ -519,6 +538,35 @@ analysis
AND t.teacher_open_course_id = #teacherOpenCourseId#
AND t.teacher_open_course_question_setting_type = #questionSettingType#
analysis
===
* 题目配置,统计分析接口
select
t.question_log_summary_from_type,
sum(t.question_setting_id) as total_setting_count,
avg(question_setting_total_score) as avg_question_setting_total_score,
avg(question_log_summary_student_total_score) as avg_student_score,
avg(question_log_summary_question_total_count) as question_total_count,
avg(question_log_summary_student_do_count) as avg_question_log_summary_student_do_count,
avg(question_log_summary_success_count) as avg_correct_count,
avg(question_log_summary_error_count) as avg_wrong_count,
avg(question_log_summary_success_rate) as avg_question_log_summary_success_rate,
avg(question_log_summary_is_pass) as avg_question_log_summary_is_pass,
avg(finish_second_time) as avg_finish_second_time
from question_log_summary t
left join teacher_open_course_question_setting ta on ta.teacher_open_course_question_setting_id = t.question_setting_id
where 1 = 1
and t.question_setting_type = #questionSettingType#
and ta.teacher_open_course_question_setting_type = #questionSettingType#
and t.question_log_summary_status = 1
and ta.teacher_open_course_id = #teacherOpenCourseId#
and ta.teacher_open_course_question_setting_status = 1
AND ta.teacher_open_course_question_setting_push_status = 1
group by
question_log_summary_from_type
getQuestionSettingScoreInfo
===
* 查询题目配置页,的分数和用时情况

@ -1,16 +1,14 @@
layui.define(['laydate', 'form', 'laydate', 'table','generalQuestionSettingApi'], function(exports) {
layui.define(['laydate', 'form', 'laydate', 'table','generalQuestionSettingApi','laytpl'], function(exports) {
var form = layui.form;
var generalQuestionSettingApi = layui.generalQuestionSettingApi;
var index = layui.index;
var laydate= layui.laydate;
var classSelectData = [];
var x=$("#xx").data('value')
console.log(x)
var table = layui.table;
var laytpl = layui.laytpl;
var questionTypeGroupInfoTable = null;
var resourcesQuestionTable =null;
var classData = Common.getAjax('/jlw/schoolClass/getValues.json').data;//上课班级多选框data
//班级值获取并处理成{name:xx,value:xx,selected:false}格式
classData.forEach(function (item, index) {
classSelectData[index] = {name: item.className, value: item.classId, selected: false}
});
var xmSeValue = $("#generalQuestionSettingSchoolClassIds").data('value');
var xmSeInitValue = [];
@ -28,26 +26,152 @@ console.log(x)
var xmClassIds = xmSelect.render({
el: '#generalQuestionSettingSchoolClassIds',
name: 'generalQuestionSettingSchoolClassIds',
data: classSelectData,
toolbar: {
show: true,
},
filterable: true,
pageSize: 3,
data: classData,
initValue: xmSeInitValue,//xxxx为你当前的value值
/*theme: {
color: '#1e9fff',
},*/
prop: { // 也许你的数据库返回的并不是name和value, 也许你提交的时候不止name和value, 怎么办? 自定义就行
name: 'className',
value: 'classId'
},
});
if (!$.isEmpty(xmSeValue)) {
if (xmSeValue === "ALL") {
xmClassIds.setValue(classData)
}
}
//日期时间范围
laydate.render({
elem: '#generalQuestionStartTime'
,type: 'date'
,range: true
, trigger: 'click'
, range: "~"
, rigger: 'click'
});
$('#manualProblemSetting').click(function () {//手动出题
layer.open({
type: 1,
title: '在线调试'
,offset: ['100px', '150px']
,content: '<table id="resourcesQuestionTable" lay-filter="resourcesQuestionTable"></table>'
, btn: ['保存', '关闭']
,success:function () {
resourcesQuestionTable();
}
,yes:function () {
}
,btn2:function () {
}
});
});
$('#randomlySetQuestions').click(function () {
console.log("dianj")
});
var view = {
init:function(){
this.initTable();
Lib.initGenrealForm($("#addForm"),form);
this.initSubmit();
},
initTable: function () {
questionTypeGroupInfoTable = table.render({
elem: '#questionTypeGroupInfoTable',
cellMinWidth: 100,
method: 'get',
url: Common.ctxPath + '/jlw/resourcesQuestion/questionTypeGroupInfo.json' // 数据接口
//, page: Lib.tablePage // 开启分页
/*,toolbar: '#toolbar_generalQuestionSetting' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
//, limit: 10,
,totalRow: true
,cols: [[ // 表头
{
field: 'questionTypeText',
title: '题型',
align: "center",
fixed: 'left',
totalRowText: '总计',
rowspan:4
},
{
field: 'totalCount',
title: '总数量',
align: "center",
temple:function (d) {
console.log(d)
}
},
{
field: 'questionNum',
title: '选题量',
align: "center",
totalRow:true
},
{
field: 'questionScore',
title: '分值',
align: "center",
totalRow: true
},
{
field: 'questionTotal',
title: '合计',
align: "center",
totalRow: true
}
]]
});
resourcesQuestionTable= function(){
table.render({
elem: '#resourcesQuestionTable',
cellMinWidth: 100,
method: 'post',
even: true,
size: "sms",
url: Common.ctxPath + '/jlw/resourcesQuestion/list.json' // 数据接口
, page: Lib.tablePage // 开启分页
, limit: 4,
cols: [[ // 表头
{
type: 'checkbox', align: "center"
},
{
field: 'questionStem', width: 320,
title: '题干', align: "center"
},
{
field: 'questionType', align: "center", width: 80,
title: '题型', templet: function (d) {//(1单选 2多选 3判断 4填空 5分析)
return d.questionType == 1 ? '单选' : d.questionType == 2 ? '多选' : d.questionType == 3 ? '判断' : '-';
}
},
{
field: 'courseInfoParentName',
title: '归属课程', align: "center"
},
{
field: 'courseInfoName',
title: '归属章节', align: "center"
},
{
field: 'userId', title: '操作', align: "center", width: 220, templet: function (d) {
// TODO 上下架前端逻辑待开发
return '<a class="layui-table-link" lay-event="del">查看</a>';
}
}
]]
});
}
},
initSubmit:function(){
$("#addButton").click(function(){
form.on('submit(form)', function(){

@ -11,9 +11,7 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
window.classList = Common.postAjax('/jlw/teacherOpenCourseScheduleSessionClass/levelList.json').data;
var teacherOpenCourseScheduleSessionId = $("input[name='teacherOpenCourseScheduleSessionId']").val();//排课id
var classData = Common.getAjax('/jlw/schoolClass/getValues.json').data;//上课班级多选框data
classData.forEach(function (item, index) {
classSelectData[index] = {name: item.className, value: item.classId, selected: false}
});
// 是否多个教室
var isMultipleSessionClass = function() {
return $("#addForm input:radio[name='teacherOpenCourseScheduleSessionClassIsMultiple']:checked").val()
@ -34,11 +32,12 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
var demo1 = xmSelect.render({
el: '#demo1',
name: 'schoolClassIds',
data: classSelectData,
data: classData,
initValue: xmSeInitValue,//xxxx为你当前的value值
/*theme: {
color: '#1e9fff',
},*/
prop: { // 也许你的数据库返回的并不是name和value, 也许你提交的时候不止name和value, 怎么办? 自定义就行
name: 'className',
value: 'classId'
},
});
/*反显开课星期*/
@ -91,6 +90,7 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
,limit: 10000,
page: false
,size:"lg"
, cols: [[
{
type: 'checkbox',

@ -1,6 +1,9 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/generalQuestionSetting/"}){ -->
<link rel="stylesheet" type="text/css" href="${ctxPath}/css/plugin.css?v=${jsVer}" media="all"/>
<form class="layui-form" id="addForm">
<div class="layui-row" style="margin-left: 103px;">
<layui:submitButtons id="addButton" buttonType="" showExamine="2" />
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
@ -11,8 +14,6 @@
</div>
</div>
</div>
<div value="${schoolClassList}" id="xx"></div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
@ -29,40 +30,53 @@
<label class="layui-form-label">题目时间</label>
<div class="layui-input-inline">
<input type="text" autocomplete="off" name="generalQuestionStartTime" id="generalQuestionStartTime" class="layui-input" placeholder="请选择"
value="${generalQuestionSetting.generalQuestionStartTime,"yyyy-MM-dd"} - ${generalQuestionSetting.generalQuestionEndTime,"yyyy-MM-dd"}">
value="${generalQuestionSetting.generalQuestionStartTime,"yyyy-MM-dd"} ~ ${generalQuestionSetting.generalQuestionEndTime,"yyyy-MM-dd"}">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">设置</label>
<label class="layui-form-label">设置</label>
<div class="layui-input-block" style="background-color: #f5f5f5;width: 60%;">
<div class="layui-form-item">
<label class="layui-form-label" style="text-align: left;width: 70px;left: 15px;">作答次数</label>
<div class="layui-input-inline">
<div class="layui-form-item">
<label class="layui-form-label">作答次数</label>
<div class="layui-input-block">
<input type="text" name="generalQuestionSettingDoCount" value="${generalQuestionSetting.generalQuestionSettingDoCount}" class="layui-input" >
</div>
<input type="text" name="generalQuestionSettingDoCount" value="${generalQuestionSetting.generalQuestionSettingDoCount}" class="layui-input" style="width: 50%">
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">题目乱序(同一大题内)</label>
<div class="layui-input-block" value="${generalQuestionSetting.generalQuestionSettingQuestionNoOrder}">
<input type="radio" name="generalQuestionSettingQuestionNoOrder" value="1" title="是">
<input type="radio" name="generalQuestionSettingQuestionNoOrder" value="0" title="否" checked>
</div>
<div class="layui-form-item">
<label class="layui-form-label">题目乱序(同一大题内)</label>
<div class="layui-input-block">
<input type="radio" name="sex" value="男" title="是">
<input type="radio" name="sex" value="女" title="否" checked>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">选择乱序(限单选、多选)</label>
<div class="layui-input-block" value="${generalQuestionSetting.generalQuestionSettingOptionNoOrder}">
<input type="radio" name="generalQuestionSettingOptionNoOrder" value="1" title="是">
<input type="radio" name="generalQuestionSettingOptionNoOrder" value="0" title="否" checked>
</div>
<div class="layui-form-item">
<label class="layui-form-label">题目乱序(同一大题内)</label>
<div class="layui-input-block">
<input type="radio" name="sex" value="男" title="是">
<input type="radio" name="sex" value="女" title="否" checked>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">答卷后显示答案解析</label>
<div class="layui-input-block" value="${generalQuestionSetting.generalQuestionSettingEndShowQa}">
<input type="radio" name="generalQuestionSettingEndShowQa" value="1" title="是">
<input type="radio" name="generalQuestionSettingEndShowQa" value="0" title="否" checked>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">答卷后显示答案对错</label>
<div class="layui-input-block" value="${generalQuestionSetting.generalQuestionSettingEndShowTrueFalse}">
<input type="radio" name="generalQuestionSettingEndShowTrueFalse" value="1" title="是">
<input type="radio" name="generalQuestionSettingEndShowTrueFalse" value="0" title="否" checked>
</div>
</div>
</div>
</div>
</div>
<div class="layui-row" >
@ -70,8 +84,8 @@
<div class="layui-inline">
<label class="layui-form-label">题目设置</label>
<div class="layui-input-block">
<button type="button" class="layui-btn layui-btn-normal">手动出题</button>
<button type="button" class="layui-btn layui-btn-normal">随机出题</button>
<button type="button" class="layui-btn layui-btn-normal" id="manualProblemSetting">手动出题</button>
<button type="button" class="layui-btn layui-btn-normal" id="randomlySetQuestions">随机出题</button>
</div>
</div>
<div class="layui-inline">
@ -79,6 +93,10 @@
</div>
</div>
</div>
<div>
<table id="questionTypeGroupInfoTable" lay-filter="questionTypeGroupInfoTable"></table>
</div>
<!--<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
@ -116,13 +134,13 @@
<div class="layui-inline">
<label class="layui-form-label">题目乱序(同一大题内)</label>
<div class="layui-input-inline">
<input type="text" id="generalQuestionSettingQuestionNoOrder" name="generalQuestionSettingQuestionNoOrder" value="${generalQuestionSetting.generalQuestionSettingQuestionNoOrder}" class="layui-input" >
<input type="text" id="generalQuestionSettingQuestionNoOrder" name="generalQuestionSettingQuestionNoOrder" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">选项乱序(限单选、多选)</label>
<div class="layui-input-inline">
<input type="text" id="generalQuestionSettingOptionNoOrder" name="generalQuestionSettingOptionNoOrder" value="${generalQuestionSetting.generalQuestionSettingOptionNoOrder}" class="layui-input" >
<input type="text" id="generalQuestionSettingOptionNoOrder" class="layui-input" >
</div>
</div>
</div>
@ -132,13 +150,13 @@
<div class="layui-inline">
<label class="layui-form-label">答卷后显示答案解析</label>
<div class="layui-input-inline">
<input type="text" id="generalQuestionSettingEndShowQa" name="generalQuestionSettingEndShowQa" value="${generalQuestionSetting.generalQuestionSettingEndShowQa}" class="layui-input" >
<input type="text" id="generalQuestionSettingEndShowQa" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">答卷后显示答案对错</label>
<div class="layui-input-inline">
<input type="text" id="generalQuestionSettingEndShowTrueFalse" name="generalQuestionSettingEndShowTrueFalse" value="${generalQuestionSetting.generalQuestionSettingEndShowTrueFalse}" class="layui-input" >
<input type="text" id="generalQuestionSettingEndShowTrueFalse" class="layui-input" >
</div>
</div>
</div>
@ -237,7 +255,7 @@
</div>-->
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="generalQuestionSettingId" value="${generalQuestionSetting.generalQuestionSettingId}" />
<layui:submitButtons id="addButton" buttonType="" showExamine="2" />
</form>
<!--#} -->
<script type="text/javascript" src="${ctxPath}/plugins/xm-select.js?v=${jsVer}"></script>

Loading…
Cancel
Save