From a37ca40125f0882a21672baa0e2b12e0d460623b Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 21 五月 2025 14:41:03 +0800 Subject: [PATCH] 新增公交的接口对接 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java | 21 +++++++++++++++++---- 1 files changed, 17 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 a7aca3c..084fecf 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 { @@ -89,4 +90,16 @@ } return R.ok(); } + + + /** + * 海康威视报警信息推送 + * @return + */ + @ResponseBody + @PostMapping("/alarmNotice") + public void alarmNotice(@RequestBody SubscriptionEvent event) { + log.error("收到危海康的事件回调"); + log.error(JSON.toJSONString(event)); + } } -- Gitblit v1.7.1