| | |
| | | BeanUtils.copyProperties(entity, dto); |
| | | if (entity.getStatus() == 22) { |
| | | if (equip != null) { |
| | | List<MdcAlarmInfo> mdcAlarmInfo = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getDriveType, equip.getDrivetype()).eq(MdcAlarmInfo::getAlarmCode, entity.getAlarm()).eq(MdcAlarmInfo::getIsUse, 0)); |
| | | if (mdcAlarmInfo != null && !mdcAlarmInfo.isEmpty()) { |
| | | dto.setAlarmContent(mdcAlarmInfo.get(0).getAlarmContent()); |
| | | Optional<TmpEquipmentAlarm> tmpEquipmentAlarm = entity.getTmpEquipmentAlarmSet().stream().findFirst(); |
| | | if (tmpEquipmentAlarm.isPresent() && StringUtils.isNotBlank(tmpEquipmentAlarm.get().getAlarmContent())) { |
| | | dto.setAlarmContent(tmpEquipmentAlarm.get().getAlarmContent()); |
| | | }else { |
| | | List<MdcAlarmInfo> mdcAlarmInfo = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getDriveType, equip.getDrivetype()).eq(MdcAlarmInfo::getAlarmCode, entity.getAlarm()).eq(MdcAlarmInfo::getIsUse, 0)); |
| | | if (mdcAlarmInfo != null && !mdcAlarmInfo.isEmpty()) { |
| | | dto.setAlarmContent(mdcAlarmInfo.get(0).getAlarmContent()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | queryWrapper.le(MdcEquipmentRunningSection::getStartTime, endTime); |
| | | queryWrapper.orderByAsc(MdcEquipmentRunningSection::getStartTime); |
| | | list = this.baseMapper.selectList(queryWrapper); |
| | | |
| | | list = mergeErrorRunningTrace(list); |
| | | |
| | | } |
| | | if (list == null || list.isEmpty()) { |
| | | return Collections.emptyList(); |