diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java index 6053008c..531b5279 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/count/SysUsernumController.java @@ -80,7 +80,7 @@ public class SysUsernumController extends BaseController { List sysDepts = deptService.selectDeptList(dept); for (SysDept sysDept : sysDepts) { for (SysUser user1 : list) { - if (sysDept.getDeptName().equals(user1.getDept().getDeptName())) { + if (sysDept.getDeptId().equals(user1.getDept().getDeptId())) { sysuser.add(user1); } } @@ -111,7 +111,7 @@ public class SysUsernumController extends BaseController { @GetMapping("/print/{deptId}") public String print(@PathVariable("deptId") Long deptId, SysUser user, ModelMap mmap) { List list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId) - .eq(SysUser::getDelFlag, 0) + .eq(SysUser::getDelFlag, '0') .ne(SysUser::getUserId, 1) .list(); list.forEach(sysuser -> { @@ -130,7 +130,7 @@ public class SysUsernumController extends BaseController { } - private List sharType = Arrays.asList("已登记", "已申报", "已审核", "已离职","已离岗"); + private List sharType = Arrays.asList("已登记", "已审查", "已定岗", "已离职","已离岗"); private List smType = Arrays.asList("一般涉密人员", "重要涉密人员", "核心涉密人员"); @@ -159,7 +159,7 @@ public class SysUsernumController extends BaseController { } /** - * + * * 统计人员已登记、已申报、已审核、已离职 * @return com.ruoyi.common.core.domain.AjaxResult */ @@ -172,10 +172,10 @@ public class SysUsernumController extends BaseController { AtomicReference value = new AtomicReference<>(0L); if("已登记".equals(name)){ value.set(userCountDTO.getYdj()); - }else if("已申报".equals(name)){ - value.set(userCountDTO.getYsb()); - }else if("已审核".equals(name)){ - value.set(userCountDTO.getYsh()); + }else if("已审查".equals(name)){ + value.set(userCountDTO.getYsc()); + }else if("已定岗".equals(name)){ + value.set(userCountDTO.getYdg()); }else if("已离职".equals(name)){ value.set(userCountDTO.getYlz()); }else{ @@ -214,8 +214,8 @@ public class SysUsernumController extends BaseController { Integer count = new LambdaQueryChainWrapper<>(userService.getBaseMapper()) .ge(SysUser::getCreateTime, minDayTime) .le(SysUser::getCreateTime, maxDayTime) - .eq(SysUser::getExamine,2) - .eq(SysUser::getDelFlag,0) + .eq(SysUser::getExamine,'2') + .eq(SysUser::getDelFlag,'0') .count(); if(Objects.isNull(count)){ count = 0; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserApplyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserApplyController.java index 131b7819..bf3dbae3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserApplyController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserApplyController.java @@ -1,17 +1,26 @@ package com.ruoyi.web.controller.system.system; +import cn.hutool.core.convert.Convert; +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.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.core.domain.entity.SysUserVo; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.framework.shiro.util.AuthorizationUtils; +import com.ruoyi.system.domain.record.SysUserAfter; import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysUserService; +import com.ruoyi.web.controller.manager.UserRecordManager; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -39,6 +48,9 @@ public class SysUserApplyController extends BaseController { @Autowired private ISysPostService postService; + @Autowired + private UserRecordManager userRecordManager; + private String prefix = "system/user/userApply"; @@ -60,9 +72,11 @@ public class SysUserApplyController extends BaseController { @ResponseBody public TableDataInfo list(SysUser user) { startPage(); - user.setExamine("2"); + user.setExamine("0"); List list = userService.selectUserList(user); - return getDataTable(list); + List userList = list.stream() + .filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList()); + return getDataTable(userList); } @@ -81,15 +95,27 @@ public class SysUserApplyController extends BaseController { } - @GetMapping("/submit/{userId}") + @GetMapping("/submit2/{userId}") @ResponseBody - public AjaxResult submit(@PathVariable("userId") Long userId) { + public AjaxResult submit2(@PathVariable("userId") Long userId) { boolean update = userService.lambdaUpdate() .eq(SysUser::getUserId, userId) .set(SysUser::getExamine, "3").update(); return toAjax(update); } + /** + * 用户定岗 + */ + @Log(title = "用户定岗", businessType = BusinessType.UPDATE) + @PostMapping("/submit") + @ResponseBody + public AjaxResult submit(@Validated SysUserVo userVo) { + SysUser user = Convert.convert(SysUser.class, userVo); + user.setExamine("3"); + userRecordManager.saveOrUpdate(user); + return toAjax(userService.updateUser(user)); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserController.java index 65b262e0..e4398553 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserController.java @@ -364,8 +364,11 @@ public class SysUserController extends BaseController { @PostMapping("/userList") @ResponseBody public AjaxResult userList() { - return AjaxResult.success(userService.lambdaQuery(). - select(SysUser::getUserId,SysUser::getUserName).list()); + List list = userService.lambdaQuery(). + select(SysUser::getUserId, SysUser::getUserName).list(); + List userList = list.stream() + .filter(u -> !"admin".equals(u.getUserName())).collect(Collectors.toList()); + return AjaxResult.success(userList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserExamineController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserExamineController.java index 883a9be1..04efc987 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserExamineController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/SysUserExamineController.java @@ -53,9 +53,11 @@ public class SysUserExamineController extends BaseController { public TableDataInfo list(SysUser user) { startPage(); - user.setExamine("3"); + user.setExamine("2"); List list = userService.selectUserList(user); - return getDataTable(list); + List userList = list.stream() + .filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList()); + return getDataTable(userList); } /** @@ -70,7 +72,9 @@ public class SysUserExamineController extends BaseController { startPage(); user.setExamine("0"); List list = userService.selectUserList(user); - return getDataTable(list); + List userList = list.stream() + .filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList()); + return getDataTable(userList); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdLeaveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdLeaveController.java index 1dbfb539..35080b69 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdLeaveController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdLeaveController.java @@ -176,4 +176,17 @@ public class TdLeaveController extends BaseController mmap.put("posts", postService.selectPostsByUserIds(userId)); return prefix + "/leaveprint"; } + + /** + * 修改用户状态 + * @param userId + * @return + */ + public Boolean userUpdate(Long userId) { + return userService.lambdaUpdate() + .eq(SysUser::getUserId, userId) + .set(SysUser::getStatus, "1") + .update(); + } + } diff --git a/ruoyi-admin/src/main/resources/templates/system/leave/add.html b/ruoyi-admin/src/main/resources/templates/system/leave/add.html index 99a88428..3544ec9a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/leave/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/leave/add.html @@ -6,112 +6,112 @@ -
-
- - -
- -
- -
+
+ + + +
+ +
+
-
- -
- -
+
+
+ +
+
-
- -
- -
+
+
+ +
+
-
- -
-
- - -
- +
+
+ +
+
+ +
+
-
- -
-
- - -
+
+
+ +
+
+ +
+
-
- -
- -
+
+ +
+
+
- -
- - - - + }); + diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index a6c694a9..a340d363 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -1,242 +1,242 @@ - - + + -
-
- -

基本信息

-
-
-
- -
- -
+
+ + +

基本信息

+
+
+
+ +
+
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
-
- - -
+
+
+
+
+ +
+
+ +
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
-
- - -
+
+
+
+
+ +
+
+ +
-
-
- -
- -
+
+
+
+ +
+
+
-
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
+
-
-
-
- -
- -
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
+
+
+
+
+ +
选择文件 更改 @@ -244,213 +244,213 @@ - - × -
+ + ×
-
-
- -
- -
+
+
+
+ +
+
-
-

其他信息

-
-
-
- -
- -
+ +
+

其他信息

+
+
+
+ +
+
- -
- -
-
-   -
+ +
+ +
+
+   +
- - - - - + }); + diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html index 8b876fc5..8c67bca0 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html @@ -1,220 +1,219 @@ - - + + -
-
- - -

基本信息

-
-
-
- -
- -
+
+ + + +

基本信息

+
+
+
+ +
+
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
-
- -
- -
+ +
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
-
- - -
+
+
+
+
+ +
+
+ +
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
-
- - -
+
+
+
+
+ +
+
+ +
-
-
- -
- -
+
+
+
+ +
+
-
-
-
- -
-
- - -
+
+
+
+
+ +
+
+ +
-
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
-
-
- -
- -
+
+
+
+
+ +
+
-
-
- -
- -
+
+
+
+ +
+
-
-
- -
-
+
+
+
+ +
+
选择文件 更改 @@ -222,164 +221,164 @@ - [[*{confName}]] - × -
+ [[*{confName}]] + ×
+
-

其他信息

-
-
-
- -
- -
+

其他信息

+
+
+
+ +
+
- -
-
-
-   -
+ +
+
+
+   +
- - - - - + + }); + diff --git a/ruoyi-admin/src/main/resources/templates/system/user/userApply/applyDetail.html b/ruoyi-admin/src/main/resources/templates/system/user/userApply/applyDetail.html index 4a32fcfa..493495c6 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/userApply/applyDetail.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/userApply/applyDetail.html @@ -93,9 +93,9 @@
- +
-
@@ -118,7 +118,7 @@
@@ -202,10 +202,11 @@
- +
- + +
@@ -263,20 +264,20 @@ window.location.href = ctx + "common/download/resource?resource=" + encodeURI(fileUrl) ; } var prefix = ctx + "system/userApply"; - function pass(){ - let id = $("input[name='userId']").val() - $.ajax({ - type : "GET", - url : prefix + '/submit/' + id, - async : false, - beforeSend: function () { - $.modal.loading("正在处理中,请稍候..."); - }, - success: function(result) { - $.operate.successTabCallback(result); - } - }); + + function pass() { + if ($.validate.form()) { + var data = $("#form-user-edit").serializeArray(); + /*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;*/ + var roleIds = $.form.radioCheckeds("role"); + var postIds = $.form.selectSelects("post"); + /*data.push({"name": "status", "value": status});*/ + data.push({"name": "roleIds", "value": roleIds}); + data.push({"name": "postIds", "value": postIds}); + $.operate.saveTab(prefix + "/submit", data); + } } + document.addEventListener('DOMContentLoaded', function () { // 获取所有name为role的radio按钮 var radios = document.querySelectorAll('input[type="radio"]'); diff --git a/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html b/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html index b7fcea11..40729c0f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/userApply/userApply.html @@ -30,9 +30,7 @@ diff --git a/ruoyi-admin/src/main/resources/templates/system/user/userexamine/examinedetail.html b/ruoyi-admin/src/main/resources/templates/system/user/userexamine/examinedetail.html index 29f191df..9e5a4919 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/userexamine/examinedetail.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/userexamine/examinedetail.html @@ -205,7 +205,8 @@
@@ -228,8 +229,8 @@ 文件下载 - [[*{confName}]] - + [[*{confName}]] +
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/userexamine/userexamine.html b/ruoyi-admin/src/main/resources/templates/system/user/userexamine/userexamine.html index fcd71919..38237d49 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/userexamine/userexamine.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/userexamine/userexamine.html @@ -24,7 +24,7 @@
@@ -101,7 +101,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('审核 '); + actions.push('审查 '); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html index e426035e..cac32f68 100644 --- a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html +++ b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html @@ -24,110 +24,110 @@ } -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- - -
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
+
+
-
-
+
+
+
+
+ + +
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+
+
+
+
- - - - - + } + ] + }); + console.log(response.data.data) + } + }) + var rightMain = echarts.init(document.getElementById('rightMain')); + axios.post(prefix + '/countUser').then(response => { + if (response.data.code == web_status.SUCCESS){ + rightMain.setOption({ + title: { + text: '人员状态统计' + }, + tooltip: {}, + legend: { + orient: 'vertical', + x: 'right', + data: ['已登记', '已审查', '已定岗', '已离职', '已离岗'], + top: '60%', + left: '81%' + }, + series: [ + { + type: 'pie', + data: response.data.data, + center: ['43%', '55%'] + } + ] + }); + } + }) + diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserVo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserVo.java new file mode 100644 index 00000000..9bd56cba --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserVo.java @@ -0,0 +1,47 @@ +package com.ruoyi.common.core.domain.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.*; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + + +/** + * 用户对象 sys_user + * + * @author ruoyi + */ +@Data +public class SysUserVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 用户ID */ + private Long userId; + + /** 涉密程度 */ + @NotBlank(message = "涉密程度不能为空") + private String shemichengdu; + + /** 帐号状态(0正常 1停用) */ + private String status; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + /** 审核状态 */ + private String examine; + + /** 角色组 */ + @TableField(exist=false) + private Long[] roleIds; + + /** 岗位组 */ + @NotNull(message = "岗位不能为空") + @TableField(exist=false) + private Long[] postIds; + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/count/UserCountDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/count/UserCountDTO.java index 2a4f4185..9f7ab0b8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/count/UserCountDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/count/UserCountDTO.java @@ -22,11 +22,11 @@ public class UserCountDTO implements Serializable { @ApiModelProperty(value = "已登记") private Integer ydj; - @ApiModelProperty(value = "已申报") - private Integer ysb; + @ApiModelProperty(value = "已审查") + private Integer ysc; - @ApiModelProperty(value = "已审核") - private Integer ysh; + @ApiModelProperty(value = "已定岗") + private Integer ydg; @ApiModelProperty(value = "已离职") private Integer ylz; diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 998b2095..db1409c2 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -314,15 +314,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) -