| | |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.vo.UserVo; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.UserService; |
| | |
| | | |
| | | /** |
| | | * 根据条件获取用户列表 |
| | | * * todo: type : 1: 获取检测人员信息 |
| | | * type : 2: 获取当前登录用户部门下的所有用户 |
| | | * @param user |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> selectUserCondition(User user, String type) { |
| | | if (StringUtils.isNotEmpty(type)) { |
| | | |
| | | switch (type) { |
| | | case "1": |
| | | return baseMapper.selectQualityUserList(); |
| | | case "2": |
| | | return baseMapper.selectDepartmentLimsUserList(SecurityUtils.getUserId().intValue()); |
| | | } |
| | | |
| | | } |
| | | |
| | | return baseMapper.selectUserCondition(QueryWrappers.queryWrappers(user), type); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public int upUserDepardLimsId(String ids, String id) { |
| | | List<Integer> userIds = JSON.parseArray(ids, Integer.class); |
| | | return baseMapper.update(null, Wrappers.<User>lambdaUpdate().in(User::getId, userIds).set(User::getDepartLimsId, id).set(User::getUpdateTime, LocalDateTime.now()).set(User::getUpdateBy,SecurityUtils.getLoginUser().getUsername())); |
| | | return baseMapper.update(null, Wrappers.<User>lambdaUpdate().in(User::getId, userIds).set(User::getDepartLimsId, id).set(User::getUpdateTime, LocalDateTime.now()).set(User::getUpdateBy, SecurityUtils.getLoginUser().getUsername())); |
| | | } |
| | | |
| | | /** |