| | |
| | | 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) { |
| | | Optional<TmpEquipmentAlarm> tmpEquipmentAlarm = entity.getTmpEquipmentAlarmSet().stream().findFirst(); |
| | | if (tmpEquipmentAlarm.isPresent() && StringUtils.isNotBlank(tmpEquipmentAlarm.get().getAlarmContent())) { |
| | | dto.setAlarmContent(tmpEquipmentAlarm.get().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()) { |