| | |
| | | if (Func.isNotEmpty(user.getPassword())) { |
| | | user.setPassword(DigestUtil.encrypt(user.getPassword())); |
| | | } |
| | | Integer userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount())); |
| | | if (userCount > 0 && Func.isEmpty(user.getId())) { |
| | | throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount())); |
| | | } |
| | | // Integer userCount = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getAccount, user.getAccount())); |
| | | // if (userCount > 0 && Func.isEmpty(user.getId())) { |
| | | // throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount())); |
| | | // } |
| | | return save(user) && submitUserDept(user); |
| | | } |
| | | |
| | |
| | | if (!AuthUtil.isAdministrator() || StringUtil.isBlank(user.getTenantId())) { |
| | | user.setTenantId(AuthUtil.getTenantId()); |
| | | } |
| | | if (null != userExcel.getStatus() && userExcel.getStatus() != "") { |
| | | if (userExcel.getStatus().equals("在职")){ |
| | | user.setStatus(1); |
| | | } |
| | | else { |
| | | } else { |
| | | user.setStatus(2); |
| | | } |
| | | } |
| | | if (userExcel.getSex().equals("男性")){ |
| | | user.setSex(1); |
| | | } |
| | | else { |
| | | } else { |
| | | user.setSex(2); |
| | | } |
| | | user.setRoleId("1412226235153731586"); |
| | |
| | | |
| | | /** |
| | | * 通过 身份证号查询用户信息 |
| | | * |
| | | * @param idCardNo 身份证号 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保安员列表,帅选无保安证 |
| | | * |
| | | * @param page |
| | | * @param user |
| | | * @param deptId |
| | |
| | | |
| | | /** |
| | | * 保安员列表树 安员列表树,帅选无保安证,下拉tree |
| | | * |
| | | * @param user 用户信息 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询当前年份已有的保安证编号 |
| | | * |
| | | * @param pre 前缀 |
| | | * @return |
| | | */ |