From a440ec3bfaa1363f5841100b8948d852971a2eb1 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 10 十二月 2024 13:19:58 +0800
Subject: [PATCH] MmPredictAlarmConfigService

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictModelServiceImpl.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictModelServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictModelServiceImpl.java
index 12221fc..4738817 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictModelServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictModelServiceImpl.java
@@ -8,6 +8,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.util.ObjectUtils;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -67,11 +68,11 @@
     @Override
     public BigDecimal getSampleLength(String id) {
         BigDecimal result = BigDecimal.ZERO;
-        List<MmPredictModelEntity> list = mmPredictModelDao.getSampleLength(id);
-        if (CollectionUtils.isEmpty(list)) {
+        MmPredictModelEntity entity = mmPredictModelDao.getSampleLength(id);
+        if (ObjectUtils.isEmpty(entity)) {
             return result;
         }
-        result = list.get(0).getPredictsamplength();
+        result = entity.getPredictsamplength();
 
         return result;
     }

--
Gitblit v1.9.3