feat:问题修改

pg_adapter
wangxy 8 months ago
parent 53c730bb16
commit 9e7eea461c

@ -0,0 +1,71 @@
package com.ruoyi.web.controller.system.system;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.ISysUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.system
*
* @author wangxy
* @version JDK 8
* @className SysUserApplyController
* @date 2024/8/5
* @description
*/
@Controller
@RequestMapping("/system/userApply")
public class SysUserApplyController extends BaseController {
@Autowired
private ISysUserService userService;
private String prefix = "system/user/userApply";
@RequiresPermissions("system:userApply:view")
@GetMapping()
public String apply()
{
return prefix + "/userApply";
}
/**
*
* @param user
* @return
*/
@RequiresPermissions("system:userApply:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysUser user)
{
startPage();
user.setExamine("2");
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
@GetMapping("/apply/{userId}")
public AjaxResult userExamine(@PathVariable("userId") Long userId) {
boolean update= userService.lambdaUpdate()
.eq(SysUser::getUserId, userId)
.set(SysUser::getExamine, "3").update();
return toAjax(update);
}
}

@ -53,6 +53,7 @@ public class SysUserExamineController extends BaseController {
public TableDataInfo list(SysUser user) public TableDataInfo list(SysUser user)
{ {
startPage(); startPage();
user.setExamine("3");
List<SysUser> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
return getDataTable(list); return getDataTable(list);
} }

@ -93,7 +93,7 @@
var editFlag = [[${@permission.hasPermi('system:user:edit')}]]; var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]]; var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]];
var examineState = [[${@dict.getType('sys_examine_state')}]]; var examineState = [[${@dict.getType('sys_user_examine')}]];
var prefix = ctx + "system/user"; var prefix = ctx + "system/user";
$(function() { $(function() {

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('涉密人员审核列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>人员状态:</label>
<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>审核状态:</label>
<select name="examine" th:with="type=${@dict.getType('sys_user_examine')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>人员姓名:</label>
<input type="text" name="userName"/>
</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-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var examineFlag = [[${@permission.hasPermi('system:userexamine:examine')}]];
var downloadFlag = [[${@permission.hasPermi('system:userexamine:examine')}]];
var userStatus = [[${@dict.getType('sys_normal_disable')}]];
var userPolitics = [[${@dict.getType('sys_user_politics')}]];
var examineState = [[${@dict.getType('sys_user_examine')}]];
var prefix = ctx + "system/userApply";
$(function() {
var options = {
url: prefix + "/list",
modalName: "涉密人员审核",
columns: [
{
field: 'userId',
title: '人员ID',
},
{
field: 'loginName',
title: '人员编号',
},
{
field: 'examine',
title: '审核状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(examineState, value);
}
},
{
field: 'examineuser',
title: '审核人',
},
{
field: 'examinedate',
title: '审核时间',
},
{
field: 'userName',
title: '人员姓名',
},
{
field: 'status',
title: '用户状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(userStatus, value);
}
},
{
field: 'phonenumber',
title: '联系电话'
},
{
field: 'politics',
title: '政治面貌',
formatter: function(value, row, index) {
return $.table.selectDictLabel(userPolitics, value);
}
},
{
field: 'userarea',
title: '户籍地址',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
if(row.examine !== '2'){
actions.push('<a disabled class="btn btn-success btn-xs ' + examineFlag + '" href="javascript:void(0)"><i class="fa fa-edit"></i>审核</a> ');
actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="examineprint(\'' + row.userId + '\')"><i class="fa fa-download"></i>打印</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + examineFlag + '" href="javascript:void(0)" onclick="examinedetail(\'' + row.userId + '\')"><i class="fa fa-edit"></i>审核</a> ');
actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="examineprint(\'' + row.userId + '\')"><i class="fa fa-download"></i>打印</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
function examinedetail(id) {
var url ='/system/userexamine/examine/' + id;
$.modal.openTab("涉密人员审核", url);
}
function examineprint(id){
var url ='system/userexamine/examineprint/' + id;
$.modal.openTab("打印", url);
}
</script>
</body>
</html>

@ -19,7 +19,7 @@
</li> </li>
<li> <li>
<label>审核状态:</label> <label>审核状态:</label>
<select name="examine" th:with="type=${@dict.getType('sys_examine_state')}"> <select name="examine" th:with="type=${@dict.getType('sys_user_examine')}">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -47,7 +47,7 @@
var downloadFlag = [[${@permission.hasPermi('system:userexamine:examine')}]]; var downloadFlag = [[${@permission.hasPermi('system:userexamine:examine')}]];
var userStatus = [[${@dict.getType('sys_normal_disable')}]]; var userStatus = [[${@dict.getType('sys_normal_disable')}]];
var userPolitics = [[${@dict.getType('sys_user_politics')}]]; var userPolitics = [[${@dict.getType('sys_user_politics')}]];
var examineState = [[${@dict.getType('sys_examine_state')}]]; var examineState = [[${@dict.getType('sys_user_examine')}]];
var prefix = ctx + "system/userexamine"; var prefix = ctx + "system/userexamine";
$(function() { $(function() {

Loading…
Cancel
Save