当前位置:网站首页>internship:改了需求
internship:改了需求
2022-08-04 18:52:00 【ahyo】
需求的更改总算是彻底结束了…
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;
}
进行功能优化更新 会对原有接口进行代码更改 值得注意的一点是 要与原有接口json数据结构对应起来 这也是和前端在交互的时候需要特别注意的还有字段名称此类。
边栏推荐
- limux入门3—磁盘与分区管理
- c语言进阶篇:自定义类型--结构体
- win10 uwp win2d 离屏渲染
- 巴比特 | 元宇宙每日必读:微博动漫将招募全球各类虚拟偶像并为其提供扶持...
- Go language Go language, understand Go language file operation in one article
- Redis数据库—定义、特点、安装、如何启动与停止
- Route lazy loading
- 我的四周年创作纪念日
- 数据库SqlServer迁移PostgreSql实践
- After EasyCVR is locally connected to the national standard device to map the public network, the local device cannot play and cascade the solution
猜你喜欢
随机推荐
百度智能云重庆工业互联网平台正式亮相,深耕重庆,辐射西南
【STM32】STM32单片机总目录
如何进行自动化测试?
HCIP-R&S By Wakin自用笔记(1)企业网络高级解决方案
机器学习之支持向量机实例,线性核函数 多项式核函数 RBF高斯核函数 sigmoid核函数
BigDecimal 使用注意!!“别踩坑”
【STM32】入门(五):串口TTL、RS232、RS485
当前最快的实例分割模型:YOLACT 和 YOLACT++
Win10只读文件夹怎么删除
自己经常使用的三种调试:Pycharm、Vscode、pdb调试
mood swings
ECCV 2022 | FPN错位对齐,实现高效半监督目标检测(PseCo)
LVS+NAT 负载均衡群集,NAT模式部署
直播回顾|7 月 Pulsar 中文开发者与用户组会议
防火墙基础之防火墙做出口设备安全防护
从零开始实现一个简单的CycleGAN项目
(ECCV-2022)GaitEdge:超越普通的端到端步态识别,提高实用性
动态数组底层是如何实现的
unity中实现ue眼球的渲染
【填空题】130道面试填空题









