hyingbo
6 天以前 cc0e9036de6e922e8fe254fef01d8de9996024b7
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentRunningSectionServiceImpl.java
@@ -103,9 +103,14 @@
                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());
                            }
                        }
                    }
                }
@@ -224,6 +229,9 @@
            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();