From a8a5d58c268dd19a35209eb4af9f302ddc47b89b Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Wed, 29 May 2024 19:00:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=91=8A=E8=AD=A6=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E9=97=AE=E9=A2=98=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enums/SupervisionResponseEnum.java | 2 +- .../pojo/vo/leaflet/WarningLeafletVO.java | 1 + .../leaflet/impl/WarningLeafletServiceImpl.java | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java index f046ae897..fe72ce7b6 100644 --- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/enums/SupervisionResponseEnum.java @@ -16,7 +16,7 @@ public enum SupervisionResponseEnum { * A00550 ~ A00649 */ SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"), - NO_POWER("A00550","很抱歉,该流程不是您创建的,没有权限操作!") + NO_POWER("A00550","不能操作非自己创建的任务!") ; private final String code; diff --git a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java index e7d70c748..1442c0691 100644 --- a/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java +++ b/pqs-supervision/supervision-api/src/main/java/com/njcn/supervision/pojo/vo/leaflet/WarningLeafletVO.java @@ -44,6 +44,7 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{ */ private String problemId; + /** * 单子类型:1:预警单;2:告警单 */ diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java index 096c0a5bc..242926a26 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/leaflet/impl/WarningLeafletServiceImpl.java @@ -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(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper); + Page warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper); + //目前仅知道现场测试超标会有附件 + List 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; }