当前位置:网站首页>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.
边栏推荐
- win10 uwp DataContext
- 12. SAP ABAP OData 服务如何支持 $select 有选择性地仅读取部分模型字段值
- lc marathon 8.3
- ros2订阅esp32发布的电池电压数据
- win10 uwp json
- 视频目标检测
- 袋鼠云思枢:数驹DTengine,助力企业构建高效的流批一体数据湖计算平台
- The CPU suddenly soars and the system responds slowly, what is the cause?Is there any way to check?
- 如何理解 SAP UI5 的 sap.ui.define 函数
- 百度智能云重庆工业互联网平台正式亮相,深耕重庆,辐射西南
猜你喜欢
随机推荐
IDEA 自动导入的配置(Auto import)
The Industrial Metaverse Brings Changes to Industry
curl命令的那些事
Those things about the curl command
LVS+Keepalived群集
小波提取特征的VQ实现
12. SAP ABAP OData 服务如何支持 $select 有选择性地仅读取部分模型字段值
VPC2187/8 current mode PWM controller 4-100VIN ultra-wide voltage startup, highly integrated power control chip recommended
开篇-开启全新的.NET现代应用开发体验
【STM32】入门(五):串口TTL、RS232、RS485
查询APP Store已发布过的版本记录
win10 uwp MetroLog 入门
八一建军节 | 致敬中国人民解放军
目标检测的发展与现状
SAP UI5 视图控制器 View Controller 的生命周期方法 - Lifecycle methods
win10 uwp json
【RTOS训练营】关于上课和答疑
HCIA-R&S自用笔记(22)STP状态与计时器、STP拓扑变化、STP配置及实验
YOLOv7-Pose尝鲜,基于YOLOv7的关键点模型测评
ECCV 2022 | FPN错位对齐,实现高效半监督目标检测(PseCo)









