| | |
| | | } |
| | | } |
| | | //根据产线集合查找所有设备id |
| | | if (allDepartIds.isEmpty()) { |
| | | return null; |
| | | } |
| | | List<String> equipmentIds = this.baseMapper.queryIdsByDeparts(allDepartIds); |
| | | if (StringUtils.isNotEmpty(key)) { |
| | | //key不为空,查询所有下级部门id |
| | |
| | | } |
| | | } |
| | | //根据产线集合查找所有设备id |
| | | if (allProductionIds.isEmpty()) { |
| | | return null; |
| | | } |
| | | List<String> equipmentIds = this.baseMapper.queryIdsByProductions(allProductionIds); |
| | | if (StringUtils.isNotEmpty(key)) { |
| | | //key不为空,查询所有下级产线id |
| | |
| | | return this.baseMapper.findEquProList(equipmentIdList); |
| | | } |
| | | |
| | | /** |
| | | * 根据部门层级查询设备单个 |
| | | */ |
| | | @Override |
| | | public MdcEquipment getEquipmentByDepPid(String pid, String userId) { |
| | | List<String> idsByDepart = this.getEquipmentIdsByDepart(userId, pid); |
| | | if (idsByDepart != null && !idsByDepart.isEmpty()) { |
| | | return super.getOne(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentId, idsByDepart.get(0))); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |