| | |
| | | } |
| | | IPage<EquipmentAlarmDto> pageList = this.baseMapper.pageList(page, equipmentAlarmVo); |
| | | pageList.getRecords().forEach(item -> { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | if (StringUtils.isBlank(item.getAlarmContent())) { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, item.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | } |
| | | } |
| | | }); |
| | | return this.baseMapper.pageList(page, equipmentAlarmVo); |
| | | return pageList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | // Step.2 AutoPoi 导出Excel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | List<EquipmentAlarmDto> equipmentAlarmDtos = this.baseMapper.list(equipmentAlarmVo); |
| | | if (equipmentAlarmDtos != null && !equipmentAlarmDtos.isEmpty()) { |
| | | for (EquipmentAlarmDto equipmentAlarmDto : equipmentAlarmDtos) { |
| | | if (StringUtils.isBlank(equipmentAlarmDto.getAlarmContent())) { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, equipmentAlarmDto.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, equipmentAlarmDto.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | equipmentAlarmDto.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 导出文件名称 |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "设备报警列表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, EquipmentAlarmDto.class); |