• internship:改了需求


    需求的更改总算是彻底结束了…

      public Map<String, Object> peopleStatGraph(Integer tunnelId) {
            Map<String, Integer> statMap = peopleStat(tunnelId);
            BizTunnel tunnel=tunnelMapper.selectById(tunnelId);
    
    
            Map<String, Object> res = new LinkedHashMap<>(3);
            //横坐标 两端各三个区域
            List<String> xAxis = new ArrayList();
            //纵坐标 六个区域的人数 分进出口端
            List<Integer> values = new ArrayList<>();
    
    
            if(tunnel.getType()==2) {
                for (Duan normal : Duan.values()) {
                    for (Position position : Position.values()) {
                        //添加横坐标
                        xAxis.add(tunnel.getName() + normal.getValue() + position.getValue());
                        //添加纵坐标
                        Integer count = statMap.get(normal.getKey() + "_" + position.getKey());
                        values.add(count == null ? 0 : count);
                    }
                }
            }
            else
            {
                for (Duan normally :Duan.values()) {
                    for (Position position : Position.values()) {
                        //添加横坐标
                        if(normally.getValue().equals("进口")) {
                            xAxis.add(tunnel.getName() + "小里程" + position.getValue());
                            //添加纵坐标
                            Integer count = statMap.get(normally.getKey() + "_" + position.getKey());
                            values.add(count == null ? 0 : count);
                        }
                        else
                        {
                            xAxis.add(tunnel.getName() + "大里程" + position.getValue());
                            //添加纵坐标
                            Integer count = statMap.get(normally.getKey() + "_" + position.getKey());
                            values.add(count == null ? 0 : count);
                        }
                    }
                }
            }
    
            //TODO 后续改为真实预警数据
            res.put("alarm", 0);
            res.put("xAxis", xAxis);
            res.put("values", values);
            return res;
        }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52

    进行功能优化更新 会对原有接口进行代码更改 值得注意的一点是 要与原有接口json数据结构对应起来 这也是和前端在交互的时候需要特别注意的还有字段名称此类。

  • 相关阅读:
    postman token 请求头添加
    【性能测试】使用jprofile进行远程监控
    8软件工程环境
    L4W4作业2 深度学习与艺术 - 神经风格迁移
    Java面试中的常问的多线程问题
    Android 性能分析 之 插桩日志
    tp5使用sum()聚合函数分组查询
    特征工程建模可解释包(note)
    Java面试题一
    深入 Django 的 URL 分发器
  • 原文地址:https://blog.csdn.net/yooppa/article/details/126162894