diff --git a/source/vue/xzs-admin/src/api/examPaperAnwser.js b/source/vue/xzs-admin/src/api/examPaperAnwser.js
new file mode 100644
index 0000000..c10dd2a
--- /dev/null
+++ b/source/vue/xzs-admin/src/api/examPaperAnwser.js
@@ -0,0 +1,5 @@
+import { post } from '@/utils/request'
+
+export default {
+ page: query => post('/api/admin/examPaperAnswer/page', query)
+}
diff --git a/source/vue/xzs-admin/src/icons/svg/answer.svg b/source/vue/xzs-admin/src/icons/svg/answer.svg
new file mode 100644
index 0000000..546d787
--- /dev/null
+++ b/source/vue/xzs-admin/src/icons/svg/answer.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/vue/xzs-admin/src/router.js b/source/vue/xzs-admin/src/router.js
index 12e2010..b567245 100644
--- a/source/vue/xzs-admin/src/router.js
+++ b/source/vue/xzs-admin/src/router.js
@@ -187,6 +187,24 @@ const constantRoutes = [
}
]
},
+ {
+ path: '/answer',
+ component: Layout,
+ name: 'AnswerPage',
+ meta: {
+ title: '成绩管理',
+ icon: 'answer'
+ },
+ alwaysShow: true,
+ children: [
+ {
+ path: 'list',
+ component: () => import('@/views/answer/list'),
+ name: 'AnswerPageList',
+ meta: { title: '答卷列表', noCache: true }
+ }
+ ]
+ },
{
path: '/message',
component: Layout,
diff --git a/source/vue/xzs-admin/src/views/answer/list.vue b/source/vue/xzs-admin/src/views/answer/list.vue
new file mode 100644
index 0000000..0abe28a
--- /dev/null
+++ b/source/vue/xzs-admin/src/views/answer/list.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+ {{row.userScore}} / {{row.paperScore}}
+
+
+
+
+ {{row.questionCorrect}} / {{row.questionCount}}
+
+
+
+
+
+
+
+
+
+
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/controller/admin/ExamPaperAnswerController.java b/source/xzs/src/main/java/com/mindskip/xzs/controller/admin/ExamPaperAnswerController.java
new file mode 100644
index 0000000..0121c11
--- /dev/null
+++ b/source/xzs/src/main/java/com/mindskip/xzs/controller/admin/ExamPaperAnswerController.java
@@ -0,0 +1,54 @@
+package com.mindskip.xzs.controller.admin;
+
+import com.mindskip.xzs.base.BaseApiController;
+import com.mindskip.xzs.base.RestResponse;
+import com.mindskip.xzs.domain.ExamPaperAnswer;
+import com.mindskip.xzs.domain.Subject;
+import com.mindskip.xzs.domain.User;
+import com.mindskip.xzs.service.*;
+import com.mindskip.xzs.utility.DateTimeUtil;
+import com.mindskip.xzs.utility.ExamUtil;
+import com.mindskip.xzs.utility.PageInfoHelper;
+import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
+import com.mindskip.xzs.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController("AdminExamPaperAnswerController")
+@RequestMapping(value = "/api/admin/examPaperAnswer")
+public class ExamPaperAnswerController extends BaseApiController {
+
+ private final ExamPaperAnswerService examPaperAnswerService;
+ private final SubjectService subjectService;
+ private final UserService userService;
+
+ @Autowired
+ public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, SubjectService subjectService, UserService userService) {
+ this.examPaperAnswerService = examPaperAnswerService;
+ this.subjectService = subjectService;
+ this.userService = userService;
+ }
+
+
+ @RequestMapping(value = "/page", method = RequestMethod.POST)
+ public RestResponse> pageJudgeList(@RequestBody ExamPaperAnswerPageRequestVM model) {
+ PageInfo pageInfo = examPaperAnswerService.adminPage(model);
+ PageInfo page = PageInfoHelper.copyMap(pageInfo, e -> {
+ ExamPaperAnswerPageResponseVM vm = modelMapper.map(e, ExamPaperAnswerPageResponseVM.class);
+ Subject subject = subjectService.selectById(vm.getSubjectId());
+ vm.setDoTime(ExamUtil.secondToVM(e.getDoTime()));
+ vm.setSystemScore(ExamUtil.scoreToVM(e.getSystemScore()));
+ vm.setUserScore(ExamUtil.scoreToVM(e.getUserScore()));
+ vm.setPaperScore(ExamUtil.scoreToVM(e.getPaperScore()));
+ vm.setSubjectName(subject.getName());
+ vm.setCreateTime(DateTimeUtil.dateFormat(e.getCreateTime()));
+ User user = userService.selectById(e.getCreateUser());
+ vm.setUserName(user.getUserName());
+ return vm;
+ });
+ return RestResponse.ok(page);
+ }
+
+
+}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/repository/ExamPaperAnswerMapper.java b/source/xzs/src/main/java/com/mindskip/xzs/repository/ExamPaperAnswerMapper.java
index c5e0984..a39dbf4 100644
--- a/source/xzs/src/main/java/com/mindskip/xzs/repository/ExamPaperAnswerMapper.java
+++ b/source/xzs/src/main/java/com/mindskip/xzs/repository/ExamPaperAnswerMapper.java
@@ -31,4 +31,5 @@ public interface ExamPaperAnswerMapper extends BaseMapper {
ExamPaperAnswer getByPidUid(@Param("pid") Integer paperId, @Param("uid") Integer uid);
+ List adminPage(com.mindskip.xzs.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM requestVM);
}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/service/ExamPaperAnswerService.java b/source/xzs/src/main/java/com/mindskip/xzs/service/ExamPaperAnswerService.java
index 02da6dc..11f2a2f 100644
--- a/source/xzs/src/main/java/com/mindskip/xzs/service/ExamPaperAnswerService.java
+++ b/source/xzs/src/main/java/com/mindskip/xzs/service/ExamPaperAnswerService.java
@@ -48,4 +48,6 @@ public interface ExamPaperAnswerService extends BaseService {
Integer selectAllCount();
List selectMothCount();
+
+ PageInfo adminPage(com.mindskip.xzs.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM requestVM);
}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExamPaperAnswerServiceImpl.java b/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExamPaperAnswerServiceImpl.java
index 0345b3e..1815142 100644
--- a/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExamPaperAnswerServiceImpl.java
+++ b/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExamPaperAnswerServiceImpl.java
@@ -268,4 +268,11 @@ public class ExamPaperAnswerServiceImpl extends BaseServiceImpl
}
return examPaperAnswer;
}
+
+
+ @Override
+ public PageInfo adminPage(com.mindskip.xzs.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM requestVM) {
+ return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() ->
+ examPaperAnswerMapper.adminPage(requestVM));
+ }
}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamAnswerResponseVM.java b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamAnswerResponseVM.java
new file mode 100644
index 0000000..da6677f
--- /dev/null
+++ b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamAnswerResponseVM.java
@@ -0,0 +1,94 @@
+package com.mindskip.xzs.viewmodel.admin.paper;
+
+
+public class ExamAnswerResponseVM {
+ private Integer id;
+
+ private String name;
+
+ private Integer questionCount;
+
+ private Integer score;
+
+ private String createTime;
+
+ private Integer createUser;
+
+ private Integer subjectId;
+
+ private Integer paperType;
+
+ private Integer frameTextContentId;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getQuestionCount() {
+ return questionCount;
+ }
+
+ public void setQuestionCount(Integer questionCount) {
+ this.questionCount = questionCount;
+ }
+
+ public Integer getScore() {
+ return score;
+ }
+
+ public void setScore(Integer score) {
+ this.score = score;
+ }
+
+ public String getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public Integer getCreateUser() {
+ return createUser;
+ }
+
+ public void setCreateUser(Integer createUser) {
+ this.createUser = createUser;
+ }
+
+ public Integer getSubjectId() {
+ return subjectId;
+ }
+
+ public void setSubjectId(Integer subjectId) {
+ this.subjectId = subjectId;
+ }
+
+ public Integer getPaperType() {
+ return paperType;
+ }
+
+ public void setPaperType(Integer paperType) {
+ this.paperType = paperType;
+ }
+
+ public Integer getFrameTextContentId() {
+ return frameTextContentId;
+ }
+
+ public void setFrameTextContentId(Integer frameTextContentId) {
+ this.frameTextContentId = frameTextContentId;
+ }
+}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamPaperAnswerPageRequestVM.java b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamPaperAnswerPageRequestVM.java
new file mode 100644
index 0000000..202794b
--- /dev/null
+++ b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/admin/paper/ExamPaperAnswerPageRequestVM.java
@@ -0,0 +1,15 @@
+package com.mindskip.xzs.viewmodel.admin.paper;
+
+import com.mindskip.xzs.base.BasePage;
+
+public class ExamPaperAnswerPageRequestVM extends BasePage {
+ private Integer subjectId;
+
+ public Integer getSubjectId() {
+ return subjectId;
+ }
+
+ public void setSubjectId(Integer subjectId) {
+ this.subjectId = subjectId;
+ }
+}
diff --git a/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/student/exampaper/ExamPaperAnswerPageResponseVM.java b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/student/exampaper/ExamPaperAnswerPageResponseVM.java
index f81ef9d..33aab1a 100644
--- a/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/student/exampaper/ExamPaperAnswerPageResponseVM.java
+++ b/source/xzs/src/main/java/com/mindskip/xzs/viewmodel/student/exampaper/ExamPaperAnswerPageResponseVM.java
@@ -28,6 +28,8 @@ public class ExamPaperAnswerPageResponseVM {
private String paperName;
+ private String userName;
+
public Integer getId() {
return id;
}
@@ -131,4 +133,13 @@ public class ExamPaperAnswerPageResponseVM {
public void setPaperName(String paperName) {
this.paperName = paperName;
}
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
}
diff --git a/source/xzs/src/main/resources/mapper/ExamPaperAnswerMapper.xml b/source/xzs/src/main/resources/mapper/ExamPaperAnswerMapper.xml
index 3b85680..c1f48f8 100644
--- a/source/xzs/src/main/resources/mapper/ExamPaperAnswerMapper.xml
+++ b/source/xzs/src/main/resources/mapper/ExamPaperAnswerMapper.xml
@@ -251,4 +251,16 @@
limit 1
+
+
+
diff --git a/source/xzs/src/main/resources/static/admin/index.html b/source/xzs/src/main/resources/static/admin/index.html
index 6d1e4a5..5fc3142 100644
--- a/source/xzs/src/main/resources/static/admin/index.html
+++ b/source/xzs/src/main/resources/static/admin/index.html
@@ -13,4 +13,4 @@
hm.src = 'https://hm.baidu.com/hm.js?cd8218cd51f800ed2b73e5751cb3f4f9'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
- })()