From c51323e6fcc84f08bc8c01e3dd6c916427f83f4e Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 07 三月 2024 10:41:50 +0800
Subject: [PATCH] 设备状态长时间未变化算法更新

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
index 85dd8df..83817f6 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java
@@ -759,8 +759,13 @@
                 Map<String, Object> param = new HashMap<>();
                 param.put("columns", builder.toString());
                 param.put("tableName", saveTableName);
-                Map<String, Object> map = this.baseMapper.getWorkLineLast(param);
-                if (map != null) {
+                Map<String, Object> map = new HashMap<>();
+                try {
+                    map = this.baseMapper.getWorkLineLast(param);
+                } catch (Exception e) {
+                    log.error("鏌ヨ鍗曡〃鏁版嵁鍑哄樊锛�", e);
+                }
+                if (!map.isEmpty()) {
                     for (MdcEquipmentThreshold mdcEquipmentThreshold : mdcEquipmentThresholdList) {
                         Integer actualValue = Integer.valueOf(map.get(mdcEquipmentThreshold.getEnglishName()).toString());
                         Integer max = mdcEquipmentThreshold.getMaxThreshold();
@@ -837,4 +842,14 @@
         return treeList;
     }
 
+    /**
+     * 鏌ヨ鍗曡〃鏁版嵁
+     * @param tableName
+     * @return
+     */
+    @Override
+    public MdcEquipmentDto getWorkLineLast(String tableName) {
+        return this.baseMapper.findWorkLineLast(tableName);
+    }
+
 }

--
Gitblit v1.9.3