This commit is contained in:
guosongrui
2024-05-30 13:46:48 +08:00
11 changed files with 78 additions and 57 deletions

View File

@@ -16,7 +16,7 @@ public enum SupervisionResponseEnum {
* A00550 ~ A00649
*/
SUPERVISION_COMMON_ERROR("A00550","监督管理模块异常"),
NO_POWER("A00550","很抱歉,该流程不是您创建的,没有权限操作")
NO_POWER("A00550","不能操作非自己创建的任务")
;
private final String code;

View File

@@ -44,6 +44,7 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
*/
private String problemId;
/**
* 单子类型1预警单2告警单
*/

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;
@@ -163,7 +164,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;
}