From 45ef9e340f9bb4b98fd88a758343470dfe125cb3 Mon Sep 17 00:00:00 2001
From: whyclxw <810412026@qq.com>
Date: 星期三, 07 五月 2025 17:12:48 +0800
Subject: [PATCH] 苏州地铁推送修改

---
 src/main/java/com/whyc/service/BattInfService.java |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/whyc/service/BattInfService.java b/src/main/java/com/whyc/service/BattInfService.java
index 2c68e5f..06fc017 100644
--- a/src/main/java/com/whyc/service/BattInfService.java
+++ b/src/main/java/com/whyc/service/BattInfService.java
@@ -59,6 +59,9 @@
     @Autowired(required = false)
     private BaoJiGroupBattGroupMapper bjBattMapper;
 
+    @Autowired(required = false)
+    private DevalarmDataMapper devAlmMapper;
+
     public int searchMaxBattgroupId_zj() {
         Integer id = battInfMapper.getMaxBattGroupId_zj();
         if (id == null) {
@@ -989,7 +992,7 @@
         int devNum=0;
         int battNum=0;
         try {
-            //鏌ヨbattinf琛ㄤ腑鎵�鏈夋満鎴夸俊鎭�
+            //鏌ヨbattinf琛ㄤ腑鎵�鏈夌數姹犵粍淇℃伅
             List<Battinf> list=battInfMapper.getAllInfInSz2(userId);
             Map<String, List<Battinf>> ListMap = list.stream().collect(Collectors.groupingBy(Battinf::getStationName9));
             for (String stationName9 : ListMap.keySet()) {
@@ -1019,4 +1022,29 @@
         }
 
     }
+    //4.涓棿鍦板浘
+    public Response getAllStationInSz2(Integer userId) {
+        Map<String,Object> map=new HashMap<>();
+        try {
+            //鏌ヨbattinf琛ㄤ腑鎵�鏈夋満鎴夸俊鎭�
+            List<Battinf> list=battInfMapper.getAllStationInSz2(userId);
+            Map<String, List<Battinf>> ListMap = list.stream().collect(Collectors.groupingBy(Battinf::getStationName9));
+            for (String stationName9 : ListMap.keySet())  {
+                List<Battinf> name9List=ListMap.get(stationName9);
+                for (Battinf binf:name9List) {
+                    //鍒ゆ柇鏈烘埧涓嬬殑璁惧鍛婅鏄惁閮藉瓨鍦ㄩ�氳鍛婅 119020
+                    int flag=devAlmMapper.judgeCommErr(binf.getStationId(),119020);
+                    if(flag>0){
+                        binf.setNote("0");
+                    }else{
+                        binf.setNote("1");
+                    }
+                }
+                map.put(stationName9,name9List);
+            }
+            return new Response<>().setII(1,true,map,"");
+        } catch (Exception e) {
+            return new Response<>().set(1,false,"");
+        }
+    }
 }

--
Gitblit v1.9.1