111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamPaper;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 试卷Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/paper")
|
||||
public class ExamPaperController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamPaperService examPaperService;
|
||||
|
||||
/**
|
||||
* 查询试卷列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaper examPaper)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaper> list = examPaperService.selectExamPaperList(examPaper);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:export')")
|
||||
@Log(title = "试卷", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamPaper examPaper)
|
||||
{
|
||||
List<ExamPaper> list = examPaperService.selectExamPaperList(examPaper);
|
||||
ExcelUtil<ExamPaper> util = new ExcelUtil<ExamPaper>(ExamPaper.class);
|
||||
return util.exportExcel(list, "paper");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取试卷详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examPaperService.selectExamPaperById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:add')")
|
||||
@Log(title = "试卷", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaper examPaper)
|
||||
{
|
||||
examPaper.setStatus(1);
|
||||
return toAjax(examPaperService.insertExamPaper(examPaper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:edit')")
|
||||
@Log(title = "试卷", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaper examPaper)
|
||||
{
|
||||
return toAjax(examPaperService.updateExamPaper(examPaper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:paper:remove')")
|
||||
@Log(title = "试卷", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examPaperService.deleteExamPaperByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import com.luqj.exam.domain.ChooiseQustion;
|
||||
import com.luqj.exam.domain.ChooiseSearch;
|
||||
import com.luqj.exam.domain.ExamPaperItem;
|
||||
import com.luqj.exam.service.IExamPaperItemService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 试卷明细Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/item")
|
||||
public class ExamPaperItemController extends BaseController {
|
||||
@Autowired
|
||||
private IExamPaperItemService examPaperItemService;
|
||||
|
||||
/**
|
||||
* 查询试卷明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaperItem examPaperItem) {
|
||||
startPage();
|
||||
List<ExamPaperItem> list = examPaperItemService.selectExamPaperItemList(examPaperItem);
|
||||
examPaperItemService.additionalInfo(list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:export')")
|
||||
@Log(title = "试卷明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamPaperItem examPaperItem) {
|
||||
List<ExamPaperItem> list = examPaperItemService.selectExamPaperItemList(examPaperItem);
|
||||
ExcelUtil<ExamPaperItem> util = new ExcelUtil<ExamPaperItem>(ExamPaperItem.class);
|
||||
return util.exportExcel(list, "item");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取试卷明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(examPaperItemService.selectExamPaperItemById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:add')")
|
||||
@Log(title = "试卷明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaperItem examPaperItem) {
|
||||
return toAjax(examPaperItemService.insertExamPaperItem(examPaperItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:edit')")
|
||||
@Log(title = "试卷明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaperItem examPaperItem) {
|
||||
return toAjax(examPaperItemService.updateExamPaperItem(examPaperItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:remove')")
|
||||
@Log(title = "试卷明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(examPaperItemService.deleteExamPaperItemByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('exam:item:chooise-list')")
|
||||
@GetMapping("/chooise-list")
|
||||
public List<ChooiseQustion> chooiseList(ChooiseSearch search) {
|
||||
List<ChooiseQustion> list = examPaperItemService.chooiseList(search);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.luqj.exam.domain.ReqAddQuestionDTO;
|
||||
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.luqj.exam.domain.ExamPaperModule;
|
||||
import com.luqj.exam.service.IExamPaperModuleService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 试卷模块Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/module")
|
||||
public class ExamPaperModuleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamPaperModuleService examPaperModuleService;
|
||||
|
||||
/**
|
||||
* 查询试卷模块列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaperModule examPaperModule)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperModule> list = examPaperModuleService.selectExamPaperModuleList(examPaperModule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷模块列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:export')")
|
||||
@Log(title = "试卷模块", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamPaperModule examPaperModule)
|
||||
{
|
||||
List<ExamPaperModule> list = examPaperModuleService.selectExamPaperModuleList(examPaperModule);
|
||||
ExcelUtil<ExamPaperModule> util = new ExcelUtil<ExamPaperModule>(ExamPaperModule.class);
|
||||
return util.exportExcel(list, "module");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取试卷模块详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examPaperModuleService.selectExamPaperModuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:add')")
|
||||
@Log(title = "试卷模块", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaperModule examPaperModule)
|
||||
{
|
||||
return toAjax(examPaperModuleService.insertExamPaperModule(examPaperModule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷模块
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:edit')")
|
||||
@Log(title = "试卷模块", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaperModule examPaperModule)
|
||||
{
|
||||
return toAjax(examPaperModuleService.updateExamPaperModule(examPaperModule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷模块
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:remove')")
|
||||
@Log(title = "试卷模块", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examPaperModuleService.deleteExamPaperModuleByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:add')")
|
||||
@Log(title = "模块添加试题", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add-question")
|
||||
public AjaxResult addQuestion(@RequestBody ReqAddQuestionDTO reqAddQuestionDTO)
|
||||
{
|
||||
return toAjax(examPaperModuleService.addQuestion(reqAddQuestionDTO.getModuleId(),reqAddQuestionDTO.getQuestionIds()));
|
||||
}
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:module:add')")
|
||||
@Log(title = "模块添加试题", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/remove-question")
|
||||
public AjaxResult removeQuestion(@RequestBody ReqAddQuestionDTO reqAddQuestionDTO)
|
||||
{
|
||||
return toAjax(examPaperModuleService.removeQuestion(reqAddQuestionDTO.getModuleId(),reqAddQuestionDTO.getQuestionIds()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamPaperStrategy;
|
||||
import com.luqj.exam.service.IExamPaperStrategyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 试卷模板策略Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/strategy")
|
||||
public class ExamPaperStrategyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamPaperStrategyService examPaperStrategyService;
|
||||
|
||||
/**
|
||||
* 查询试卷模板策略列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaperStrategy examPaperStrategy)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperStrategy> list = examPaperStrategyService.selectExamPaperStrategyList(examPaperStrategy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出试卷模板策略列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:export')")
|
||||
@Log(title = "试卷模板策略", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamPaperStrategy examPaperStrategy)
|
||||
{
|
||||
List<ExamPaperStrategy> list = examPaperStrategyService.selectExamPaperStrategyList(examPaperStrategy);
|
||||
ExcelUtil<ExamPaperStrategy> util = new ExcelUtil<ExamPaperStrategy>(ExamPaperStrategy.class);
|
||||
return util.exportExcel(list, "strategy");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取试卷模板策略详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examPaperStrategyService.selectExamPaperStrategyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模板策略
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:add')")
|
||||
@Log(title = "试卷模板策略", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaperStrategy examPaperStrategy)
|
||||
{
|
||||
return toAjax(examPaperStrategyService.insertExamPaperStrategy(examPaperStrategy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷模板策略
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:edit')")
|
||||
@Log(title = "试卷模板策略", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaperStrategy examPaperStrategy)
|
||||
{
|
||||
return toAjax(examPaperStrategyService.updateExamPaperStrategy(examPaperStrategy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷模板策略
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:strategy:remove')")
|
||||
@Log(title = "试卷模板策略", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examPaperStrategyService.deleteExamPaperStrategyByIds(ids));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamPaperStrategyList;
|
||||
import com.luqj.exam.service.IExamPaperStrategyListService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 策略子Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/list")
|
||||
public class ExamPaperStrategyListController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamPaperStrategyListService examPaperStrategyListService;
|
||||
|
||||
/**
|
||||
* 查询策略子列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
startPage();
|
||||
List<ExamPaperStrategyList> list = examPaperStrategyListService.selectExamPaperStrategyListList(examPaperStrategyList);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出策略子列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:export')")
|
||||
@Log(title = "策略子", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
List<ExamPaperStrategyList> list = examPaperStrategyListService.selectExamPaperStrategyListList(examPaperStrategyList);
|
||||
ExcelUtil<ExamPaperStrategyList> util = new ExcelUtil<ExamPaperStrategyList>(ExamPaperStrategyList.class);
|
||||
return util.exportExcel(list, "list");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取策略子详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examPaperStrategyListService.selectExamPaperStrategyListById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增策略子
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:add')")
|
||||
@Log(title = "策略子", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
return toAjax(examPaperStrategyListService.insertExamPaperStrategyList(examPaperStrategyList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改策略子
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:edit')")
|
||||
@Log(title = "策略子", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
return toAjax(examPaperStrategyListService.updateExamPaperStrategyList(examPaperStrategyList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除策略子
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:list:remove')")
|
||||
@Log(title = "策略子", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examPaperStrategyListService.deleteExamPaperStrategyListByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamQuestion;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 题库Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/question")
|
||||
public class ExamQuestionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
|
||||
/**
|
||||
* 查询题库列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestion examQuestion)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestion> list = examQuestionService.selectExamQuestionList(examQuestion);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题库列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:export')")
|
||||
@Log(title = "题库", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestion examQuestion)
|
||||
{
|
||||
List<ExamQuestion> list = examQuestionService.selectExamQuestionList(examQuestion);
|
||||
ExcelUtil<ExamQuestion> util = new ExcelUtil<ExamQuestion>(ExamQuestion.class);
|
||||
return util.exportExcel(list, "question");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题库详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examQuestionService.selectExamQuestionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题库
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:add')")
|
||||
@Log(title = "题库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamQuestion examQuestion)
|
||||
{
|
||||
return toAjax(examQuestionService.insertExamQuestion(examQuestion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:edit')")
|
||||
@Log(title = "题库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamQuestion examQuestion)
|
||||
{
|
||||
return toAjax(examQuestionService.updateExamQuestion(examQuestion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题库
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:question:remove')")
|
||||
@Log(title = "题库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examQuestionService.deleteExamQuestionByIds(ids));
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamQuestionCorrection;
|
||||
import com.luqj.exam.service.IExamQuestionCorrectionService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 题目纠错Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/correction")
|
||||
public class ExamQuestionCorrectionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionCorrectionService examQuestionCorrectionService;
|
||||
|
||||
/**
|
||||
* 查询题目纠错列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestionCorrection> list = examQuestionCorrectionService.selectExamQuestionCorrectionList(examQuestionCorrection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题目纠错列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:export')")
|
||||
@Log(title = "题目纠错", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
List<ExamQuestionCorrection> list = examQuestionCorrectionService.selectExamQuestionCorrectionList(examQuestionCorrection);
|
||||
ExcelUtil<ExamQuestionCorrection> util = new ExcelUtil<ExamQuestionCorrection>(ExamQuestionCorrection.class);
|
||||
return util.exportExcel(list, "correction");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题目纠错详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examQuestionCorrectionService.selectExamQuestionCorrectionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题目纠错
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:add')")
|
||||
@Log(title = "题目纠错", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
return toAjax(examQuestionCorrectionService.insertExamQuestionCorrection(examQuestionCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题目纠错
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:edit')")
|
||||
@Log(title = "题目纠错", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
return toAjax(examQuestionCorrectionService.updateExamQuestionCorrection(examQuestionCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目纠错
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:correction:remove')")
|
||||
@Log(title = "题目纠错", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examQuestionCorrectionService.deleteExamQuestionCorrectionByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamQuestionFavorite;
|
||||
import com.luqj.exam.service.IExamQuestionFavoriteService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 题目收藏Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/favorite")
|
||||
public class ExamQuestionFavoriteController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamQuestionFavoriteService examQuestionFavoriteService;
|
||||
|
||||
/**
|
||||
* 查询题目收藏列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
startPage();
|
||||
List<ExamQuestionFavorite> list = examQuestionFavoriteService.selectExamQuestionFavoriteList(examQuestionFavorite);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出题目收藏列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:export')")
|
||||
@Log(title = "题目收藏", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
List<ExamQuestionFavorite> list = examQuestionFavoriteService.selectExamQuestionFavoriteList(examQuestionFavorite);
|
||||
ExcelUtil<ExamQuestionFavorite> util = new ExcelUtil<ExamQuestionFavorite>(ExamQuestionFavorite.class);
|
||||
return util.exportExcel(list, "favorite");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题目收藏详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examQuestionFavoriteService.selectExamQuestionFavoriteById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题目收藏
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:add')")
|
||||
@Log(title = "题目收藏", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
return toAjax(examQuestionFavoriteService.insertExamQuestionFavorite(examQuestionFavorite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题目收藏
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:edit')")
|
||||
@Log(title = "题目收藏", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
return toAjax(examQuestionFavoriteService.updateExamQuestionFavorite(examQuestionFavorite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目收藏
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:favorite:remove')")
|
||||
@Log(title = "题目收藏", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examQuestionFavoriteService.deleteExamQuestionFavoriteByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamSchool;
|
||||
import com.luqj.exam.service.IExamSchoolService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出题学校Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/school")
|
||||
public class ExamSchoolController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamSchoolService examSchoolService;
|
||||
|
||||
/**
|
||||
* 查询出题学校列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamSchool examSchool)
|
||||
{
|
||||
startPage();
|
||||
List<ExamSchool> list = examSchoolService.selectExamSchoolList(examSchool);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出题学校列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:export')")
|
||||
@Log(title = "出题学校", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamSchool examSchool)
|
||||
{
|
||||
List<ExamSchool> list = examSchoolService.selectExamSchoolList(examSchool);
|
||||
ExcelUtil<ExamSchool> util = new ExcelUtil<ExamSchool>(ExamSchool.class);
|
||||
return util.exportExcel(list, "school");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出题学校详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examSchoolService.selectExamSchoolById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出题学校
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:add')")
|
||||
@Log(title = "出题学校", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamSchool examSchool)
|
||||
{
|
||||
return toAjax(examSchoolService.insertExamSchool(examSchool));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出题学校
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:edit')")
|
||||
@Log(title = "出题学校", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamSchool examSchool)
|
||||
{
|
||||
return toAjax(examSchoolService.updateExamSchool(examSchool));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出题学校
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:school:remove')")
|
||||
@Log(title = "出题学校", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examSchoolService.deleteExamSchoolByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamStudentMistakes;
|
||||
import com.luqj.exam.service.IExamStudentMistakesService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 错题集Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/mistakes")
|
||||
public class ExamStudentMistakesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamStudentMistakesService examStudentMistakesService;
|
||||
|
||||
/**
|
||||
* 查询错题集列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamStudentMistakes examStudentMistakes)
|
||||
{
|
||||
startPage();
|
||||
List<ExamStudentMistakes> list = examStudentMistakesService.selectExamStudentMistakesList(examStudentMistakes);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出错题集列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:export')")
|
||||
@Log(title = "错题集", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamStudentMistakes examStudentMistakes)
|
||||
{
|
||||
List<ExamStudentMistakes> list = examStudentMistakesService.selectExamStudentMistakesList(examStudentMistakes);
|
||||
ExcelUtil<ExamStudentMistakes> util = new ExcelUtil<ExamStudentMistakes>(ExamStudentMistakes.class);
|
||||
return util.exportExcel(list, "mistakes");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取错题集详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examStudentMistakesService.selectExamStudentMistakesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增错题集
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:add')")
|
||||
@Log(title = "错题集", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamStudentMistakes examStudentMistakes)
|
||||
{
|
||||
return toAjax(examStudentMistakesService.insertExamStudentMistakes(examStudentMistakes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改错题集
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:edit')")
|
||||
@Log(title = "错题集", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamStudentMistakes examStudentMistakes)
|
||||
{
|
||||
return toAjax(examStudentMistakesService.updateExamStudentMistakes(examStudentMistakes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除错题集
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:mistakes:remove')")
|
||||
@Log(title = "错题集", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examStudentMistakesService.deleteExamStudentMistakesByIds(ids));
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswerPlus;
|
||||
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.luqj.exam.domain.ExamStudentPaperAnswer;
|
||||
import com.luqj.exam.service.IExamStudentPaperAnswerService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生答题明细Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/answer")
|
||||
public class ExamStudentPaperAnswerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamStudentPaperAnswerService examStudentPaperAnswerService;
|
||||
|
||||
/**
|
||||
* 查询学生答题明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
startPage();
|
||||
Page<ExamStudentPaperAnswerPlus> page = new Page<ExamStudentPaperAnswerPlus>(1, 2);
|
||||
page = examStudentPaperAnswerService.page(page);
|
||||
List<ExamStudentPaperAnswer> list = examStudentPaperAnswerService.selectExamStudentPaperAnswerList(examStudentPaperAnswer);
|
||||
examStudentPaperAnswerService.additionalInfo(list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生答题明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:export')")
|
||||
@Log(title = "学生答题明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
List<ExamStudentPaperAnswer> list = examStudentPaperAnswerService.selectExamStudentPaperAnswerList(examStudentPaperAnswer);
|
||||
ExcelUtil<ExamStudentPaperAnswer> util = new ExcelUtil<ExamStudentPaperAnswer>(ExamStudentPaperAnswer.class);
|
||||
return util.exportExcel(list, "answer");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生答题明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examStudentPaperAnswerService.selectExamStudentPaperAnswerById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:add')")
|
||||
@Log(title = "学生答题明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
return toAjax(examStudentPaperAnswerService.insertExamStudentPaperAnswer(examStudentPaperAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:edit')")
|
||||
@Log(title = "学生答题明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
return toAjax(examStudentPaperAnswerService.updateExamStudentPaperAnswer(examStudentPaperAnswer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:answer:remove')")
|
||||
@Log(title = "学生答题明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examStudentPaperAnswerService.deleteExamStudentPaperAnswerByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamStudentPaper;
|
||||
import com.luqj.exam.service.IExamStudentPaperService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生考试试卷实例Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/spaper")
|
||||
public class ExamStudentPaperController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamStudentPaperService examStudentPaperService;
|
||||
|
||||
/**
|
||||
* 查询学生考试试卷实例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
startPage();
|
||||
List<ExamStudentPaper> list = examStudentPaperService.selectExamStudentPaperList(examStudentPaper);
|
||||
examStudentPaperService.additionalInfo(list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生考试试卷实例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:export')")
|
||||
@Log(title = "学生考试试卷实例", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
List<ExamStudentPaper> list = examStudentPaperService.selectExamStudentPaperList(examStudentPaper);
|
||||
ExcelUtil<ExamStudentPaper> util = new ExcelUtil<ExamStudentPaper>(ExamStudentPaper.class);
|
||||
return util.exportExcel(list, "spaper");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生考试试卷实例详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examStudentPaperService.selectExamStudentPaperById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生考试试卷实例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:add')")
|
||||
@Log(title = "学生考试试卷实例", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
return toAjax(examStudentPaperService.insertExamStudentPaper(examStudentPaper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生考试试卷实例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:edit')")
|
||||
@Log(title = "学生考试试卷实例", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
return toAjax(examStudentPaperService.updateExamStudentPaper(examStudentPaper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生考试试卷实例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:spaper:remove')")
|
||||
@Log(title = "学生考试试卷实例", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examStudentPaperService.deleteExamStudentPaperByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.ExamStudentScore;
|
||||
import com.luqj.exam.service.IExamStudentScoreService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生成绩Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/score")
|
||||
public class ExamStudentScoreController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamStudentScoreService examStudentScoreService;
|
||||
|
||||
/**
|
||||
* 查询学生成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamStudentScore examStudentScore)
|
||||
{
|
||||
startPage();
|
||||
List<ExamStudentScore> list = examStudentScoreService.selectExamStudentScoreList(examStudentScore);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生成绩列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:export')")
|
||||
@Log(title = "学生成绩", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ExamStudentScore examStudentScore)
|
||||
{
|
||||
List<ExamStudentScore> list = examStudentScoreService.selectExamStudentScoreList(examStudentScore);
|
||||
ExcelUtil<ExamStudentScore> util = new ExcelUtil<ExamStudentScore>(ExamStudentScore.class);
|
||||
return util.exportExcel(list, "score");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生成绩详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(examStudentScoreService.selectExamStudentScoreById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:add')")
|
||||
@Log(title = "学生成绩", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamStudentScore examStudentScore)
|
||||
{
|
||||
return toAjax(examStudentScoreService.insertExamStudentScore(examStudentScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:edit')")
|
||||
@Log(title = "学生成绩", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamStudentScore examStudentScore)
|
||||
{
|
||||
return toAjax(examStudentScoreService.updateExamStudentScore(examStudentScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生成绩
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:score:remove')")
|
||||
@Log(title = "学生成绩", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(examStudentScoreService.deleteExamStudentScoreByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.StatsExamAccuracy;
|
||||
import com.luqj.exam.service.IStatsExamAccuracyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生答题正确率统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/eaccuracy")
|
||||
public class StatsExamAccuracyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatsExamAccuracyService statsExamAccuracyService;
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
startPage();
|
||||
List<StatsExamAccuracy> list = statsExamAccuracyService.selectStatsExamAccuracyList(statsExamAccuracy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生答题正确率统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:export')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
List<StatsExamAccuracy> list = statsExamAccuracyService.selectStatsExamAccuracyList(statsExamAccuracy);
|
||||
ExcelUtil<StatsExamAccuracy> util = new ExcelUtil<StatsExamAccuracy>(StatsExamAccuracy.class);
|
||||
return util.exportExcel(list, "eaccuracy");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生答题正确率统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statsExamAccuracyService.selectStatsExamAccuracyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:add')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
statsExamAccuracy.setStatus(1);
|
||||
return toAjax(statsExamAccuracyService.insertStatsExamAccuracy(statsExamAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:edit')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
return toAjax(statsExamAccuracyService.updateStatsExamAccuracy(statsExamAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:eaccuracy:remove')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statsExamAccuracyService.deleteStatsExamAccuracyByIds(ids));
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.StatsExamQuestionAccuracy;
|
||||
import com.luqj.exam.service.IStatsExamQuestionAccuracyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 按题目统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/qaccuracy")
|
||||
public class StatsExamQuestionAccuracyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatsExamQuestionAccuracyService statsExamQuestionAccuracyService;
|
||||
|
||||
/**
|
||||
* 查询按题目统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
startPage();
|
||||
List<StatsExamQuestionAccuracy> list = statsExamQuestionAccuracyService.selectStatsExamQuestionAccuracyList(statsExamQuestionAccuracy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出按题目统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:export')")
|
||||
@Log(title = "按题目统计", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
List<StatsExamQuestionAccuracy> list = statsExamQuestionAccuracyService.selectStatsExamQuestionAccuracyList(statsExamQuestionAccuracy);
|
||||
ExcelUtil<StatsExamQuestionAccuracy> util = new ExcelUtil<StatsExamQuestionAccuracy>(StatsExamQuestionAccuracy.class);
|
||||
return util.exportExcel(list, "qaccuracy");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取按题目统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statsExamQuestionAccuracyService.selectStatsExamQuestionAccuracyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增按题目统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:add')")
|
||||
@Log(title = "按题目统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
statsExamQuestionAccuracy.setStatus(1);
|
||||
return toAjax(statsExamQuestionAccuracyService.insertStatsExamQuestionAccuracy(statsExamQuestionAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改按题目统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:edit')")
|
||||
@Log(title = "按题目统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
return toAjax(statsExamQuestionAccuracyService.updateStatsExamQuestionAccuracy(statsExamQuestionAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除按题目统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:qaccuracy:remove')")
|
||||
@Log(title = "按题目统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statsExamQuestionAccuracyService.deleteStatsExamQuestionAccuracyByIds(ids));
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.controller;
|
||||
|
||||
import java.util.List;
|
||||
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.luqj.exam.domain.StatsExamWeekAccuracy;
|
||||
import com.luqj.exam.service.IStatsExamWeekAccuracyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 学生答题正确率统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/exam/waccuracy")
|
||||
public class StatsExamWeekAccuracyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IStatsExamWeekAccuracyService statsExamWeekAccuracyService;
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
startPage();
|
||||
List<StatsExamWeekAccuracy> list = statsExamWeekAccuracyService.selectStatsExamWeekAccuracyList(statsExamWeekAccuracy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出学生答题正确率统计列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:export')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
List<StatsExamWeekAccuracy> list = statsExamWeekAccuracyService.selectStatsExamWeekAccuracyList(statsExamWeekAccuracy);
|
||||
ExcelUtil<StatsExamWeekAccuracy> util = new ExcelUtil<StatsExamWeekAccuracy>(StatsExamWeekAccuracy.class);
|
||||
return util.exportExcel(list, "waccuracy");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学生答题正确率统计详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(statsExamWeekAccuracyService.selectStatsExamWeekAccuracyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:add')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
statsExamWeekAccuracy.setStatus(1);
|
||||
return toAjax(statsExamWeekAccuracyService.insertStatsExamWeekAccuracy(statsExamWeekAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:edit')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
return toAjax(statsExamWeekAccuracyService.updateStatsExamWeekAccuracy(statsExamWeekAccuracy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('exam:waccuracy:remove')")
|
||||
@Log(title = "学生答题正确率统计", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(statsExamWeekAccuracyService.deleteStatsExamWeekAccuracyByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@Data
|
||||
public class ChooiseQustion implements Serializable {
|
||||
private Long id;
|
||||
private String title;
|
||||
private boolean disabled;
|
||||
private boolean hasChooise;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@Data
|
||||
public class ChooiseSearch implements Serializable {
|
||||
private String keyWord;
|
||||
private Long type;
|
||||
private Long moduleId;
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 试卷对象 exam_paper
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
public class ExamPaper extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷名称 */
|
||||
@Excel(name = "试卷名称")
|
||||
private String name;
|
||||
|
||||
/** 试卷编号 */
|
||||
@Excel(name = "试卷编号")
|
||||
private String no;
|
||||
|
||||
/** 图片地址 */
|
||||
@Excel(name = "图片地址")
|
||||
private String imgUrl;
|
||||
|
||||
/** 省份id */
|
||||
@Excel(name = "省份id")
|
||||
private Long provinceId;
|
||||
private String provinceName;
|
||||
/** 城市id */
|
||||
@Excel(name = "城市id")
|
||||
private Long cityId;
|
||||
|
||||
private String cityName;
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
|
||||
private String schoolName;
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
|
||||
/** 出卷老师id */
|
||||
@Excel(name = "出卷老师id")
|
||||
private Long teacherId;
|
||||
|
||||
/** 审核老师id */
|
||||
@Excel(name = "审核老师id")
|
||||
private Long auditorId;
|
||||
|
||||
/** 学年 */
|
||||
@Excel(name = "学年")
|
||||
private Integer year;
|
||||
|
||||
/** 学期 */
|
||||
@Excel(name = "学期")
|
||||
private Integer semester;
|
||||
|
||||
/** 统考类型(0无,1全国统考,2省统考) */
|
||||
@Excel(name = "统考类型(0无,1全国统考,2省统考)")
|
||||
private Integer unionType;
|
||||
|
||||
/** 试卷类型(详见ExamType) */
|
||||
@Excel(name = "试卷类型(详见ExamType)")
|
||||
private Long type;
|
||||
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
|
||||
/** 总分 */
|
||||
@Excel(name = "总分")
|
||||
private Long score;
|
||||
|
||||
/** 及格分数线 */
|
||||
@Excel(name = "及格分数线")
|
||||
private Long passScore;
|
||||
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
|
||||
/** 考试时长 */
|
||||
@Excel(name = "考试时长")
|
||||
private Long timeLength;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDelete;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
private String categoryName;
|
||||
/** 试卷模块信息 */
|
||||
private List<ExamPaperModule> examPaperModuleList;
|
||||
|
||||
public String getProvinceName() {
|
||||
return provinceName;
|
||||
}
|
||||
|
||||
public void setProvinceName(String provinceName) {
|
||||
this.provinceName = provinceName;
|
||||
}
|
||||
|
||||
public String getCityName() {
|
||||
return cityName;
|
||||
}
|
||||
|
||||
public void setCityName(String cityName) {
|
||||
this.cityName = cityName;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
public void setImgUrl(String imgUrl)
|
||||
{
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl()
|
||||
{
|
||||
return imgUrl;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setTeacherId(Long teacherId)
|
||||
{
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
public Long getTeacherId()
|
||||
{
|
||||
return teacherId;
|
||||
}
|
||||
public void setAuditorId(Long auditorId)
|
||||
{
|
||||
this.auditorId = auditorId;
|
||||
}
|
||||
|
||||
public Long getAuditorId()
|
||||
{
|
||||
return auditorId;
|
||||
}
|
||||
public void setYear(Integer year)
|
||||
{
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public Integer getYear()
|
||||
{
|
||||
return year;
|
||||
}
|
||||
public void setSemester(Integer semester)
|
||||
{
|
||||
this.semester = semester;
|
||||
}
|
||||
|
||||
public Integer getSemester()
|
||||
{
|
||||
return semester;
|
||||
}
|
||||
public void setUnionType(Integer unionType)
|
||||
{
|
||||
this.unionType = unionType;
|
||||
}
|
||||
|
||||
public Integer getUnionType()
|
||||
{
|
||||
return unionType;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setPassScore(Long passScore)
|
||||
{
|
||||
this.passScore = passScore;
|
||||
}
|
||||
|
||||
public Long getPassScore()
|
||||
{
|
||||
return passScore;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setTimeLength(Long timeLength)
|
||||
{
|
||||
this.timeLength = timeLength;
|
||||
}
|
||||
|
||||
public Long getTimeLength()
|
||||
{
|
||||
return timeLength;
|
||||
}
|
||||
public void setIsDelete(Integer isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public List<ExamPaperModule> getExamPaperModuleList()
|
||||
{
|
||||
return examPaperModuleList;
|
||||
}
|
||||
|
||||
public void setExamPaperModuleList(List<ExamPaperModule> examPaperModuleList)
|
||||
{
|
||||
this.examPaperModuleList = examPaperModuleList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("no", getNo())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("teacherId", getTeacherId())
|
||||
.append("auditorId", getAuditorId())
|
||||
.append("year", getYear())
|
||||
.append("semester", getSemester())
|
||||
.append("unionType", getUnionType())
|
||||
.append("type", getType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("passScore", getPassScore())
|
||||
.append("examTime", getExamTime())
|
||||
.append("timeLength", getTimeLength())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("status", getStatus())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("examPaperModuleList", getExamPaperModuleList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 试卷明细对象 exam_paper_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
public class ExamPaperItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
|
||||
private transient String paperName;
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long examPaperModuleId;
|
||||
|
||||
private transient String examPaperModuleName;
|
||||
/** 类型id(参考QuestionTypeEnum) */
|
||||
@Excel(name = "类型id(参考QuestionTypeEnum)")
|
||||
private Long questionTypeId;
|
||||
|
||||
/** 问题id */
|
||||
@Excel(name = "问题id")
|
||||
private Long questionId;
|
||||
|
||||
private transient String questionName;
|
||||
/** 分数 */
|
||||
@Excel(name = "分数")
|
||||
private Long score;
|
||||
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
|
||||
/** 排序号 */
|
||||
@Excel(name = "排序号")
|
||||
private Long sortNum;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public String getExamPaperModuleName() {
|
||||
return examPaperModuleName;
|
||||
}
|
||||
|
||||
public void setExamPaperModuleName(String examPaperModuleName) {
|
||||
this.examPaperModuleName = examPaperModuleName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setExamPaperModuleId(Long examPaperModuleId)
|
||||
{
|
||||
this.examPaperModuleId = examPaperModuleId;
|
||||
}
|
||||
|
||||
public String getPaperName() {
|
||||
return paperName;
|
||||
}
|
||||
|
||||
public void setPaperName(String paperName) {
|
||||
this.paperName = paperName;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public Long getExamPaperModuleId()
|
||||
{
|
||||
return examPaperModuleId;
|
||||
}
|
||||
public void setQuestionTypeId(Long questionTypeId)
|
||||
{
|
||||
this.questionTypeId = questionTypeId;
|
||||
}
|
||||
|
||||
public Long getQuestionTypeId()
|
||||
{
|
||||
return questionTypeId;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setSortNum(Long sortNum)
|
||||
{
|
||||
this.sortNum = sortNum;
|
||||
}
|
||||
|
||||
public Long getSortNum()
|
||||
{
|
||||
return sortNum;
|
||||
}
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("examPaperModuleId", getExamPaperModuleId())
|
||||
.append("questionTypeId", getQuestionTypeId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("score", getScore())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("sortNum", getSortNum())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
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;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 试卷明细对象 exam_paper_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@TableName("exam_paper_item")
|
||||
public class ExamPaperItemPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
/** 模块id */
|
||||
@Excel(name = "模块id")
|
||||
private Long examPaperModuleId;
|
||||
/** 类型id(参考QuestionTypeEnum) */
|
||||
@Excel(name = "类型id(参考QuestionTypeEnum)")
|
||||
private Long questionTypeId;
|
||||
/** 问题id */
|
||||
@Excel(name = "问题id")
|
||||
private Long questionId;
|
||||
/** 分数 */
|
||||
@Excel(name = "分数")
|
||||
private Long score;
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
/** 排序号 */
|
||||
@Excel(name = "排序号")
|
||||
private Long sortNum;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setExamPaperModuleId(Long examPaperModuleId)
|
||||
{
|
||||
this.examPaperModuleId = examPaperModuleId;
|
||||
}
|
||||
|
||||
public Long getExamPaperModuleId()
|
||||
{
|
||||
return examPaperModuleId;
|
||||
}
|
||||
public void setQuestionTypeId(Long questionTypeId)
|
||||
{
|
||||
this.questionTypeId = questionTypeId;
|
||||
}
|
||||
|
||||
public Long getQuestionTypeId()
|
||||
{
|
||||
return questionTypeId;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setSortNum(Long sortNum)
|
||||
{
|
||||
this.sortNum = sortNum;
|
||||
}
|
||||
|
||||
public Long getSortNum()
|
||||
{
|
||||
return sortNum;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("examPaperModuleId", getExamPaperModuleId())
|
||||
.append("questionTypeId", getQuestionTypeId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("score", getScore())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("sortNum", getSortNum())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 试卷模块对象 exam_paper_module
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
public class ExamPaperModule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
|
||||
private transient String paperName;
|
||||
/** 模块名称 */
|
||||
@Excel(name = "模块名称")
|
||||
private String moduleName;
|
||||
|
||||
/** 题型id */
|
||||
@Excel(name = "题型id")
|
||||
private Long questionTypeId;
|
||||
|
||||
/** 建议答题时长 */
|
||||
@Excel(name = "建议答题时长")
|
||||
private Integer timeLength;
|
||||
|
||||
/** 模块图片 */
|
||||
@Excel(name = "模块图片")
|
||||
private String imgUrl;
|
||||
|
||||
/** 本模块分值 */
|
||||
@Excel(name = "本模块分值")
|
||||
private Long score;
|
||||
|
||||
/** 排序号 */
|
||||
@Excel(name = "排序号")
|
||||
private Long sortNum;
|
||||
|
||||
/** 试卷明细信息 */
|
||||
private List<ExamPaperItem> examPaperItemList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setModuleName(String moduleName)
|
||||
{
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
public String getModuleName()
|
||||
{
|
||||
return moduleName;
|
||||
}
|
||||
public void setQuestionTypeId(Long questionTypeId)
|
||||
{
|
||||
this.questionTypeId = questionTypeId;
|
||||
}
|
||||
|
||||
public Long getQuestionTypeId()
|
||||
{
|
||||
return questionTypeId;
|
||||
}
|
||||
public void setTimeLength(Integer timeLength)
|
||||
{
|
||||
this.timeLength = timeLength;
|
||||
}
|
||||
|
||||
public String getPaperName() {
|
||||
return paperName;
|
||||
}
|
||||
|
||||
public void setPaperName(String paperName) {
|
||||
this.paperName = paperName;
|
||||
}
|
||||
|
||||
public Integer getTimeLength()
|
||||
{
|
||||
return timeLength;
|
||||
}
|
||||
public void setImgUrl(String imgUrl)
|
||||
{
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl()
|
||||
{
|
||||
return imgUrl;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setSortNum(Long sortNum)
|
||||
{
|
||||
this.sortNum = sortNum;
|
||||
}
|
||||
|
||||
public Long getSortNum()
|
||||
{
|
||||
return sortNum;
|
||||
}
|
||||
|
||||
public List<ExamPaperItem> getExamPaperItemList()
|
||||
{
|
||||
return examPaperItemList;
|
||||
}
|
||||
|
||||
public void setExamPaperItemList(List<ExamPaperItem> examPaperItemList)
|
||||
{
|
||||
this.examPaperItemList = examPaperItemList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("moduleName", getModuleName())
|
||||
.append("questionTypeId", getQuestionTypeId())
|
||||
.append("timeLength", getTimeLength())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("sortNum", getSortNum())
|
||||
.append("examPaperItemList", getExamPaperItemList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 试卷模块对象 exam_paper_module
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
@TableName(value = "exam_paper_module")
|
||||
public class ExamPaperModulePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
/** 模块名称 */
|
||||
@Excel(name = "模块名称")
|
||||
private String moduleName;
|
||||
/** 题型id */
|
||||
@Excel(name = "题型id")
|
||||
private Long questionTypeId;
|
||||
/** 建议答题时长 */
|
||||
@Excel(name = "建议答题时长")
|
||||
private Integer timeLength;
|
||||
/** 模块图片 */
|
||||
@Excel(name = "模块图片")
|
||||
private String imgUrl;
|
||||
/** 本模块分值 */
|
||||
@Excel(name = "本模块分值")
|
||||
private Long score;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 排序号 */
|
||||
@Excel(name = "排序号")
|
||||
private Long sortNum;
|
||||
/** 试卷明细信息 */
|
||||
private transient List<ExamPaperItem> examPaperItemList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setModuleName(String moduleName)
|
||||
{
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
public String getModuleName()
|
||||
{
|
||||
return moduleName;
|
||||
}
|
||||
public void setQuestionTypeId(Long questionTypeId)
|
||||
{
|
||||
this.questionTypeId = questionTypeId;
|
||||
}
|
||||
|
||||
public Long getQuestionTypeId()
|
||||
{
|
||||
return questionTypeId;
|
||||
}
|
||||
public void setTimeLength(Integer timeLength)
|
||||
{
|
||||
this.timeLength = timeLength;
|
||||
}
|
||||
|
||||
public Integer getTimeLength()
|
||||
{
|
||||
return timeLength;
|
||||
}
|
||||
public void setImgUrl(String imgUrl)
|
||||
{
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl()
|
||||
{
|
||||
return imgUrl;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setSortNum(Long sortNum)
|
||||
{
|
||||
this.sortNum = sortNum;
|
||||
}
|
||||
|
||||
public Long getSortNum()
|
||||
{
|
||||
return sortNum;
|
||||
}
|
||||
|
||||
public List<ExamPaperItem> getExamPaperItemList()
|
||||
{
|
||||
return examPaperItemList;
|
||||
}
|
||||
|
||||
public void setExamPaperItemList(List<ExamPaperItem> examPaperItemList)
|
||||
{
|
||||
this.examPaperItemList = examPaperItemList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("moduleName", getModuleName())
|
||||
.append("questionTypeId", getQuestionTypeId())
|
||||
.append("timeLength", getTimeLength())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("sortNum", getSortNum())
|
||||
.append("examPaperItemList", getExamPaperItemList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,357 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 试卷对象 exam_paper
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
@TableName(value = "exam_paper")
|
||||
public class ExamPaperPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷名称 */
|
||||
@Excel(name = "试卷名称")
|
||||
private String name;
|
||||
/** 试卷编号 */
|
||||
@Excel(name = "试卷编号")
|
||||
private String no;
|
||||
/** 图片地址 */
|
||||
@Excel(name = "图片地址")
|
||||
private String imgUrl;
|
||||
/** 省份id */
|
||||
@Excel(name = "省份id")
|
||||
private Long provinceId;
|
||||
/** 城市id */
|
||||
@Excel(name = "城市id")
|
||||
private Long cityId;
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
/** 出卷老师id */
|
||||
@Excel(name = "出卷老师id")
|
||||
private Long teacherId;
|
||||
/** 审核老师id */
|
||||
@Excel(name = "审核老师id")
|
||||
private Long auditorId;
|
||||
/** 学年 */
|
||||
@Excel(name = "学年")
|
||||
private Integer year;
|
||||
/** 学期 */
|
||||
@Excel(name = "学期")
|
||||
private Integer semester;
|
||||
/** 统考类型(0无,1全国统考,2省统考) */
|
||||
@Excel(name = "统考类型(0无,1全国统考,2省统考)")
|
||||
private Integer unionType;
|
||||
/** 试卷类型(详见ExamType) */
|
||||
@Excel(name = "试卷类型(详见ExamType)")
|
||||
private Long type;
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
/** 总分 */
|
||||
@Excel(name = "总分")
|
||||
private Long score;
|
||||
/** 及格分数线 */
|
||||
@Excel(name = "及格分数线")
|
||||
private Long passScore;
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
/** 考试时长 */
|
||||
@Excel(name = "考试时长")
|
||||
private Long timeLength;
|
||||
/** 出卷时间 */
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDelete;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
/** 试卷模块信息 */
|
||||
private transient List<ExamPaperModule> examPaperModuleList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
public void setImgUrl(String imgUrl)
|
||||
{
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getImgUrl()
|
||||
{
|
||||
return imgUrl;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setTeacherId(Long teacherId)
|
||||
{
|
||||
this.teacherId = teacherId;
|
||||
}
|
||||
|
||||
public Long getTeacherId()
|
||||
{
|
||||
return teacherId;
|
||||
}
|
||||
public void setAuditorId(Long auditorId)
|
||||
{
|
||||
this.auditorId = auditorId;
|
||||
}
|
||||
|
||||
public Long getAuditorId()
|
||||
{
|
||||
return auditorId;
|
||||
}
|
||||
public void setYear(Integer year)
|
||||
{
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public Integer getYear()
|
||||
{
|
||||
return year;
|
||||
}
|
||||
public void setSemester(Integer semester)
|
||||
{
|
||||
this.semester = semester;
|
||||
}
|
||||
|
||||
public Integer getSemester()
|
||||
{
|
||||
return semester;
|
||||
}
|
||||
public void setUnionType(Integer unionType)
|
||||
{
|
||||
this.unionType = unionType;
|
||||
}
|
||||
|
||||
public Integer getUnionType()
|
||||
{
|
||||
return unionType;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setPassScore(Long passScore)
|
||||
{
|
||||
this.passScore = passScore;
|
||||
}
|
||||
|
||||
public Long getPassScore()
|
||||
{
|
||||
return passScore;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setTimeLength(Long timeLength)
|
||||
{
|
||||
this.timeLength = timeLength;
|
||||
}
|
||||
|
||||
public Long getTimeLength()
|
||||
{
|
||||
return timeLength;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setIsDelete(Integer isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public List<ExamPaperModule> getExamPaperModuleList()
|
||||
{
|
||||
return examPaperModuleList;
|
||||
}
|
||||
|
||||
public void setExamPaperModuleList(List<ExamPaperModule> examPaperModuleList)
|
||||
{
|
||||
this.examPaperModuleList = examPaperModuleList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("no", getNo())
|
||||
.append("imgUrl", getImgUrl())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("teacherId", getTeacherId())
|
||||
.append("auditorId", getAuditorId())
|
||||
.append("year", getYear())
|
||||
.append("semester", getSemester())
|
||||
.append("unionType", getUnionType())
|
||||
.append("type", getType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("passScore", getPassScore())
|
||||
.append("examTime", getExamTime())
|
||||
.append("timeLength", getTimeLength())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("status", getStatus())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("examPaperModuleList", getExamPaperModuleList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 试卷模板策略对象 exam_paper_strategy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
public class ExamPaperStrategy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 策略名称 */
|
||||
@Excel(name = "策略名称")
|
||||
private String name;
|
||||
|
||||
/** 策略代码 */
|
||||
@Excel(name = "策略代码")
|
||||
private String code;
|
||||
|
||||
/** 试卷类型 */
|
||||
@Excel(name = "试卷类型")
|
||||
private Integer type;
|
||||
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Integer difficulty;
|
||||
|
||||
/** 总分数 */
|
||||
@Excel(name = "总分数")
|
||||
private Long score;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String creatorId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "创建人")
|
||||
private Long categoryId;
|
||||
|
||||
private String categoryName;
|
||||
|
||||
/** 策略子信息 */
|
||||
private List<ExamPaperStrategyList> examPaperStrategyListList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setType(Integer type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setDifficulty(Integer difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public Integer getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setCreatorId(String creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public List<ExamPaperStrategyList> getExamPaperStrategyListList()
|
||||
{
|
||||
return examPaperStrategyListList;
|
||||
}
|
||||
|
||||
public void setExamPaperStrategyListList(List<ExamPaperStrategyList> examPaperStrategyListList)
|
||||
{
|
||||
this.examPaperStrategyListList = examPaperStrategyListList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("code", getCode())
|
||||
.append("type", getType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("examPaperStrategyListList", getExamPaperStrategyListList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.luqj.exam.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;
|
||||
|
||||
/**
|
||||
* 策略子对象 exam_paper_strategy_list
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
public class ExamPaperStrategyList extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 主表id */
|
||||
@Excel(name = "主表id")
|
||||
private Long examPaperStrategyId;
|
||||
|
||||
/** 题目类型类型 */
|
||||
@Excel(name = "题目类型类型")
|
||||
private Integer questionType;
|
||||
|
||||
/** 默认难度系数 */
|
||||
@Excel(name = "默认难度系数")
|
||||
private Integer difficulty;
|
||||
|
||||
/** 每一题分数 */
|
||||
@Excel(name = "每一题分数")
|
||||
private Long score;
|
||||
|
||||
/** 题目数 */
|
||||
@Excel(name = "题目数")
|
||||
private Long count;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String creatorId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setExamPaperStrategyId(Long examPaperStrategyId)
|
||||
{
|
||||
this.examPaperStrategyId = examPaperStrategyId;
|
||||
}
|
||||
|
||||
public Long getExamPaperStrategyId()
|
||||
{
|
||||
return examPaperStrategyId;
|
||||
}
|
||||
public void setQuestionType(Integer questionType)
|
||||
{
|
||||
this.questionType = questionType;
|
||||
}
|
||||
|
||||
public Integer getQuestionType()
|
||||
{
|
||||
return questionType;
|
||||
}
|
||||
public void setDifficulty(Integer difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Integer getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setCount(Long count)
|
||||
{
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public Long getCount()
|
||||
{
|
||||
return count;
|
||||
}
|
||||
public void setCreatorId(String creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("examPaperStrategyId", getExamPaperStrategyId())
|
||||
.append("questionType", getQuestionType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("count", getCount())
|
||||
.append("creatorId", getCreatorId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 策略子对象 exam_paper_strategy_list
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamPaperStrategyListPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
/** 主表id */
|
||||
@Excel(name = "主表id")
|
||||
private Long examPaperStrategyId;
|
||||
/** 题目类型类型 */
|
||||
@Excel(name = "题目类型类型")
|
||||
private Integer questionType;
|
||||
/** 默认难度系数 */
|
||||
@Excel(name = "默认难度系数")
|
||||
private Integer difficulty;
|
||||
/** 每一题分数 */
|
||||
@Excel(name = "每一题分数")
|
||||
private Long score;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 题目数 */
|
||||
@Excel(name = "题目数")
|
||||
private Long count;
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String creatorId;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setExamPaperStrategyId(Long examPaperStrategyId)
|
||||
{
|
||||
this.examPaperStrategyId = examPaperStrategyId;
|
||||
}
|
||||
|
||||
public Long getExamPaperStrategyId()
|
||||
{
|
||||
return examPaperStrategyId;
|
||||
}
|
||||
public void setQuestionType(Integer questionType)
|
||||
{
|
||||
this.questionType = questionType;
|
||||
}
|
||||
|
||||
public Integer getQuestionType()
|
||||
{
|
||||
return questionType;
|
||||
}
|
||||
public void setDifficulty(Integer difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Integer getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setCount(Long count)
|
||||
{
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public Long getCount()
|
||||
{
|
||||
return count;
|
||||
}
|
||||
public void setCreatorId(String creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("examPaperStrategyId", getExamPaperStrategyId())
|
||||
.append("questionType", getQuestionType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("count", getCount())
|
||||
.append("creatorId", getCreatorId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 试卷模板策略对象 exam_paper_strategy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
@TableName(value = "exam_paper_strategy")
|
||||
public class ExamPaperStrategyPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 策略名称 */
|
||||
@Excel(name = "策略名称")
|
||||
private String name;
|
||||
/** 策略代码 */
|
||||
@Excel(name = "策略代码")
|
||||
private String code;
|
||||
/** 试卷类型 */
|
||||
@Excel(name = "试卷类型")
|
||||
private Integer type;
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Integer difficulty;
|
||||
/** 总分数 */
|
||||
@Excel(name = "总分数")
|
||||
private Long score;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String creatorId;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "创建人")
|
||||
private Long categoryId;
|
||||
/** 策略子信息 */
|
||||
private List<ExamPaperStrategyList> examPaperStrategyListList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setCode(String code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
public void setType(Integer type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setDifficulty(Integer difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Integer getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setCreatorId(String creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public List<ExamPaperStrategyList> getExamPaperStrategyListList()
|
||||
{
|
||||
return examPaperStrategyListList;
|
||||
}
|
||||
|
||||
public void setExamPaperStrategyListList(List<ExamPaperStrategyList> examPaperStrategyListList)
|
||||
{
|
||||
this.examPaperStrategyListList = examPaperStrategyListList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("code", getCode())
|
||||
.append("type", getType())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("score", getScore())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("examPaperStrategyListList", getExamPaperStrategyListList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,431 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 题库对象 exam_question
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamQuestion extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
/** 题目编号 */
|
||||
@Excel(name = "题目编号")
|
||||
private String no;
|
||||
|
||||
/** 题干 */
|
||||
@Excel(name = "题干")
|
||||
private String question;
|
||||
|
||||
/** 选项A */
|
||||
@Excel(name = "选项A")
|
||||
private String optionA;
|
||||
|
||||
/** 选项B */
|
||||
@Excel(name = "选项B")
|
||||
private String optionB;
|
||||
|
||||
/** 选项C */
|
||||
@Excel(name = "选项C")
|
||||
private String optionC;
|
||||
|
||||
/** 选项D */
|
||||
@Excel(name = "选项D")
|
||||
private String optionD;
|
||||
|
||||
/** 选项E */
|
||||
@Excel(name = "选项E")
|
||||
private String optionE;
|
||||
|
||||
/** 选项F */
|
||||
@Excel(name = "选项F")
|
||||
private String optionF;
|
||||
|
||||
/** 选项F */
|
||||
@Excel(name = "选项F")
|
||||
private String optionG;
|
||||
|
||||
/** 默认分数(可空) */
|
||||
@Excel(name = "默认分数(可空)")
|
||||
private Long score;
|
||||
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
|
||||
/** 考试要点id */
|
||||
@Excel(name = "考试要点id")
|
||||
private Long pointId;
|
||||
|
||||
/** 答案(单选、判断详见AnswerEnum) */
|
||||
@Excel(name = "答案(单选、判断详见AnswerEnum)")
|
||||
private String answer;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "答案(单选、判断详见AnswerEnum)")
|
||||
private String analysisUrl;
|
||||
|
||||
/** 解析 */
|
||||
@Excel(name = "解析")
|
||||
private String analysis;
|
||||
|
||||
/** 出题省份id */
|
||||
@Excel(name = "出题省份id")
|
||||
private Long provinceId;
|
||||
|
||||
/** 出题城市id */
|
||||
@Excel(name = "出题城市id")
|
||||
private Long cityId;
|
||||
|
||||
/** 出题学校id */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long schoolId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long categoryId;
|
||||
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
|
||||
/** 题目类型(详见QuestionTypeEnum) */
|
||||
@Excel(name = "题目类型(详见QuestionTypeEnum)")
|
||||
private Long type;
|
||||
|
||||
/** 真题id */
|
||||
@Excel(name = "真题id")
|
||||
private Long examId;
|
||||
|
||||
/** 试卷来源(1练习题,2真题,3模拟题) */
|
||||
@Excel(name = "试卷来源(1练习题,2真题,3模拟题)")
|
||||
private String source;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 审核人id */
|
||||
@Excel(name = "审核人id")
|
||||
private Long auditorId;
|
||||
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
|
||||
/** 状态(0初始化,1审核通过,2驳回) */
|
||||
@Excel(name = "状态(0初始化,1审核通过,2驳回)")
|
||||
private Integer status;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDelete;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
public void setQuestion(String question)
|
||||
{
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public String getQuestion()
|
||||
{
|
||||
return question;
|
||||
}
|
||||
public void setOptionA(String optionA)
|
||||
{
|
||||
this.optionA = optionA;
|
||||
}
|
||||
|
||||
public String getOptionA()
|
||||
{
|
||||
return optionA;
|
||||
}
|
||||
public void setOptionB(String optionB)
|
||||
{
|
||||
this.optionB = optionB;
|
||||
}
|
||||
|
||||
public String getOptionB()
|
||||
{
|
||||
return optionB;
|
||||
}
|
||||
public void setOptionC(String optionC)
|
||||
{
|
||||
this.optionC = optionC;
|
||||
}
|
||||
|
||||
public String getOptionC()
|
||||
{
|
||||
return optionC;
|
||||
}
|
||||
public void setOptionD(String optionD)
|
||||
{
|
||||
this.optionD = optionD;
|
||||
}
|
||||
|
||||
public String getOptionD()
|
||||
{
|
||||
return optionD;
|
||||
}
|
||||
public void setOptionE(String optionE)
|
||||
{
|
||||
this.optionE = optionE;
|
||||
}
|
||||
|
||||
public String getOptionE()
|
||||
{
|
||||
return optionE;
|
||||
}
|
||||
public void setOptionF(String optionF)
|
||||
{
|
||||
this.optionF = optionF;
|
||||
}
|
||||
|
||||
public String getOptionF()
|
||||
{
|
||||
return optionF;
|
||||
}
|
||||
public void setOptionG(String optionG)
|
||||
{
|
||||
this.optionG = optionG;
|
||||
}
|
||||
|
||||
public String getOptionG()
|
||||
{
|
||||
return optionG;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setAnswer(String answer)
|
||||
{
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
public String getAnswer()
|
||||
{
|
||||
return answer;
|
||||
}
|
||||
public void setAnalysisUrl(String analysisUrl)
|
||||
{
|
||||
this.analysisUrl = analysisUrl;
|
||||
}
|
||||
|
||||
public String getAnalysisUrl()
|
||||
{
|
||||
return analysisUrl;
|
||||
}
|
||||
public void setAnalysis(String analysis)
|
||||
{
|
||||
this.analysis = analysis;
|
||||
}
|
||||
|
||||
public String getAnalysis()
|
||||
{
|
||||
return analysis;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setExamId(Long examId)
|
||||
{
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public Long getExamId()
|
||||
{
|
||||
return examId;
|
||||
}
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setAuditorId(Long auditorId)
|
||||
{
|
||||
this.auditorId = auditorId;
|
||||
}
|
||||
|
||||
public Long getAuditorId()
|
||||
{
|
||||
return auditorId;
|
||||
}
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setIsDelete(Integer isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("no", getNo())
|
||||
.append("question", getQuestion())
|
||||
.append("optionA", getOptionA())
|
||||
.append("optionB", getOptionB())
|
||||
.append("optionC", getOptionC())
|
||||
.append("optionD", getOptionD())
|
||||
.append("optionE", getOptionE())
|
||||
.append("optionF", getOptionF())
|
||||
.append("optionG", getOptionG())
|
||||
.append("score", getScore())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("pointId", getPointId())
|
||||
.append("answer", getAnswer())
|
||||
.append("analysisUrl", getAnalysisUrl())
|
||||
.append("analysis", getAnalysis())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("type", getType())
|
||||
.append("examId", getExamId())
|
||||
.append("source", getSource())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("auditorId", getAuditorId())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("status", getStatus())
|
||||
.append("isDelete", getIsDelete())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 题目纠错对象 exam_question_correction
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamQuestionCorrection extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String questionName;
|
||||
private String studentName;
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
|
||||
/** 原答案 */
|
||||
@Excel(name = "原答案")
|
||||
private String oldAnswer;
|
||||
|
||||
/** 纠错答案 */
|
||||
@Excel(name = "纠错答案")
|
||||
private String adviceAnswer;
|
||||
|
||||
/** 纠错备注解析 */
|
||||
@Excel(name = "纠错备注解析")
|
||||
private String adviceAnalysis;
|
||||
|
||||
/** 错误类型列表 */
|
||||
@Excel(name = "错误类型列表")
|
||||
private String errorTypeList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setOldAnswer(String oldAnswer)
|
||||
{
|
||||
this.oldAnswer = oldAnswer;
|
||||
}
|
||||
|
||||
public String getOldAnswer()
|
||||
{
|
||||
return oldAnswer;
|
||||
}
|
||||
public void setAdviceAnswer(String adviceAnswer)
|
||||
{
|
||||
this.adviceAnswer = adviceAnswer;
|
||||
}
|
||||
|
||||
public String getAdviceAnswer()
|
||||
{
|
||||
return adviceAnswer;
|
||||
}
|
||||
public void setAdviceAnalysis(String adviceAnalysis)
|
||||
{
|
||||
this.adviceAnalysis = adviceAnalysis;
|
||||
}
|
||||
|
||||
public String getAdviceAnalysis()
|
||||
{
|
||||
return adviceAnalysis;
|
||||
}
|
||||
public void setErrorTypeList(String errorTypeList)
|
||||
{
|
||||
this.errorTypeList = errorTypeList;
|
||||
}
|
||||
|
||||
public String getErrorTypeList()
|
||||
{
|
||||
return errorTypeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("oldAnswer", getOldAnswer())
|
||||
.append("adviceAnswer", getAdviceAnswer())
|
||||
.append("adviceAnalysis", getAdviceAnalysis())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("errorTypeList", getErrorTypeList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 题目纠错对象 exam_question_correction
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamQuestionCorrectionPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
/** 原答案 */
|
||||
@Excel(name = "原答案")
|
||||
private String oldAnswer;
|
||||
/** 纠错答案 */
|
||||
@Excel(name = "纠错答案")
|
||||
private String adviceAnswer;
|
||||
/** 纠错备注解析 */
|
||||
@Excel(name = "纠错备注解析")
|
||||
private String adviceAnalysis;
|
||||
/** $column.columnComment */
|
||||
private Date createTime;
|
||||
/** 错误类型列表 */
|
||||
@Excel(name = "错误类型列表")
|
||||
private String errorTypeList;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setOldAnswer(String oldAnswer)
|
||||
{
|
||||
this.oldAnswer = oldAnswer;
|
||||
}
|
||||
|
||||
public String getOldAnswer()
|
||||
{
|
||||
return oldAnswer;
|
||||
}
|
||||
public void setAdviceAnswer(String adviceAnswer)
|
||||
{
|
||||
this.adviceAnswer = adviceAnswer;
|
||||
}
|
||||
|
||||
public String getAdviceAnswer()
|
||||
{
|
||||
return adviceAnswer;
|
||||
}
|
||||
public void setAdviceAnalysis(String adviceAnalysis)
|
||||
{
|
||||
this.adviceAnalysis = adviceAnalysis;
|
||||
}
|
||||
|
||||
public String getAdviceAnalysis()
|
||||
{
|
||||
return adviceAnalysis;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setErrorTypeList(String errorTypeList)
|
||||
{
|
||||
this.errorTypeList = errorTypeList;
|
||||
}
|
||||
|
||||
public String getErrorTypeList()
|
||||
{
|
||||
return errorTypeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("oldAnswer", getOldAnswer())
|
||||
.append("adviceAnswer", getAdviceAnswer())
|
||||
.append("adviceAnalysis", getAdviceAnalysis())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("errorTypeList", getErrorTypeList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 题目收藏对象 exam_question_favorite
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamQuestionFavorite extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
private String questionName;
|
||||
private String studentName;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 题目来源 */
|
||||
@Excel(name = "题目来源")
|
||||
private Integer source;
|
||||
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
private String schoolName;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setSource(Integer source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Integer getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("source", getSource())
|
||||
.append("schoolId", getSchoolId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 题目收藏对象 exam_question_favorite
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamQuestionFavoritePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
private String categoryName;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 题目来源 */
|
||||
@Excel(name = "题目来源")
|
||||
private Integer source;
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setSource(Integer source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Integer getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("source", getSource())
|
||||
.append("schoolId", getSchoolId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,429 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 题库对象 exam_question
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@TableName(value = "exam_question")
|
||||
public class ExamQuestionPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 题目编号 */
|
||||
@Excel(name = "题目编号")
|
||||
private String no;
|
||||
/** 题干 */
|
||||
@Excel(name = "题干")
|
||||
private String question;
|
||||
/** 选项A */
|
||||
@Excel(name = "选项A")
|
||||
private String optionA;
|
||||
/** 选项B */
|
||||
@Excel(name = "选项B")
|
||||
private String optionB;
|
||||
/** 选项C */
|
||||
@Excel(name = "选项C")
|
||||
private String optionC;
|
||||
/** 选项D */
|
||||
@Excel(name = "选项D")
|
||||
private String optionD;
|
||||
/** 选项E */
|
||||
@Excel(name = "选项E")
|
||||
private String optionE;
|
||||
/** 选项F */
|
||||
@Excel(name = "选项F")
|
||||
private String optionF;
|
||||
/** 选项F */
|
||||
@Excel(name = "选项F")
|
||||
private String optionG;
|
||||
/** 默认分数(可空) */
|
||||
@Excel(name = "默认分数(可空)")
|
||||
private Long score;
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
/** 考试要点id */
|
||||
@Excel(name = "考试要点id")
|
||||
private Long pointId;
|
||||
/** 答案(单选、判断详见AnswerEnum) */
|
||||
@Excel(name = "答案(单选、判断详见AnswerEnum)")
|
||||
private String answer;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "答案(单选、判断详见AnswerEnum)")
|
||||
private String analysisUrl;
|
||||
/** 解析 */
|
||||
@Excel(name = "解析")
|
||||
private String analysis;
|
||||
/** 出题省份id */
|
||||
@Excel(name = "出题省份id")
|
||||
private Long provinceId;
|
||||
/** 出题城市id */
|
||||
@Excel(name = "出题城市id")
|
||||
private Long cityId;
|
||||
/** 出题学校id */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long schoolId;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long categoryId;
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
/** 题目类型(详见QuestionTypeEnum) */
|
||||
@Excel(name = "题目类型(详见QuestionTypeEnum)")
|
||||
private Long type;
|
||||
/** 真题id */
|
||||
@Excel(name = "真题id")
|
||||
private Long examId;
|
||||
/** 试卷来源(1练习题,2真题,3模拟题) */
|
||||
@Excel(name = "试卷来源(1练习题,2真题,3模拟题)")
|
||||
private String source;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
/** 审核人id */
|
||||
@Excel(name = "审核人id")
|
||||
private Long auditorId;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
/** 状态(0初始化,1审核通过,2驳回) */
|
||||
@Excel(name = "状态(0初始化,1审核通过,2驳回)")
|
||||
private Integer status;
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Integer isDelete;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
public void setQuestion(String question)
|
||||
{
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public String getQuestion()
|
||||
{
|
||||
return question;
|
||||
}
|
||||
public void setOptionA(String optionA)
|
||||
{
|
||||
this.optionA = optionA;
|
||||
}
|
||||
|
||||
public String getOptionA()
|
||||
{
|
||||
return optionA;
|
||||
}
|
||||
public void setOptionB(String optionB)
|
||||
{
|
||||
this.optionB = optionB;
|
||||
}
|
||||
|
||||
public String getOptionB()
|
||||
{
|
||||
return optionB;
|
||||
}
|
||||
public void setOptionC(String optionC)
|
||||
{
|
||||
this.optionC = optionC;
|
||||
}
|
||||
|
||||
public String getOptionC()
|
||||
{
|
||||
return optionC;
|
||||
}
|
||||
public void setOptionD(String optionD)
|
||||
{
|
||||
this.optionD = optionD;
|
||||
}
|
||||
|
||||
public String getOptionD()
|
||||
{
|
||||
return optionD;
|
||||
}
|
||||
public void setOptionE(String optionE)
|
||||
{
|
||||
this.optionE = optionE;
|
||||
}
|
||||
|
||||
public String getOptionE()
|
||||
{
|
||||
return optionE;
|
||||
}
|
||||
public void setOptionF(String optionF)
|
||||
{
|
||||
this.optionF = optionF;
|
||||
}
|
||||
|
||||
public String getOptionF()
|
||||
{
|
||||
return optionF;
|
||||
}
|
||||
public void setOptionG(String optionG)
|
||||
{
|
||||
this.optionG = optionG;
|
||||
}
|
||||
|
||||
public String getOptionG()
|
||||
{
|
||||
return optionG;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setPointId(Long pointId)
|
||||
{
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public Long getPointId()
|
||||
{
|
||||
return pointId;
|
||||
}
|
||||
public void setAnswer(String answer)
|
||||
{
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
public String getAnswer()
|
||||
{
|
||||
return answer;
|
||||
}
|
||||
public void setAnalysisUrl(String analysisUrl)
|
||||
{
|
||||
this.analysisUrl = analysisUrl;
|
||||
}
|
||||
|
||||
public String getAnalysisUrl()
|
||||
{
|
||||
return analysisUrl;
|
||||
}
|
||||
public void setAnalysis(String analysis)
|
||||
{
|
||||
this.analysis = analysis;
|
||||
}
|
||||
|
||||
public String getAnalysis()
|
||||
{
|
||||
return analysis;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setExamId(Long examId)
|
||||
{
|
||||
this.examId = examId;
|
||||
}
|
||||
|
||||
public Long getExamId()
|
||||
{
|
||||
return examId;
|
||||
}
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
public void setAuditorId(Long auditorId)
|
||||
{
|
||||
this.auditorId = auditorId;
|
||||
}
|
||||
|
||||
public Long getAuditorId()
|
||||
{
|
||||
return auditorId;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setIsDelete(Integer isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Integer getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("no", getNo())
|
||||
.append("question", getQuestion())
|
||||
.append("optionA", getOptionA())
|
||||
.append("optionB", getOptionB())
|
||||
.append("optionC", getOptionC())
|
||||
.append("optionD", getOptionD())
|
||||
.append("optionE", getOptionE())
|
||||
.append("optionF", getOptionF())
|
||||
.append("optionG", getOptionG())
|
||||
.append("score", getScore())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("pointId", getPointId())
|
||||
.append("answer", getAnswer())
|
||||
.append("analysisUrl", getAnalysisUrl())
|
||||
.append("analysis", getAnalysis())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("type", getType())
|
||||
.append("examId", getExamId())
|
||||
.append("source", getSource())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("auditorId", getAuditorId())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("status", getStatus())
|
||||
.append("isDelete", getIsDelete())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 出题学校对象 exam_school
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamSchool extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 学校名称 */
|
||||
@Excel(name = "学校名称")
|
||||
private String name;
|
||||
|
||||
/** 省份id */
|
||||
@Excel(name = "省份id")
|
||||
private Long provinceId;
|
||||
|
||||
private String provinceName;
|
||||
/** 城市id */
|
||||
@Excel(name = "城市id")
|
||||
private Long cityId;
|
||||
|
||||
private String cityName;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public String getProvinceName() {
|
||||
return provinceName;
|
||||
}
|
||||
|
||||
public void setProvinceName(String provinceName) {
|
||||
this.provinceName = provinceName;
|
||||
}
|
||||
|
||||
public String getCityName() {
|
||||
return cityName;
|
||||
}
|
||||
|
||||
public void setCityName(String cityName) {
|
||||
this.cityName = cityName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 出题学校对象 exam_school
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@TableName(value = "exam_school")
|
||||
public class ExamSchoolPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 学校名称 */
|
||||
@Excel(name = "学校名称")
|
||||
private String name;
|
||||
/** 省份id */
|
||||
@Excel(name = "省份id")
|
||||
private Long provinceId;
|
||||
/** 城市id */
|
||||
@Excel(name = "城市id")
|
||||
private Long cityId;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 错题集对象 exam_student_mistakes
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentMistakes extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
|
||||
private String studentName;
|
||||
/** 错误答案 */
|
||||
@Excel(name = "错误答案")
|
||||
private String errorAnswer;
|
||||
|
||||
/** 问题id */
|
||||
@Excel(name = "问题id")
|
||||
private Long questionId;
|
||||
|
||||
private String questionName;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
|
||||
/** 题目来源 */
|
||||
@Excel(name = "题目来源")
|
||||
private Integer source;
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setErrorAnswer(String errorAnswer)
|
||||
{
|
||||
this.errorAnswer = errorAnswer;
|
||||
}
|
||||
|
||||
public String getErrorAnswer()
|
||||
{
|
||||
return errorAnswer;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setSource(Integer source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Integer getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("id", getId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("errorAnswer", getErrorAnswer())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("status", getStatus())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("source", getSource())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 错题集对象 exam_student_mistakes
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentMistakesPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
private Long categoryId;
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
/** 错误答案 */
|
||||
@Excel(name = "错误答案")
|
||||
private String errorAnswer;
|
||||
/** 问题id */
|
||||
@Excel(name = "问题id")
|
||||
private Long questionId;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
private String categoryName;
|
||||
/** 学校id */
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolId;
|
||||
/** 题目来源 */
|
||||
@Excel(name = "题目来源")
|
||||
private Integer source;
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setErrorAnswer(String errorAnswer)
|
||||
{
|
||||
this.errorAnswer = errorAnswer;
|
||||
}
|
||||
|
||||
public String getErrorAnswer()
|
||||
{
|
||||
return errorAnswer;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCategoryName(String categoryName)
|
||||
{
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
return categoryName;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setSource(Integer source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public Integer getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("id", getId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("errorAnswer", getErrorAnswer())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("status", getStatus())
|
||||
.append("categoryName", getCategoryName())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("source", getSource())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 学生考试试卷实例对象 exam_student_paper
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentPaper extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
|
||||
private transient String paperName;
|
||||
private transient String studentName;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 考试时长 */
|
||||
@Excel(name = "考试时长")
|
||||
private Long takeTimes;
|
||||
|
||||
/** 得分 */
|
||||
@Excel(name = "得分")
|
||||
private Long score;
|
||||
|
||||
/** 状态(101初始化,201考试中,202取消考试,301提交试卷,302考试超时,401考试结束已评分,402考试结束未评分) */
|
||||
@Excel(name = " 状态(101初始化,201考试中,202取消考试,301提交试卷,302考试超时,401考试结束已评分,402考试结束未评分)")
|
||||
private Integer status;
|
||||
|
||||
/** 考试类型 */
|
||||
@Excel(name = "考试类型")
|
||||
private Integer examType;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public String getPaperName() {
|
||||
return paperName;
|
||||
}
|
||||
|
||||
public void setPaperName(String paperName) {
|
||||
this.paperName = paperName;
|
||||
}
|
||||
|
||||
public String getStudentName() {
|
||||
return studentName;
|
||||
}
|
||||
|
||||
public void setStudentName(String studentName) {
|
||||
this.studentName = studentName;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
public void setTakeTimes(Long takeTimes)
|
||||
{
|
||||
this.takeTimes = takeTimes;
|
||||
}
|
||||
|
||||
public Long getTakeTimes()
|
||||
{
|
||||
return takeTimes;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExamType(Integer examType)
|
||||
{
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public Integer getExamType()
|
||||
{
|
||||
return examType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("examTime", getExamTime())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("takeTimes", getTakeTimes())
|
||||
.append("score", getScore())
|
||||
.append("status", getStatus())
|
||||
.append("examType", getExamType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 学生答题明细对象 exam_student_paper_answer
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentPaperAnswer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
|
||||
private transient String paperName;
|
||||
private transient String questionName;
|
||||
/** 试卷实例id */
|
||||
@Excel(name = "试卷实例id")
|
||||
private Long stuPaperId;
|
||||
|
||||
/** 试卷明细表id */
|
||||
@Excel(name = "试卷明细表id")
|
||||
private Long examPaperItemId;
|
||||
|
||||
/** 试题id */
|
||||
@Excel(name = "试题id")
|
||||
private Long questionId;
|
||||
|
||||
/** 学生答案 */
|
||||
@Excel(name = "学生答案")
|
||||
private String studentAnswer;
|
||||
|
||||
/** 实际答案 */
|
||||
@Excel(name = "实际答案")
|
||||
private String realAnswer;
|
||||
|
||||
/** 答题结果 0错误 1正确 2未作答 4返回有作答 5返回未作答 6交卷未作答 */
|
||||
@Excel(name = "答题结果 0错误 1正确 2未作答 4返回有作答 5返回未作答 6交卷未作答")
|
||||
private Integer result;
|
||||
|
||||
/** 评分方式(1系统评分,2老师评分) */
|
||||
@Excel(name = "评分方式(1系统评分,2老师评分)")
|
||||
private Integer scoreType;
|
||||
|
||||
/** 本题得分 */
|
||||
@Excel(name = "本题得分")
|
||||
private Long score;
|
||||
|
||||
/** 答题耗时 */
|
||||
@Excel(name = "答题耗时")
|
||||
private Integer takeTimes;
|
||||
|
||||
/** 答题时间 */
|
||||
@Excel(name = "答题时间")
|
||||
private Integer answerTime;
|
||||
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
|
||||
/** 学生省份id */
|
||||
@Excel(name = "学生省份id")
|
||||
private Long stuProvinceId;
|
||||
|
||||
/** 学生城市id */
|
||||
@Excel(name = "学生城市id")
|
||||
private Long stuCityId;
|
||||
|
||||
/** 学生学校id */
|
||||
@Excel(name = "学生学校id")
|
||||
private Long stuSchoolId;
|
||||
|
||||
/** 出题省份id */
|
||||
@Excel(name = "出题省份id")
|
||||
private Long provinceId;
|
||||
|
||||
/** 出题城市id */
|
||||
@Excel(name = "出题城市id")
|
||||
private Long cityId;
|
||||
|
||||
/** 出题学校id */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long schoolId;
|
||||
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
|
||||
/** 题目类型(详见QuestionTypeEnum) */
|
||||
@Excel(name = "题目类型(详见QuestionTypeEnum)")
|
||||
private Long type;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public String getPaperName() {
|
||||
return paperName;
|
||||
}
|
||||
|
||||
public void setPaperName(String paperName) {
|
||||
this.paperName = paperName;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStuPaperId(Long stuPaperId)
|
||||
{
|
||||
this.stuPaperId = stuPaperId;
|
||||
}
|
||||
|
||||
public Long getStuPaperId()
|
||||
{
|
||||
return stuPaperId;
|
||||
}
|
||||
public void setExamPaperItemId(Long examPaperItemId)
|
||||
{
|
||||
this.examPaperItemId = examPaperItemId;
|
||||
}
|
||||
|
||||
public Long getExamPaperItemId()
|
||||
{
|
||||
return examPaperItemId;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentAnswer(String studentAnswer)
|
||||
{
|
||||
this.studentAnswer = studentAnswer;
|
||||
}
|
||||
|
||||
public String getStudentAnswer()
|
||||
{
|
||||
return studentAnswer;
|
||||
}
|
||||
public void setRealAnswer(String realAnswer)
|
||||
{
|
||||
this.realAnswer = realAnswer;
|
||||
}
|
||||
|
||||
public String getRealAnswer()
|
||||
{
|
||||
return realAnswer;
|
||||
}
|
||||
public void setResult(Integer result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public Integer getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
public void setScoreType(Integer scoreType)
|
||||
{
|
||||
this.scoreType = scoreType;
|
||||
}
|
||||
|
||||
public Integer getScoreType()
|
||||
{
|
||||
return scoreType;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setTakeTimes(Integer takeTimes)
|
||||
{
|
||||
this.takeTimes = takeTimes;
|
||||
}
|
||||
|
||||
public Integer getTakeTimes()
|
||||
{
|
||||
return takeTimes;
|
||||
}
|
||||
public void setAnswerTime(Integer answerTime)
|
||||
{
|
||||
this.answerTime = answerTime;
|
||||
}
|
||||
|
||||
public Integer getAnswerTime()
|
||||
{
|
||||
return answerTime;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setStuProvinceId(Long stuProvinceId)
|
||||
{
|
||||
this.stuProvinceId = stuProvinceId;
|
||||
}
|
||||
|
||||
public Long getStuProvinceId()
|
||||
{
|
||||
return stuProvinceId;
|
||||
}
|
||||
public void setStuCityId(Long stuCityId)
|
||||
{
|
||||
this.stuCityId = stuCityId;
|
||||
}
|
||||
|
||||
public Long getStuCityId()
|
||||
{
|
||||
return stuCityId;
|
||||
}
|
||||
public void setStuSchoolId(Long stuSchoolId)
|
||||
{
|
||||
this.stuSchoolId = stuSchoolId;
|
||||
}
|
||||
|
||||
public Long getStuSchoolId()
|
||||
{
|
||||
return stuSchoolId;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("stuPaperId", getStuPaperId())
|
||||
.append("examPaperItemId", getExamPaperItemId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentAnswer", getStudentAnswer())
|
||||
.append("realAnswer", getRealAnswer())
|
||||
.append("result", getResult())
|
||||
.append("scoreType", getScoreType())
|
||||
.append("score", getScore())
|
||||
.append("takeTimes", getTakeTimes())
|
||||
.append("answerTime", getAnswerTime())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("stuProvinceId", getStuProvinceId())
|
||||
.append("stuCityId", getStuCityId())
|
||||
.append("stuSchoolId", getStuSchoolId())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("type", getType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 学生答题明细对象 exam_student_paper_answer
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@TableName(value = "exam_student_paper_answer")
|
||||
public class ExamStudentPaperAnswerPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
/** 试卷实例id */
|
||||
@Excel(name = "试卷实例id")
|
||||
private Long stuPaperId;
|
||||
/** 试卷明细表id */
|
||||
@Excel(name = "试卷明细表id")
|
||||
private Long examPaperItemId;
|
||||
/** 试题id */
|
||||
@Excel(name = "试题id")
|
||||
private Long questionId;
|
||||
/** 学生答案 */
|
||||
@Excel(name = "学生答案")
|
||||
private String studentAnswer;
|
||||
/** 实际答案 */
|
||||
@Excel(name = "实际答案")
|
||||
private String realAnswer;
|
||||
/** 答题结果 0错误 1正确 2未作答 4返回有作答 5返回未作答 6交卷未作答 */
|
||||
@Excel(name = "答题结果 0错误 1正确 2未作答 4返回有作答 5返回未作答 6交卷未作答")
|
||||
private Integer result;
|
||||
/** 评分方式(1系统评分,2老师评分) */
|
||||
@Excel(name = "评分方式(1系统评分,2老师评分)")
|
||||
private Integer scoreType;
|
||||
/** 本题得分 */
|
||||
@Excel(name = "本题得分")
|
||||
private Long score;
|
||||
/** 答题耗时 */
|
||||
@Excel(name = "答题耗时")
|
||||
private Integer takeTimes;
|
||||
/** 答题时间 */
|
||||
@Excel(name = "答题时间")
|
||||
private Integer answerTime;
|
||||
/** 难度系数 */
|
||||
@Excel(name = "难度系数")
|
||||
private Long difficulty;
|
||||
/** 学生省份id */
|
||||
@Excel(name = "学生省份id")
|
||||
private Long stuProvinceId;
|
||||
/** 学生城市id */
|
||||
@Excel(name = "学生城市id")
|
||||
private Long stuCityId;
|
||||
/** 学生学校id */
|
||||
@Excel(name = "学生学校id")
|
||||
private Long stuSchoolId;
|
||||
/** 出题省份id */
|
||||
@Excel(name = "出题省份id")
|
||||
private Long provinceId;
|
||||
/** 出题城市id */
|
||||
@Excel(name = "出题城市id")
|
||||
private Long cityId;
|
||||
/** 出题学校id */
|
||||
@Excel(name = "出题学校id")
|
||||
private Long schoolId;
|
||||
/** 考试课程id */
|
||||
@Excel(name = "考试课程id")
|
||||
private Long courseId;
|
||||
/** 题目类型(详见QuestionTypeEnum) */
|
||||
@Excel(name = "题目类型(详见QuestionTypeEnum)")
|
||||
private Long type;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStuPaperId(Long stuPaperId)
|
||||
{
|
||||
this.stuPaperId = stuPaperId;
|
||||
}
|
||||
|
||||
public Long getStuPaperId()
|
||||
{
|
||||
return stuPaperId;
|
||||
}
|
||||
public void setExamPaperItemId(Long examPaperItemId)
|
||||
{
|
||||
this.examPaperItemId = examPaperItemId;
|
||||
}
|
||||
|
||||
public Long getExamPaperItemId()
|
||||
{
|
||||
return examPaperItemId;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setStudentAnswer(String studentAnswer)
|
||||
{
|
||||
this.studentAnswer = studentAnswer;
|
||||
}
|
||||
|
||||
public String getStudentAnswer()
|
||||
{
|
||||
return studentAnswer;
|
||||
}
|
||||
public void setRealAnswer(String realAnswer)
|
||||
{
|
||||
this.realAnswer = realAnswer;
|
||||
}
|
||||
|
||||
public String getRealAnswer()
|
||||
{
|
||||
return realAnswer;
|
||||
}
|
||||
public void setResult(Integer result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public Integer getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
public void setScoreType(Integer scoreType)
|
||||
{
|
||||
this.scoreType = scoreType;
|
||||
}
|
||||
|
||||
public Integer getScoreType()
|
||||
{
|
||||
return scoreType;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setTakeTimes(Integer takeTimes)
|
||||
{
|
||||
this.takeTimes = takeTimes;
|
||||
}
|
||||
|
||||
public Integer getTakeTimes()
|
||||
{
|
||||
return takeTimes;
|
||||
}
|
||||
public void setAnswerTime(Integer answerTime)
|
||||
{
|
||||
this.answerTime = answerTime;
|
||||
}
|
||||
|
||||
public Integer getAnswerTime()
|
||||
{
|
||||
return answerTime;
|
||||
}
|
||||
public void setDifficulty(Long difficulty)
|
||||
{
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public Long getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
public void setStuProvinceId(Long stuProvinceId)
|
||||
{
|
||||
this.stuProvinceId = stuProvinceId;
|
||||
}
|
||||
|
||||
public Long getStuProvinceId()
|
||||
{
|
||||
return stuProvinceId;
|
||||
}
|
||||
public void setStuCityId(Long stuCityId)
|
||||
{
|
||||
this.stuCityId = stuCityId;
|
||||
}
|
||||
|
||||
public Long getStuCityId()
|
||||
{
|
||||
return stuCityId;
|
||||
}
|
||||
public void setStuSchoolId(Long stuSchoolId)
|
||||
{
|
||||
this.stuSchoolId = stuSchoolId;
|
||||
}
|
||||
|
||||
public Long getStuSchoolId()
|
||||
{
|
||||
return stuSchoolId;
|
||||
}
|
||||
public void setProvinceId(Long provinceId)
|
||||
{
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public Long getProvinceId()
|
||||
{
|
||||
return provinceId;
|
||||
}
|
||||
public void setCityId(Long cityId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public Long getCityId()
|
||||
{
|
||||
return cityId;
|
||||
}
|
||||
public void setSchoolId(Long schoolId)
|
||||
{
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public Long getSchoolId()
|
||||
{
|
||||
return schoolId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("stuPaperId", getStuPaperId())
|
||||
.append("examPaperItemId", getExamPaperItemId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("studentAnswer", getStudentAnswer())
|
||||
.append("realAnswer", getRealAnswer())
|
||||
.append("result", getResult())
|
||||
.append("scoreType", getScoreType())
|
||||
.append("score", getScore())
|
||||
.append("takeTimes", getTakeTimes())
|
||||
.append("answerTime", getAnswerTime())
|
||||
.append("difficulty", getDifficulty())
|
||||
.append("stuProvinceId", getStuProvinceId())
|
||||
.append("stuCityId", getStuCityId())
|
||||
.append("stuSchoolId", getStuSchoolId())
|
||||
.append("provinceId", getProvinceId())
|
||||
.append("cityId", getCityId())
|
||||
.append("schoolId", getSchoolId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("type", getType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 学生考试试卷实例对象 exam_student_paper
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentPaperPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
/** 考试时长 */
|
||||
@Excel(name = "考试时长")
|
||||
private Long takeTimes;
|
||||
/** 得分 */
|
||||
@Excel(name = "得分")
|
||||
private Long score;
|
||||
/** 状态(101初始化,201考试中,202取消考试,301提交试卷,302考试超时,401考试结束已评分,402考试结束未评分) */
|
||||
@Excel(name = " 状态(101初始化,201考试中,202取消考试,301提交试卷,302考试超时,401考试结束已评分,402考试结束未评分)")
|
||||
private Integer status;
|
||||
/** 考试类型 */
|
||||
@Excel(name = "考试类型")
|
||||
private Integer examType;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
public void setTakeTimes(Long takeTimes)
|
||||
{
|
||||
this.takeTimes = takeTimes;
|
||||
}
|
||||
|
||||
public Long getTakeTimes()
|
||||
{
|
||||
return takeTimes;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExamType(Integer examType)
|
||||
{
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public Integer getExamType()
|
||||
{
|
||||
return examType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("examTime", getExamTime())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("takeTimes", getTakeTimes())
|
||||
.append("score", getScore())
|
||||
.append("status", getStatus())
|
||||
.append("examType", getExamType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 学生成绩对象 exam_student_score
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentScore extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
|
||||
/** 课程id */
|
||||
@Excel(name = "课程id")
|
||||
private Long courseId;
|
||||
|
||||
/** 学年 */
|
||||
@Excel(name = "学年")
|
||||
private Integer year;
|
||||
|
||||
/** 学期 */
|
||||
@Excel(name = "学期")
|
||||
private Integer semester;
|
||||
|
||||
/** 成绩 */
|
||||
@Excel(name = "成绩")
|
||||
private Long score;
|
||||
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setYear(Integer year)
|
||||
{
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public Integer getYear()
|
||||
{
|
||||
return year;
|
||||
}
|
||||
public void setSemester(Integer semester)
|
||||
{
|
||||
this.semester = semester;
|
||||
}
|
||||
|
||||
public Integer getSemester()
|
||||
{
|
||||
return semester;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("year", getYear())
|
||||
.append("semester", getSemester())
|
||||
.append("score", getScore())
|
||||
.append("examTime", getExamTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 学生成绩对象 exam_student_score
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class ExamStudentScorePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 试卷id */
|
||||
@Excel(name = "试卷id")
|
||||
private Long paperId;
|
||||
/** 学生id */
|
||||
@Excel(name = "学生id")
|
||||
private Long studentId;
|
||||
/** 课程id */
|
||||
@Excel(name = "课程id")
|
||||
private Long courseId;
|
||||
/** 学年 */
|
||||
@Excel(name = "学年")
|
||||
private Integer year;
|
||||
/** 学期 */
|
||||
@Excel(name = "学期")
|
||||
private Integer semester;
|
||||
/** 成绩 */
|
||||
@Excel(name = "成绩")
|
||||
private Long score;
|
||||
/** 考试时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date examTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPaperId(Long paperId)
|
||||
{
|
||||
this.paperId = paperId;
|
||||
}
|
||||
|
||||
public Long getPaperId()
|
||||
{
|
||||
return paperId;
|
||||
}
|
||||
public void setStudentId(Long studentId)
|
||||
{
|
||||
this.studentId = studentId;
|
||||
}
|
||||
|
||||
public Long getStudentId()
|
||||
{
|
||||
return studentId;
|
||||
}
|
||||
public void setCourseId(Long courseId)
|
||||
{
|
||||
this.courseId = courseId;
|
||||
}
|
||||
|
||||
public Long getCourseId()
|
||||
{
|
||||
return courseId;
|
||||
}
|
||||
public void setYear(Integer year)
|
||||
{
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public Integer getYear()
|
||||
{
|
||||
return year;
|
||||
}
|
||||
public void setSemester(Integer semester)
|
||||
{
|
||||
this.semester = semester;
|
||||
}
|
||||
|
||||
public Integer getSemester()
|
||||
{
|
||||
return semester;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setExamTime(Date examTime)
|
||||
{
|
||||
this.examTime = examTime;
|
||||
}
|
||||
|
||||
public Date getExamTime()
|
||||
{
|
||||
return examTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("paperId", getPaperId())
|
||||
.append("studentId", getStudentId())
|
||||
.append("courseId", getCourseId())
|
||||
.append("year", getYear())
|
||||
.append("semester", getSemester())
|
||||
.append("score", getScore())
|
||||
.append("examTime", getExamTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ReqAddQuestionDTO implements Serializable {
|
||||
private Long moduleId;
|
||||
private List<Long> questionIds;
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 学生答题正确率统计对象 stats_exam_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamAccuracy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
private String userName;
|
||||
/** 正确答题量 */
|
||||
@Excel(name = "正确答题量")
|
||||
private Long rightCount;
|
||||
|
||||
/** 答题总数 */
|
||||
@Excel(name = "答题总数")
|
||||
private Long doCount;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 学生答题正确率统计对象 stats_exam_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamAccuracyPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 正确答题量 */
|
||||
@Excel(name = "正确答题量")
|
||||
private Long rightCount;
|
||||
/** 答题总数 */
|
||||
@Excel(name = "答题总数")
|
||||
private Long doCount;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.luqj.exam.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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 按题目统计对象 stats_exam_question_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamQuestionAccuracy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
|
||||
private String questionName;
|
||||
|
||||
/** 正确数 */
|
||||
@Excel(name = "正确数")
|
||||
private Long rightCount;
|
||||
|
||||
/** 总答题数 */
|
||||
@Excel(name = "总答题数")
|
||||
private Long doCount;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getQuestionName() {
|
||||
return questionName;
|
||||
}
|
||||
|
||||
public void setQuestionName(String questionName) {
|
||||
this.questionName = questionName;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 按题目统计对象 stats_exam_question_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamQuestionAccuracyPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
/** 题目id */
|
||||
@Excel(name = "题目id")
|
||||
private Long questionId;
|
||||
/** 正确数 */
|
||||
@Excel(name = "正确数")
|
||||
private Long rightCount;
|
||||
/** 总答题数 */
|
||||
@Excel(name = "总答题数")
|
||||
private Long doCount;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setQuestionId(Long questionId)
|
||||
{
|
||||
this.questionId = questionId;
|
||||
}
|
||||
|
||||
public Long getQuestionId()
|
||||
{
|
||||
return questionId;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("questionId", getQuestionId())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 学生答题正确率统计对象 stats_exam_week_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamWeekAccuracy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
private String userName;
|
||||
|
||||
/** 本周开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本周开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 本周结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本周结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 本周正确题数 */
|
||||
@Excel(name = "本周正确题数")
|
||||
private Long rightCount;
|
||||
|
||||
/** 本周做题题数 */
|
||||
@Excel(name = "本周做题题数")
|
||||
private Long doCount;
|
||||
|
||||
/** 状态,是否参与本次排名0否 1是 */
|
||||
@Excel(name = "状态,是否参与本次排名0否 1是")
|
||||
private Integer status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.luqj.exam.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 学生答题正确率统计对象 stats_exam_week_accuracy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public class StatsExamWeekAccuracyPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.AUTO)
|
||||
/** id */
|
||||
private Long id;
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 本周开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本周开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
/** 本周结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本周结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
/** 本周正确题数 */
|
||||
@Excel(name = "本周正确题数")
|
||||
private Long rightCount;
|
||||
/** 本周做题题数 */
|
||||
@Excel(name = "本周做题题数")
|
||||
private Long doCount;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 修改时间 */
|
||||
private Date updateTime;
|
||||
/** 状态,是否参与本次排名0否 1是 */
|
||||
@Excel(name = "状态,是否参与本次排名0否 1是")
|
||||
private Integer status;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
public void setRightCount(Long rightCount)
|
||||
{
|
||||
this.rightCount = rightCount;
|
||||
}
|
||||
|
||||
public Long getRightCount()
|
||||
{
|
||||
return rightCount;
|
||||
}
|
||||
public void setDoCount(Long doCount)
|
||||
{
|
||||
this.doCount = doCount;
|
||||
}
|
||||
|
||||
public Long getDoCount()
|
||||
{
|
||||
return doCount;
|
||||
}
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("rightCount", getRightCount())
|
||||
.append("doCount", getDoCount())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.luqj.exam.init;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@Component
|
||||
public class ExamInit {
|
||||
// @Autowired
|
||||
// private IExamQuestionService examQuestionService;
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
// examQuestionService.getMapByIds(Arrays.asList(1L));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamPaperItem;
|
||||
import com.luqj.exam.domain.ExamPaperItemPlus;
|
||||
|
||||
/**
|
||||
* 试卷明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamPaperItemMapper extends BaseMapper<ExamPaperItemPlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷明细
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 试卷明细
|
||||
*/
|
||||
public ExamPaperItem selectExamPaperItemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷明细列表
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 试卷明细集合
|
||||
*/
|
||||
public List<ExamPaperItem> selectExamPaperItemList(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 新增试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperItem(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 修改试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperItem(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 删除试卷明细
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除试卷明细
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.luqj.exam.domain.ExamPaper;
|
||||
import com.luqj.exam.domain.ExamPaperModule;
|
||||
import com.luqj.exam.domain.ExamPaperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 试卷Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
public interface ExamPaperMapper extends BaseMapper<ExamPaperPlus> {
|
||||
/**
|
||||
* 查询试卷
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 试卷
|
||||
*/
|
||||
public ExamPaper selectExamPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷列表
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 试卷集合
|
||||
*/
|
||||
public List<ExamPaper> selectExamPaperList(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 新增试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaper(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 修改试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaper(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 删除试卷
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除试卷
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除试卷模块
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleByPaperIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增试卷模块
|
||||
*
|
||||
* @param examPaperModuleList 试卷模块列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchExamPaperModule(List<ExamPaperModule> examPaperModuleList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过试卷ID删除试卷模块信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleByPaperId(Long id);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamPaperModule;
|
||||
import com.luqj.exam.domain.ExamPaperModulePlus;
|
||||
import com.luqj.exam.domain.ExamPaperItem;
|
||||
|
||||
/**
|
||||
* 试卷模块Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
public interface ExamPaperModuleMapper extends BaseMapper<ExamPaperModulePlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷模块
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 试卷模块
|
||||
*/
|
||||
public ExamPaperModule selectExamPaperModuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷模块列表
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 试卷模块集合
|
||||
*/
|
||||
public List<ExamPaperModule> selectExamPaperModuleList(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperModule(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 修改试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperModule(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 删除试卷模块
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除试卷模块
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除试卷明细
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemByExamPaperModuleIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增试卷明细
|
||||
*
|
||||
* @param examPaperItemList 试卷明细列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchExamPaperItem(List<ExamPaperItem> examPaperItemList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过试卷模块ID删除试卷明细信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemByExamPaperModuleId(Long id);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyList;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyListPlus;
|
||||
|
||||
/**
|
||||
* 策略子Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamPaperStrategyListMapper extends BaseMapper<ExamPaperStrategyListPlus>
|
||||
{
|
||||
/**
|
||||
* 查询策略子
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 策略子
|
||||
*/
|
||||
public ExamPaperStrategyList selectExamPaperStrategyListById(Long id);
|
||||
|
||||
/**
|
||||
* 查询策略子列表
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 策略子集合
|
||||
*/
|
||||
public List<ExamPaperStrategyList> selectExamPaperStrategyListList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 新增策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 修改策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 删除策略子
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除策略子
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamPaperStrategy;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyPlus;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyList;
|
||||
|
||||
/**
|
||||
* 试卷模板策略Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
public interface ExamPaperStrategyMapper extends BaseMapper<ExamPaperStrategyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷模板策略
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 试卷模板策略
|
||||
*/
|
||||
public ExamPaperStrategy selectExamPaperStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷模板策略列表
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 试卷模板策略集合
|
||||
*/
|
||||
public List<ExamPaperStrategy> selectExamPaperStrategyList(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 新增试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperStrategy(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 修改试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperStrategy(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 删除试卷模板策略
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除试卷模板策略
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除策略子
|
||||
*
|
||||
* @param customerIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListByExamPaperStrategyIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增策略子
|
||||
*
|
||||
* @param examPaperStrategyListList 策略子列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchExamPaperStrategyList(List<ExamPaperStrategyList> examPaperStrategyListList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过试卷模板策略ID删除策略子信息
|
||||
*
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListByExamPaperStrategyId(Long id);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrection;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrectionPlus;
|
||||
|
||||
/**
|
||||
* 题目纠错Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamQuestionCorrectionMapper extends BaseMapper<ExamQuestionCorrectionPlus>
|
||||
{
|
||||
/**
|
||||
* 查询题目纠错
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 题目纠错
|
||||
*/
|
||||
public ExamQuestionCorrection selectExamQuestionCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题目纠错列表
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 题目纠错集合
|
||||
*/
|
||||
public List<ExamQuestionCorrection> selectExamQuestionCorrectionList(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 新增题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 修改题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 删除题目纠错
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除题目纠错
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionCorrectionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamQuestionFavorite;
|
||||
import com.luqj.exam.domain.ExamQuestionFavoritePlus;
|
||||
|
||||
/**
|
||||
* 题目收藏Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamQuestionFavoriteMapper extends BaseMapper<ExamQuestionFavoritePlus>
|
||||
{
|
||||
/**
|
||||
* 查询题目收藏
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 题目收藏
|
||||
*/
|
||||
public ExamQuestionFavorite selectExamQuestionFavoriteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题目收藏列表
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 题目收藏集合
|
||||
*/
|
||||
public List<ExamQuestionFavorite> selectExamQuestionFavoriteList(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 新增题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 修改题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 删除题目收藏
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionFavoriteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除题目收藏
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionFavoriteByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamQuestion;
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
|
||||
/**
|
||||
* 题库Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamQuestionMapper extends BaseMapper<ExamQuestionPlus>
|
||||
{
|
||||
/**
|
||||
* 查询题库
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 题库
|
||||
*/
|
||||
public ExamQuestion selectExamQuestionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题库列表
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 题库集合
|
||||
*/
|
||||
public List<ExamQuestion> selectExamQuestionList(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 新增题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestion(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestion(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 删除题库
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除题库
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamSchool;
|
||||
import com.luqj.exam.domain.ExamSchoolPlus;
|
||||
|
||||
/**
|
||||
* 出题学校Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamSchoolMapper extends BaseMapper<ExamSchoolPlus>
|
||||
{
|
||||
/**
|
||||
* 查询出题学校
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 出题学校
|
||||
*/
|
||||
public ExamSchool selectExamSchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 查询出题学校列表
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 出题学校集合
|
||||
*/
|
||||
public List<ExamSchool> selectExamSchoolList(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 新增出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamSchool(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 修改出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamSchool(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 删除出题学校
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamSchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除出题学校
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamSchoolByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamStudentMistakes;
|
||||
import com.luqj.exam.domain.ExamStudentMistakesPlus;
|
||||
|
||||
/**
|
||||
* 错题集Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamStudentMistakesMapper extends BaseMapper<ExamStudentMistakesPlus>
|
||||
{
|
||||
/**
|
||||
* 查询错题集
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 错题集
|
||||
*/
|
||||
public ExamStudentMistakes selectExamStudentMistakesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询错题集列表
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 错题集集合
|
||||
*/
|
||||
public List<ExamStudentMistakes> selectExamStudentMistakesList(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 新增错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentMistakes(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 修改错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentMistakes(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 删除错题集
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentMistakesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除错题集
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentMistakesByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswer;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswerPlus;
|
||||
|
||||
/**
|
||||
* 学生答题明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamStudentPaperAnswerMapper extends BaseMapper<ExamStudentPaperAnswerPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题明细
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 学生答题明细
|
||||
*/
|
||||
public ExamStudentPaperAnswer selectExamStudentPaperAnswerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题明细列表
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 学生答题明细集合
|
||||
*/
|
||||
public List<ExamStudentPaperAnswer> selectExamStudentPaperAnswerList(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 新增学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 修改学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 删除学生答题明细
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperAnswerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题明细
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperAnswerByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamStudentPaper;
|
||||
import com.luqj.exam.domain.ExamStudentPaperPlus;
|
||||
|
||||
/**
|
||||
* 学生考试试卷实例Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamStudentPaperMapper extends BaseMapper<ExamStudentPaperPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生考试试卷实例
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 学生考试试卷实例
|
||||
*/
|
||||
public ExamStudentPaper selectExamStudentPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生考试试卷实例列表
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 学生考试试卷实例集合
|
||||
*/
|
||||
public List<ExamStudentPaper> selectExamStudentPaperList(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 新增学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentPaper(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 修改学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentPaper(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 删除学生考试试卷实例
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学生考试试卷实例
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.ExamStudentScore;
|
||||
import com.luqj.exam.domain.ExamStudentScorePlus;
|
||||
|
||||
/**
|
||||
* 学生成绩Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface ExamStudentScoreMapper extends BaseMapper<ExamStudentScorePlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生成绩
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 学生成绩
|
||||
*/
|
||||
public ExamStudentScore selectExamStudentScoreById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生成绩列表
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 学生成绩集合
|
||||
*/
|
||||
public List<ExamStudentScore> selectExamStudentScoreList(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 新增学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentScore(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 修改学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentScore(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 删除学生成绩
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentScoreById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学生成绩
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentScoreByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.StatsExamAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamAccuracyPlus;
|
||||
|
||||
/**
|
||||
* 学生答题正确率统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface StatsExamAccuracyMapper extends BaseMapper<StatsExamAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
public StatsExamAccuracy selectStatsExamAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计集合
|
||||
*/
|
||||
public List<StatsExamAccuracy> selectStatsExamAccuracyList(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamAccuracyByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracyPlus;
|
||||
|
||||
/**
|
||||
* 按题目统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface StatsExamQuestionAccuracyMapper extends BaseMapper<StatsExamQuestionAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询按题目统计
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 按题目统计
|
||||
*/
|
||||
public StatsExamQuestionAccuracy selectStatsExamQuestionAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询按题目统计列表
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 按题目统计集合
|
||||
*/
|
||||
public List<StatsExamQuestionAccuracy> selectStatsExamQuestionAccuracyList(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 新增按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 修改按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 删除按题目统计
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamQuestionAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除按题目统计
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamQuestionAccuracyByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.luqj.exam.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracyPlus;
|
||||
|
||||
/**
|
||||
* 学生答题正确率统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface StatsExamWeekAccuracyMapper extends BaseMapper<StatsExamWeekAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
public StatsExamWeekAccuracy selectStatsExamWeekAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计集合
|
||||
*/
|
||||
public List<StatsExamWeekAccuracy> selectStatsExamWeekAccuracyList(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamWeekAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamWeekAccuracyByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.luqj.exam.domain.ChooiseQustion;
|
||||
import com.luqj.exam.domain.ChooiseSearch;
|
||||
import com.luqj.exam.domain.ExamPaperItem;
|
||||
import com.luqj.exam.domain.ExamPaperItemPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 试卷明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamPaperItemService extends IService<ExamPaperItemPlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷明细
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 试卷明细
|
||||
*/
|
||||
public ExamPaperItem selectExamPaperItemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷明细列表
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 试卷明细集合
|
||||
*/
|
||||
public List<ExamPaperItem> selectExamPaperItemList(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 新增试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperItem(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 修改试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperItem(ExamPaperItem examPaperItem);
|
||||
|
||||
/**
|
||||
* 批量删除试卷明细
|
||||
*
|
||||
* @param ids 需要删除的试卷明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除试卷明细信息
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperItemById(Long id);
|
||||
|
||||
int deleteExamPaperItemByModuleIdAndQuestionIds(Long moduleId,List<Long> questionIds);
|
||||
|
||||
boolean additionalInfo(List<ExamPaperItem> list);
|
||||
|
||||
List<ExamPaperItemPlus> getByIds(List<Long> ids, SFunction<ExamPaperItemPlus, ?>... columns);
|
||||
|
||||
ExamPaperItemPlus getById(Long id, SFunction<ExamPaperItemPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamPaperItemPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperItemPlus, ?>... columns);
|
||||
|
||||
List<ExamPaperItemPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamPaperItemPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
|
||||
List<ChooiseQustion> chooiseList(ChooiseSearch search);
|
||||
|
||||
List<ExamPaperItemPlus> selectByModuleIdAndQuestionIds(Long moduleId,List<Long> questionIds);
|
||||
|
||||
boolean deleteByPaperId(Long id);
|
||||
|
||||
boolean deleteByPaperId(List<Long> ids);
|
||||
|
||||
boolean deleteByModuleId(Long id);
|
||||
|
||||
boolean deleteByModuleId(List<Long> ids);
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamPaperModule;
|
||||
import com.luqj.exam.domain.ExamPaperModulePlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 试卷模块Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
public interface IExamPaperModuleService extends IService<ExamPaperModulePlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷模块
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 试卷模块
|
||||
*/
|
||||
public ExamPaperModule selectExamPaperModuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷模块列表
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 试卷模块集合
|
||||
*/
|
||||
public List<ExamPaperModule> selectExamPaperModuleList(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperModule(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 修改试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperModule(ExamPaperModule examPaperModule);
|
||||
|
||||
/**
|
||||
* 批量删除试卷模块
|
||||
*
|
||||
* @param ids 需要删除的试卷模块ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除试卷模块信息
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperModuleById(Long id);
|
||||
|
||||
List<ExamPaperModulePlus> getByIds(List<Long> ids, SFunction<ExamPaperModulePlus, ?>... columns);
|
||||
|
||||
ExamPaperModulePlus getById(Long id, SFunction<ExamPaperModulePlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamPaperModulePlus> getMapByIds(List<Long> ids, SFunction<ExamPaperModulePlus, ?>... columns);
|
||||
|
||||
List<ExamPaperModulePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamPaperModulePlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
|
||||
boolean addQuestion(Long moduleId,Long questionId);
|
||||
|
||||
boolean addQuestion(Long moduleId,List<Long> questionIds);
|
||||
|
||||
boolean removeQuestion(Long moduleId,List<Long> questionIds);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamPaper;
|
||||
import com.luqj.exam.domain.ExamPaperPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 试卷Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
public interface IExamPaperService extends IService<ExamPaperPlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 试卷
|
||||
*/
|
||||
public ExamPaper selectExamPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷列表
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 试卷集合
|
||||
*/
|
||||
public List<ExamPaper> selectExamPaperList(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 新增试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaper(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 修改试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaper(ExamPaper examPaper);
|
||||
|
||||
/**
|
||||
* 批量删除试卷
|
||||
*
|
||||
* @param ids 需要删除的试卷ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除试卷信息
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperById(Long id);
|
||||
|
||||
List<ExamPaperPlus> getByIds(List<Long> ids, SFunction<ExamPaperPlus, ?>... columns);
|
||||
|
||||
ExamPaperPlus getById(Long id, SFunction<ExamPaperPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamPaperPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperPlus, ?>... columns);
|
||||
|
||||
List<ExamPaperPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamPaperPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyList;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyListPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 策略子Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamPaperStrategyListService extends IService<ExamPaperStrategyListPlus>
|
||||
{
|
||||
/**
|
||||
* 查询策略子
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 策略子
|
||||
*/
|
||||
public ExamPaperStrategyList selectExamPaperStrategyListById(Long id);
|
||||
|
||||
/**
|
||||
* 查询策略子列表
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 策略子集合
|
||||
*/
|
||||
public List<ExamPaperStrategyList> selectExamPaperStrategyListList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 新增策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 修改策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList);
|
||||
|
||||
/**
|
||||
* 批量删除策略子
|
||||
*
|
||||
* @param ids 需要删除的策略子ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除策略子信息
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyListById(Long id);
|
||||
|
||||
List<ExamPaperStrategyListPlus> getByIds(List<Long> ids, SFunction<ExamPaperStrategyListPlus, ?>... columns);
|
||||
|
||||
ExamPaperStrategyListPlus getById(Long id, SFunction<ExamPaperStrategyListPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamPaperStrategyListPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperStrategyListPlus, ?>... columns);
|
||||
|
||||
List<ExamPaperStrategyListPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamPaperStrategyListPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamPaperStrategy;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 试卷模板策略Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
public interface IExamPaperStrategyService extends IService<ExamPaperStrategyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询试卷模板策略
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 试卷模板策略
|
||||
*/
|
||||
public ExamPaperStrategy selectExamPaperStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询试卷模板策略列表
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 试卷模板策略集合
|
||||
*/
|
||||
public List<ExamPaperStrategy> selectExamPaperStrategyList(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 新增试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamPaperStrategy(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 修改试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamPaperStrategy(ExamPaperStrategy examPaperStrategy);
|
||||
|
||||
/**
|
||||
* 批量删除试卷模板策略
|
||||
*
|
||||
* @param ids 需要删除的试卷模板策略ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除试卷模板策略信息
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamPaperStrategyById(Long id);
|
||||
|
||||
List<ExamPaperStrategyPlus> getByIds(List<Long> ids, SFunction<ExamPaperStrategyPlus, ?>... columns);
|
||||
|
||||
ExamPaperStrategyPlus getById(Long id, SFunction<ExamPaperStrategyPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamPaperStrategyPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperStrategyPlus, ?>... columns);
|
||||
|
||||
List<ExamPaperStrategyPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamPaperStrategyPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrection;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrectionPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 题目纠错Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamQuestionCorrectionService extends IService<ExamQuestionCorrectionPlus>
|
||||
{
|
||||
/**
|
||||
* 查询题目纠错
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 题目纠错
|
||||
*/
|
||||
public ExamQuestionCorrection selectExamQuestionCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题目纠错列表
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 题目纠错集合
|
||||
*/
|
||||
public List<ExamQuestionCorrection> selectExamQuestionCorrectionList(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 新增题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 修改题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection);
|
||||
|
||||
/**
|
||||
* 批量删除题目纠错
|
||||
*
|
||||
* @param ids 需要删除的题目纠错ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionCorrectionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除题目纠错信息
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionCorrectionById(Long id);
|
||||
|
||||
List<ExamQuestionCorrectionPlus> getByIds(List<Long> ids, SFunction<ExamQuestionCorrectionPlus, ?>... columns);
|
||||
|
||||
ExamQuestionCorrectionPlus getById(Long id, SFunction<ExamQuestionCorrectionPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamQuestionCorrectionPlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionCorrectionPlus, ?>... columns);
|
||||
|
||||
List<ExamQuestionCorrectionPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamQuestionCorrectionPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamQuestionFavorite;
|
||||
import com.luqj.exam.domain.ExamQuestionFavoritePlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 题目收藏Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamQuestionFavoriteService extends IService<ExamQuestionFavoritePlus>
|
||||
{
|
||||
/**
|
||||
* 查询题目收藏
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 题目收藏
|
||||
*/
|
||||
public ExamQuestionFavorite selectExamQuestionFavoriteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题目收藏列表
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 题目收藏集合
|
||||
*/
|
||||
public List<ExamQuestionFavorite> selectExamQuestionFavoriteList(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 新增题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 修改题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite);
|
||||
|
||||
/**
|
||||
* 批量删除题目收藏
|
||||
*
|
||||
* @param ids 需要删除的题目收藏ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionFavoriteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除题目收藏信息
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionFavoriteById(Long id);
|
||||
|
||||
List<ExamQuestionFavoritePlus> getByIds(List<Long> ids, SFunction<ExamQuestionFavoritePlus, ?>... columns);
|
||||
|
||||
ExamQuestionFavoritePlus getById(Long id, SFunction<ExamQuestionFavoritePlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamQuestionFavoritePlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionFavoritePlus, ?>... columns);
|
||||
|
||||
List<ExamQuestionFavoritePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamQuestionFavoritePlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamQuestion;
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 题库Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamQuestionService extends IService<ExamQuestionPlus>
|
||||
{
|
||||
/**
|
||||
* 查询题库
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 题库
|
||||
*/
|
||||
public ExamQuestion selectExamQuestionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询题库列表
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 题库集合
|
||||
*/
|
||||
public List<ExamQuestion> selectExamQuestionList(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 新增题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamQuestion(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamQuestion(ExamQuestion examQuestion);
|
||||
|
||||
/**
|
||||
* 批量删除题库
|
||||
*
|
||||
* @param ids 需要删除的题库ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除题库信息
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamQuestionById(Long id);
|
||||
|
||||
List<ExamQuestionPlus> getByIds(List<Long> ids, SFunction<ExamQuestionPlus, ?>... columns);
|
||||
|
||||
ExamQuestionPlus getById(Long id, SFunction<ExamQuestionPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamQuestionPlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionPlus, ?>... columns);
|
||||
|
||||
List<ExamQuestionPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamQuestionPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamSchool;
|
||||
import com.luqj.exam.domain.ExamSchoolPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 出题学校Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamSchoolService extends IService<ExamSchoolPlus>
|
||||
{
|
||||
/**
|
||||
* 查询出题学校
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 出题学校
|
||||
*/
|
||||
public ExamSchool selectExamSchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 查询出题学校列表
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 出题学校集合
|
||||
*/
|
||||
public List<ExamSchool> selectExamSchoolList(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 新增出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamSchool(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 修改出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamSchool(ExamSchool examSchool);
|
||||
|
||||
/**
|
||||
* 批量删除出题学校
|
||||
*
|
||||
* @param ids 需要删除的出题学校ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamSchoolByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除出题学校信息
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamSchoolById(Long id);
|
||||
|
||||
List<ExamSchoolPlus> getByIds(List<Long> ids, SFunction<ExamSchoolPlus, ?>... columns);
|
||||
|
||||
ExamSchoolPlus getById(Long id, SFunction<ExamSchoolPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamSchoolPlus> getMapByIds(List<Long> ids, SFunction<ExamSchoolPlus, ?>... columns);
|
||||
|
||||
List<ExamSchoolPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamSchoolPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamStudentMistakes;
|
||||
import com.luqj.exam.domain.ExamStudentMistakesPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 错题集Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamStudentMistakesService extends IService<ExamStudentMistakesPlus>
|
||||
{
|
||||
/**
|
||||
* 查询错题集
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 错题集
|
||||
*/
|
||||
public ExamStudentMistakes selectExamStudentMistakesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询错题集列表
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 错题集集合
|
||||
*/
|
||||
public List<ExamStudentMistakes> selectExamStudentMistakesList(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 新增错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentMistakes(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 修改错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentMistakes(ExamStudentMistakes examStudentMistakes);
|
||||
|
||||
/**
|
||||
* 批量删除错题集
|
||||
*
|
||||
* @param ids 需要删除的错题集ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentMistakesByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除错题集信息
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentMistakesById(Long id);
|
||||
|
||||
List<ExamStudentMistakesPlus> getByIds(List<Long> ids, SFunction<ExamStudentMistakesPlus, ?>... columns);
|
||||
|
||||
ExamStudentMistakesPlus getById(Long id, SFunction<ExamStudentMistakesPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamStudentMistakesPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentMistakesPlus, ?>... columns);
|
||||
|
||||
List<ExamStudentMistakesPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamStudentMistakesPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswer;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswerPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 学生答题明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamStudentPaperAnswerService extends IService<ExamStudentPaperAnswerPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题明细
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 学生答题明细
|
||||
*/
|
||||
public ExamStudentPaperAnswer selectExamStudentPaperAnswerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题明细列表
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 学生答题明细集合
|
||||
*/
|
||||
public List<ExamStudentPaperAnswer> selectExamStudentPaperAnswerList(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 新增学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 修改学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题明细
|
||||
*
|
||||
* @param ids 需要删除的学生答题明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperAnswerByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除学生答题明细信息
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperAnswerById(Long id);
|
||||
|
||||
List<ExamStudentPaperAnswerPlus> getByIds(List<Long> ids, SFunction<ExamStudentPaperAnswerPlus, ?>... columns);
|
||||
|
||||
ExamStudentPaperAnswerPlus getById(Long id, SFunction<ExamStudentPaperAnswerPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamStudentPaperAnswerPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentPaperAnswerPlus, ?>... columns);
|
||||
|
||||
List<ExamStudentPaperAnswerPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamStudentPaperAnswerPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
|
||||
boolean additionalInfo(List<ExamStudentPaperAnswer> list);
|
||||
|
||||
int deleteExamStudentPaperAnswerByParentIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamStudentPaper;
|
||||
import com.luqj.exam.domain.ExamStudentPaperPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 学生考试试卷实例Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamStudentPaperService extends IService<ExamStudentPaperPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生考试试卷实例
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 学生考试试卷实例
|
||||
*/
|
||||
public ExamStudentPaper selectExamStudentPaperById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生考试试卷实例列表
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 学生考试试卷实例集合
|
||||
*/
|
||||
public List<ExamStudentPaper> selectExamStudentPaperList(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 新增学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentPaper(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 修改学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentPaper(ExamStudentPaper examStudentPaper);
|
||||
|
||||
/**
|
||||
* 批量删除学生考试试卷实例
|
||||
*
|
||||
* @param ids 需要删除的学生考试试卷实例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除学生考试试卷实例信息
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentPaperById(Long id);
|
||||
|
||||
List<ExamStudentPaperPlus> getByIds(List<Long> ids, SFunction<ExamStudentPaperPlus, ?>... columns);
|
||||
|
||||
ExamStudentPaperPlus getById(Long id, SFunction<ExamStudentPaperPlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamStudentPaperPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentPaperPlus, ?>... columns);
|
||||
|
||||
List<ExamStudentPaperPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamStudentPaperPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
|
||||
|
||||
boolean additionalInfo(List<ExamStudentPaper> list);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.ExamStudentScore;
|
||||
import com.luqj.exam.domain.ExamStudentScorePlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 学生成绩Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IExamStudentScoreService extends IService<ExamStudentScorePlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生成绩
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 学生成绩
|
||||
*/
|
||||
public ExamStudentScore selectExamStudentScoreById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生成绩列表
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 学生成绩集合
|
||||
*/
|
||||
public List<ExamStudentScore> selectExamStudentScoreList(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 新增学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamStudentScore(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 修改学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamStudentScore(ExamStudentScore examStudentScore);
|
||||
|
||||
/**
|
||||
* 批量删除学生成绩
|
||||
*
|
||||
* @param ids 需要删除的学生成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentScoreByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除学生成绩信息
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamStudentScoreById(Long id);
|
||||
|
||||
List<ExamStudentScorePlus> getByIds(List<Long> ids, SFunction<ExamStudentScorePlus, ?>... columns);
|
||||
|
||||
ExamStudentScorePlus getById(Long id, SFunction<ExamStudentScorePlus, ?>... columns);
|
||||
|
||||
Map<Long, ExamStudentScorePlus> getMapByIds(List<Long> ids, SFunction<ExamStudentScorePlus, ?>... columns);
|
||||
|
||||
List<ExamStudentScorePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, ExamStudentScorePlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.StatsExamAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamAccuracyPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 学生答题正确率统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IStatsExamAccuracyService extends IService<StatsExamAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
public StatsExamAccuracy selectStatsExamAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计集合
|
||||
*/
|
||||
public List<StatsExamAccuracy> selectStatsExamAccuracyList(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamAccuracyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计信息
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamAccuracyById(Long id);
|
||||
|
||||
List<StatsExamAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamAccuracyPlus, ?>... columns);
|
||||
|
||||
StatsExamAccuracyPlus getById(Long id, SFunction<StatsExamAccuracyPlus, ?>... columns);
|
||||
|
||||
Map<Long, StatsExamAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamAccuracyPlus, ?>... columns);
|
||||
|
||||
List<StatsExamAccuracyPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, StatsExamAccuracyPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracyPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 按题目统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IStatsExamQuestionAccuracyService extends IService<StatsExamQuestionAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询按题目统计
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 按题目统计
|
||||
*/
|
||||
public StatsExamQuestionAccuracy selectStatsExamQuestionAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询按题目统计列表
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 按题目统计集合
|
||||
*/
|
||||
public List<StatsExamQuestionAccuracy> selectStatsExamQuestionAccuracyList(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 新增按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 修改按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy);
|
||||
|
||||
/**
|
||||
* 批量删除按题目统计
|
||||
*
|
||||
* @param ids 需要删除的按题目统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamQuestionAccuracyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除按题目统计信息
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamQuestionAccuracyById(Long id);
|
||||
|
||||
List<StatsExamQuestionAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns);
|
||||
|
||||
StatsExamQuestionAccuracyPlus getById(Long id, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns);
|
||||
|
||||
Map<Long, StatsExamQuestionAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns);
|
||||
|
||||
List<StatsExamQuestionAccuracyPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, StatsExamQuestionAccuracyPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.luqj.exam.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracyPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
/**
|
||||
* 学生答题正确率统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
public interface IStatsExamWeekAccuracyService extends IService<StatsExamWeekAccuracyPlus>
|
||||
{
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
public StatsExamWeekAccuracy selectStatsExamWeekAccuracyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计集合
|
||||
*/
|
||||
public List<StatsExamWeekAccuracy> selectStatsExamWeekAccuracyList(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy);
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamWeekAccuracyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计信息
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStatsExamWeekAccuracyById(Long id);
|
||||
|
||||
List<StatsExamWeekAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamWeekAccuracyPlus, ?>... columns);
|
||||
|
||||
StatsExamWeekAccuracyPlus getById(Long id, SFunction<StatsExamWeekAccuracyPlus, ?>... columns);
|
||||
|
||||
Map<Long, StatsExamWeekAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamWeekAccuracyPlus, ?>... columns);
|
||||
|
||||
List<StatsExamWeekAccuracyPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, StatsExamWeekAccuracyPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -0,0 +1,317 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.luqj.exam.domain.*;
|
||||
import com.luqj.exam.mapper.ExamPaperItemMapper;
|
||||
import com.luqj.exam.service.IExamPaperItemService;
|
||||
import com.luqj.exam.service.IExamPaperModuleService;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试卷明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperItemServiceImpl extends ServiceImpl<ExamPaperItemMapper, ExamPaperItemPlus> implements IExamPaperItemService {
|
||||
@Autowired
|
||||
private ExamPaperItemMapper examPaperItemMapper;
|
||||
@Autowired
|
||||
private IExamPaperService examPaperService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Autowired
|
||||
private IExamPaperModuleService examPaperModuleService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamPaperItemPlus> getByIds(List<Long> ids, SFunction<ExamPaperItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.select(columns).in(ExamPaperItemPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamPaperItemPlus getById(Long id, SFunction<ExamPaperItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.select(columns).eq(ExamPaperItemPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperItemPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperItemPlus, ?>... columns) {
|
||||
List<ExamPaperItemPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamPaperItemPlus> map = new HashMap<>();
|
||||
for (ExamPaperItemPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperItemPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamPaperItemPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamPaperItemPlus> map = new HashMap<>();
|
||||
for (ExamPaperItemPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperItemPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>().in(ExamPaperItemPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_paper_item ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_item ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_item ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChooiseQustion> chooiseList(ChooiseSearch search) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.eq(ExamPaperItemPlus::getExamPaperModuleId, search.getModuleId());
|
||||
List<ExamPaperItemPlus> list = this.examPaperItemMapper.selectList(lambdaQueryWrapper);
|
||||
List<Long> qids = new ArrayList<>();
|
||||
Map<Long, ExamPaperItemPlus> map = new HashMap<>();
|
||||
for (ExamPaperItemPlus item : list) {
|
||||
map.put(item.getQuestionId(), item);
|
||||
qids.add(item.getQuestionId());
|
||||
}
|
||||
ExamQuestion params = new ExamQuestion();
|
||||
if (StringUtils.isNotEmpty(search.getKeyWord())) {
|
||||
params.setQuestion(search.getKeyWord());
|
||||
}
|
||||
params.setType(search.getType());
|
||||
Map<Long, ExamQuestionPlus> questionPlusMap = new HashMap<>();
|
||||
if (qids.size() > 0) {
|
||||
questionPlusMap = examQuestionService.getMapByIds(qids);
|
||||
}
|
||||
PageHelper.startPage(0, 100);
|
||||
List<ExamQuestion> examQuestions = examQuestionService.selectExamQuestionList(params);
|
||||
List<ChooiseQustion> chooiseQustions = new ArrayList<>();
|
||||
List<Long> ids = new ArrayList<>();
|
||||
for (ExamQuestion item : examQuestions) {
|
||||
ChooiseQustion chooiseQustion = new ChooiseQustion();
|
||||
chooiseQustion.setId(item.getId());
|
||||
if (map.containsKey(item.getId())) {
|
||||
chooiseQustion.setHasChooise(true);
|
||||
} else {
|
||||
chooiseQustion.setHasChooise(false);
|
||||
}
|
||||
chooiseQustion.setDisabled(false);
|
||||
chooiseQustion.setTitle(item.getQuestion());
|
||||
chooiseQustions.add(chooiseQustion);
|
||||
ids.add(item.getId());
|
||||
}
|
||||
for (ExamPaperItemPlus item : list) {
|
||||
ChooiseQustion chooiseQustion = new ChooiseQustion();
|
||||
if (!ids.contains(item.getQuestionId())) {
|
||||
chooiseQustion.setId(item.getQuestionId());
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
chooiseQustion.setHasChooise(true);
|
||||
chooiseQustion.setDisabled(false);
|
||||
chooiseQustion.setTitle(questionPlusMap.get(item.getQuestionId()).getQuestion());
|
||||
chooiseQustions.add(chooiseQustion);
|
||||
}
|
||||
return chooiseQustions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperItemPlus> selectByModuleIdAndQuestionIds(Long moduleId, List<Long> questionIds) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.eq(ExamPaperItemPlus::getExamPaperModuleId, moduleId).and(i -> i.in(ExamPaperItemPlus::getQuestionId, questionIds));
|
||||
List<ExamPaperItemPlus> list = this.examPaperItemMapper.selectList(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByPaperId(Long id) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.eq(ExamPaperItemPlus::getPaperId, id);
|
||||
return examPaperItemMapper.delete(lambdaQueryWrapper) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByModuleId(Long id) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.eq(ExamPaperItemPlus::getExamPaperModuleId, id);
|
||||
return examPaperItemMapper.delete(lambdaQueryWrapper) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByPaperId(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.in(ExamPaperItemPlus::getPaperId, ids);
|
||||
return examPaperItemMapper.delete(lambdaQueryWrapper) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByModuleId(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.in(ExamPaperItemPlus::getExamPaperModuleId, ids);
|
||||
return examPaperItemMapper.delete(lambdaQueryWrapper) > 0;
|
||||
}
|
||||
/**
|
||||
* 查询试卷明细
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 试卷明细
|
||||
*/
|
||||
@Override
|
||||
public ExamPaperItem selectExamPaperItemById(Long id) {
|
||||
return examPaperItemMapper.selectExamPaperItemById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷明细列表
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 试卷明细
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperItem> selectExamPaperItemList(ExamPaperItem examPaperItem) {
|
||||
return examPaperItemMapper.selectExamPaperItemList(examPaperItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamPaperItem(ExamPaperItem examPaperItem) {
|
||||
examPaperItem.setCreateTime(DateUtils.getNowDate());
|
||||
return examPaperItemMapper.insertExamPaperItem(examPaperItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷明细
|
||||
*
|
||||
* @param examPaperItem 试卷明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamPaperItem(ExamPaperItem examPaperItem) {
|
||||
return examPaperItemMapper.updateExamPaperItem(examPaperItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷明细
|
||||
*
|
||||
* @param ids 需要删除的试卷明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperItemByIds(Long[] ids) {
|
||||
return examPaperItemMapper.deleteExamPaperItemByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷明细信息
|
||||
*
|
||||
* @param id 试卷明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperItemById(Long id) {
|
||||
return examPaperItemMapper.deleteExamPaperItemById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteExamPaperItemByModuleIdAndQuestionIds(Long moduleId, List<Long> questionIds) {
|
||||
LambdaQueryWrapper<ExamPaperItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperItemPlus>()
|
||||
.eq(ExamPaperItemPlus::getExamPaperModuleId, moduleId).and(i -> i.in(ExamPaperItemPlus::getQuestionId, questionIds));
|
||||
return this.examPaperItemMapper.delete(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public boolean additionalInfo(List<ExamPaperItem> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
List<Long> paperIds = new ArrayList<>();
|
||||
List<Long> modules = new ArrayList<>();
|
||||
List<Long> questionIds = new ArrayList<>();
|
||||
for (ExamPaperItem item : list) {
|
||||
questionIds.add(item.getQuestionId());
|
||||
paperIds.add(item.getPaperId());
|
||||
modules.add(item.getExamPaperModuleId());
|
||||
}
|
||||
Map<Long, ExamPaperPlus> examPaperPlusMap = examPaperService.getMapByIds(paperIds);
|
||||
Map<Long, ExamQuestionPlus> examQuestionPlusMap = examQuestionService.getMapByIds(questionIds);
|
||||
Map<Long, ExamPaperModulePlus> examPaperModulePlusMap = examPaperModuleService.getMapByIds(modules);
|
||||
for (ExamPaperItem item : list) {
|
||||
if (examPaperPlusMap.containsKey(item.getPaperId())) {
|
||||
item.setPaperName(examPaperPlusMap.get(item.getPaperId()).getName());
|
||||
}
|
||||
if (examQuestionPlusMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionPlusMap.get(item.getQuestionId()).getNo());
|
||||
}
|
||||
if (examPaperModulePlusMap.containsKey(item.getExamPaperModuleId())) {
|
||||
item.setExamPaperModuleName(examPaperModulePlusMap.get(item.getExamPaperModuleId()).getModuleName());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.luqj.exam.domain.*;
|
||||
import com.luqj.exam.mapper.ExamPaperModuleMapper;
|
||||
import com.luqj.exam.service.IExamPaperItemService;
|
||||
import com.luqj.exam.service.IExamPaperModuleService;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试卷模块Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-10
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperModuleServiceImpl extends ServiceImpl<ExamPaperModuleMapper, ExamPaperModulePlus> implements IExamPaperModuleService {
|
||||
@Autowired
|
||||
private ExamPaperModuleMapper examPaperModuleMapper;
|
||||
@Autowired
|
||||
private IExamPaperService examPaperService;
|
||||
@Autowired
|
||||
private IExamPaperItemService examPaperItemService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamPaperModulePlus> getByIds(List<Long> ids, SFunction<ExamPaperModulePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperModulePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperModulePlus>()
|
||||
.select(columns).in(ExamPaperModulePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamPaperModulePlus getById(Long id, SFunction<ExamPaperModulePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperModulePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperModulePlus>()
|
||||
.select(columns).eq(ExamPaperModulePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperModulePlus> getMapByIds(List<Long> ids, SFunction<ExamPaperModulePlus, ?>... columns) {
|
||||
List<ExamPaperModulePlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamPaperModulePlus> map = new HashMap<>();
|
||||
for (ExamPaperModulePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperModulePlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamPaperModulePlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamPaperModulePlus> map = new HashMap<>();
|
||||
for (ExamPaperModulePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperModulePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperModulePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperModulePlus>().in(ExamPaperModulePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_paper_module ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_module ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_module ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addQuestion(Long moduleId, Long questionId) {
|
||||
ExamPaperItem paperItem = new ExamPaperItem();
|
||||
paperItem.setExamPaperModuleId(moduleId);
|
||||
paperItem.setQuestionId(questionId);
|
||||
List<ExamPaperItem> examPaperItemList = this.examPaperItemService.selectExamPaperItemList(paperItem);
|
||||
if (null != examPaperItemList && examPaperItemList.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
ExamQuestion examQuestion = this.examQuestionService.selectExamQuestionById(questionId);
|
||||
ExamPaperItem examPaperItem = new ExamPaperItem();
|
||||
examPaperItem.setQuestionId(questionId);
|
||||
examPaperItem.setExamPaperModuleId(moduleId);
|
||||
examPaperItem.setQuestionName(examQuestion.getNo());
|
||||
examPaperItem.setStatus(1);
|
||||
examPaperItem.setSortNum(0L);
|
||||
examPaperItem.setScore(examQuestion.getScore());
|
||||
examPaperItem.setQuestionTypeId(examQuestion.getType());
|
||||
examPaperItem.setDifficulty(examQuestion.getDifficulty());
|
||||
examPaperItem.setCreatorId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
ExamPaperModule examPaperModule = examPaperModuleMapper.selectExamPaperModuleById(moduleId);
|
||||
examPaperItem.setPaperId(examPaperModule.getPaperId());
|
||||
return examPaperItemService.insertExamPaperItem(examPaperItem) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addQuestion(Long moduleId, List<Long> questionIds) {
|
||||
List<ExamPaperItemPlus> examPaperItemList = this.examPaperItemService.selectByModuleIdAndQuestionIds(moduleId, questionIds);
|
||||
if (null != examPaperItemList && examPaperItemList.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
ExamPaperModule examPaperModule = examPaperModuleMapper.selectExamPaperModuleById(moduleId);
|
||||
List<ExamPaperItemPlus> examPaperItems = new ArrayList<>();
|
||||
for (Long questionId : questionIds) {
|
||||
ExamQuestion examQuestion = this.examQuestionService.selectExamQuestionById(questionId);
|
||||
ExamPaperItemPlus examPaperItem = new ExamPaperItemPlus();
|
||||
examPaperItem.setQuestionId(questionId);
|
||||
examPaperItem.setExamPaperModuleId(moduleId);
|
||||
examPaperItem.setStatus(1);
|
||||
examPaperItem.setSortNum(0L);
|
||||
examPaperItem.setScore(examQuestion.getScore());
|
||||
examPaperItem.setQuestionTypeId(examQuestion.getType());
|
||||
examPaperItem.setDifficulty(examQuestion.getDifficulty());
|
||||
examPaperItem.setCreatorId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
examPaperItem.setPaperId(examPaperModule.getPaperId());
|
||||
examPaperItems.add(examPaperItem);
|
||||
}
|
||||
return examPaperItemService.saveBatch(examPaperItems);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeQuestion(Long moduleId, List<Long> questionIds) {
|
||||
return examPaperItemService.deleteExamPaperItemByModuleIdAndQuestionIds(moduleId, questionIds) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷模块
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 试卷模块
|
||||
*/
|
||||
@Override
|
||||
public ExamPaperModule selectExamPaperModuleById(Long id) {
|
||||
ExamPaperModule module = examPaperModuleMapper.selectExamPaperModuleById(id);
|
||||
if (null != module && module.getExamPaperItemList() != null) {
|
||||
examPaperItemService.additionalInfo(module.getExamPaperItemList());
|
||||
}
|
||||
return module;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷模块列表
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 试卷模块
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperModule> selectExamPaperModuleList(ExamPaperModule examPaperModule) {
|
||||
List<ExamPaperModule> list = examPaperModuleMapper.selectExamPaperModuleList(examPaperModule);
|
||||
if (list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> paperIds = new ArrayList<>();
|
||||
for (ExamPaperModule item : list) {
|
||||
paperIds.add(item.getPaperId());
|
||||
}
|
||||
Map<Long, ExamPaperPlus> map = examPaperService.getMapByIds(paperIds);
|
||||
for (ExamPaperModule item : list) {
|
||||
if (map.containsKey(item.getPaperId())) {
|
||||
item.setPaperName(map.get(item.getPaperId()).getName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertExamPaperModule(ExamPaperModule examPaperModule) {
|
||||
examPaperModule.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = examPaperModuleMapper.insertExamPaperModule(examPaperModule);
|
||||
insertExamPaperItem(examPaperModule);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷模块
|
||||
*
|
||||
* @param examPaperModule 试卷模块
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateExamPaperModule(ExamPaperModule examPaperModule) {
|
||||
examPaperModuleMapper.deleteExamPaperItemByExamPaperModuleId(examPaperModule.getId());
|
||||
insertExamPaperItem(examPaperModule);
|
||||
return examPaperModuleMapper.updateExamPaperModule(examPaperModule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷模块
|
||||
*
|
||||
* @param ids 需要删除的试卷模块ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteExamPaperModuleByIds(Long[] ids) {
|
||||
examPaperModuleMapper.deleteExamPaperItemByExamPaperModuleIds(ids);
|
||||
return examPaperModuleMapper.deleteExamPaperModuleByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷模块信息
|
||||
*
|
||||
* @param id 试卷模块ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperModuleById(Long id) {
|
||||
examPaperModuleMapper.deleteExamPaperItemByExamPaperModuleId(id);
|
||||
return examPaperModuleMapper.deleteExamPaperModuleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷明细信息
|
||||
*
|
||||
* @param examPaperModule 试卷模块对象
|
||||
*/
|
||||
public void insertExamPaperItem(ExamPaperModule examPaperModule) {
|
||||
List<ExamPaperItem> examPaperItemList = examPaperModule.getExamPaperItemList();
|
||||
Long id = examPaperModule.getId();
|
||||
if (StringUtils.isNotNull(examPaperItemList)) {
|
||||
List<ExamPaperItem> list = new ArrayList<ExamPaperItem>();
|
||||
for (ExamPaperItem examPaperItem : examPaperItemList) {
|
||||
examPaperItem.setExamPaperModuleId(id);
|
||||
list.add(examPaperItem);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
examPaperModuleMapper.batchExamPaperItem(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.luqj.common.domain.ComCategoryPlus;
|
||||
import com.luqj.common.service.IComCategoryService;
|
||||
import com.luqj.exam.domain.ExamPaper;
|
||||
import com.luqj.exam.domain.ExamPaperModule;
|
||||
import com.luqj.exam.domain.ExamPaperPlus;
|
||||
import com.luqj.exam.domain.ExamSchoolPlus;
|
||||
import com.luqj.exam.mapper.ExamPaperMapper;
|
||||
import com.luqj.exam.service.IExamPaperItemService;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.luqj.exam.service.IExamSchoolService;
|
||||
import com.luqj.gis.domain.GisRegionPlus;
|
||||
import com.luqj.gis.service.IGisRegionService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 试卷Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-08-09
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperServiceImpl extends ServiceImpl<ExamPaperMapper, ExamPaperPlus> implements IExamPaperService {
|
||||
@Autowired
|
||||
private ExamPaperMapper examPaperMapper;
|
||||
@Autowired
|
||||
private IExamPaperItemService examPaperItemService;
|
||||
@Autowired
|
||||
private IGisRegionService gisRegionService;
|
||||
@Autowired
|
||||
private IExamSchoolService examSchoolService;
|
||||
@Autowired
|
||||
private IComCategoryService comCategoryService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamPaperPlus> getByIds(List<Long> ids, SFunction<ExamPaperPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperPlus>()
|
||||
.select(columns).in(ExamPaperPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamPaperPlus getById(Long id, SFunction<ExamPaperPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperPlus>()
|
||||
.select(columns).eq(ExamPaperPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperPlus, ?>... columns) {
|
||||
List<ExamPaperPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamPaperPlus> map = new HashMap<>();
|
||||
for (ExamPaperPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamPaperPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamPaperPlus> map = new HashMap<>();
|
||||
for (ExamPaperPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperPlus>().in(ExamPaperPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 试卷
|
||||
*/
|
||||
@Override
|
||||
public ExamPaper selectExamPaperById(Long id) {
|
||||
ExamPaper examPaper = examPaperMapper.selectExamPaperById(id);
|
||||
ComCategoryPlus comCategory = this.comCategoryService.getById(examPaper.getCategoryId());
|
||||
if (null != comCategory) {
|
||||
examPaper.setCategoryName(comCategory.getName());
|
||||
}
|
||||
ExamSchoolPlus examSchoolPlus = this.examSchoolService.getById(examPaper.getSchoolId());
|
||||
if (null != examSchoolPlus) {
|
||||
examPaper.setSchoolName(examSchoolPlus.getName());
|
||||
}
|
||||
return examPaper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷列表
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 试卷
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaper> selectExamPaperList(ExamPaper examPaper) {
|
||||
List<ExamPaper> list = examPaperMapper.selectExamPaperList(examPaper);
|
||||
if (list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
List<Long> sList = new ArrayList<>();
|
||||
List<Long> categoryIdS = new ArrayList<>();
|
||||
for (ExamPaper item : list) {
|
||||
if (null != item.getSchoolId()) {
|
||||
sList.add(item.getSchoolId());
|
||||
}
|
||||
if (!ids.contains(item.getCityId())) {
|
||||
ids.add(item.getCityId());
|
||||
}
|
||||
if (!ids.contains(item.getProvinceId())) {
|
||||
ids.add(item.getProvinceId());
|
||||
}
|
||||
categoryIdS.add(item.getCategoryId());
|
||||
}
|
||||
Map<Long, ExamSchoolPlus> map = new HashMap<>();
|
||||
if (sList.size() > 0) {
|
||||
map = examSchoolService.getMapByIds(sList);
|
||||
}
|
||||
Map<Long, ComCategoryPlus> comCategoryPlusMap = comCategoryService.getMapByIds(categoryIdS);
|
||||
Map<Long, GisRegionPlus> gisRegionMap = gisRegionService.getMapByIds(ids);
|
||||
for (ExamPaper item : list) {
|
||||
if (gisRegionMap.containsKey(item.getCityId())) {
|
||||
item.setCityName(gisRegionMap.get(item.getCityId()).getName());
|
||||
}
|
||||
if (gisRegionMap.containsKey(item.getProvinceId())) {
|
||||
item.setProvinceName(gisRegionMap.get(item.getProvinceId()).getName());
|
||||
}
|
||||
if (map.containsKey(item.getSchoolId())) {
|
||||
item.setSchoolName(map.get(item.getSchoolId()).getName());
|
||||
}
|
||||
if (comCategoryPlusMap.containsKey(item.getCategoryId())) {
|
||||
item.setCategoryName(comCategoryPlusMap.get(item.getCategoryId()).getName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertExamPaper(ExamPaper examPaper) {
|
||||
examPaper.setUnionType(0);
|
||||
examPaper.setTeacherId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
examPaper.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = examPaperMapper.insertExamPaper(examPaper);
|
||||
insertExamPaperModule(examPaper);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷
|
||||
*
|
||||
* @param examPaper 试卷
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateExamPaper(ExamPaper examPaper) {
|
||||
examPaper.setUpdateTime(DateUtils.getNowDate());
|
||||
examPaperMapper.deleteExamPaperModuleByPaperId(examPaper.getId());
|
||||
insertExamPaperModule(examPaper);
|
||||
return examPaperMapper.updateExamPaper(examPaper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷
|
||||
*
|
||||
* @param ids 需要删除的试卷ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteExamPaperByIds(Long[] ids) {
|
||||
examPaperMapper.deleteExamPaperModuleByPaperIds(ids);
|
||||
examPaperItemService.deleteByPaperId(Arrays.asList(ids));
|
||||
return examPaperMapper.deleteExamPaperByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷信息
|
||||
*
|
||||
* @param id 试卷ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperById(Long id) {
|
||||
examPaperMapper.deleteExamPaperModuleByPaperId(id);
|
||||
return examPaperMapper.deleteExamPaperById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模块信息
|
||||
*
|
||||
* @param examPaper 试卷对象
|
||||
*/
|
||||
public void insertExamPaperModule(ExamPaper examPaper) {
|
||||
List<ExamPaperModule> examPaperModuleList = examPaper.getExamPaperModuleList();
|
||||
Long id = examPaper.getId();
|
||||
if (StringUtils.isNotNull(examPaperModuleList)) {
|
||||
List<ExamPaperModule> list = new ArrayList<ExamPaperModule>();
|
||||
for (ExamPaperModule examPaperModule : examPaperModuleList) {
|
||||
examPaperModule.setPaperId(id);
|
||||
list.add(examPaperModule);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
examPaperMapper.batchExamPaperModule(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import java.util.HashMap;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamPaperStrategyListMapper;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyList;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyListPlus;
|
||||
import com.luqj.exam.service.IExamPaperStrategyListService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 策略子Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperStrategyListServiceImpl extends ServiceImpl<ExamPaperStrategyListMapper, ExamPaperStrategyListPlus> implements IExamPaperStrategyListService
|
||||
{
|
||||
@Autowired
|
||||
private ExamPaperStrategyListMapper examPaperStrategyListMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamPaperStrategyListPlus> getByIds(List<Long> ids, SFunction<ExamPaperStrategyListPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyListPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyListPlus>()
|
||||
.select(columns).in(ExamPaperStrategyListPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamPaperStrategyListPlus getById(Long id, SFunction<ExamPaperStrategyListPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyListPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyListPlus>()
|
||||
.select(columns).eq(ExamPaperStrategyListPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperStrategyListPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperStrategyListPlus, ?>... columns) {
|
||||
List<ExamPaperStrategyListPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamPaperStrategyListPlus> map = new HashMap<>();
|
||||
for (ExamPaperStrategyListPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperStrategyListPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamPaperStrategyListPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamPaperStrategyListPlus> map = new HashMap<>();
|
||||
for (ExamPaperStrategyListPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperStrategyListPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyListPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyListPlus>().in(ExamPaperStrategyListPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_paper_strategy_list ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_strategy_list ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_strategy_list ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询策略子
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 策略子
|
||||
*/
|
||||
@Override
|
||||
public ExamPaperStrategyList selectExamPaperStrategyListById(Long id)
|
||||
{
|
||||
return examPaperStrategyListMapper.selectExamPaperStrategyListById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询策略子列表
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 策略子
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperStrategyList> selectExamPaperStrategyListList(ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
return examPaperStrategyListMapper.selectExamPaperStrategyListList(examPaperStrategyList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
examPaperStrategyList.setCreateTime(DateUtils.getNowDate());
|
||||
return examPaperStrategyListMapper.insertExamPaperStrategyList(examPaperStrategyList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改策略子
|
||||
*
|
||||
* @param examPaperStrategyList 策略子
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamPaperStrategyList(ExamPaperStrategyList examPaperStrategyList)
|
||||
{
|
||||
return examPaperStrategyListMapper.updateExamPaperStrategyList(examPaperStrategyList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除策略子
|
||||
*
|
||||
* @param ids 需要删除的策略子ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperStrategyListByIds(Long[] ids)
|
||||
{
|
||||
return examPaperStrategyListMapper.deleteExamPaperStrategyListByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除策略子信息
|
||||
*
|
||||
* @param id 策略子ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperStrategyListById(Long id)
|
||||
{
|
||||
return examPaperStrategyListMapper.deleteExamPaperStrategyListById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.luqj.common.domain.ComCategoryPlus;
|
||||
import com.luqj.common.service.IComCategoryService;
|
||||
import com.luqj.exam.domain.ExamPaperStrategy;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyList;
|
||||
import com.luqj.exam.domain.ExamPaperStrategyPlus;
|
||||
import com.luqj.exam.mapper.ExamPaperStrategyMapper;
|
||||
import com.luqj.exam.service.IExamPaperStrategyService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.apache.http.util.Asserts;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 试卷模板策略Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-29
|
||||
*/
|
||||
@Service
|
||||
public class ExamPaperStrategyServiceImpl extends ServiceImpl<ExamPaperStrategyMapper, ExamPaperStrategyPlus> implements IExamPaperStrategyService {
|
||||
@Autowired
|
||||
private ExamPaperStrategyMapper examPaperStrategyMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private IComCategoryService comCategoryService;
|
||||
|
||||
@Override
|
||||
public List<ExamPaperStrategyPlus> getByIds(List<Long> ids, SFunction<ExamPaperStrategyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyPlus>()
|
||||
.select(columns).in(ExamPaperStrategyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamPaperStrategyPlus getById(Long id, SFunction<ExamPaperStrategyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyPlus>()
|
||||
.select(columns).eq(ExamPaperStrategyPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperStrategyPlus> getMapByIds(List<Long> ids, SFunction<ExamPaperStrategyPlus, ?>... columns) {
|
||||
List<ExamPaperStrategyPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamPaperStrategyPlus> map = new HashMap<>();
|
||||
for (ExamPaperStrategyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamPaperStrategyPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamPaperStrategyPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamPaperStrategyPlus> map = new HashMap<>();
|
||||
for (ExamPaperStrategyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamPaperStrategyPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamPaperStrategyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamPaperStrategyPlus>().in(ExamPaperStrategyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_paper_strategy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_strategy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_paper_strategy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷模板策略
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 试卷模板策略
|
||||
*/
|
||||
@Override
|
||||
public ExamPaperStrategy selectExamPaperStrategyById(Long id) {
|
||||
return examPaperStrategyMapper.selectExamPaperStrategyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询试卷模板策略列表
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 试卷模板策略
|
||||
*/
|
||||
@Override
|
||||
public List<ExamPaperStrategy> selectExamPaperStrategyList(ExamPaperStrategy examPaperStrategy) {
|
||||
List<ExamPaperStrategy> list = examPaperStrategyMapper.selectExamPaperStrategyList(examPaperStrategy);
|
||||
if (list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
for (ExamPaperStrategy item : list) {
|
||||
if (null != item.getCategoryId() && !ids.contains(item.getCategoryId())) {
|
||||
ids.add(item.getCategoryId());
|
||||
}
|
||||
}
|
||||
Map<Long, ComCategoryPlus> comCategoryPlusHashMap = new HashMap<>();
|
||||
if (ids.size() > 0) {
|
||||
comCategoryPlusHashMap = comCategoryService.getMapByIds(ids);
|
||||
}
|
||||
for (ExamPaperStrategy item : list) {
|
||||
if (null != item.getCategoryId() && comCategoryPlusHashMap.containsKey(item.getCategoryId())) {
|
||||
item.setCategoryName(comCategoryPlusHashMap.get(item.getCategoryId()).getName());
|
||||
} else {
|
||||
item.setCategoryName("无分类");
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertExamPaperStrategy(ExamPaperStrategy examPaperStrategy) {
|
||||
examPaperStrategy.setCreatorId(SecurityUtils.getLoginUser().getUser().getUserId().toString());
|
||||
examPaperStrategy.setCreateTime(DateUtils.getNowDate());
|
||||
List<ExamPaperStrategyList> examPaperStrategyListList = examPaperStrategy.getExamPaperStrategyListList();
|
||||
if (StringUtils.isNotNull(examPaperStrategyListList)) {
|
||||
for(ExamPaperStrategyList item:examPaperStrategyListList){
|
||||
Asserts.notNull(item.getCount(),"子策略题目数");
|
||||
Asserts.notNull(item.getQuestionType(),"子策略题目类型");
|
||||
}
|
||||
}
|
||||
int rows = examPaperStrategyMapper.insertExamPaperStrategy(examPaperStrategy);
|
||||
insertExamPaperStrategyList(examPaperStrategy);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试卷模板策略
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateExamPaperStrategy(ExamPaperStrategy examPaperStrategy) {
|
||||
examPaperStrategyMapper.deleteExamPaperStrategyListByExamPaperStrategyId(examPaperStrategy.getId());
|
||||
insertExamPaperStrategyList(examPaperStrategy);
|
||||
return examPaperStrategyMapper.updateExamPaperStrategy(examPaperStrategy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除试卷模板策略
|
||||
*
|
||||
* @param ids 需要删除的试卷模板策略ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteExamPaperStrategyByIds(Long[] ids) {
|
||||
examPaperStrategyMapper.deleteExamPaperStrategyListByExamPaperStrategyIds(ids);
|
||||
return examPaperStrategyMapper.deleteExamPaperStrategyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除试卷模板策略信息
|
||||
*
|
||||
* @param id 试卷模板策略ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamPaperStrategyById(Long id) {
|
||||
examPaperStrategyMapper.deleteExamPaperStrategyListByExamPaperStrategyId(id);
|
||||
return examPaperStrategyMapper.deleteExamPaperStrategyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增策略子信息
|
||||
*
|
||||
* @param examPaperStrategy 试卷模板策略对象
|
||||
*/
|
||||
public void insertExamPaperStrategyList(ExamPaperStrategy examPaperStrategy) {
|
||||
List<ExamPaperStrategyList> examPaperStrategyListList = examPaperStrategy.getExamPaperStrategyListList();
|
||||
Long id = examPaperStrategy.getId();
|
||||
if (StringUtils.isNotNull(examPaperStrategyListList)) {
|
||||
List<ExamPaperStrategyList> list = new ArrayList<ExamPaperStrategyList>();
|
||||
for (ExamPaperStrategyList examPaperStrategyList : examPaperStrategyListList) {
|
||||
examPaperStrategyList.setExamPaperStrategyId(id);
|
||||
list.add(examPaperStrategyList);
|
||||
}
|
||||
if (list.size() > 0) {
|
||||
examPaperStrategyMapper.batchExamPaperStrategyList(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamQuestionCorrectionMapper;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrection;
|
||||
import com.luqj.exam.domain.ExamQuestionCorrectionPlus;
|
||||
import com.luqj.exam.service.IExamQuestionCorrectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 题目纠错Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamQuestionCorrectionServiceImpl extends ServiceImpl<ExamQuestionCorrectionMapper, ExamQuestionCorrectionPlus> implements IExamQuestionCorrectionService
|
||||
{
|
||||
@Autowired
|
||||
private ExamQuestionCorrectionMapper examQuestionCorrectionMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Override
|
||||
public List<ExamQuestionCorrectionPlus> getByIds(List<Long> ids, SFunction<ExamQuestionCorrectionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionCorrectionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionCorrectionPlus>()
|
||||
.select(columns).in(ExamQuestionCorrectionPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamQuestionCorrectionPlus getById(Long id, SFunction<ExamQuestionCorrectionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionCorrectionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionCorrectionPlus>()
|
||||
.select(columns).eq(ExamQuestionCorrectionPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionCorrectionPlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionCorrectionPlus, ?>... columns) {
|
||||
List<ExamQuestionCorrectionPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamQuestionCorrectionPlus> map = new HashMap<>();
|
||||
for (ExamQuestionCorrectionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionCorrectionPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamQuestionCorrectionPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamQuestionCorrectionPlus> map = new HashMap<>();
|
||||
for (ExamQuestionCorrectionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamQuestionCorrectionPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamQuestionCorrectionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionCorrectionPlus>().in(ExamQuestionCorrectionPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_question_correction ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question_correction ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question_correction ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询题目纠错
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 题目纠错
|
||||
*/
|
||||
@Override
|
||||
public ExamQuestionCorrection selectExamQuestionCorrectionById(Long id)
|
||||
{
|
||||
return examQuestionCorrectionMapper.selectExamQuestionCorrectionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询题目纠错列表
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 题目纠错
|
||||
*/
|
||||
@Override
|
||||
public List<ExamQuestionCorrection> selectExamQuestionCorrectionList(ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
List<ExamQuestionCorrection> list= examQuestionCorrectionMapper.selectExamQuestionCorrectionList(examQuestionCorrection);
|
||||
if (list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
List<Long> qids = new ArrayList<>();
|
||||
for (ExamQuestionCorrection item : list) {
|
||||
ids.add(item.getStudentId());
|
||||
qids.add(item.getQuestionId());
|
||||
}
|
||||
Map<Long, ExamQuestionPlus> examQuestionMap = examQuestionService.getMapByIds(qids, ExamQuestionPlus::getId, ExamQuestionPlus::getQuestion);
|
||||
Map<Long, SysUser> map = sysUserService.selectMapUserById(ids);
|
||||
for (ExamQuestionCorrection item : list) {
|
||||
if (map.containsKey(item.getStudentId())) {
|
||||
item.setStudentName(map.get(item.getStudentId()).getNickName());
|
||||
}
|
||||
if (examQuestionMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionMap.get(item.getQuestionId()).getQuestion());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
examQuestionCorrection.setCreateTime(DateUtils.getNowDate());
|
||||
return examQuestionCorrectionMapper.insertExamQuestionCorrection(examQuestionCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题目纠错
|
||||
*
|
||||
* @param examQuestionCorrection 题目纠错
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamQuestionCorrection(ExamQuestionCorrection examQuestionCorrection)
|
||||
{
|
||||
return examQuestionCorrectionMapper.updateExamQuestionCorrection(examQuestionCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除题目纠错
|
||||
*
|
||||
* @param ids 需要删除的题目纠错ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionCorrectionByIds(Long[] ids)
|
||||
{
|
||||
return examQuestionCorrectionMapper.deleteExamQuestionCorrectionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目纠错信息
|
||||
*
|
||||
* @param id 题目纠错ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionCorrectionById(Long id)
|
||||
{
|
||||
return examQuestionCorrectionMapper.deleteExamQuestionCorrectionById(id);
|
||||
}
|
||||
}
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.domain.ExamSchoolPlus;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.luqj.exam.service.IExamSchoolService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamQuestionFavoriteMapper;
|
||||
import com.luqj.exam.domain.ExamQuestionFavorite;
|
||||
import com.luqj.exam.domain.ExamQuestionFavoritePlus;
|
||||
import com.luqj.exam.service.IExamQuestionFavoriteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 题目收藏Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamQuestionFavoriteServiceImpl extends ServiceImpl<ExamQuestionFavoriteMapper, ExamQuestionFavoritePlus> implements IExamQuestionFavoriteService
|
||||
{
|
||||
@Autowired
|
||||
private ExamQuestionFavoriteMapper examQuestionFavoriteMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Autowired
|
||||
private IExamSchoolService examSchoolService;
|
||||
@Override
|
||||
public List<ExamQuestionFavoritePlus> getByIds(List<Long> ids, SFunction<ExamQuestionFavoritePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionFavoritePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionFavoritePlus>()
|
||||
.select(columns).in(ExamQuestionFavoritePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamQuestionFavoritePlus getById(Long id, SFunction<ExamQuestionFavoritePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionFavoritePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionFavoritePlus>()
|
||||
.select(columns).eq(ExamQuestionFavoritePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionFavoritePlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionFavoritePlus, ?>... columns) {
|
||||
List<ExamQuestionFavoritePlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamQuestionFavoritePlus> map = new HashMap<>();
|
||||
for (ExamQuestionFavoritePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionFavoritePlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamQuestionFavoritePlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamQuestionFavoritePlus> map = new HashMap<>();
|
||||
for (ExamQuestionFavoritePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamQuestionFavoritePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamQuestionFavoritePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionFavoritePlus>().in(ExamQuestionFavoritePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_question_favorite ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question_favorite ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question_favorite ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询题目收藏
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 题目收藏
|
||||
*/
|
||||
@Override
|
||||
public ExamQuestionFavorite selectExamQuestionFavoriteById(Long id)
|
||||
{
|
||||
return examQuestionFavoriteMapper.selectExamQuestionFavoriteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询题目收藏列表
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 题目收藏
|
||||
*/
|
||||
@Override
|
||||
public List<ExamQuestionFavorite> selectExamQuestionFavoriteList(ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
List<ExamQuestionFavorite> list= examQuestionFavoriteMapper.selectExamQuestionFavoriteList(examQuestionFavorite);
|
||||
if(list == null || list.size() == 0){
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
List<Long> qids = new ArrayList<>();
|
||||
List<Long> schoolIds = new ArrayList<>();
|
||||
for (ExamQuestionFavorite item : list) {
|
||||
ids.add(item.getStudentId());
|
||||
qids.add(item.getQuestionId());
|
||||
schoolIds.add(item.getSchoolId());
|
||||
}
|
||||
Map<Long, ExamQuestionPlus> examQuestionMap = examQuestionService.getMapByIds(qids, ExamQuestionPlus::getId, ExamQuestionPlus::getQuestion);
|
||||
Map<Long, SysUser> map = sysUserService.selectMapUserById(ids);
|
||||
Map<Long, ExamSchoolPlus> examSchoolPlusMap = this.examSchoolService.getMapByIds(schoolIds);
|
||||
for (ExamQuestionFavorite item : list) {
|
||||
if (map.containsKey(item.getStudentId())) {
|
||||
item.setStudentName(map.get(item.getStudentId()).getNickName());
|
||||
}
|
||||
if (examQuestionMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionMap.get(item.getQuestionId()).getQuestion());
|
||||
}
|
||||
if (examSchoolPlusMap.containsKey(item.getSchoolId())) {
|
||||
item.setSchoolName(examSchoolPlusMap.get(item.getSchoolId()).getName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
examQuestionFavorite.setCreateTime(DateUtils.getNowDate());
|
||||
return examQuestionFavoriteMapper.insertExamQuestionFavorite(examQuestionFavorite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题目收藏
|
||||
*
|
||||
* @param examQuestionFavorite 题目收藏
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamQuestionFavorite(ExamQuestionFavorite examQuestionFavorite)
|
||||
{
|
||||
return examQuestionFavoriteMapper.updateExamQuestionFavorite(examQuestionFavorite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除题目收藏
|
||||
*
|
||||
* @param ids 需要删除的题目收藏ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionFavoriteByIds(Long[] ids)
|
||||
{
|
||||
return examQuestionFavoriteMapper.deleteExamQuestionFavoriteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题目收藏信息
|
||||
*
|
||||
* @param id 题目收藏ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionFavoriteById(Long id)
|
||||
{
|
||||
return examQuestionFavoriteMapper.deleteExamQuestionFavoriteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamQuestionMapper;
|
||||
import com.luqj.exam.domain.ExamQuestion;
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 题库Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamQuestionServiceImpl extends ServiceImpl<ExamQuestionMapper, ExamQuestionPlus> implements IExamQuestionService
|
||||
{
|
||||
@Autowired
|
||||
private ExamQuestionMapper examQuestionMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamQuestionPlus> getByIds(List<Long> ids, SFunction<ExamQuestionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionPlus>()
|
||||
.select(columns).in(ExamQuestionPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamQuestionPlus getById(Long id, SFunction<ExamQuestionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamQuestionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionPlus>()
|
||||
.select(columns).eq(ExamQuestionPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionPlus> getMapByIds(List<Long> ids, SFunction<ExamQuestionPlus, ?>... columns) {
|
||||
List<ExamQuestionPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamQuestionPlus> map = new HashMap<>();
|
||||
for (ExamQuestionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamQuestionPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamQuestionPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamQuestionPlus> map = new HashMap<>();
|
||||
for (ExamQuestionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamQuestionPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamQuestionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamQuestionPlus>().in(ExamQuestionPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_question ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_question ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询题库
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 题库
|
||||
*/
|
||||
@Override
|
||||
public ExamQuestion selectExamQuestionById(Long id)
|
||||
{
|
||||
return examQuestionMapper.selectExamQuestionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询题库列表
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 题库
|
||||
*/
|
||||
@Override
|
||||
public List<ExamQuestion> selectExamQuestionList(ExamQuestion examQuestion)
|
||||
{
|
||||
return examQuestionMapper.selectExamQuestionList(examQuestion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamQuestion(ExamQuestion examQuestion)
|
||||
{
|
||||
examQuestion.setCreatorId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
examQuestion.setUpdateTime(new Date());
|
||||
examQuestion.setUpdaterId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
examQuestion.setCreateTime(DateUtils.getNowDate());
|
||||
examQuestion.setStatus(0);
|
||||
examQuestion.setIsDelete(0);
|
||||
return examQuestionMapper.insertExamQuestion(examQuestion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改题库
|
||||
*
|
||||
* @param examQuestion 题库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamQuestion(ExamQuestion examQuestion)
|
||||
{
|
||||
examQuestion.setUpdaterId(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
examQuestion.setUpdateTime(DateUtils.getNowDate());
|
||||
return examQuestionMapper.updateExamQuestion(examQuestion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除题库
|
||||
*
|
||||
* @param ids 需要删除的题库ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionByIds(Long[] ids)
|
||||
{
|
||||
return examQuestionMapper.deleteExamQuestionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除题库信息
|
||||
*
|
||||
* @param id 题库ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamQuestionById(Long id)
|
||||
{
|
||||
return examQuestionMapper.deleteExamQuestionById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.luqj.exam.domain.ExamSchool;
|
||||
import com.luqj.exam.domain.ExamSchoolPlus;
|
||||
import com.luqj.exam.mapper.ExamSchoolMapper;
|
||||
import com.luqj.exam.service.IExamSchoolService;
|
||||
import com.luqj.gis.domain.GisRegionPlus;
|
||||
import com.luqj.gis.service.IGisRegionService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 出题学校Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamSchoolServiceImpl extends ServiceImpl<ExamSchoolMapper, ExamSchoolPlus> implements IExamSchoolService {
|
||||
@Autowired
|
||||
private ExamSchoolMapper examSchoolMapper;
|
||||
@Autowired
|
||||
private IGisRegionService gisRegionService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamSchoolPlus> getByIds(List<Long> ids, SFunction<ExamSchoolPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamSchoolPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamSchoolPlus>()
|
||||
.select(columns).in(ExamSchoolPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamSchoolPlus getById(Long id, SFunction<ExamSchoolPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamSchoolPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamSchoolPlus>()
|
||||
.select(columns).eq(ExamSchoolPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamSchoolPlus> getMapByIds(List<Long> ids, SFunction<ExamSchoolPlus, ?>... columns) {
|
||||
List<ExamSchoolPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamSchoolPlus> map = new HashMap<>();
|
||||
for (ExamSchoolPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamSchoolPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamSchoolPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamSchoolPlus> map = new HashMap<>();
|
||||
for (ExamSchoolPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamSchoolPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamSchoolPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamSchoolPlus>().in(ExamSchoolPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_school ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_school ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_school ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出题学校
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 出题学校
|
||||
*/
|
||||
@Override
|
||||
public ExamSchool selectExamSchoolById(Long id) {
|
||||
return examSchoolMapper.selectExamSchoolById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出题学校列表
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 出题学校
|
||||
*/
|
||||
@Override
|
||||
public List<ExamSchool> selectExamSchoolList(ExamSchool examSchool) {
|
||||
List<ExamSchool> list = examSchoolMapper.selectExamSchoolList(examSchool);
|
||||
if (list == null || list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
for (ExamSchool item : list) {
|
||||
if (!ids.contains(item.getCityId())) {
|
||||
ids.add(item.getCityId());
|
||||
}
|
||||
if (!ids.contains(item.getProvinceId())) {
|
||||
ids.add(item.getProvinceId());
|
||||
}
|
||||
}
|
||||
Map<Long, GisRegionPlus> gisRegionMap = gisRegionService.getMapByIds(ids);
|
||||
for (ExamSchool item : list) {
|
||||
if (gisRegionMap.containsKey(item.getCityId())) {
|
||||
item.setCityName(gisRegionMap.get(item.getCityId()).getName());
|
||||
}
|
||||
if (gisRegionMap.containsKey(item.getProvinceId())) {
|
||||
item.setProvinceName(gisRegionMap.get(item.getProvinceId()).getName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamSchool(ExamSchool examSchool) {
|
||||
examSchool.setCreateTime(DateUtils.getNowDate());
|
||||
examSchool.setStatus(1);
|
||||
return examSchoolMapper.insertExamSchool(examSchool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出题学校
|
||||
*
|
||||
* @param examSchool 出题学校
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamSchool(ExamSchool examSchool) {
|
||||
examSchool.setUpdateTime(DateUtils.getNowDate());
|
||||
return examSchoolMapper.updateExamSchool(examSchool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出题学校
|
||||
*
|
||||
* @param ids 需要删除的出题学校ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamSchoolByIds(Long[] ids) {
|
||||
return examSchoolMapper.deleteExamSchoolByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出题学校信息
|
||||
*
|
||||
* @param id 出题学校ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamSchoolById(Long id) {
|
||||
return examSchoolMapper.deleteExamSchoolById(id);
|
||||
}
|
||||
}
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.domain.ExamStudentMistakes;
|
||||
import com.luqj.exam.domain.ExamStudentMistakesPlus;
|
||||
import com.luqj.exam.mapper.ExamStudentMistakesMapper;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.luqj.exam.service.IExamStudentMistakesService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 错题集Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamStudentMistakesServiceImpl extends ServiceImpl<ExamStudentMistakesMapper, ExamStudentMistakesPlus> implements IExamStudentMistakesService {
|
||||
@Autowired
|
||||
private ExamStudentMistakesMapper examStudentMistakesMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
|
||||
@Override
|
||||
public List<ExamStudentMistakesPlus> getByIds(List<Long> ids, SFunction<ExamStudentMistakesPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentMistakesPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentMistakesPlus>()
|
||||
.select(columns).in(ExamStudentMistakesPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamStudentMistakesPlus getById(Long id, SFunction<ExamStudentMistakesPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentMistakesPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentMistakesPlus>()
|
||||
.select(columns).eq(ExamStudentMistakesPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentMistakesPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentMistakesPlus, ?>... columns) {
|
||||
List<ExamStudentMistakesPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamStudentMistakesPlus> map = new HashMap<>();
|
||||
for (ExamStudentMistakesPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentMistakesPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamStudentMistakesPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamStudentMistakesPlus> map = new HashMap<>();
|
||||
for (ExamStudentMistakesPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamStudentMistakesPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamStudentMistakesPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentMistakesPlus>().in(ExamStudentMistakesPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_student_mistakes ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_mistakes ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_mistakes ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询错题集
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 错题集
|
||||
*/
|
||||
@Override
|
||||
public ExamStudentMistakes selectExamStudentMistakesById(Long id) {
|
||||
return examStudentMistakesMapper.selectExamStudentMistakesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询错题集列表
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 错题集
|
||||
*/
|
||||
@Override
|
||||
public List<ExamStudentMistakes> selectExamStudentMistakesList(ExamStudentMistakes examStudentMistakes) {
|
||||
List<ExamStudentMistakes> list = examStudentMistakesMapper.selectExamStudentMistakesList(examStudentMistakes);
|
||||
if (list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
List<Long> qids = new ArrayList<>();
|
||||
for (ExamStudentMistakes item : list) {
|
||||
ids.add(item.getStudentId());
|
||||
qids.add(item.getQuestionId());
|
||||
}
|
||||
Map<Long, ExamQuestionPlus> examQuestionMap = examQuestionService.getMapByIds(qids, ExamQuestionPlus::getId, ExamQuestionPlus::getQuestion);
|
||||
Map<Long, SysUser> map = sysUserService.selectMapUserById(ids);
|
||||
for (ExamStudentMistakes item : list) {
|
||||
if (map.containsKey(item.getStudentId())) {
|
||||
item.setStudentName(map.get(item.getStudentId()).getNickName());
|
||||
}
|
||||
if (examQuestionMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionMap.get(item.getQuestionId()).getQuestion());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamStudentMistakes(ExamStudentMistakes examStudentMistakes) {
|
||||
examStudentMistakes.setCreateTime(DateUtils.getNowDate());
|
||||
return examStudentMistakesMapper.insertExamStudentMistakes(examStudentMistakes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改错题集
|
||||
*
|
||||
* @param examStudentMistakes 错题集
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamStudentMistakes(ExamStudentMistakes examStudentMistakes) {
|
||||
return examStudentMistakesMapper.updateExamStudentMistakes(examStudentMistakes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除错题集
|
||||
*
|
||||
* @param ids 需要删除的错题集ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentMistakesByIds(Long[] ids) {
|
||||
return examStudentMistakesMapper.deleteExamStudentMistakesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除错题集信息
|
||||
*
|
||||
* @param id 错题集ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentMistakesById(Long id) {
|
||||
return examStudentMistakesMapper.deleteExamStudentMistakesById(id);
|
||||
}
|
||||
}
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.luqj.exam.domain.ExamPaperPlus;
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamStudentPaperAnswerMapper;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswer;
|
||||
import com.luqj.exam.domain.ExamStudentPaperAnswerPlus;
|
||||
import com.luqj.exam.service.IExamStudentPaperAnswerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 学生答题明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamStudentPaperAnswerServiceImpl extends ServiceImpl<ExamStudentPaperAnswerMapper, ExamStudentPaperAnswerPlus> implements IExamStudentPaperAnswerService
|
||||
{
|
||||
@Autowired
|
||||
private ExamStudentPaperAnswerMapper examStudentPaperAnswerMapper;
|
||||
@Autowired
|
||||
private IExamPaperService examPaperService;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamStudentPaperAnswerPlus> getByIds(List<Long> ids, SFunction<ExamStudentPaperAnswerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentPaperAnswerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperAnswerPlus>()
|
||||
.select(columns).in(ExamStudentPaperAnswerPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamStudentPaperAnswerPlus getById(Long id, SFunction<ExamStudentPaperAnswerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentPaperAnswerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperAnswerPlus>()
|
||||
.select(columns).eq(ExamStudentPaperAnswerPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentPaperAnswerPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentPaperAnswerPlus, ?>... columns) {
|
||||
List<ExamStudentPaperAnswerPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamStudentPaperAnswerPlus> map = new HashMap<>();
|
||||
for (ExamStudentPaperAnswerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentPaperAnswerPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamStudentPaperAnswerPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamStudentPaperAnswerPlus> map = new HashMap<>();
|
||||
for (ExamStudentPaperAnswerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamStudentPaperAnswerPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamStudentPaperAnswerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperAnswerPlus>().in(ExamStudentPaperAnswerPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_student_paper_answer ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_paper_answer ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_paper_answer ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean additionalInfo(List<ExamStudentPaperAnswer> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
List<Long> paperIds = new ArrayList<>();
|
||||
List<Long> questionIds = new ArrayList<>();
|
||||
for (ExamStudentPaperAnswer item : list) {
|
||||
questionIds.add(item.getQuestionId());
|
||||
paperIds.add(item.getPaperId());
|
||||
}
|
||||
Map<Long, ExamPaperPlus> examPaperPlusMap = examPaperService.getMapByIds(paperIds);
|
||||
Map<Long, ExamQuestionPlus> examQuestionPlusMap = examQuestionService.getMapByIds(questionIds);
|
||||
for (ExamStudentPaperAnswer item : list) {
|
||||
if (examPaperPlusMap.containsKey(item.getPaperId())) {
|
||||
item.setPaperName(examPaperPlusMap.get(item.getPaperId()).getName());
|
||||
}
|
||||
if (examQuestionPlusMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionPlusMap.get(item.getQuestionId()).getNo());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteExamStudentPaperAnswerByParentIds(Long[] ids) {
|
||||
LambdaQueryWrapper<ExamStudentPaperAnswerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperAnswerPlus>()
|
||||
.in(ExamStudentPaperAnswerPlus::getStuPaperId, ids);
|
||||
return this.baseMapper.delete(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生答题明细
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 学生答题明细
|
||||
*/
|
||||
@Override
|
||||
public ExamStudentPaperAnswer selectExamStudentPaperAnswerById(Long id)
|
||||
{
|
||||
return examStudentPaperAnswerMapper.selectExamStudentPaperAnswerById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生答题明细列表
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 学生答题明细
|
||||
*/
|
||||
@Override
|
||||
public List<ExamStudentPaperAnswer> selectExamStudentPaperAnswerList(ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
return examStudentPaperAnswerMapper.selectExamStudentPaperAnswerList(examStudentPaperAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
examStudentPaperAnswer.setCreateTime(DateUtils.getNowDate());
|
||||
return examStudentPaperAnswerMapper.insertExamStudentPaperAnswer(examStudentPaperAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题明细
|
||||
*
|
||||
* @param examStudentPaperAnswer 学生答题明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamStudentPaperAnswer(ExamStudentPaperAnswer examStudentPaperAnswer)
|
||||
{
|
||||
examStudentPaperAnswer.setUpdateTime(DateUtils.getNowDate());
|
||||
return examStudentPaperAnswerMapper.updateExamStudentPaperAnswer(examStudentPaperAnswer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生答题明细
|
||||
*
|
||||
* @param ids 需要删除的学生答题明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentPaperAnswerByIds(Long[] ids)
|
||||
{
|
||||
return examStudentPaperAnswerMapper.deleteExamStudentPaperAnswerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题明细信息
|
||||
*
|
||||
* @param id 学生答题明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentPaperAnswerById(Long id)
|
||||
{
|
||||
return examStudentPaperAnswerMapper.deleteExamStudentPaperAnswerById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.luqj.exam.domain.ExamPaperPlus;
|
||||
import com.luqj.exam.service.IExamPaperService;
|
||||
import com.luqj.exam.service.IExamStudentPaperAnswerService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamStudentPaperMapper;
|
||||
import com.luqj.exam.domain.ExamStudentPaper;
|
||||
import com.luqj.exam.domain.ExamStudentPaperPlus;
|
||||
import com.luqj.exam.service.IExamStudentPaperService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 学生考试试卷实例Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamStudentPaperServiceImpl extends ServiceImpl<ExamStudentPaperMapper, ExamStudentPaperPlus> implements IExamStudentPaperService
|
||||
{
|
||||
@Autowired
|
||||
private ExamStudentPaperMapper examStudentPaperMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IExamPaperService examPaperService;
|
||||
@Autowired
|
||||
private IExamStudentPaperAnswerService examStudentPaperAnswerService;
|
||||
@Override
|
||||
public List<ExamStudentPaperPlus> getByIds(List<Long> ids, SFunction<ExamStudentPaperPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperPlus>()
|
||||
.select(columns).in(ExamStudentPaperPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamStudentPaperPlus getById(Long id, SFunction<ExamStudentPaperPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperPlus>()
|
||||
.select(columns).eq(ExamStudentPaperPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentPaperPlus> getMapByIds(List<Long> ids, SFunction<ExamStudentPaperPlus, ?>... columns) {
|
||||
List<ExamStudentPaperPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamStudentPaperPlus> map = new HashMap<>();
|
||||
for (ExamStudentPaperPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentPaperPlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamStudentPaperPlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamStudentPaperPlus> map = new HashMap<>();
|
||||
for (ExamStudentPaperPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamStudentPaperPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamStudentPaperPlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentPaperPlus>().in(ExamStudentPaperPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_student_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_paper ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean additionalInfo(List<ExamStudentPaper> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
List<Long> paperIds = new ArrayList<>();
|
||||
List<Long> studentIds = new ArrayList<>();
|
||||
for (ExamStudentPaper item : list) {
|
||||
studentIds.add(item.getStudentId());
|
||||
paperIds.add(item.getPaperId());
|
||||
}
|
||||
Map<Long, ExamPaperPlus> examPaperPlusMap = examPaperService.getMapByIds(paperIds);
|
||||
Map<Long, SysUser> sysUserMap = sysUserService.selectMapUserById(studentIds);
|
||||
for (ExamStudentPaper item : list) {
|
||||
if (examPaperPlusMap.containsKey(item.getPaperId())) {
|
||||
item.setPaperName(examPaperPlusMap.get(item.getPaperId()).getName());
|
||||
}
|
||||
if (sysUserMap.containsKey(item.getStudentId())) {
|
||||
item.setStudentName(sysUserMap.get(item.getStudentId()).getNickName());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生考试试卷实例
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 学生考试试卷实例
|
||||
*/
|
||||
@Override
|
||||
public ExamStudentPaper selectExamStudentPaperById(Long id)
|
||||
{
|
||||
return examStudentPaperMapper.selectExamStudentPaperById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生考试试卷实例列表
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 学生考试试卷实例
|
||||
*/
|
||||
@Override
|
||||
public List<ExamStudentPaper> selectExamStudentPaperList(ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
return examStudentPaperMapper.selectExamStudentPaperList(examStudentPaper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamStudentPaper(ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
return examStudentPaperMapper.insertExamStudentPaper(examStudentPaper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生考试试卷实例
|
||||
*
|
||||
* @param examStudentPaper 学生考试试卷实例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamStudentPaper(ExamStudentPaper examStudentPaper)
|
||||
{
|
||||
return examStudentPaperMapper.updateExamStudentPaper(examStudentPaper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生考试试卷实例
|
||||
*
|
||||
* @param ids 需要删除的学生考试试卷实例ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentPaperByIds(Long[] ids)
|
||||
{
|
||||
examStudentPaperAnswerService.deleteExamStudentPaperAnswerByParentIds(ids);
|
||||
return examStudentPaperMapper.deleteExamStudentPaperByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生考试试卷实例信息
|
||||
*
|
||||
* @param id 学生考试试卷实例ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentPaperById(Long id)
|
||||
{
|
||||
return examStudentPaperMapper.deleteExamStudentPaperById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import java.util.HashMap;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.ExamStudentScoreMapper;
|
||||
import com.luqj.exam.domain.ExamStudentScore;
|
||||
import com.luqj.exam.domain.ExamStudentScorePlus;
|
||||
import com.luqj.exam.service.IExamStudentScoreService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 学生成绩Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class ExamStudentScoreServiceImpl extends ServiceImpl<ExamStudentScoreMapper, ExamStudentScorePlus> implements IExamStudentScoreService
|
||||
{
|
||||
@Autowired
|
||||
private ExamStudentScoreMapper examStudentScoreMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<ExamStudentScorePlus> getByIds(List<Long> ids, SFunction<ExamStudentScorePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentScorePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentScorePlus>()
|
||||
.select(columns).in(ExamStudentScorePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamStudentScorePlus getById(Long id, SFunction<ExamStudentScorePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<ExamStudentScorePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentScorePlus>()
|
||||
.select(columns).eq(ExamStudentScorePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentScorePlus> getMapByIds(List<Long> ids, SFunction<ExamStudentScorePlus, ?>... columns) {
|
||||
List<ExamStudentScorePlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, ExamStudentScorePlus> map = new HashMap<>();
|
||||
for (ExamStudentScorePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, ExamStudentScorePlus> getMapByIds(List<Long> ids) {
|
||||
List<ExamStudentScorePlus> list = this.getByIds(ids);
|
||||
Map<Long, ExamStudentScorePlus> map = new HashMap<>();
|
||||
for (ExamStudentScorePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamStudentScorePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<ExamStudentScorePlus> lambdaQueryWrapper = new LambdaQueryWrapper<ExamStudentScorePlus>().in(ExamStudentScorePlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from exam_student_score ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_score ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" exam_student_score ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询学生成绩
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 学生成绩
|
||||
*/
|
||||
@Override
|
||||
public ExamStudentScore selectExamStudentScoreById(Long id)
|
||||
{
|
||||
return examStudentScoreMapper.selectExamStudentScoreById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生成绩列表
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 学生成绩
|
||||
*/
|
||||
@Override
|
||||
public List<ExamStudentScore> selectExamStudentScoreList(ExamStudentScore examStudentScore)
|
||||
{
|
||||
return examStudentScoreMapper.selectExamStudentScoreList(examStudentScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamStudentScore(ExamStudentScore examStudentScore)
|
||||
{
|
||||
return examStudentScoreMapper.insertExamStudentScore(examStudentScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生成绩
|
||||
*
|
||||
* @param examStudentScore 学生成绩
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamStudentScore(ExamStudentScore examStudentScore)
|
||||
{
|
||||
return examStudentScoreMapper.updateExamStudentScore(examStudentScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生成绩
|
||||
*
|
||||
* @param ids 需要删除的学生成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentScoreByIds(Long[] ids)
|
||||
{
|
||||
return examStudentScoreMapper.deleteExamStudentScoreByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生成绩信息
|
||||
*
|
||||
* @param id 学生成绩ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamStudentScoreById(Long id)
|
||||
{
|
||||
return examStudentScoreMapper.deleteExamStudentScoreById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.StatsExamAccuracyMapper;
|
||||
import com.luqj.exam.domain.StatsExamAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamAccuracyPlus;
|
||||
import com.luqj.exam.service.IStatsExamAccuracyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 学生答题正确率统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class StatsExamAccuracyServiceImpl extends ServiceImpl<StatsExamAccuracyMapper, StatsExamAccuracyPlus> implements IStatsExamAccuracyService
|
||||
{
|
||||
@Autowired
|
||||
private StatsExamAccuracyMapper statsExamAccuracyMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Override
|
||||
public List<StatsExamAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamAccuracyPlus>()
|
||||
.select(columns).in(StatsExamAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsExamAccuracyPlus getById(Long id, SFunction<StatsExamAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamAccuracyPlus>()
|
||||
.select(columns).eq(StatsExamAccuracyPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamAccuracyPlus, ?>... columns) {
|
||||
List<StatsExamAccuracyPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, StatsExamAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamAccuracyPlus> getMapByIds(List<Long> ids) {
|
||||
List<StatsExamAccuracyPlus> list = this.getByIds(ids);
|
||||
Map<Long, StatsExamAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StatsExamAccuracyPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<StatsExamAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamAccuracyPlus>().in(StatsExamAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from stats_exam_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
@Override
|
||||
public StatsExamAccuracy selectStatsExamAccuracyById(Long id)
|
||||
{
|
||||
return statsExamAccuracyMapper.selectStatsExamAccuracyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
@Override
|
||||
public List<StatsExamAccuracy> selectStatsExamAccuracyList(StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
List<StatsExamAccuracy> list = statsExamAccuracyMapper.selectStatsExamAccuracyList(statsExamAccuracy);
|
||||
if (list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
for (StatsExamAccuracy item : list) {
|
||||
ids.add(item.getUserId());
|
||||
}
|
||||
Map<Long, SysUser> map = sysUserService.selectMapUserById(ids);
|
||||
for (StatsExamAccuracy item : list) {
|
||||
if (map.containsKey(item.getUserId())) {
|
||||
item.setUserName(map.get(item.getUserId()).getNickName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
statsExamAccuracy.setCreateTime(DateUtils.getNowDate());
|
||||
return statsExamAccuracyMapper.insertStatsExamAccuracy(statsExamAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatsExamAccuracy(StatsExamAccuracy statsExamAccuracy)
|
||||
{
|
||||
statsExamAccuracy.setUpdateTime(DateUtils.getNowDate());
|
||||
return statsExamAccuracyMapper.updateStatsExamAccuracy(statsExamAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamAccuracyByIds(Long[] ids)
|
||||
{
|
||||
return statsExamAccuracyMapper.deleteStatsExamAccuracyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计信息
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamAccuracyById(Long id)
|
||||
{
|
||||
return statsExamAccuracyMapper.deleteStatsExamAccuracyById(id);
|
||||
}
|
||||
}
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.luqj.exam.domain.ExamQuestionPlus;
|
||||
import com.luqj.exam.service.IExamQuestionService;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.StatsExamQuestionAccuracyMapper;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamQuestionAccuracyPlus;
|
||||
import com.luqj.exam.service.IStatsExamQuestionAccuracyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 按题目统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class StatsExamQuestionAccuracyServiceImpl extends ServiceImpl<StatsExamQuestionAccuracyMapper, StatsExamQuestionAccuracyPlus> implements IStatsExamQuestionAccuracyService
|
||||
{
|
||||
@Autowired
|
||||
private StatsExamQuestionAccuracyMapper statsExamQuestionAccuracyMapper;
|
||||
@Autowired
|
||||
private IExamQuestionService examQuestionService;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<StatsExamQuestionAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamQuestionAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamQuestionAccuracyPlus>()
|
||||
.select(columns).in(StatsExamQuestionAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsExamQuestionAccuracyPlus getById(Long id, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamQuestionAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamQuestionAccuracyPlus>()
|
||||
.select(columns).eq(StatsExamQuestionAccuracyPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamQuestionAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamQuestionAccuracyPlus, ?>... columns) {
|
||||
List<StatsExamQuestionAccuracyPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, StatsExamQuestionAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamQuestionAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamQuestionAccuracyPlus> getMapByIds(List<Long> ids) {
|
||||
List<StatsExamQuestionAccuracyPlus> list = this.getByIds(ids);
|
||||
Map<Long, StatsExamQuestionAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamQuestionAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StatsExamQuestionAccuracyPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<StatsExamQuestionAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamQuestionAccuracyPlus>().in(StatsExamQuestionAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from stats_exam_question_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_question_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_question_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询按题目统计
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 按题目统计
|
||||
*/
|
||||
@Override
|
||||
public StatsExamQuestionAccuracy selectStatsExamQuestionAccuracyById(Long id)
|
||||
{
|
||||
return statsExamQuestionAccuracyMapper.selectStatsExamQuestionAccuracyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询按题目统计列表
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 按题目统计
|
||||
*/
|
||||
@Override
|
||||
public List<StatsExamQuestionAccuracy> selectStatsExamQuestionAccuracyList(StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
List<StatsExamQuestionAccuracy> list = statsExamQuestionAccuracyMapper.selectStatsExamQuestionAccuracyList(statsExamQuestionAccuracy);
|
||||
if (list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> qids = new ArrayList<>();
|
||||
for (StatsExamQuestionAccuracy item : list) {
|
||||
qids.add(item.getQuestionId());
|
||||
}
|
||||
Map<Long, ExamQuestionPlus> examQuestionMap = examQuestionService.getMapByIds(qids, ExamQuestionPlus::getId, ExamQuestionPlus::getQuestion);
|
||||
for (StatsExamQuestionAccuracy item : list) {
|
||||
if (examQuestionMap.containsKey(item.getQuestionId())) {
|
||||
item.setQuestionName(examQuestionMap.get(item.getQuestionId()).getQuestion());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
statsExamQuestionAccuracy.setCreateTime(DateUtils.getNowDate());
|
||||
return statsExamQuestionAccuracyMapper.insertStatsExamQuestionAccuracy(statsExamQuestionAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改按题目统计
|
||||
*
|
||||
* @param statsExamQuestionAccuracy 按题目统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatsExamQuestionAccuracy(StatsExamQuestionAccuracy statsExamQuestionAccuracy)
|
||||
{
|
||||
statsExamQuestionAccuracy.setUpdateTime(DateUtils.getNowDate());
|
||||
return statsExamQuestionAccuracyMapper.updateStatsExamQuestionAccuracy(statsExamQuestionAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除按题目统计
|
||||
*
|
||||
* @param ids 需要删除的按题目统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamQuestionAccuracyByIds(Long[] ids)
|
||||
{
|
||||
return statsExamQuestionAccuracyMapper.deleteStatsExamQuestionAccuracyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除按题目统计信息
|
||||
*
|
||||
* @param id 按题目统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamQuestionAccuracyById(Long id)
|
||||
{
|
||||
return statsExamQuestionAccuracyMapper.deleteStatsExamQuestionAccuracyById(id);
|
||||
}
|
||||
}
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
package com.luqj.exam.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.luqj.exam.mapper.StatsExamWeekAccuracyMapper;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracy;
|
||||
import com.luqj.exam.domain.StatsExamWeekAccuracyPlus;
|
||||
import com.luqj.exam.service.IStatsExamWeekAccuracyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
/**
|
||||
* 学生答题正确率统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-07-23
|
||||
*/
|
||||
@Service
|
||||
public class StatsExamWeekAccuracyServiceImpl extends ServiceImpl<StatsExamWeekAccuracyMapper, StatsExamWeekAccuracyPlus> implements IStatsExamWeekAccuracyService
|
||||
{
|
||||
@Autowired
|
||||
private StatsExamWeekAccuracyMapper statsExamWeekAccuracyMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Override
|
||||
public List<StatsExamWeekAccuracyPlus> getByIds(List<Long> ids, SFunction<StatsExamWeekAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamWeekAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamWeekAccuracyPlus>()
|
||||
.select(columns).in(StatsExamWeekAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsExamWeekAccuracyPlus getById(Long id, SFunction<StatsExamWeekAccuracyPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<StatsExamWeekAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamWeekAccuracyPlus>()
|
||||
.select(columns).eq(StatsExamWeekAccuracyPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamWeekAccuracyPlus> getMapByIds(List<Long> ids, SFunction<StatsExamWeekAccuracyPlus, ?>... columns) {
|
||||
List<StatsExamWeekAccuracyPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, StatsExamWeekAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamWeekAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, StatsExamWeekAccuracyPlus> getMapByIds(List<Long> ids) {
|
||||
List<StatsExamWeekAccuracyPlus> list = this.getByIds(ids);
|
||||
Map<Long, StatsExamWeekAccuracyPlus> map = new HashMap<>();
|
||||
for (StatsExamWeekAccuracyPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StatsExamWeekAccuracyPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<StatsExamWeekAccuracyPlus> lambdaQueryWrapper = new LambdaQueryWrapper<StatsExamWeekAccuracyPlus>().in(StatsExamWeekAccuracyPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from stats_exam_week_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_week_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" stats_exam_week_accuracy ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询学生答题正确率统计
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
@Override
|
||||
public StatsExamWeekAccuracy selectStatsExamWeekAccuracyById(Long id)
|
||||
{
|
||||
return statsExamWeekAccuracyMapper.selectStatsExamWeekAccuracyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询学生答题正确率统计列表
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 学生答题正确率统计
|
||||
*/
|
||||
@Override
|
||||
public List<StatsExamWeekAccuracy> selectStatsExamWeekAccuracyList(StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
List<StatsExamWeekAccuracy> list = statsExamWeekAccuracyMapper.selectStatsExamWeekAccuracyList(statsExamWeekAccuracy);
|
||||
if (list.size() == 0) {
|
||||
return list;
|
||||
}
|
||||
List<Long> ids = new ArrayList<>();
|
||||
for (StatsExamWeekAccuracy item : list) {
|
||||
ids.add(item.getUserId());
|
||||
}
|
||||
Map<Long, SysUser> map = sysUserService.selectMapUserById(ids);
|
||||
for (StatsExamWeekAccuracy item : list) {
|
||||
if (map.containsKey(item.getUserId())) {
|
||||
item.setUserName(map.get(item.getUserId()).getNickName());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
statsExamWeekAccuracy.setCreateTime(DateUtils.getNowDate());
|
||||
return statsExamWeekAccuracyMapper.insertStatsExamWeekAccuracy(statsExamWeekAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改学生答题正确率统计
|
||||
*
|
||||
* @param statsExamWeekAccuracy 学生答题正确率统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateStatsExamWeekAccuracy(StatsExamWeekAccuracy statsExamWeekAccuracy)
|
||||
{
|
||||
statsExamWeekAccuracy.setUpdateTime(DateUtils.getNowDate());
|
||||
return statsExamWeekAccuracyMapper.updateStatsExamWeekAccuracy(statsExamWeekAccuracy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除学生答题正确率统计
|
||||
*
|
||||
* @param ids 需要删除的学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamWeekAccuracyByIds(Long[] ids)
|
||||
{
|
||||
return statsExamWeekAccuracyMapper.deleteStatsExamWeekAccuracyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生答题正确率统计信息
|
||||
*
|
||||
* @param id 学生答题正确率统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteStatsExamWeekAccuracyById(Long id)
|
||||
{
|
||||
return statsExamWeekAccuracyMapper.deleteStatsExamWeekAccuracyById(id);
|
||||
}
|
||||
}
|
||||
Loaded 100 of 540 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user