From 0becc3c207412543ded0195cc4f897eb5434f24d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 24 一月 2025 04:22:20 +0800
Subject: [PATCH] 多次ping

---
 ycl-server/src/main/java/com/ycl/calculate/VideoOnlineCalculation.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ycl-server/src/main/java/com/ycl/calculate/VideoOnlineCalculation.java b/ycl-server/src/main/java/com/ycl/calculate/VideoOnlineCalculation.java
index 9398f7d..0e274f4 100644
--- a/ycl-server/src/main/java/com/ycl/calculate/VideoOnlineCalculation.java
+++ b/ycl-server/src/main/java/com/ycl/calculate/VideoOnlineCalculation.java
@@ -18,6 +18,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 璁$畻瑙嗛璁惧鐐逛綅鍦ㄧ嚎鐜囥�侀噸鐐圭偣浣嶅湪绾跨巼銆侀噸鐐规寚鎸ュ浘鍍忓湪绾跨巼銆侀儴绾х偣浣嶅湪绾跨巼
@@ -65,7 +66,16 @@
                 }
             }
         });
-
+        //閲嶇偣鎸囨尌鍥惧儚鐗规畩澶勭悊锛岀粺涓�閲囩敤鍖哄幙鏁版嵁
+        Map<Long, BigDecimal> keyCommandMap = checkIndexVideos.stream().filter(checkIndexVideo -> !checkIndexVideo.getDeptTag() && !checkIndexVideo.getProvinceTag())
+                .collect(Collectors.toMap(checkIndexVideo -> checkIndexVideo.getDeptId(), checkIndexVideo -> checkIndexVideo.getKeyCommandImageOnline()));
+        for (CheckIndexVideo checkIndexVideo : checkIndexVideos) {
+            //鏇挎崲鐪佸巺鍜岄儴绾� 閲嶇偣鎸囨尌鍥惧儚
+            if(checkIndexVideo.getProvinceTag() || checkIndexVideo.getDeptTag()){
+                BigDecimal keyCommand = keyCommandMap.get(checkIndexVideo.getDeptId());
+                checkIndexVideo.setKeyCommandImageOnline(keyCommand);
+            }
+        }
         checkIndexVideoService.saveOrUpdateBatch(checkIndexVideos);
     }
 

--
Gitblit v1.8.0