当前位置:网站首页>Internship: changed the requirements
Internship: changed the requirements
2022-08-04 19:02:00 【ahyo】
The change of requirements is finally over…
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() + "small mileage" + 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 Subsequent to real warning data
res.put("alarm", 0);
res.put("xAxis", xAxis);
res.put("values", values);
return res;
}
Perform functional optimization updates Code changes will be made to the original interface 值得注意的一点是 To interface with the originaljsonThe data structure corresponds This is also the field name that needs special attention when interacting with the front end.
边栏推荐
- 如何进行自动化测试?
- Kubernetes入门到精通- Operator 模式入门
- 运力升级助力算力流转,中国数字经济的加速时刻
- 【简答题】月薪4k和月薪8k的区别就在这里
- ECCV 2022 | FPN错位对齐,实现高效半监督目标检测(PseCo)
- 【最新资讯】2022下半年软考新增2个地区公布报名时间
- 【STM32】STM32单片机总目录
- 【STM32】入门(五):串口TTL、RS232、RS485
- 如何进行自动化测试?【Eolink分享】
- Regardless of whether you are a public, professional or non-major class, I have been sorting out the learning route for a long time here, and the learning route I have summarized is not yet rolled up
猜你喜欢
随机推荐
PHP代码审计8—SSRF 漏洞
win10 uwp ping
win10 uwp MVVM 语义耦合
MySQL安装教程(详细)
网络运维管理从基础到实战-自用笔记(1)构建综合园区网、接入互联网
入选爱分析·银行数字化厂商全景报告,网易数帆助力金融数字化场景落地
四维图新:子公司首款功能安全 MCU 芯片已陆续送样
测试/开发程序员男都秃头?女都满脸痘痘?过好我们“短暂“的一生......
小波提取特征的VQ实现
运力升级助力算力流转,中国数字经济的加速时刻
How can test engineers break through career bottlenecks?
【web自动化测试】Playwright快速入门,5分钟上手
HCIP-R&S By Wakin自用笔记(1)企业网络高级解决方案
如何进行自动化测试?
《学会写作》粥佐罗著
win10 uwp DataContext
STP实验
服务器
Google AppSheet: 无需编程构建零代码应用
当前最快的实例分割模型:YOLACT 和 YOLACT++









