| | |
| | | ControlSystem controlSystem = controlSystemService.getByDriveType(mdcEquipmentDto.getDriveType()); |
| | | // 查询设备状态 |
| | | EquipmentLog equipmentLog = equipmentLogService.selectEquipmentOporation(mdcEquipment.getEquipmentId()); |
| | | if (equipmentLog == null) { |
| | | return mdcEquipmentDto; |
| | | } |
| | | Integer oporation = equipmentLog.getOporation(); |
| | | |
| | | if (controlSystem != null) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> listEquipmentId(String equipmentType, List<String> equipmentIdList) { |
| | | List<MdcEquipment> list = super.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentType, equipmentType).in(MdcEquipment::getEquipmentId, equipmentIdList)); |
| | | public List<String> listEquipmentId(MdcEfficiencyReportQueryVo vo) { |
| | | LambdaQueryWrapper<MdcEquipment> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (vo.getEquipmentIdList() != null && !vo.getEquipmentIdList().isEmpty()) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getEquipmentType())) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDriveType())) { |
| | | queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceCategory, Arrays.asList(vo.getDeviceCategory().split(","))); |
| | | } |
| | | List<MdcEquipment> list = super.list(queryWrapper); |
| | | // List<MdcEquipment> list = super.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentType, equipmentType).in(MdcEquipment::getEquipmentId, equipmentIdList)); |
| | | return list.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | |
| | | Integer min = mdcEquipmentThreshold.getMinThreshold(); |
| | | MessageDTO messageDTO = new MessageDTO(); |
| | | messageDTO.setTitle("设备" + mdcEquipmentThreshold.getChineseName() + "报警!"); |
| | | messageDTO.setCategory("预警消息"); |
| | | messageDTO.setCategory(CommonConstant.MSG_CATEGORY_2); |
| | | messageDTO.setFromUser("admin"); |
| | | messageDTO.setToUser("admin"); |
| | | MdcOverrunAlarm mdcOverrunAlarm = new MdcOverrunAlarm(); |
| | |
| | | */ |
| | | @Override |
| | | public MdcEquipmentDto getWorkLineLast(String tableName) { |
| | | return this.baseMapper.findWorkLineLast(tableName); |
| | | try { |
| | | return this.baseMapper.findWorkLineLast(tableName); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<String> listEquipmentIdShift(MdcEfficiencyReportShiftQueryVo vo) { |
| | | LambdaQueryWrapper<MdcEquipment> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (vo.getEquipmentIdList() != null && !vo.getEquipmentIdList().isEmpty()) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getEquipmentType())) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDriveType())) { |
| | | queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceCategory, Arrays.asList(vo.getDeviceCategory().split(","))); |
| | | } |
| | | List<MdcEquipment> list = super.list(queryWrapper); |
| | | // List<MdcEquipment> list = super.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentType, equipmentType).in(MdcEquipment::getEquipmentId, equipmentIdList)); |
| | | return list.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |