From 4ad32c37e3317fb6cb7cbfb034b53d3220c27db4 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 30 五月 2025 17:59:16 +0800 Subject: [PATCH] 优化报警 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java index b000fad..2696389 100644 --- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java +++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java @@ -1,5 +1,6 @@ package com.ruoyi.dataInterchange.controller; +import com.alibaba.fastjson2.JSON; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.utils.bean.BeanUtils; import com.ruoyi.dataInterchange.api.vo.UPWarnMsgAdptInfoVo; @@ -7,10 +8,9 @@ import com.ruoyi.dataInterchange.dao.UPWarnMsgUrgeTodoAckDao; import com.ruoyi.dataInterchange.model.UPWarnMsgAdptInfo; import com.ruoyi.dataInterchange.model.UPWarnMsgUrgeTodoAck; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.dataInterchange.util.haikang.model.SubscriptionEvent; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.ArrayList; @@ -23,6 +23,7 @@ * @author zhibing.pu * @Date 2025/4/2 10:08 */ +@Slf4j @RestController @RequestMapping("/warnMsgAdptInfo") public class UPWarnMsgAdptInfoController { @@ -71,4 +72,24 @@ return R.ok(list); } } + + + /** + * 根据信息id查询报警原始数据 + * + * @param infoId + * @return + */ + @PostMapping("/findByInfoId") + public R<UPWarnMsgAdptInfoVo> findByInfoId(@RequestParam("infoId") String infoId) { + UPWarnMsgAdptInfo warnMsgAdptInfo = upWarnMsgAdptInfoDao.findByInfoIdIs(infoId); + if(null != warnMsgAdptInfo){ + UPWarnMsgAdptInfoVo vo = new UPWarnMsgAdptInfoVo(); + BeanUtils.copyProperties(warnMsgAdptInfo, vo); + return R.ok(vo); + } + return R.ok(); + } + + } -- Gitblit v1.7.1