whycxzp
2025-02-27 92de39955432103f1210e74ee22271050e6b3033
电池单体统计
3个文件已修改
30 ■■■■■ 已修改文件
src/main/java/com/whyc/mapper/BattInfMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattInfService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/webSocket/ScreenForSZSocket.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/mapper/BattInfMapper.java
@@ -88,6 +88,8 @@
    int getBattGroupNum(int userId);
    int getBattGroupMonNum(int userId);
    //山西晋源特定接口
    int getBattGroupNumJY();
src/main/java/com/whyc/service/BattInfService.java
@@ -652,6 +652,30 @@
        }
    }
    public Response getDevCountMapForSZ(int userId) {
        try {
            Map<String, Object> map = new HashMap<>();
            int battGroupCount = battInfMapper.getBattGroupNum(userId);
            //电池单体总数
            int battGroupMonCount = battInfMapper.getBattGroupMonNum(userId);
            int devCount = battInfMapper.getDevNum(userId);
            int powerNum = powerInfService.getNum(userId);
            List<StationInf> stationInfList = stationInfService.getStationInfList(userId);
            int stationNum = stationInfService.getStation(userId);
            int hrDisNum = testInfService.getHrQuarterZC(userId);
            map.put("battGroupCount", battGroupCount);
            map.put("battGroupMonCount", battGroupMonCount);
            map.put("devCount", devCount);
            map.put("powerNum", powerNum);
            map.put("stationNum",stationNum);
            map.put("stationInfList",stationInfList);
            map.put("checkCapNum",hrDisNum);
            return new Response().setII(1,true, map,"");
        }catch (Exception e){
            return new Response<>().set(1,false,"发生异常:"+e.getCause());
        }
    }
    //山西晋源特定接口
    public Response getDevCountMapJY() {
        try {
src/main/java/com/whyc/webSocket/ScreenForSZSocket.java
@@ -156,8 +156,8 @@
                            latch.countDown();
                        });
                        poolExecutor.execute(()->{
                            //4.统计:各种设备类型总数 电池 设备 电源 站点 TODO 新增电池单体数
                            Response<Map> res_devCountMap = battInfService.getDevCountMap(userId);
                            //4.统计:各种设备类型总数 电池 设备 电源 站点 新增电池单体数
                            Response<Map> res_devCountMap = battInfService.getDevCountMapForSZ(userId);
                            res.put("devCountMap", res_devCountMap);
                            latch.countDown();
                        });