From 5ceaf8ba5734dcebd26991edb0d6c2280849348d Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期三, 05 三月 2025 15:22:15 +0800 Subject: [PATCH] 新增修改预警配置接口和修改图表参数配置接口 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java index 3856993..a08edd1 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java @@ -25,6 +25,7 @@ import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmMessageEntity; import com.iailab.module.model.mcs.pre.service.*; import com.iailab.module.model.mcs.pre.vo.MmItemOutputRespVO; +import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessageSaveReqVO; import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; import com.iailab.module.model.mcs.sche.entity.StAdjustConfigDetEntity; @@ -119,7 +120,6 @@ @Autowired private StAdjustConfigService stAdjustConfigService; - private int HOUR_MINS = 60; @Override @@ -824,6 +824,27 @@ return ConvertUtils.sourceToTarget(list, StAdjustConfigDetDTO.class); } + @Override + public Boolean updateAlarmConfig(String alarmObj,String upperLimit,String lowerLimit) { + MmPredictAlarmConfigSaveReqVO reqVO = new MmPredictAlarmConfigSaveReqVO(); + reqVO.setAlarmObj(alarmObj); + reqVO.setUpperLimit(BigDecimal.valueOf(Double.parseDouble(upperLimit))); + reqVO.setLowerLimit(BigDecimal.valueOf(Double.parseDouble(lowerLimit))); + mmPredictAlarmConfigService.updateByAlarmObj(reqVO); + return true; + } + + @Override + public Boolean updateChartParam(ChartDTO chartDTO) { + ChartDTO oldChartDTO = chartService.getChartByChartCode(chartDTO.getChartCode()); + List<ChartParamDTO> chartParams = chartDTO.getChartParams(); + chartParams.forEach(item -> { + item.setChartId(oldChartDTO.getId()); + }); + chartParamService.updateByChartIdAndParamCode(chartParams); + return true; + } + /** * 计算功率因数 p²/(根号:p²+Q²) **/ -- Gitblit v1.9.3