预告警单详细问题查看

This commit is contained in:
2024-05-29 19:00:25 +08:00
parent 2b17c8dbea
commit a8a5d58c26
3 changed files with 17 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -158,7 +159,20 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.ALARM.getCode())
.orderByDesc("supervision_warning_leaflet.Update_Time");
return this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
//目前仅知道现场测试超标会有附件
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
if(CollectionUtil.isNotEmpty(records)){
for (WarningLeafletVO record : records) {
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
//查询到现场测试超标附件地址
SupervisionGeneralSurveyPlanPO generalSurveyPlanPO = supervisionGeneralSurveyPlanPOService.getById(record.getProblemId());
record.setProblemPath(generalSurveyPlanPO.getFilePath());
}
}
}
return warningLeafletVOPage;
}