| | |
| | | package org.jeecg.modules.mdc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmAnalyzeDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmListDto; |
| | | import org.jeecg.modules.mdc.dto.MdcAlarmTrendDto; |
| | | import org.jeecg.modules.mdc.entity.MdcAlarmInfo; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection; |
| | | import org.jeecg.modules.mdc.service.IMdcAlarmInfoService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentRunningSectionService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.service.MdcEquipmentAlarmAnalyzeService; |
| | |
| | | |
| | | @Resource |
| | | private IMdcEquipmentService mdcEquipmentService; |
| | | |
| | | @Resource |
| | | private IMdcAlarmInfoService mdcAlarmInfoService; |
| | | |
| | | @Override |
| | | public List<MdcAlarmAnalyzeDto> alarmList(String userId, MdcAlarmAnalyzeQueryVo vo) { |
| | |
| | | mdcAlarmAnalyzeDto.setAlarmCode(mdcEquipmentRunningSection.getAlarm()); |
| | | mdcAlarmAnalyzeDto.setCount(1); |
| | | mdcAlarmAnalyzeDto.setTimeCount(new BigDecimal(mdcEquipmentRunningSection.getDuration())); |
| | | //查询报警号内容 |
| | | List<MdcEquipment> list = mdcEquipmentService.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentId, mdcEquipmentRunningSection.getEquipmentId())); |
| | | List<MdcAlarmInfo> mdcAlarmInfo = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getDriveType, list.get(0).getDriveType()).eq(MdcAlarmInfo::getAlarmCode, mdcEquipmentRunningSection.getAlarm()).eq(MdcAlarmInfo::getIsUse, 0)); |
| | | if (mdcAlarmInfo != null && !mdcAlarmInfo.isEmpty()) { |
| | | mdcAlarmAnalyzeDto.setAlarmContent(mdcAlarmInfo.get(0).getAlarmContent()); |
| | | } |
| | | map.put(mdcEquipmentRunningSection.getAlarm(), mdcAlarmAnalyzeDto); |
| | | } |
| | | } |