From e8d835496ca0a82cbd291130ec3e4cc77baf738b Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 17 十月 2024 14:29:10 +0800
Subject: [PATCH] 大屏数据 update

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
index 3451fa9..af86eba 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
@@ -13,6 +13,7 @@
 import cn.lihu.jh.module.ecg.service.config.EcgConfigService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -32,21 +33,39 @@
 @RestController
 @RequestMapping("/ecg/screen")
 @Validated
+@Slf4j
 public class CallingScreenController {
 
     @Resource
     private CallingScreenService callingScreenService;
 
+    @GetMapping("/display-col-info")
+    @Operation(summary = "鏄剧ず鍒椾俊鎭�")
+    @PermitAll
+    public CommonResult<Map<Integer, List<String>>> displayColInfo()
+    {
+        Map<Integer, List<String>> map = callingScreenService.getDisplayColInfo();
+        return success( map );
+    }
+
     @GetMapping("/big-screen-data")
     @Operation(summary = "澶у睆鍙彿鏁版嵁")
     @PermitAll
-    public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingData()
+    public CommonResult<Map<Integer, Map<Integer, List<ScreenQueueRespVO>>>> callingData()
     {
-        Map<Integer, List<QueueDO>> map = callingScreenService.callingData();
+        Map<Integer, Map<Integer, List<QueueDO>>> map = callingScreenService.callingData();
 
-        Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
-        map.keySet().forEach( key -> {
-            mapVO.put(key, BeanUtils.toBean(map.get(key), ScreenQueueRespVO.class));
+        Map<Integer, Map<Integer, List<ScreenQueueRespVO>>> mapVO = new HashMap<>();
+        map.keySet().forEach( displayCol -> {
+            log.info("dispayCol: " + displayCol);
+            Map<Integer, List<QueueDO>> mapSoltQueueDO = map.get(displayCol);
+            Map<Integer, List<ScreenQueueRespVO>> mapSoltQueueVO = new HashMap<>();
+            mapSoltQueueDO.keySet().forEach( displaySlot -> {
+                log.info("displaySlot: " + displaySlot);
+                mapSoltQueueVO.put(displaySlot, BeanUtils.toBean(mapSoltQueueDO.get(displaySlot), ScreenQueueRespVO.class));
+            });
+
+            mapVO.put(displayCol, mapSoltQueueVO);
         });
 
         return success( mapVO );

--
Gitblit v1.9.3