| | |
| | | package org.jeecg.modules.mdc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.common.system.vo.DictModel; |
| | |
| | | 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()); |
| | | Set<TmpEquipmentAlarm> tmpEquipmentAlarmSet = entity.getTmpEquipmentAlarmSet(); |
| | | if (CollectionUtils.isNotEmpty(tmpEquipmentAlarmSet)) { |
| | | dto.setAlarmContent(tmpEquipmentAlarmSet.stream().findFirst().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(); |