From 6f7cc7c14b4532120e9e6827ca0feb2c9aa4c2c7 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 24 一月 2025 04:10:16 +0800
Subject: [PATCH]  利旧设备Osd,ping任务离线时间点取最近两条,工单审核bug,重点指挥图像调整

---
 ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
index 0c418f5..5d2b201 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
@@ -116,9 +116,8 @@
             }
             List<String> offLineTime = item.getOffLineTimeStr();
             if(!CollectionUtils.isEmpty(offLineTime)) {
-                //鍚庣画鍙互鏀规垚閰嶇疆鐨勭绾挎鏁�(鎻愬彇鍓峮娆★紝n涓洪厤缃殑绂荤嚎娆℃暟)
                 if (offLineTime.size() > 1) {
-                    offLineTime = offLineTime.subList(0, 2);
+                    offLineTime = offLineTime.subList(offLineTime.size() - 2, offLineTime.size());
                 }
                 item.setOffLineTimeStr(offLineTime);
             }
@@ -1194,6 +1193,16 @@
         List<OsdCheckResult> resultList = mongoTemplate.find(query, OsdCheckResult.class);
         for (OsdCheckResult osdCheckResult : resultList) {
             OsdCheckResult.getError(osdCheckResult);
+            StringBuilder tag = new StringBuilder("" +
+                    (osdCheckResult.getProvinceTag() ? "鐪佸巺銆�" : "") +
+                    (osdCheckResult.getImportantTag() ? "閲嶇偣鐐逛綅銆�" : "") +
+                    (osdCheckResult.getImportantCommandImageTag() ? "閲嶇偣鎸囨尌鍥惧儚銆�" : "") +
+                    (osdCheckResult.getDeptTag() ? "閮ㄧ骇銆�" : ""));
+            // 鍒犻櫎瀛楃涓叉湯灏剧殑"銆�"
+            if (tag.toString().endsWith("銆�")) {
+                tag = new StringBuilder(tag.substring(0, tag.length() - 1));
+            }
+            osdCheckResult.setTagStr(tag.toString());
         }
         ExcelUtil<OsdCheckResult> util = new ExcelUtil<>(OsdCheckResult.class);
         String sheetName = "OSD鏍囨敞";

--
Gitblit v1.8.0