| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.mdc.dto.EquipmentAlarmDto; |
| | | import org.jeecg.modules.mdc.entity.EquipmentAlarm; |
| | | import org.jeecg.modules.mdc.entity.MdcAlarmInfo; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentOvertime; |
| | | import org.jeecg.modules.mdc.mapper.EquipmentAlarmMapper; |
| | | import org.jeecg.modules.mdc.service.IEquipmentAlarmService; |
| | | import org.jeecg.modules.mdc.service.IMdcAlarmInfoService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.vo.EquipmentAlarmVo; |
| | | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
| | |
| | | |
| | | @Resource |
| | | private IMdcEquipmentService mdcEquipmentService; |
| | | |
| | | @Resource |
| | | private IMdcAlarmInfoService mdcAlarmInfoService; |
| | | |
| | | @Override |
| | | public List<EquipmentAlarm> findEquipmentAlarmByDate(String equipmentId, Date startTime, Date endTime) { |
| | |
| | | if (equipmentAlarmVo.getEquipmentIdList() == null || equipmentAlarmVo.getEquipmentIdList().isEmpty()) { |
| | | return null; |
| | | } |
| | | 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()); |
| | | } |
| | | }); |
| | | return this.baseMapper.pageList(page, equipmentAlarmVo); |
| | | } |
| | | |