|
|
|
@ -16,9 +16,11 @@ import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.query.PageParam;
|
|
|
|
|
import com.ibeetl.jlw.entity.FileEntity;
|
|
|
|
|
import com.ibeetl.jlw.entity.GeneralQuestionLog;
|
|
|
|
|
import com.ibeetl.jlw.entity.GeneralQuestionSetting;
|
|
|
|
|
import com.ibeetl.jlw.entity.Student;
|
|
|
|
|
import com.ibeetl.jlw.entity.dto.QuestionLogAddDTO;
|
|
|
|
|
import com.ibeetl.jlw.service.GeneralQuestionLogService;
|
|
|
|
|
import com.ibeetl.jlw.service.GeneralQuestionSettingService;
|
|
|
|
|
import com.ibeetl.jlw.web.query.GeneralQuestionLogQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.GeneralQuestionLogScoreDetailsInfoQuery;
|
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
@ -45,6 +47,7 @@ import java.util.*;
|
|
|
|
|
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.StreamUtils.listJoin;
|
|
|
|
|
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
|
|
|
|
|
import static com.ibeetl.jlw.enums.QuestionLogAddTypeEnum.FINALLY_SUBMIT;
|
|
|
|
|
|
|
|
|
@ -63,6 +66,7 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired private GeneralQuestionLogService generalQuestionLogService;
|
|
|
|
|
@Autowired private GeneralQuestionSettingService generalQuestionSettingService;
|
|
|
|
|
|
|
|
|
|
@Autowired FileService fileService;
|
|
|
|
|
|
|
|
|
@ -239,13 +243,29 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
Assert.notNull(student, "非学生身份,无法获取题目分析!");
|
|
|
|
|
PageQuery query = new PageQuery(pageParam.getPage().longValue(), pageParam.getLimit().longValue());
|
|
|
|
|
query.setPara("studentId", student.getStudentId());
|
|
|
|
|
query.setPara("generalQuestionLogStatus", 1);
|
|
|
|
|
// 只查询收藏的题目
|
|
|
|
|
query.setPara("isTuck", true);
|
|
|
|
|
query.setPara("generalQuestionSettingIdPlural", questionSettingIds);
|
|
|
|
|
return JsonResult.success(generalQuestionLogService.queryByConditionQuery(query));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 通过课程的Ids查询收藏题目
|
|
|
|
|
*
|
|
|
|
|
* @param pageParam 分页
|
|
|
|
|
* @param courseInfoIds 课程IDs
|
|
|
|
|
* @param coreUser 登录用户
|
|
|
|
|
* @return {@link JsonResult}
|
|
|
|
|
* @Author: 87966
|
|
|
|
|
* @Date: 2022/12/1 9:19
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(API + "/tuckListByCourseInfoIds.do")
|
|
|
|
|
public JsonResult tuckListByCourseInfoIds(PageParam pageParam, @RequestParam(required = false) String courseInfoIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
String questionSettingIds = listJoin(generalQuestionSettingService.getByBusinessIds(courseInfoIds), GeneralQuestionSetting::getGeneralQuestionSettingId);
|
|
|
|
|
return tuckList(pageParam, questionSettingIds, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 〈指定的题目配置ID,的收藏夹导出〉
|
|
|
|
@ -258,12 +278,27 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
@GetMapping(API + "/excel/exportTuck.do")
|
|
|
|
|
public void exportTuck(@NotNull(message = "题目配置ID不能为空!") String questionSettingIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
GeneralQuestionLogQuery logQuery = new GeneralQuestionLogQuery();
|
|
|
|
|
logQuery.setGeneralQuestionLogStatus(1);
|
|
|
|
|
logQuery.setIsTuck(true);
|
|
|
|
|
logQuery.setGeneralQuestionSettingIdPlural(questionSettingIds);
|
|
|
|
|
generalQuestionLogService.exportErrorFavorite(request, response, logQuery, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 通过课程IDs导出题目收藏夹
|
|
|
|
|
*
|
|
|
|
|
* @param courseInfoIds 课程IDs
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @Author: lx
|
|
|
|
|
* @Date: 2022/11/30 0:35
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(API + "/excel/exportTuckByCourseInfoIds.do")
|
|
|
|
|
public void exportTuckByCourseInfoIds(@NotNull(message = "题目配置ID不能为空!") String courseInfoIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
String questionSettingIds = listJoin(generalQuestionSettingService.getByBusinessIds(courseInfoIds), GeneralQuestionSetting::getGeneralQuestionSettingId);
|
|
|
|
|
exportDo(questionSettingIds, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量收藏错题库 / 取消收藏错题库
|
|
|
|
|
* @param generalQuestionLogIds 题目日志ID
|
|
|
|
@ -293,7 +328,6 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
Assert.notNull(student, "非学生身份,无法获取题目分析!");
|
|
|
|
|
PageQuery query = new PageQuery(pageParam.getPage().longValue(), pageParam.getLimit().longValue());
|
|
|
|
|
query.setPara("studentId", student.getStudentId());
|
|
|
|
|
query.setPara("generalQuestionLogStatus", 1);
|
|
|
|
|
// 只查询收藏到错题库的题目
|
|
|
|
|
query.setPara("isErrorFavorite", true);
|
|
|
|
|
query.setPara("generalQuestionSettingIdPlural", questionSettingIds);
|
|
|
|
@ -301,6 +335,24 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
return JsonResult.success(generalQuestionLogService.queryByConditionQuery(query));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 查询错题集(错题库)
|
|
|
|
|
* 通过课程IDs查询错题集
|
|
|
|
|
*
|
|
|
|
|
* @param pageParam 分页信息
|
|
|
|
|
* @param courseInfoIds 系统课程IDs
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return {@link JsonResult}
|
|
|
|
|
* @Author: 87966
|
|
|
|
|
* @Date: 2022/12/1 9:13
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(API + "/errorFavoriteListByCourseInfoIds.do")
|
|
|
|
|
public JsonResult errorFavoriteListByCourseInfoIds(PageParam pageParam, String courseInfoIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
String questionSettingIds = listJoin(generalQuestionSettingService.getByBusinessIds(courseInfoIds), GeneralQuestionSetting::getGeneralQuestionSettingId);
|
|
|
|
|
return errorFavoriteList(pageParam, questionSettingIds, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 〈指定的题目配置ID,的错题库导出〉
|
|
|
|
@ -313,12 +365,28 @@ public class GeneralQuestionLogController extends BaseController {
|
|
|
|
|
@GetMapping(API + "/excel/exportErrorFavorite.do")
|
|
|
|
|
public void exportDo(@NotNull(message = "题目配置ID不能为空!") String questionSettingIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
GeneralQuestionLogQuery logQuery = new GeneralQuestionLogQuery();
|
|
|
|
|
logQuery.setGeneralQuestionLogStatus(1);
|
|
|
|
|
logQuery.setIsErrorFavorite(true);
|
|
|
|
|
logQuery.setGeneralQuestionSettingIdPlural(questionSettingIds);
|
|
|
|
|
generalQuestionLogService.exportErrorFavorite(request, response, logQuery, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
* 查询错题集(错题库)
|
|
|
|
|
* 通过课程IDs导出错题库
|
|
|
|
|
*
|
|
|
|
|
* @param courseInfoIds 系统课程IDs
|
|
|
|
|
* @param coreUser
|
|
|
|
|
* @return {@link JsonResult}
|
|
|
|
|
* @Author: 87966
|
|
|
|
|
* @Date: 2022/12/1 9:13
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(API + "/excel/errorFavoriteListByCourseInfoIds.do")
|
|
|
|
|
public void excelErrorFavoriteListByCourseInfoIds(String courseInfoIds, @SCoreUser CoreUser coreUser) {
|
|
|
|
|
String questionSettingIds = listJoin(generalQuestionSettingService.getByBusinessIds(courseInfoIds), GeneralQuestionSetting::getGeneralQuestionSettingId);
|
|
|
|
|
exportDo(questionSettingIds, coreUser);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询分数详细信息(系统,非教师开课)
|
|
|
|
|
* @param query 题目分数查询实体
|
|
|
|
|