当前位置:网站首页>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数据结构对应起来 这也是和前端在交互的时候需要特别注意的还有字段名称此类。
边栏推荐
- 如何封装 svg
- gbase8s创建RANGE分片表
- WPF 使用封装的 SharpDx 控件
- IDEA 自动导入的配置(Auto import)
- 2019 Haidian District Youth Programming Challenge Activity Elementary Group Rematch Test Questions Detailed Answers
- After EasyCVR is locally connected to the national standard device to map the public network, the local device cannot play and cascade the solution
- VPC2187/8 current mode PWM controller 4-100VIN ultra-wide voltage startup, highly integrated power control chip recommended
- 12. SAP ABAP OData 服务如何支持 $select 有选择性地仅读取部分模型字段值
- unity中实现ue眼球的渲染
- ros2订阅esp32发布的电池电压数据
猜你喜欢
直播回顾|7 月 Pulsar 中文开发者与用户组会议
面试官:MVCC是如何实现的?
DHCP&OSPF combined experimental demonstration (Huawei routing and switching equipment configuration)
老电脑怎么重装系统win10
After EasyCVR is locally connected to the national standard device to map the public network, the local device cannot play and cascade the solution
2019年海淀区青少年程序设计挑战活动小学组复赛试题详细答案
译文推荐|Apache Pulsar 隔离系列(四):单集群隔离策略
YOLOv7-Pose尝鲜,基于YOLOv7的关键点模型测评
阿里云技术专家秦隆:云上如何进行混沌工程?
JS: 数组和树的相互转换
随机推荐
ros2订阅esp32发布的电池电压数据
百度智能云重庆工业互联网平台正式亮相,深耕重庆,辐射西南
四维图新:子公司首款功能安全 MCU 芯片已陆续送样
FE01_OneHot-Scala Application
如何封装 svg
SAP UI5 视图控制器 View Controller 的生命周期方法 - Lifecycle methods
使用.NET简单实现一个Redis的高性能克隆版(二)
How does EasyCVR call the double-speed playback of device recording through the interface?
如何搭建 RADIUS 云服务器?
win10 uwp xaml 绑定接口
Alibaba Cloud International Edition uses ROS to build WordPress tutorial
阿里云技术专家秦隆:云上如何进行混沌工程?
基于 eBPF 的 Kubernetes 可观测实践
Homework 8.3 Thread Synchronization Mutex Condition Variables
gbase8s创建RANGE分片表
袋鼠云思枢:数驹DTengine,助力企业构建高效的流批一体数据湖计算平台
limux入门3—磁盘与分区管理
BigDecimal 使用注意!!“别踩坑”
2019 Haidian District Youth Programming Challenge Activity Elementary Group Rematch Test Questions Detailed Answers
通配符SSL证书不支持多域名吗?