当前位置:网站首页>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数据结构对应起来 这也是和前端在交互的时候需要特别注意的还有字段名称此类。
边栏推荐
猜你喜欢
企业应当实施的5个云安全管理策略
IDEA 自动导入的配置(Auto import)
基于激励的需求响应计划下弹性微电网的短期可靠性和经济性评估(Matlab代码实现)
EasyCVR calls the cloud recording API and returns an error and no recording file is generated. What is the reason?
Babbitt | Metaverse daily must-read: Weibo animation will recruit all kinds of virtual idols around the world and provide support for them...
Flink/Scala - Storing data with RedisSink
[Distributed Advanced] Let's fill in those pits in Redis distributed locks.
ECCV 2022 | FPN错位对齐,实现高效半监督目标检测(PseCo)
The upgrade of capacity helps the flow of computing power, the acceleration moment of China's digital economy
当项目中自动格式化插件Prettier和ESLint冲突报错时如何解决
随机推荐
阿里云国际版使用ROS搭建WordPress教程
机器学习——线性回归
12. SAP ABAP OData 服务如何支持 $select 有选择性地仅读取部分模型字段值
win10 uwp json
天呐,七夕我收到9份告白~
win10 uwp win2d 使用 Path 绘制界面
防火墙基础之防火墙做出口设备安全防护
链表的经典入门LeetCode题目
ATF中断处理的设计模型
Hezhou Cat1 4G module Air724UG is configured with RNDIS network card or PPP dial-up, and the development board is connected to the Internet through the RNDIS network card (taking the RV1126/1109 devel
2019年海淀区青少年程序设计挑战活动小学组复赛试题详细答案
【AI+医疗】斯坦福大学最新博士论文《深度学习在医学影像理解中的应用》,205页pdf
EuROC dataset format and related codes
Scala105-Spark.sql中collect_list用法
Flask framework implementations registered encryption, a Flask enterprise class learning 】 【
curl命令的那些事
测试工程师如何突破职业瓶颈?
如何进行自动化测试?
当项目中自动格式化插件Prettier和ESLint冲突报错时如何解决
The CPU suddenly soars and the system responds slowly, what is the cause?Is there any way to check?