From 9b9facd6ace6ce39897c5126ca983dc8a024aa22 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 19 Feb 2024 08:47:11 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=BC=94=E7=A4=BA=E5=B9=B3=E5=8F=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=8130=E5=A4=A9=E5=8F=91=E7=94=B5=E9=87=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alert/controller/AbnormalAlarmController.java | 12 ++++++++++++ .../alert/service/impl/AbnormalAlarmServiceImpl.java | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java index cd4979d..b92d6a8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java @@ -7,6 +7,7 @@ import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity; +import com.hnac.hzims.operational.alert.service.AbnormalAlarmService; import com.hnac.hzims.operational.alert.service.HistoryAbnormalAlarmService; import com.hnac.hzims.operational.alert.vo.AlarmParamVo; import com.hnac.hzims.operational.alert.vo.AlarmReustVo; @@ -39,6 +40,7 @@ import java.util.List; @RequestMapping("/abnormal/alarm") public class AbnormalAlarmController extends BladeController { + private final AbnormalAlarmService alarmService; private final HistoryAbnormalAlarmService service; /** @@ -154,4 +156,14 @@ public class AbnormalAlarmController extends BladeController { return R.data(service.alarmData(page,query)); } + + @ApiLog + @RequestMapping(value = "/syncMonAlar", method = {RequestMethod.GET, RequestMethod.POST}) + @ApiOperationSupport(order = 10) + @ApiOperation(value = "当月告警数据记录", notes = "传入imsDutyMainEntity") + public R syncMonAlar() { + alarmService.alarmDataHandle("1"); + return R.status(true); + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java index c4067ea..c616d8a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java @@ -63,7 +63,9 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl stations = stationService.list(); + List stations = stationService.list(Wrappers.lambdaQuery() + .eq(StationEntity::getDataOrigin,"0") + ); if(CollectionUtil.isEmpty(stations)){ return; } @@ -73,7 +75,11 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl