Przeglądaj źródła

科目表及考试部分接口

mingfu 1 miesiąc temu
rodzic
commit
44c6102a8f
27 zmienionych plików z 2013 dodań i 18 usunięć
  1. 44 0
      back-ui/src/api/dz/groups.js
  2. 44 0
      back-ui/src/api/dz/subject.js
  3. 272 0
      back-ui/src/views/dz/groups/index.vue
  4. 283 0
      back-ui/src/views/dz/subject/index.vue
  5. 104 0
      ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSelectSubjectController.java
  6. 104 0
      ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSubjectController.java
  7. 192 0
      ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontExamController.java
  8. 71 0
      ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontPaperController.java
  9. 2 2
      ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontSyVocationalController.java
  10. 112 0
      ie-system/src/main/java/com/ruoyi/dz/domain/DzSelectSubject.java
  11. 112 0
      ie-system/src/main/java/com/ruoyi/dz/domain/DzSubject.java
  12. 61 0
      ie-system/src/main/java/com/ruoyi/dz/mapper/DzSelectSubjectMapper.java
  13. 61 0
      ie-system/src/main/java/com/ruoyi/dz/mapper/DzSubjectMapper.java
  14. 61 0
      ie-system/src/main/java/com/ruoyi/dz/service/IDzSelectSubjectService.java
  15. 61 0
      ie-system/src/main/java/com/ruoyi/dz/service/IDzSubjectService.java
  16. 93 0
      ie-system/src/main/java/com/ruoyi/dz/service/impl/DzSelectSubjectServiceImpl.java
  17. 93 0
      ie-system/src/main/java/com/ruoyi/dz/service/impl/DzSubjectServiceImpl.java
  18. 26 0
      ie-system/src/main/java/com/ruoyi/enums/ExamineeStatus.java
  19. 20 9
      ie-system/src/main/java/com/ruoyi/learn/domain/LearnExaminee.java
  20. 17 7
      ie-system/src/main/java/com/ruoyi/learn/domain/LearnTest.java
  21. 8 0
      ie-system/src/main/java/com/ruoyi/learn/mapper/LearnPaperQuestionMapper.java
  22. 2 0
      ie-system/src/main/java/com/ruoyi/learn/mapper/LearnQuestionsMapper.java
  23. 3 0
      ie-system/src/main/java/com/ruoyi/learn/service/ILearnPaperQuestionService.java
  24. 6 0
      ie-system/src/main/java/com/ruoyi/learn/service/impl/LearnPaperQuestionServiceImpl.java
  25. 76 0
      ie-system/src/main/resources/mapper/dz/DzSelectSubjectMapper.xml
  26. 78 0
      ie-system/src/main/resources/mapper/dz/DzSubjectMapper.xml
  27. 7 0
      ie-system/src/main/resources/mapper/learn/LearnQuestionsMapper.xml

+ 44 - 0
back-ui/src/api/dz/groups.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询科目组合列表
+export function listGroups(query) {
+  return request({
+    url: '/dz/groups/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询科目组合详细
+export function getGroups(groupId) {
+  return request({
+    url: '/dz/groups/' + groupId,
+    method: 'get'
+  })
+}
+
+// 新增科目组合
+export function addGroups(data) {
+  return request({
+    url: '/dz/groups',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改科目组合
+export function updateGroups(data) {
+  return request({
+    url: '/dz/groups',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除科目组合
+export function delGroups(groupId) {
+  return request({
+    url: '/dz/groups/' + groupId,
+    method: 'delete'
+  })
+}

+ 44 - 0
back-ui/src/api/dz/subject.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询科目列表
+export function listSubject(query) {
+  return request({
+    url: '/dz/subject/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询科目详细
+export function getSubject(subjectId) {
+  return request({
+    url: '/dz/subject/' + subjectId,
+    method: 'get'
+  })
+}
+
+// 新增科目
+export function addSubject(data) {
+  return request({
+    url: '/dz/subject',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改科目
+export function updateSubject(data) {
+  return request({
+    url: '/dz/subject',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除科目
+export function delSubject(subjectId) {
+  return request({
+    url: '/dz/subject/' + subjectId,
+    method: 'delete'
+  })
+}

+ 272 - 0
back-ui/src/views/dz/groups/index.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="组合名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入组合名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="序号" prop="rank">
+        <el-input
+          v-model="queryParams.rank"
+          placeholder="请输入序号"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="首选科目" prop="course0">
+        <el-input
+          v-model="queryParams.course0"
+          placeholder="请输入首选科目"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="次选科目" prop="course1">
+        <el-input
+          v-model="queryParams.course1"
+          placeholder="请输入次选科目"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          @click="handleAdd"
+          v-hasPermi="['dz:groups:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="Edit"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['dz:groups:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="Delete"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['dz:groups:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="Download"
+          @click="handleExport"
+          v-hasPermi="['dz:groups:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="groupsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="组合id" align="center" prop="groupId" />
+      <el-table-column label="组合名称" align="center" prop="name" />
+      <el-table-column label="序号" align="center" prop="rank" />
+      <el-table-column label="首选科目" align="center" prop="course0" />
+      <el-table-column label="次选科目" align="center" prop="course1" />
+      <el-table-column label="1表3+1+2,2表3+3,3文理科,100职高对口" align="center" prop="newgaokaoType" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template #default="scope">
+          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['dz:groups:edit']">修改</el-button>
+          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['dz:groups:remove']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改科目组合对话框 -->
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+      <el-form ref="groupsRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="组合名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入组合名称" />
+        </el-form-item>
+        <el-form-item label="序号" prop="rank">
+          <el-input v-model="form.rank" placeholder="请输入序号" />
+        </el-form-item>
+        <el-form-item label="首选科目" prop="course0">
+          <el-input v-model="form.course0" placeholder="请输入首选科目" />
+        </el-form-item>
+        <el-form-item label="次选科目" prop="course1">
+          <el-input v-model="form.course1" placeholder="请输入次选科目" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="Groups">
+import { listGroups, getGroups, delGroups, addGroups, updateGroups } from "@/api/dz/groups"
+
+const { proxy } = getCurrentInstance()
+
+const groupsList = ref([])
+const open = ref(false)
+const loading = ref(true)
+const showSearch = ref(true)
+const ids = ref([])
+const single = ref(true)
+const multiple = ref(true)
+const total = ref(0)
+const title = ref("")
+
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    name: null,
+    rank: null,
+    course0: null,
+    course1: null,
+    newgaokaoType: null
+  },
+  rules: {
+  }
+})
+
+const { queryParams, form, rules } = toRefs(data)
+
+/** 查询科目组合列表 */
+function getList() {
+  loading.value = true
+  listGroups(queryParams.value).then(response => {
+    groupsList.value = response.rows
+    total.value = response.total
+    loading.value = false
+  })
+}
+
+// 取消按钮
+function cancel() {
+  open.value = false
+  reset()
+}
+
+// 表单重置
+function reset() {
+  form.value = {
+    groupId: null,
+    name: null,
+    rank: null,
+    course0: null,
+    course1: null,
+    newgaokaoType: null
+  }
+  proxy.resetForm("groupsRef")
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.pageNum = 1
+  getList()
+}
+
+/** 重置按钮操作 */
+function resetQuery() {
+  proxy.resetForm("queryRef")
+  handleQuery()
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.groupId)
+  single.value = selection.length != 1
+  multiple.value = !selection.length
+}
+
+/** 新增按钮操作 */
+function handleAdd() {
+  reset()
+  open.value = true
+  title.value = "添加科目组合"
+}
+
+/** 修改按钮操作 */
+function handleUpdate(row) {
+  reset()
+  const _groupId = row.groupId || ids.value
+  getGroups(_groupId).then(response => {
+    form.value = response.data
+    open.value = true
+    title.value = "修改科目组合"
+  })
+}
+
+/** 提交按钮 */
+function submitForm() {
+  proxy.$refs["groupsRef"].validate(valid => {
+    if (valid) {
+      if (form.value.groupId != null) {
+        updateGroups(form.value).then(response => {
+          proxy.$modal.msgSuccess("修改成功")
+          open.value = false
+          getList()
+        })
+      } else {
+        addGroups(form.value).then(response => {
+          proxy.$modal.msgSuccess("新增成功")
+          open.value = false
+          getList()
+        })
+      }
+    }
+  })
+}
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+  const _groupIds = row.groupId || ids.value
+  proxy.$modal.confirm('是否确认删除科目组合编号为"' + _groupIds + '"的数据项?').then(function() {
+    return delGroups(_groupIds)
+  }).then(() => {
+    getList()
+    proxy.$modal.msgSuccess("删除成功")
+  }).catch(() => {})
+}
+
+/** 导出按钮操作 */
+function handleExport() {
+  proxy.download('dz/groups/export', {
+    ...queryParams.value
+  }, `groups_${new Date().getTime()}.xlsx`)
+}
+
+getList()
+</script>

+ 283 - 0
back-ui/src/views/dz/subject/index.vue

@@ -0,0 +1,283 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="科目名称" prop="subjectName">
+        <el-input
+          v-model="queryParams.subjectName"
+          placeholder="请输入科目名称"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="拼音" prop="pinyin">
+        <el-input
+          v-model="queryParams.pinyin"
+          placeholder="请输入拼音"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="排序" prop="sort">
+        <el-input
+          v-model="queryParams.sort"
+          placeholder="请输入排序"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="适合省份" prop="locations">
+        <el-input
+          v-model="queryParams.locations"
+          placeholder="请输入适合省份"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="适合类别" prop="examTypes">
+        <el-input
+          v-model="queryParams.examTypes"
+          placeholder="请输入适合类别"
+          clearable
+          @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="Plus"
+          @click="handleAdd"
+          v-hasPermi="['dz:subject:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="Edit"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['dz:subject:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="Delete"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['dz:subject:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="Download"
+          @click="handleExport"
+          v-hasPermi="['dz:subject:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="subjectList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="科目ID" align="center" prop="subjectId" />
+      <el-table-column label="科目名称" align="center" prop="subjectName" />
+      <el-table-column label="拼音" align="center" prop="pinyin" />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="适合省份" align="center" prop="locations" />
+      <el-table-column label="适合类别" align="center" prop="examTypes" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template #default="scope">
+          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['dz:subject:edit']">修改</el-button>
+          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['dz:subject:remove']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改科目对话框 -->
+    <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+      <el-form ref="subjectRef" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="科目名称" prop="subjectName">
+          <el-input v-model="form.subjectName" placeholder="请输入科目名称" />
+        </el-form-item>
+        <el-form-item label="拼音" prop="pinyin">
+          <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input v-model="form.sort" placeholder="请输入排序" />
+        </el-form-item>
+        <el-form-item label="适合省份" prop="locations">
+          <el-input v-model="form.locations" placeholder="请输入适合省份" />
+        </el-form-item>
+        <el-form-item label="适合类别" prop="examTypes">
+          <el-input v-model="form.examTypes" placeholder="请输入适合类别" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup name="Subject">
+import { listSubject, getSubject, delSubject, addSubject, updateSubject } from "@/api/dz/subject"
+
+const { proxy } = getCurrentInstance()
+
+const subjectList = ref([])
+const open = ref(false)
+const loading = ref(true)
+const showSearch = ref(true)
+const ids = ref([])
+const single = ref(true)
+const multiple = ref(true)
+const total = ref(0)
+const title = ref("")
+
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    subjectName: null,
+    pinyin: null,
+    sort: null,
+    locations: null,
+    examTypes: null
+  },
+  rules: {
+  }
+})
+
+const { queryParams, form, rules } = toRefs(data)
+
+/** 查询科目列表 */
+function getList() {
+  loading.value = true
+  listSubject(queryParams.value).then(response => {
+    subjectList.value = response.rows
+    total.value = response.total
+    loading.value = false
+  })
+}
+
+// 取消按钮
+function cancel() {
+  open.value = false
+  reset()
+}
+
+// 表单重置
+function reset() {
+  form.value = {
+    subjectId: null,
+    subjectName: null,
+    pinyin: null,
+    sort: null,
+    locations: null,
+    examTypes: null
+  }
+  proxy.resetForm("subjectRef")
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.pageNum = 1
+  getList()
+}
+
+/** 重置按钮操作 */
+function resetQuery() {
+  proxy.resetForm("queryRef")
+  handleQuery()
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.subjectId)
+  single.value = selection.length != 1
+  multiple.value = !selection.length
+}
+
+/** 新增按钮操作 */
+function handleAdd() {
+  reset()
+  open.value = true
+  title.value = "添加科目"
+}
+
+/** 修改按钮操作 */
+function handleUpdate(row) {
+  reset()
+  const _subjectId = row.subjectId || ids.value
+  getSubject(_subjectId).then(response => {
+    form.value = response.data
+    open.value = true
+    title.value = "修改科目"
+  })
+}
+
+/** 提交按钮 */
+function submitForm() {
+  proxy.$refs["subjectRef"].validate(valid => {
+    if (valid) {
+      if (form.value.subjectId != null) {
+        updateSubject(form.value).then(response => {
+          proxy.$modal.msgSuccess("修改成功")
+          open.value = false
+          getList()
+        })
+      } else {
+        addSubject(form.value).then(response => {
+          proxy.$modal.msgSuccess("新增成功")
+          open.value = false
+          getList()
+        })
+      }
+    }
+  })
+}
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+  const _subjectIds = row.subjectId || ids.value
+  proxy.$modal.confirm('是否确认删除科目编号为"' + _subjectIds + '"的数据项?').then(function() {
+    return delSubject(_subjectIds)
+  }).then(() => {
+    getList()
+    proxy.$modal.msgSuccess("删除成功")
+  }).catch(() => {})
+}
+
+/** 导出按钮操作 */
+function handleExport() {
+  proxy.download('dz/subject/export', {
+    ...queryParams.value
+  }, `subject_${new Date().getTime()}.xlsx`)
+}
+
+getList()
+</script>

+ 104 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSelectSubjectController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.dz;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.dz.domain.DzSelectSubject;
+import com.ruoyi.dz.service.IDzSelectSubjectService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 科目组合Controller
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+@RestController
+@RequestMapping("/dz/groups")
+public class DzSelectSubjectController extends BaseController
+{
+    @Autowired
+    private IDzSelectSubjectService dzSelectSubjectService;
+
+    /**
+     * 查询科目组合列表
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DzSelectSubject dzSelectSubject)
+    {
+        startPage();
+        List<DzSelectSubject> list = dzSelectSubjectService.selectDzSelectSubjectList(dzSelectSubject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出科目组合列表
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:export')")
+    @Log(title = "科目组合", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DzSelectSubject dzSelectSubject)
+    {
+        List<DzSelectSubject> list = dzSelectSubjectService.selectDzSelectSubjectList(dzSelectSubject);
+        ExcelUtil<DzSelectSubject> util = new ExcelUtil<DzSelectSubject>(DzSelectSubject.class);
+        util.exportExcel(response, list, "科目组合数据");
+    }
+
+    /**
+     * 获取科目组合详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:query')")
+    @GetMapping(value = "/{groupId}")
+    public AjaxResult getInfo(@PathVariable("groupId") String groupId)
+    {
+        return success(dzSelectSubjectService.selectDzSelectSubjectByGroupId(groupId));
+    }
+
+    /**
+     * 新增科目组合
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:add')")
+    @Log(title = "科目组合", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DzSelectSubject dzSelectSubject)
+    {
+        return toAjax(dzSelectSubjectService.insertDzSelectSubject(dzSelectSubject));
+    }
+
+    /**
+     * 修改科目组合
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:edit')")
+    @Log(title = "科目组合", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DzSelectSubject dzSelectSubject)
+    {
+        return toAjax(dzSelectSubjectService.updateDzSelectSubject(dzSelectSubject));
+    }
+
+    /**
+     * 删除科目组合
+     */
+    @PreAuthorize("@ss.hasPermi('dz:groups:remove')")
+    @Log(title = "科目组合", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{groupIds}")
+    public AjaxResult remove(@PathVariable String[] groupIds)
+    {
+        return toAjax(dzSelectSubjectService.deleteDzSelectSubjectByGroupIds(groupIds));
+    }
+}

+ 104 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSubjectController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.dz;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.dz.domain.DzSubject;
+import com.ruoyi.dz.service.IDzSubjectService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 科目Controller
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+@RestController
+@RequestMapping("/dz/subject")
+public class DzSubjectController extends BaseController
+{
+    @Autowired
+    private IDzSubjectService dzSubjectService;
+
+    /**
+     * 查询科目列表
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(DzSubject dzSubject)
+    {
+        startPage();
+        List<DzSubject> list = dzSubjectService.selectDzSubjectList(dzSubject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出科目列表
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:export')")
+    @Log(title = "科目", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, DzSubject dzSubject)
+    {
+        List<DzSubject> list = dzSubjectService.selectDzSubjectList(dzSubject);
+        ExcelUtil<DzSubject> util = new ExcelUtil<DzSubject>(DzSubject.class);
+        util.exportExcel(response, list, "科目数据");
+    }
+
+    /**
+     * 获取科目详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:query')")
+    @GetMapping(value = "/{subjectId}")
+    public AjaxResult getInfo(@PathVariable("subjectId") Long subjectId)
+    {
+        return success(dzSubjectService.selectDzSubjectBySubjectId(subjectId));
+    }
+
+    /**
+     * 新增科目
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:add')")
+    @Log(title = "科目", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody DzSubject dzSubject)
+    {
+        return toAjax(dzSubjectService.insertDzSubject(dzSubject));
+    }
+
+    /**
+     * 修改科目
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:edit')")
+    @Log(title = "科目", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody DzSubject dzSubject)
+    {
+        return toAjax(dzSubjectService.updateDzSubject(dzSubject));
+    }
+
+    /**
+     * 删除科目
+     */
+    @PreAuthorize("@ss.hasPermi('dz:subject:remove')")
+    @Log(title = "科目", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{subjectIds}")
+    public AjaxResult remove(@PathVariable Long[] subjectIds)
+    {
+        return toAjax(dzSubjectService.deleteDzSubjectBySubjectIds(subjectIds));
+    }
+}

+ 192 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontExamController.java

@@ -0,0 +1,192 @@
+package com.ruoyi.web.controller.front;
+
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Sets;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.dz.service.IDzControlService;
+import com.ruoyi.enums.ExamineeStatus;
+import com.ruoyi.enums.PaperType;
+import com.ruoyi.ie.domain.AMarjorPlan;
+import com.ruoyi.ie.service.IAMarjorPlanService;
+import com.ruoyi.ie.service.impl.AMarjorPlanServiceImpl;
+import com.ruoyi.learn.domain.LearnExaminee;
+import com.ruoyi.learn.domain.LearnPaper;
+import com.ruoyi.learn.service.ILearnExamineeService;
+import com.ruoyi.learn.service.ILearnPaperQuestionService;
+import com.ruoyi.learn.service.ILearnPaperService;
+import com.ruoyi.system.service.ISysUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.ValidationException;
+import java.util.List;
+import java.util.Set;
+
+@RestController
+@RequestMapping("/front/exam")
+@Api(tags = "前台-学习-考试练习")
+public class FrontExamController {
+    private Set<PaperType> paperTypeSet = Sets.newHashSet(PaperType.Real, PaperType.Custom, PaperType.Test);
+    private final IDzControlService controlService;
+    private final ISysUserService sysUserService;
+    private final ILearnPaperService paperService;
+    private final ILearnExamineeService examineeService;
+    private final IAMarjorPlanService marjorPlanService;
+
+    public FrontExamController(IDzControlService controlService, ISysUserService sysUserService, ILearnPaperService paperService, ILearnExamineeService examineeService, IAMarjorPlanService marjorPlanService) {
+        this.controlService = controlService;
+        this.sysUserService = sysUserService;
+        this.paperService = paperService;
+        this.examineeService = examineeService;
+        this.marjorPlanService = marjorPlanService;
+    }
+
+    // 试卷: 真题卷,批次测试卷,自组卷, 生成考试记录
+    // 定向模拟卷: 根据用户选择生成记录
+    // 组卷: 知识点 错题 必刷题 实时组卷后才生成记录
+    @ApiOperation("01 开卷")
+    @GetMapping(value = "openExaminee")
+    public AjaxResult openExamineePaper(@ApiParam("考卷类型PaperType") PaperType paperType,
+                                        @ApiParam("考卷类型关联ID") Long relateId,
+                                        @RequestBody JSONObject param) {
+        LearnPaper paper = paperService.selectLearnPaperById(relateId);
+        LearnExaminee examinee = new LearnExaminee();
+        examinee.setStudentId(SecurityUtils.getLoginUser().getUser().getUserId());
+        examinee.setPaperType(paperType.getVal());
+        if(!paperTypeSet.contains(paperType)) {
+            if(PaperType.Simulated.equals(paperType)) { // 检查是否超过最大值从顺序选择未做过的考卷来
+                return AjaxResult.success(openSimulatedPaper(examinee, param));
+            } else { // 根据几种场景实时组卷,然后返回PaperId
+                return AjaxResult.success(openCustomPaper(paperType, examinee, param));
+            }
+        }
+        examinee.setPaperKey(paperType.name() + "_" + paper.getId());
+        return AjaxResult.success(newExamineePcondaper(examinee, paper, param));
+    }
+
+    private LearnExaminee newExamineePcondaper(LearnExaminee examinee, LearnPaper paper, JSONObject param) {
+        examinee.setPaperId(paper.getId());
+        examinee.setParams(param);
+        examinee.setState(ExamineeStatus.Exam.getVal());
+        examinee.setBeginTime(DateUtils.getNowDate());
+        examineeService.insertLearnExaminee(examinee);
+        return examinee;
+    }
+
+    private LearnExaminee openCustomPaper(PaperType paperType, LearnExaminee examinee, JSONObject param) {
+        Long knowledgeId = param.getLong("knowledgeId");
+        examinee.setPaperKey(paperType.name() + knowledgeId);
+        examinee.setState(ExamineeStatus.Exam.getVal());
+        List<LearnExaminee> examineeList = examineeService.selectLearnExamineeList(examinee);
+        if(CollectionUtils.isNotEmpty(examineeList)) {
+            return examineeList.get(0);
+        }
+        // 全局配置模板参数或知识点级的参数
+        LearnPaper paper = paperService.selectLearnPaperById(0L);
+        if(null == paper) {
+            throw new ValidationException("未组卷");
+        }
+        return newExamineePcondaper(examinee, paper, param);
+    }
+
+    private LearnExaminee openSimulatedPaper(LearnExaminee examinee, JSONObject param) {
+        List<LearnExaminee> examineeList = examineeService.selectLearnExamineeList(examinee);
+        Set<Long> existPaperIdSet = Sets.newHashSet();
+        for(LearnExaminee e : examineeList) {
+            if(ExamineeStatus.Exam.getVal().equals(e.getState())) {
+                return e;
+            }
+            existPaperIdSet.add(e.getPaperId());
+        }
+        Long id = param.getLong("id");
+        AMarjorPlan plan = marjorPlanService.selectAMarjorPlanById(id);
+        if(null == plan) {
+            throw new ValidationException("专业id无效");
+        }
+        LearnPaper paper = getBestPaper(plan, existPaperIdSet);
+        examinee.setPaperKey(PaperType.Simulated.name() + "_" + paper.getId());
+        return newExamineePcondaper(examinee, paper, param);
+    }
+
+    private LearnPaper getBestPaper(AMarjorPlan plan, Set<Long> existPaperIdSet) {
+        String groupName = StringUtils.trimToEmpty(plan.getMajorGroup());
+        LearnPaper paperCond = new LearnPaper();
+        paperCond.setPaperType(PaperType.Simulated.name());
+        for(int i = 3; i>0; i--) {
+            if(i == 3) {
+                paperCond.setDirectKey(plan.getUniversityId() + "_" + groupName + "_" + plan.getMajorName());
+            } else if(i == 2) {
+                paperCond.setDirectKey(plan.getUniversityId() + "_" + groupName);
+            } else if(StringUtils.isBlank(groupName)) {
+                break;
+            }
+            List<LearnPaper> paperList = paperService.selectLearnPaperList(paperCond);
+            for(LearnPaper paper : paperList) {
+                if(existPaperIdSet.add(paper.getId())) {
+                    return paper;
+                }
+            }
+        }
+        throw new ValidationException("未初始化院校定向模拟题库: " + plan.getId());
+    }
+
+    @ApiOperation("04 取答案")
+    @GetMapping(value = "answerExaminee")
+    public AjaxResult loadAnswers(@ApiParam("答卷ID") Long examineeId) {
+        // 检查状态,以决定是否返回答案
+        return AjaxResult.success();
+    }
+
+    /*@ApiOperation("02 答题")
+    @PostMapping(value = "commitExamineeQuestion")
+    public AjaxResult commitExamineeQuestion(@RequestBody PaperDto paperDto) {
+        return adminExaminationService.saveQuestion(paperDto);
+    }
+
+    @ApiOperation("02 交卷")
+    @PostMapping(value = "commitExamineePaper")
+    public AjaxResult commitExamineePaper(@RequestBody PaperDto paperDto) {
+        if (MxjbContants.ExamineeTypeIeValue.equals(paperDto.getExamineeType())) {
+            return mxjbPaperExamService.saveExamPaper(paperDto);
+        }
+        return syTestMajorService.saveTestPaper(paperDto);
+    }
+
+    @ApiOperation("04 阅卷打分")
+    @PostMapping(value = "scoreExamineeQuestions")
+    public AjaxResult scoreExamineeQuestions(@RequestBody PaperDto paperDto) {
+        if (MxjbContants.ExamineeTypeIeValue.equals(paperDto.getExamineeType())) {
+            return mxjbPaperExamService.scoreExamineeQuestion(paperDto, true);
+        }
+        return AjaxResult.error("不支持: " + paperDto.getExamineeType());
+    }
+
+    @ApiOperation("05 阅卷结束")
+    @PostMapping(value = "scoreFinish")
+    public AjaxResult scoreFinish(
+            @ApiParam("考生答卷Id") @RequestParam Long examineeId,
+            @ApiParam("考生类型 1是测评evaluation(default),2是竞赛competitor 3 ai 5 homework 6 ie") @RequestParam(required = false, defaultValue = "1") Integer examineeType) {
+        if (MxjbContants.ExamineeTypeIeValue.equals(examineeType)) {
+            return mxjbPaperExamService.scoreFinish(examineeId);
+        }
+        return AjaxResult.error("不支持: " + examineeType);
+    }
+    @ApiOperation("06 查看题")
+    @GetMapping(value = "openQuestion")
+    public QuestionDto openQuestion(@ApiParam("考生答卷Id") @RequestParam Long examineeId, @ApiParam("考生试题ID") @RequestParam Long questionId,
+                                    @ApiParam("考生类型 1是测评evaluation(default),2是竞赛competitor 3 ai 5 homework 6 ie") @RequestParam(required = false, defaultValue = "1") Integer examineeType) {
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        if (MxjbContants.ExamineeTypeIeValue.equals(examineeType)) {
+            return mxjbPaperExamService.openQuestion(examineeId, loginUser.getUser().getUserId(), questionId);
+        }
+        return new QuestionDto();
+    }
+*/
+}

+ 71 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontPaperController.java

@@ -0,0 +1,71 @@
+package com.ruoyi.web.controller.front;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.core.content.VistorContextHolder;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.dz.domain.DzControl;
+import com.ruoyi.dz.service.IDzControlService;
+import com.ruoyi.enums.PaperType;
+import com.ruoyi.learn.domain.LearnPaper;
+import com.ruoyi.learn.domain.LearnTest;
+import com.ruoyi.learn.service.ILearnPaperQuestionService;
+import com.ruoyi.learn.service.ILearnPaperService;
+import com.ruoyi.learn.service.ILearnTestService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.commons.compress.utils.Lists;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/front/paper")
+@Api(tags = "前台-学习-试卷")
+public class FrontPaperController {
+    private final IDzControlService dzControlService;
+    private final ILearnTestService testService;
+    private final ILearnPaperService paperService;
+    private final ILearnPaperQuestionService paperQuestionService;
+
+    public FrontPaperController(IDzControlService dzControlService, ILearnTestService testService, ILearnPaperService paperService, ILearnPaperQuestionService paperQuestionService) {
+        this.dzControlService = dzControlService;
+        this.testService = testService;
+        this.paperService = paperService;
+        this.paperQuestionService = paperQuestionService;
+    }
+
+    @ApiOperation("01 考试批次")
+    @GetMapping(value = "batch")
+    public List<LearnTest> getBatch() {
+        DzControl dzControl = dzControlService.selectDzControl(VistorContextHolder.getContext());
+        LearnTest cond = new LearnTest();
+        cond.setYear(dzControl.getPlanYear());
+        return testService.selectLearnTestList(cond);
+    }
+
+    @ApiOperation("02 考试科目")
+    @GetMapping(value = "subject")
+    public List<JSONObject> getSubject() {
+        // TODO 生成下载科目ss
+        return Lists.newArrayList();
+    }
+
+    @ApiOperation("03 知识点树")
+    @GetMapping(value = "knownledge")
+    public List<JSONObject> getKnownledge(@ApiParam("科目ID") Long subjectId) {
+        // TODO 生成知识点
+        return Lists.newArrayList();
+    }
+
+    @ApiOperation("04 取试卷")
+    @GetMapping(value = "paper")
+    public AjaxResult loadPaper(@ApiParam("考卷类型PaperType") PaperType type, @ApiParam("考卷标识") Long id) {
+        LearnPaper paper = paperService.selectLearnPaperById(id);
+        JSONObject root = JSONObject.from(paper);
+        root.put("questions", paperQuestionService.selectLearnPaperQuestionById(id));
+        return AjaxResult.success(root);
+    }
+}

+ 2 - 2
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontSyVocationalController.java

@@ -1,8 +1,8 @@
 package com.ruoyi.web.controller.front;
 
 
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;

+ 112 - 0
ie-system/src/main/java/com/ruoyi/dz/domain/DzSelectSubject.java

@@ -0,0 +1,112 @@
+package com.ruoyi.dz.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 科目组合对象 dz_select_subject
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public class DzSelectSubject extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 组合id */
+    private String groupId;
+
+    /** 组合名称 */
+    @Excel(name = "组合名称")
+    private String name;
+
+    /** 序号 */
+    @Excel(name = "序号")
+    private Long rank;
+
+    /** 首选科目 */
+    @Excel(name = "首选科目")
+    private String course0;
+
+    /** 次选科目 */
+    @Excel(name = "次选科目")
+    private String course1;
+
+    /** 1表3+1+2,2表3+3,3文理科,100职高对口 */
+    @Excel(name = "1表3+1+2,2表3+3,3文理科,100职高对口")
+    private String newgaokaoType;
+
+    public void setGroupId(String groupId) 
+    {
+        this.groupId = groupId;
+    }
+
+    public String getGroupId() 
+    {
+        return groupId;
+    }
+
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+
+    public void setRank(Long rank) 
+    {
+        this.rank = rank;
+    }
+
+    public Long getRank() 
+    {
+        return rank;
+    }
+
+    public void setCourse0(String course0) 
+    {
+        this.course0 = course0;
+    }
+
+    public String getCourse0() 
+    {
+        return course0;
+    }
+
+    public void setCourse1(String course1) 
+    {
+        this.course1 = course1;
+    }
+
+    public String getCourse1() 
+    {
+        return course1;
+    }
+
+    public void setNewgaokaoType(String newgaokaoType) 
+    {
+        this.newgaokaoType = newgaokaoType;
+    }
+
+    public String getNewgaokaoType() 
+    {
+        return newgaokaoType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("groupId", getGroupId())
+            .append("name", getName())
+            .append("rank", getRank())
+            .append("course0", getCourse0())
+            .append("course1", getCourse1())
+            .append("newgaokaoType", getNewgaokaoType())
+            .toString();
+    }
+}

+ 112 - 0
ie-system/src/main/java/com/ruoyi/dz/domain/DzSubject.java

@@ -0,0 +1,112 @@
+package com.ruoyi.dz.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 科目对象 dz_subject
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public class DzSubject extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 科目ID */
+    private Long subjectId;
+
+    /** 科目名称 */
+    @Excel(name = "科目名称")
+    private String subjectName;
+
+    /** 拼音 */
+    @Excel(name = "拼音")
+    private String pinyin;
+
+    /** 排序 */
+    @Excel(name = "排序")
+    private Long sort;
+
+    /** 适合省份 */
+    @Excel(name = "适合省份")
+    private String locations;
+
+    /** 适合类别 */
+    @Excel(name = "适合类别")
+    private String examTypes;
+
+    public void setSubjectId(Long subjectId) 
+    {
+        this.subjectId = subjectId;
+    }
+
+    public Long getSubjectId() 
+    {
+        return subjectId;
+    }
+
+    public void setSubjectName(String subjectName) 
+    {
+        this.subjectName = subjectName;
+    }
+
+    public String getSubjectName() 
+    {
+        return subjectName;
+    }
+
+    public void setPinyin(String pinyin) 
+    {
+        this.pinyin = pinyin;
+    }
+
+    public String getPinyin() 
+    {
+        return pinyin;
+    }
+
+    public void setSort(Long sort) 
+    {
+        this.sort = sort;
+    }
+
+    public Long getSort() 
+    {
+        return sort;
+    }
+
+    public void setLocations(String locations) 
+    {
+        this.locations = locations;
+    }
+
+    public String getLocations() 
+    {
+        return locations;
+    }
+
+    public void setExamTypes(String examTypes) 
+    {
+        this.examTypes = examTypes;
+    }
+
+    public String getExamTypes() 
+    {
+        return examTypes;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("subjectId", getSubjectId())
+            .append("subjectName", getSubjectName())
+            .append("pinyin", getPinyin())
+            .append("sort", getSort())
+            .append("locations", getLocations())
+            .append("examTypes", getExamTypes())
+            .toString();
+    }
+}

+ 61 - 0
ie-system/src/main/java/com/ruoyi/dz/mapper/DzSelectSubjectMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.dz.mapper;
+
+import java.util.List;
+import com.ruoyi.dz.domain.DzSelectSubject;
+
+/**
+ * 科目组合Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public interface DzSelectSubjectMapper 
+{
+    /**
+     * 查询科目组合
+     * 
+     * @param groupId 科目组合主键
+     * @return 科目组合
+     */
+    public DzSelectSubject selectDzSelectSubjectByGroupId(String groupId);
+
+    /**
+     * 查询科目组合列表
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 科目组合集合
+     */
+    public List<DzSelectSubject> selectDzSelectSubjectList(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 新增科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    public int insertDzSelectSubject(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 修改科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    public int updateDzSelectSubject(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 删除科目组合
+     * 
+     * @param groupId 科目组合主键
+     * @return 结果
+     */
+    public int deleteDzSelectSubjectByGroupId(String groupId);
+
+    /**
+     * 批量删除科目组合
+     * 
+     * @param groupIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDzSelectSubjectByGroupIds(String[] groupIds);
+}

+ 61 - 0
ie-system/src/main/java/com/ruoyi/dz/mapper/DzSubjectMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.dz.mapper;
+
+import java.util.List;
+import com.ruoyi.dz.domain.DzSubject;
+
+/**
+ * 科目Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public interface DzSubjectMapper 
+{
+    /**
+     * 查询科目
+     * 
+     * @param subjectId 科目主键
+     * @return 科目
+     */
+    public DzSubject selectDzSubjectBySubjectId(Long subjectId);
+
+    /**
+     * 查询科目列表
+     * 
+     * @param dzSubject 科目
+     * @return 科目集合
+     */
+    public List<DzSubject> selectDzSubjectList(DzSubject dzSubject);
+
+    /**
+     * 新增科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    public int insertDzSubject(DzSubject dzSubject);
+
+    /**
+     * 修改科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    public int updateDzSubject(DzSubject dzSubject);
+
+    /**
+     * 删除科目
+     * 
+     * @param subjectId 科目主键
+     * @return 结果
+     */
+    public int deleteDzSubjectBySubjectId(Long subjectId);
+
+    /**
+     * 批量删除科目
+     * 
+     * @param subjectIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDzSubjectBySubjectIds(Long[] subjectIds);
+}

+ 61 - 0
ie-system/src/main/java/com/ruoyi/dz/service/IDzSelectSubjectService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.dz.service;
+
+import java.util.List;
+import com.ruoyi.dz.domain.DzSelectSubject;
+
+/**
+ * 科目组合Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public interface IDzSelectSubjectService 
+{
+    /**
+     * 查询科目组合
+     * 
+     * @param groupId 科目组合主键
+     * @return 科目组合
+     */
+    public DzSelectSubject selectDzSelectSubjectByGroupId(String groupId);
+
+    /**
+     * 查询科目组合列表
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 科目组合集合
+     */
+    public List<DzSelectSubject> selectDzSelectSubjectList(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 新增科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    public int insertDzSelectSubject(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 修改科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    public int updateDzSelectSubject(DzSelectSubject dzSelectSubject);
+
+    /**
+     * 批量删除科目组合
+     * 
+     * @param groupIds 需要删除的科目组合主键集合
+     * @return 结果
+     */
+    public int deleteDzSelectSubjectByGroupIds(String[] groupIds);
+
+    /**
+     * 删除科目组合信息
+     * 
+     * @param groupId 科目组合主键
+     * @return 结果
+     */
+    public int deleteDzSelectSubjectByGroupId(String groupId);
+}

+ 61 - 0
ie-system/src/main/java/com/ruoyi/dz/service/IDzSubjectService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.dz.service;
+
+import java.util.List;
+import com.ruoyi.dz.domain.DzSubject;
+
+/**
+ * 科目Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+public interface IDzSubjectService 
+{
+    /**
+     * 查询科目
+     * 
+     * @param subjectId 科目主键
+     * @return 科目
+     */
+    public DzSubject selectDzSubjectBySubjectId(Long subjectId);
+
+    /**
+     * 查询科目列表
+     * 
+     * @param dzSubject 科目
+     * @return 科目集合
+     */
+    public List<DzSubject> selectDzSubjectList(DzSubject dzSubject);
+
+    /**
+     * 新增科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    public int insertDzSubject(DzSubject dzSubject);
+
+    /**
+     * 修改科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    public int updateDzSubject(DzSubject dzSubject);
+
+    /**
+     * 批量删除科目
+     * 
+     * @param subjectIds 需要删除的科目主键集合
+     * @return 结果
+     */
+    public int deleteDzSubjectBySubjectIds(Long[] subjectIds);
+
+    /**
+     * 删除科目信息
+     * 
+     * @param subjectId 科目主键
+     * @return 结果
+     */
+    public int deleteDzSubjectBySubjectId(Long subjectId);
+}

+ 93 - 0
ie-system/src/main/java/com/ruoyi/dz/service/impl/DzSelectSubjectServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.dz.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.dz.mapper.DzSelectSubjectMapper;
+import com.ruoyi.dz.domain.DzSelectSubject;
+import com.ruoyi.dz.service.IDzSelectSubjectService;
+
+/**
+ * 科目组合Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+@Service
+public class DzSelectSubjectServiceImpl implements IDzSelectSubjectService 
+{
+    @Autowired
+    private DzSelectSubjectMapper dzSelectSubjectMapper;
+
+    /**
+     * 查询科目组合
+     * 
+     * @param groupId 科目组合主键
+     * @return 科目组合
+     */
+    @Override
+    public DzSelectSubject selectDzSelectSubjectByGroupId(String groupId)
+    {
+        return dzSelectSubjectMapper.selectDzSelectSubjectByGroupId(groupId);
+    }
+
+    /**
+     * 查询科目组合列表
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 科目组合
+     */
+    @Override
+    public List<DzSelectSubject> selectDzSelectSubjectList(DzSelectSubject dzSelectSubject)
+    {
+        return dzSelectSubjectMapper.selectDzSelectSubjectList(dzSelectSubject);
+    }
+
+    /**
+     * 新增科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    @Override
+    public int insertDzSelectSubject(DzSelectSubject dzSelectSubject)
+    {
+        return dzSelectSubjectMapper.insertDzSelectSubject(dzSelectSubject);
+    }
+
+    /**
+     * 修改科目组合
+     * 
+     * @param dzSelectSubject 科目组合
+     * @return 结果
+     */
+    @Override
+    public int updateDzSelectSubject(DzSelectSubject dzSelectSubject)
+    {
+        return dzSelectSubjectMapper.updateDzSelectSubject(dzSelectSubject);
+    }
+
+    /**
+     * 批量删除科目组合
+     * 
+     * @param groupIds 需要删除的科目组合主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDzSelectSubjectByGroupIds(String[] groupIds)
+    {
+        return dzSelectSubjectMapper.deleteDzSelectSubjectByGroupIds(groupIds);
+    }
+
+    /**
+     * 删除科目组合信息
+     * 
+     * @param groupId 科目组合主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDzSelectSubjectByGroupId(String groupId)
+    {
+        return dzSelectSubjectMapper.deleteDzSelectSubjectByGroupId(groupId);
+    }
+}

+ 93 - 0
ie-system/src/main/java/com/ruoyi/dz/service/impl/DzSubjectServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.dz.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.dz.mapper.DzSubjectMapper;
+import com.ruoyi.dz.domain.DzSubject;
+import com.ruoyi.dz.service.IDzSubjectService;
+
+/**
+ * 科目Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-09-27
+ */
+@Service
+public class DzSubjectServiceImpl implements IDzSubjectService 
+{
+    @Autowired
+    private DzSubjectMapper dzSubjectMapper;
+
+    /**
+     * 查询科目
+     * 
+     * @param subjectId 科目主键
+     * @return 科目
+     */
+    @Override
+    public DzSubject selectDzSubjectBySubjectId(Long subjectId)
+    {
+        return dzSubjectMapper.selectDzSubjectBySubjectId(subjectId);
+    }
+
+    /**
+     * 查询科目列表
+     * 
+     * @param dzSubject 科目
+     * @return 科目
+     */
+    @Override
+    public List<DzSubject> selectDzSubjectList(DzSubject dzSubject)
+    {
+        return dzSubjectMapper.selectDzSubjectList(dzSubject);
+    }
+
+    /**
+     * 新增科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    @Override
+    public int insertDzSubject(DzSubject dzSubject)
+    {
+        return dzSubjectMapper.insertDzSubject(dzSubject);
+    }
+
+    /**
+     * 修改科目
+     * 
+     * @param dzSubject 科目
+     * @return 结果
+     */
+    @Override
+    public int updateDzSubject(DzSubject dzSubject)
+    {
+        return dzSubjectMapper.updateDzSubject(dzSubject);
+    }
+
+    /**
+     * 批量删除科目
+     * 
+     * @param subjectIds 需要删除的科目主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDzSubjectBySubjectIds(Long[] subjectIds)
+    {
+        return dzSubjectMapper.deleteDzSubjectBySubjectIds(subjectIds);
+    }
+
+    /**
+     * 删除科目信息
+     * 
+     * @param subjectId 科目主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDzSubjectBySubjectId(Long subjectId)
+    {
+        return dzSubjectMapper.deleteDzSubjectBySubjectId(subjectId);
+    }
+}

+ 26 - 0
ie-system/src/main/java/com/ruoyi/enums/ExamineeStatus.java

@@ -0,0 +1,26 @@
+package com.ruoyi.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Getter
+@AllArgsConstructor
+public enum ExamineeStatus {
+    Init(1, "空卷"), Sign(2, "签到"), Exam(3, "考试"), Commit(4, "交卷"),
+    Review(5, "阅卷"), Publish(6, "发布"), Close(7, "关卷");
+
+    private final Integer val;
+    private final String title;
+
+    private static final Map<Integer, ExamineeStatus> valMap = Arrays.stream(ExamineeStatus.values()).collect(Collectors.toMap(ExamineeStatus::getVal, Function.identity()));
+
+    public static ExamineeStatus of(Integer vol) {
+        return valMap.get(vol);
+    }
+}
+

+ 20 - 9
ie-system/src/main/java/com/ruoyi/learn/domain/LearnExaminee.java

@@ -26,12 +26,15 @@ public class LearnExaminee extends BaseEntity
 
     /** 试卷类型 */
     @Excel(name = "试卷类型")
-    private Long paperType;
+    private Integer paperType;
 
     /** 试卷id */
     @Excel(name = "试卷id")
     private Long paperId;
 
+    @Excel(name = "试卷标识")
+    private String paperKey;
+
     /** 开始时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -42,9 +45,9 @@ public class LearnExaminee extends BaseEntity
     @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date endTime;
 
-    /** 未答题, 已答题, 通过, 未通过 */
-    @Excel(name = "未答题, 已答题, 通过, 未通过")
-    private Long state;
+    /** ExamineeStatus */
+    @Excel(name = "考卷状态 ExamineeStatus ")
+    private Integer state;
 
     /** 分级 */
     @Excel(name = "分级")
@@ -102,12 +105,12 @@ public class LearnExaminee extends BaseEntity
         return studentId;
     }
 
-    public void setPaperType(Long paperType) 
+    public void setPaperType(Integer paperType)
     {
         this.paperType = paperType;
     }
 
-    public Long getPaperType() 
+    public Integer getPaperType()
     {
         return paperType;
     }
@@ -122,7 +125,15 @@ public class LearnExaminee extends BaseEntity
         return paperId;
     }
 
-    public void setBeginTime(Date beginTime) 
+    public String getPaperKey() {
+        return paperKey;
+    }
+
+    public void setPaperKey(String paperKey) {
+        this.paperKey = paperKey;
+    }
+
+    public void setBeginTime(Date beginTime)
     {
         this.beginTime = beginTime;
     }
@@ -142,12 +153,12 @@ public class LearnExaminee extends BaseEntity
         return endTime;
     }
 
-    public void setState(Long state) 
+    public void setState(Integer state)
     {
         this.state = state;
     }
 
-    public Long getState() 
+    public Integer getState()
     {
         return state;
     }

+ 17 - 7
ie-system/src/main/java/com/ruoyi/learn/domain/LearnTest.java

@@ -16,7 +16,11 @@ public class LearnTest extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 考卷批次 */
-    private String batchId;
+    private Long batchId;
+
+    /** 批次名称 */
+    @Excel(name = "批次名称")
+    private Integer year;
 
     /** 批次名称 */
     @Excel(name = "批次名称")
@@ -26,17 +30,23 @@ public class LearnTest extends BaseEntity
     @Excel(name = "创建人")
     private Long creatorId;
 
-    public void setBatchId(String batchId) 
-    {
+    public Long getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(Long batchId) {
         this.batchId = batchId;
     }
 
-    public String getBatchId() 
-    {
-        return batchId;
+    public Integer getYear() {
+        return year;
+    }
+
+    public void setYear(Integer year) {
+        this.year = year;
     }
 
-    public void setName(String name) 
+    public void setName(String name)
     {
         this.name = name;
     }

+ 8 - 0
ie-system/src/main/java/com/ruoyi/learn/mapper/LearnPaperQuestionMapper.java

@@ -2,6 +2,7 @@ package com.ruoyi.learn.mapper;
 
 import java.util.List;
 import com.ruoyi.learn.domain.LearnPaperQuestion;
+import com.ruoyi.learn.domain.LearnQuestions;
 
 /**
  * 试卷题关系Mapper接口
@@ -58,4 +59,11 @@ public interface LearnPaperQuestionMapper
      * @return 结果
      */
     public int deleteLearnPaperQuestionByIds(Long[] ids);
+
+    /**
+     * 查询卷的题
+     * @param paperId
+     * @return
+     */
+    public List<LearnQuestions> selectQuestionByPaperId(Long paperId);
 }

+ 2 - 0
ie-system/src/main/java/com/ruoyi/learn/mapper/LearnQuestionsMapper.java

@@ -58,4 +58,6 @@ public interface LearnQuestionsMapper
      * @return 结果
      */
     public int deleteLearnQuestionsByIds(Long[] ids);
+
+    public List<LearnQuestions> selectQuestionByPaperId(Long paperId);
 }

+ 3 - 0
ie-system/src/main/java/com/ruoyi/learn/service/ILearnPaperQuestionService.java

@@ -2,6 +2,7 @@ package com.ruoyi.learn.service;
 
 import java.util.List;
 import com.ruoyi.learn.domain.LearnPaperQuestion;
+import com.ruoyi.learn.domain.LearnQuestions;
 
 /**
  * 试卷题关系Service接口
@@ -58,4 +59,6 @@ public interface ILearnPaperQuestionService
      * @return 结果
      */
     public int deleteLearnPaperQuestionById(Long id);
+
+    public List<LearnQuestions> selectQuestionByPaperId(Long paperId);
 }

+ 6 - 0
ie-system/src/main/java/com/ruoyi/learn/service/impl/LearnPaperQuestionServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.learn.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.learn.domain.LearnQuestions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.learn.mapper.LearnPaperQuestionMapper;
@@ -92,4 +93,9 @@ public class LearnPaperQuestionServiceImpl implements ILearnPaperQuestionService
     {
         return learnPaperQuestionMapper.deleteLearnPaperQuestionById(id);
     }
+
+    @Override
+    public List<LearnQuestions> selectQuestionByPaperId(Long paperId) {
+        return learnPaperQuestionMapper.selectQuestionByPaperId(paperId);
+    }
 }

+ 76 - 0
ie-system/src/main/resources/mapper/dz/DzSelectSubjectMapper.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.dz.mapper.DzSelectSubjectMapper">
+    
+    <resultMap type="DzSelectSubject" id="DzSelectSubjectResult">
+        <result property="groupId"    column="group_id"    />
+        <result property="name"    column="name"    />
+        <result property="rank"    column="rank"    />
+        <result property="course0"    column="course0"    />
+        <result property="course1"    column="course1"    />
+        <result property="newgaokaoType"    column="newgaokao_type"    />
+    </resultMap>
+
+    <sql id="selectDzSelectSubjectVo">
+        select group_id, name, rank, course0, course1, newgaokao_type from dz_select_subject
+    </sql>
+
+    <select id="selectDzSelectSubjectList" parameterType="DzSelectSubject" resultMap="DzSelectSubjectResult">
+        <include refid="selectDzSelectSubjectVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="rank != null "> and rank = #{rank}</if>
+            <if test="course0 != null  and course0 != ''"> and course0 = #{course0}</if>
+            <if test="course1 != null  and course1 != ''"> and course1 = #{course1}</if>
+            <if test="newgaokaoType != null  and newgaokaoType != ''"> and newgaokao_type = #{newgaokaoType}</if>
+        </where>
+    </select>
+    
+    <select id="selectDzSelectSubjectByGroupId" parameterType="String" resultMap="DzSelectSubjectResult">
+        <include refid="selectDzSelectSubjectVo"/>
+        where group_id = #{groupId}
+    </select>
+
+    <insert id="insertDzSelectSubject" parameterType="DzSelectSubject" useGeneratedKeys="true" keyProperty="groupId">
+        insert into dz_select_subject
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="rank != null">rank,</if>
+            <if test="course0 != null">course0,</if>
+            <if test="course1 != null">course1,</if>
+            <if test="newgaokaoType != null">newgaokao_type,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="rank != null">#{rank},</if>
+            <if test="course0 != null">#{course0},</if>
+            <if test="course1 != null">#{course1},</if>
+            <if test="newgaokaoType != null">#{newgaokaoType},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDzSelectSubject" parameterType="DzSelectSubject">
+        update dz_select_subject
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="rank != null">rank = #{rank},</if>
+            <if test="course0 != null">course0 = #{course0},</if>
+            <if test="course1 != null">course1 = #{course1},</if>
+            <if test="newgaokaoType != null">newgaokao_type = #{newgaokaoType},</if>
+        </trim>
+        where group_id = #{groupId}
+    </update>
+
+    <delete id="deleteDzSelectSubjectByGroupId" parameterType="String">
+        delete from dz_select_subject where group_id = #{groupId}
+    </delete>
+
+    <delete id="deleteDzSelectSubjectByGroupIds" parameterType="String">
+        delete from dz_select_subject where group_id in 
+        <foreach item="groupId" collection="array" open="(" separator="," close=")">
+            #{groupId}
+        </foreach>
+    </delete>
+</mapper>

+ 78 - 0
ie-system/src/main/resources/mapper/dz/DzSubjectMapper.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.dz.mapper.DzSubjectMapper">
+    
+    <resultMap type="DzSubject" id="DzSubjectResult">
+        <result property="subjectId"    column="subject_id"    />
+        <result property="subjectName"    column="subject_name"    />
+        <result property="pinyin"    column="pinyin"    />
+        <result property="sort"    column="sort"    />
+        <result property="locations"    column="locations"    />
+        <result property="examTypes"    column="exam_types"    />
+    </resultMap>
+
+    <sql id="selectDzSubjectVo">
+        select subject_id, subject_name, pinyin, sort, locations, exam_types from dz_subject
+    </sql>
+
+    <select id="selectDzSubjectList" parameterType="DzSubject" resultMap="DzSubjectResult">
+        <include refid="selectDzSubjectVo"/>
+        <where>  
+            <if test="subjectName != null  and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
+            <if test="pinyin != null  and pinyin != ''"> and pinyin = #{pinyin}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+            <if test="locations != null  and locations != ''"> and locations = #{locations}</if>
+            <if test="examTypes != null  and examTypes != ''"> and exam_types = #{examTypes}</if>
+        </where>
+    </select>
+    
+    <select id="selectDzSubjectBySubjectId" parameterType="Long" resultMap="DzSubjectResult">
+        <include refid="selectDzSubjectVo"/>
+        where subject_id = #{subjectId}
+    </select>
+
+    <insert id="insertDzSubject" parameterType="DzSubject">
+        insert into dz_subject
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="subjectId != null">subject_id,</if>
+            <if test="subjectName != null">subject_name,</if>
+            <if test="pinyin != null">pinyin,</if>
+            <if test="sort != null">sort,</if>
+            <if test="locations != null">locations,</if>
+            <if test="examTypes != null">exam_types,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="pinyin != null">#{pinyin},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="locations != null">#{locations},</if>
+            <if test="examTypes != null">#{examTypes},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDzSubject" parameterType="DzSubject">
+        update dz_subject
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="pinyin != null">pinyin = #{pinyin},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="locations != null">locations = #{locations},</if>
+            <if test="examTypes != null">exam_types = #{examTypes},</if>
+        </trim>
+        where subject_id = #{subjectId}
+    </update>
+
+    <delete id="deleteDzSubjectBySubjectId" parameterType="Long">
+        delete from dz_subject where subject_id = #{subjectId}
+    </delete>
+
+    <delete id="deleteDzSubjectBySubjectIds" parameterType="String">
+        delete from dz_subject where subject_id in 
+        <foreach item="subjectId" collection="array" open="(" separator="," close=")">
+            #{subjectId}
+        </foreach>
+    </delete>
+</mapper>

+ 7 - 0
ie-system/src/main/resources/mapper/learn/LearnQuestionsMapper.xml

@@ -267,4 +267,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectQuestionByPaperId" parameterType="Long" resultMap="LearnQuestionsResult">
+        select q.`id`, pq.`seq`, pq.`score`, title, option_a, option_b, option_c, option_d, option_e, option_f, option_g, qtpye, diff, similarity, isSub, paperTypeTitle, title0
+          from learn_paper_question pq join `learn_questions` q on q.`id` = pq.`question_id`
+          where pq.`paper_id` = #{paperId}
+          order by pq.`seq`, q.`id`
+    </select>
 </mapper>