Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/ry_zhky/commit/ee73a6a096afd4fa3d616be1fa3628c22e461ff0?style=split&whitespace=ignore-change You should set ROOT_URL correctly, otherwise the web may not work correctly.

feat:错题删除

pg_adapter
wangxy 10 months ago
parent cd6421233a
commit ee73a6a096

@ -1,6 +1,10 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamRespDTO;
import com.ruoyi.web.controller.manager.UserExamManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -20,6 +24,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
@ -37,6 +42,9 @@ public class TdExamnumController extends BaseController
@Autowired @Autowired
private ITdExamnumService tdExamnumService; private ITdExamnumService tdExamnumService;
@Resource
private UserExamManager userExamManager;
@RequiresPermissions("system:examnum:view") @RequiresPermissions("system:examnum:view")
@GetMapping() @GetMapping()
public String examnum() public String examnum()
@ -50,10 +58,9 @@ public class TdExamnumController extends BaseController
@RequiresPermissions("system:examnum:list") @RequiresPermissions("system:examnum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdExamnum tdExamnum) public TableDataInfo list(UserExamReqDTO reqDTO) {
{
startPage(); startPage();
List<TdExamnum> list = tdExamnumService.selectTdExamnumList(tdExamnum); List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
return getDataTable(list); return getDataTable(list);
} }
@ -71,62 +78,7 @@ public class TdExamnumController extends BaseController
return util.exportExcel(list, "考试结果数据"); return util.exportExcel(list, "考试结果数据");
} }
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:examnum:add")
@Log(title = "考试结果", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdExamnum tdExamnum)
{
return toAjax(tdExamnumService.insertTdExamnum(tdExamnum));
}
/**
*
*/
@RequiresPermissions("system:examnum:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
TdExamnum tdExamnum = tdExamnumService.selectTdExamnumById(id);
mmap.put("tdExamnum", tdExamnum);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:examnum:edit")
@Log(title = "考试结果", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdExamnum tdExamnum)
{
return toAjax(tdExamnumService.updateTdExamnum(tdExamnum));
}
/**
*
*/
@RequiresPermissions("system:examnum:remove")
@Log(title = "考试结果", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdExamnumService.deleteTdExamnumByIds(ids));
}
} }

@ -1,29 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('考试结果列表')" /> <th:block th:include="include :: header('考试管理')" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId"> <form id="notice-form">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>考生姓名:</label> 搜索人员:<input type="text" name="userName"/>
<input type="text" name="userName"/> <input type="hidden" name="examId" th:value="*{examId}"/>
</li>
<li>
<label>单位名称:</label>
<input type="text" name="dept"/>
</li>
<li>
<label>试题类型:</label>
<select name="type" th:with="type=${@dict.getType('td_question_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -35,10 +24,9 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:examnum:export">
<i class="fa fa-download"></i> 导出
</a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
@ -46,57 +34,63 @@
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:examnum:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:examnum:remove')}]];
var typeDatas = [[${@dict.getType('td_question_type')}]];
var prefix = ctx + "system/examnum"; var prefix = ctx + "system/examnum";
var prefixUser = ctx + "system/userExam";
$(function() { $(function() {
var options = { var options = {
uniqueId: "id",
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", modalName: "考试",
updateUrl: prefix + "/edit/{id}", columns: [
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "考试结果",
columns: [{
checkbox: true
},
{ {
field: 'id', field : 'userName',
title: 'id', title : '人员'
visible: false
}, },
{ {
field: 'userName', field: 'tryCount',
title: '考试姓名' title: '考试次数'
}, },
{ {
field: 'examResult', field: 'maxScore',
title: '考试分数' title: '最高分',
align: 'center'
}, },
{ {
field: 'startTime', field: 'passed',
title: '开始时间' title: '是否通过',
}, formatter: function(value, row, index) {
{ if(value=='1'){
field: 'endTime', return '通过';
title: '结束时间' }else{
return '未通过';
}
}
}, },
{ {
field: 'dept', field: 'updateTime',
title: '单位名称' title: '最后考试时间',
sortable: true
}, },
{ {
field: 'type', title: '操作',
title: '试题类型', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(typeDatas, value); var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.examId + '\',\'' + row.userId + '\')"><i class="fa fa-search"></i>考试明细</a> ');
return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
/*资产列表-详细*/
function detail(id,userId) {
var url = prefixUser + '/detail/' + id +'/'+userId;
$.modal.open("考试明细", url);
}
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save