From 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 14 五月 2025 15:50:57 +0800
Subject: [PATCH] bug:学员有状态不能修改问题
---
src/main/java/com/mindskip/xzs/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/mindskip/xzs/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java b/src/main/java/com/mindskip/xzs/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
index 1b2997f..73cb064 100644
--- a/src/main/java/com/mindskip/xzs/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
+++ b/src/main/java/com/mindskip/xzs/service/impl/ExamPaperQuestionCustomerAnswerServiceImpl.java
@@ -10,11 +10,13 @@
import com.mindskip.xzs.service.TextContentService;
import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.ExamUtil;
+import com.mindskip.xzs.utility.HtmlUtil;
import com.mindskip.xzs.utility.JsonUtil;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
+import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -37,9 +39,11 @@
@Override
- public PageInfo<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM requestVM) {
- return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() ->
- examPaperQuestionCustomerAnswerMapper.studentPage(requestVM)
+ public PageInfo<QuestionPageStudentResponseVM> studentPage(QuestionPageStudentRequestVM requestVM) {
+ return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize()).doSelectPageInfo(() ->
+ examPaperQuestionCustomerAnswerMapper.studentPage(requestVM).stream().peek(
+ q -> q.setShortTitle(HtmlUtil.clear(q.getShortTitle()))
+ ).collect(Collectors.toList())
);
}
@@ -68,15 +72,15 @@
}
@Override
- public Integer selectAllCount() {
- return examPaperQuestionCustomerAnswerMapper.selectAllCount();
+ public Integer selectAllCount(List<Integer> deptIds) {
+ return examPaperQuestionCustomerAnswerMapper.selectAllCount(deptIds);
}
@Override
- public List<Integer> selectMothCount() {
+ public List<Integer> selectMothCount(List<Integer> deptIds) {
Date startTime = DateTimeUtil.getMonthStartDay();
Date endTime = DateTimeUtil.getMonthEndDay();
- List<KeyValue> mouthCount = examPaperQuestionCustomerAnswerMapper.selectCountByDate(startTime, endTime);
+ List<KeyValue> mouthCount = examPaperQuestionCustomerAnswerMapper.selectCountByDate(startTime, endTime, deptIds);
List<String> mothStartToNowFormat = DateTimeUtil.MothStartToNowFormat();
return mothStartToNowFormat.stream().map(md -> {
KeyValue keyValue = mouthCount.stream().filter(kv -> kv.getName().equals(md)).findAny().orElse(null);
--
Gitblit v1.8.0