| | |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.CustomService; |
| | | import com.ruoyi.system.service.UserService; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户信息表 |
| | |
| | | }); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<Map<String, Object>>> getLaboratoryPersonList() { |
| | | //查询通信和电力下的人员信息 |
| | | //查询当前登录人员的架构 |
| | | //判断全部,个人,组织的权限 |
| | | User user = baseMapper.selectById(SecurityUtils.getUserId());//当前登录的人 |
| | | //获取当前人所属实验室id |
| | | String laboratory = ""; |
| | | String departLimsId = user.getDepartLimsId(); |
| | | if (ObjectUtils.isNotEmpty(departLimsId)) { |
| | | String[] split = departLimsId.split(","); |
| | | //查询对应架构名称(通信实验室,电力实验室,检测办) |
| | | String departLims = baseMapper.seldepLimsId(Integer.parseInt(split[split.length - 1])); |
| | | if (departLims.contains("实验室")) { |
| | | laboratory = departLims; |
| | | } |
| | | } |
| | | return baseMapper.getLaboratoryPersonList(laboratory).stream().collect(Collectors.groupingBy(m->m.get("depName").toString())); |
| | | } |
| | | } |
| | | |