diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyNotificationController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyNotificationController.java index 2effc3b57..0149cfac8 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyNotificationController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/ThirdPartyNotificationController.java @@ -150,4 +150,23 @@ public class ThirdPartyNotificationController extends BaseController { } return result; } + + /** + * 设备告警信息推送 + */ + @PostMapping("/notificationAlarmInfo") + public AjaxResult notificationAlarmInfo(@RequestBody NotificationDTO dto) { + AjaxResult result; + try { + notificationService.notificationAlarmInfo(dto); + result = AjaxResult.success(); + } catch (BusinessException e) { + logger.error("设备告警信息推送失败", e); + result = AjaxResult.error(e.getMessage()); + } catch (Exception e) { + logger.error("设备告警信息推送失败", e); + result = AjaxResult.error(); + } + return result; + } } diff --git a/jsowell-ui/src/api/thirdParty/notification.js b/jsowell-ui/src/api/thirdParty/notification.js index fa336cfd0..3e09ed6e4 100644 --- a/jsowell-ui/src/api/thirdParty/notification.js +++ b/jsowell-ui/src/api/thirdParty/notification.js @@ -39,3 +39,11 @@ export function notificationStationFee(data) { data: data }) } + +export function notificationAlarmInfo(data) { + return request({ + url: '/thirdparty/notification/notificationAlarmInfo', + method: 'post', + data: data + }) +} diff --git a/jsowell-ui/src/views/thirdparty/secret/detail.vue b/jsowell-ui/src/views/thirdparty/secret/detail.vue index bf6b63403..333678215 100644 --- a/jsowell-ui/src/views/thirdparty/secret/detail.vue +++ b/jsowell-ui/src/views/thirdparty/secret/detail.vue @@ -192,6 +192,29 @@ + + + + +
+ 推送设备告警信息 + 推送 +
+ + + + + + + + + +
+
+
@@ -206,10 +229,11 @@ import { addSecret, getSecret, selectStationList, updateSecret } from "@/api/thi import { generateRandomID, isEmptyString } from "@/utils/common"; import Template from "@/views/billing/template"; import { - notificationChargeOrderInfo, - notificationConnectorChargeStatus, notificationStationFee, - notificationStationInfo, - notificationStationStatus + notificationAlarmInfo, + notificationChargeOrderInfo, + notificationConnectorChargeStatus, notificationStationFee, + notificationStationInfo, + notificationStationStatus } from "@/api/thirdParty/notification"; export default { @@ -224,6 +248,7 @@ export default { form: {}, notificationStationId: null, notificationForm: {}, + notificationAlarmForm: {}, // 表单校验 rules: {}, stationList: [], @@ -295,6 +320,14 @@ export default { this.$modal.msgSuccess("操作成功"); }); }, + // 点击推送设备告警信息 + clickNotificationAlarmInfo() { + this.notificationAlarmForm.stationId = this.notificationStationId; + this.notificationAlarmForm.platformType = this.platformType; + notificationAlarmInfo(this.notificationAlarmForm).then(response => { + this.$modal.msgSuccess("操作成功"); + }); + }, // 点击打开 通知菜单 clickDrawer(stationId, stationName) { // console.log("站点id:", stationId);