From 984cecaa40100ee69e9038082a477e6af5d56aca Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 21 三月 2025 11:27:24 +0800
Subject: [PATCH] ALARM_TITLE

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java |   43 ++++++++++++++++++++++---------------------
 1 files changed, 22 insertions(+), 21 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 3c80215..4c97c0a 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
@@ -200,6 +200,7 @@
             Calendar calendar = Calendar.getInstance();
             calendar.setTime(predictTime);
             calendar.add(Calendar.HOUR_OF_DAY, 1);
+            calendar.add(Calendar.MINUTE, 1);
             endTime = calendar.getTime();
         }
 
@@ -353,6 +354,7 @@
         return result;
     }
 
+
     @Override
     public PreDataSingleChartRespVO getPreDataSingleChart(PreDataSingleChartReqVO reqVO) {
         PreDataSingleChartRespVO result = new PreDataSingleChartRespVO();
@@ -437,7 +439,8 @@
 
         String alarmObj = chartParams.get(CommonConstant.ALARM_OBJ);
         if (StringUtils.isNotBlank(alarmObj)) {
-            List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime), AlarmMessageRespDTO.class);
+            String alarmTitle = chartParams.get(CommonConstant.ALARM_TITLE);
+            List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime, alarmTitle), AlarmMessageRespDTO.class);
             dataView.setAlarmList(alarmList);
             if (CollectionUtils.isEmpty(alarmList)) {
                 dataView.setAlarmMessage("暂无预警信息");
@@ -821,12 +824,6 @@
     }
 
     @Override
-    public List<StAdjustConfigDetDTO> getAdjustConfigListByModelId(String modelId) {
-        List<StAdjustConfigDetEntity> list = stAdjustConfigService.getDetByModelId(modelId);
-        return ConvertUtils.sourceToTarget(list, StAdjustConfigDetDTO.class);
-    }
-
-    @Override
     public Boolean updateAlarmConfig(String alarmObj,String upperLimit,String lowerLimit) {
         MmPredictAlarmConfigSaveReqVO reqVO = new MmPredictAlarmConfigSaveReqVO();
         reqVO.setAlarmObj(alarmObj);
@@ -847,20 +844,24 @@
         return true;
     }
 
-    /**
-     * 计算功率因数 p²/(根号:p²+Q²)
-     **/
-    public Double calculateCos(Double PValue,Double QValue) {
-        // 绝对值
-        PValue = Math.abs(PValue);
-        QValue = Math.abs(QValue);
-        //PValue [0,0.001] 直接判断为关闭返回0
-        if (PValue >= 0 && PValue <= 0.001) {
-            return 0.0;
-        }else {
-            BigDecimal result = new BigDecimal(PValue).divide(BigDecimal.valueOf(Math.sqrt(Math.pow(PValue, 2) + Math.pow(QValue, 2))), 2, BigDecimal.ROUND_HALF_UP);
-            return result.doubleValue();
-        }
+    @Override
+    public MmItemOutputDTO getItemOutputByItemid(String itemid, String resultstr, String resultIndex) {
+        return ConvertUtils.sourceToTarget(mmItemOutputService.getByItemid(itemid,resultstr,resultIndex),MmItemOutputDTO.class);
+    }
+
+    @Override
+    public List<Object[]> getItemResult(String outputid, Date startTime, Date endTime, String timeFormat) {
+        return mmItemResultService.getData(outputid,startTime,endTime,timeFormat);
+    }
+
+    @Override
+    public PredictItemVO getPredictItemByItemNo(String itemNo) {
+        return ConvertUtils.sourceToTarget(mmPredictItemService.getItemByItemNo(itemNo),PredictItemVO.class);
+    }
+
+    @Override
+    public List<Object[]> getItemResultLastPoint(String outputid, Date startTime, Date endTime, String timeFormat) {
+        return mmItemResultLastPointService.getData(outputid,startTime,endTime,timeFormat);
     }
 
     private Date[] calResultTime(ItemVO predictItem, Date startTimeReq, Date endTimeReq, int lengthLeft, int lengthRight) {

--
Gitblit v1.9.3