From 9e52621a4f6e64cbeb900a3239b00ee1b58292d4 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Tue, 27 Aug 2024 16:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcWarningController.java | 9 +++++++++ .../zc/business/domain/DcNoStakeWarningTable.java | 3 +++ .../java/com/zc/business/mapper/DcWarningMapper.java | 4 ++++ .../com/zc/business/service/IDcWarningService.java | 4 ++++ .../business/service/impl/DcWarningServiceImpl.java | 7 +++++++ .../resources/mapper/business/DcWarningMapper.xml | 12 ++++++++++++ 6 files changed, 39 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java index 5b5560b9..9aefb910 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java @@ -10,6 +10,7 @@ import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.uuid.IdUtils; import com.zc.business.domain.DcDevice; import com.zc.business.domain.DcDispatch; +import com.zc.business.domain.DcNoStakeWarningTable; import com.zc.business.domain.DcWarning; import com.zc.business.domain.DcWarningBatchConvert; import com.zc.business.enums.UniversalEnum; @@ -232,5 +233,13 @@ public class DcWarningController extends BaseController return AjaxResult.success(dcWarningService.getRadarIncidentVideo(id)); } + //首页气象预警,最近三天的数据 + @PostMapping("/meteorologicalList") + public TableDataInfo selectStakeWarningTable(){ + startPage(); + List list = dcWarningService.selectStakeWarningTable(); + return getDataTable(list); + } + } diff --git a/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java b/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java index 91f93ac6..ae28822f 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcNoStakeWarningTable.java @@ -2,6 +2,7 @@ package com.zc.business.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -24,9 +25,11 @@ public class DcNoStakeWarningTable { private String warningType; @ApiModelProperty("创建时间") @Excel(name = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createTime; @ApiModelProperty("预警时间") @Excel(name = "预警时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date warningTime; @ApiModelProperty("其他配置") @Excel(name = "其他配置") diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java index 4018d62b..8b81e686 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java @@ -7,6 +7,7 @@ import java.util.List; import cn.hutool.core.lang.hash.Hash; import com.zc.business.domain.DcDispatch; import com.zc.business.domain.DcDispatchResource; +import com.zc.business.domain.DcNoStakeWarningTable; import com.zc.business.domain.DcRoadSection; import com.zc.business.domain.DcWaringStrategy; import com.zc.business.domain.DcWarning; @@ -161,4 +162,7 @@ public interface DcWarningMapper Long selectWarningNum(); //事件验证是否存在 public String selectEventId(@Param("eventId")String eventId); + + //首页气象预警列表 + public List selectStakeWarningTable(); } diff --git a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java index efb350d5..cc066546 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java @@ -6,6 +6,7 @@ import java.util.List; import com.ruoyi.common.core.domain.AjaxResult; import com.zc.business.domain.DcDispatch; import com.zc.business.domain.DcDispatchResource; +import com.zc.business.domain.DcNoStakeWarningTable; import com.zc.business.domain.DcWarning; import com.zc.business.domain.DcWarningBatchConvert; import org.apache.ibatis.annotations.Param; @@ -112,4 +113,7 @@ public interface IDcWarningService * 获取雷达事件视频 */ String getRadarIncidentVideo(String id)throws Exception; + + //首页气象预警列表 + public List selectStakeWarningTable(); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java index 2f11a374..4b5c2aec 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java @@ -1174,6 +1174,7 @@ public class DcWarningServiceImpl implements IDcWarningService { } + /** * 雷达关联监控点查询接口 * @@ -1231,4 +1232,10 @@ public class DcWarningServiceImpl implements IDcWarningService { return ArtemisHttpUtil.doPostStringArtemis(config, path, body, null, null, "application/json"); } + + //首页气象预警列表 + @Override + public List selectStakeWarningTable() { + return dcWarningMapper.selectStakeWarningTable(); + } } diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index 9d3a84c2..58424fad 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -447,5 +447,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +