Commit 094fce64 authored by duanruiming's avatar duanruiming

[update] 空放事件优化路口名称

parent 95ee22f0
......@@ -39,6 +39,17 @@ public class CrossInfoCache implements InitializingBean {
}
return Collections.emptyList();
}
public static String getName(String crossId) {
if (!CollectionUtils.isEmpty(crossInfoList)) {
for (BaseCrossInfoPO baseCrossInfoPO : crossInfoList) {
if (crossId.equals(baseCrossInfoPO.getId())) {
return baseCrossInfoPO.getName();
}
}
}
return "龙鼎大道与西山东路交叉口";
}
@Override
public void afterPropertiesSet() throws Exception {
List<BaseCrossInfoPO> baseCrossInfoPOS = baseCrossInfoMapper.selectAll();
......
......@@ -3,6 +3,7 @@ package net.wanji.datacenter.service.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.wanji.common.utils.tool.JacksonUtils;
import net.wanji.datacenter.cache.CrossInfoCache;
import net.wanji.datacenter.mapper.CrossStrategyResultMapper;
import net.wanji.datacenter.pojo.dto.ImbalanceAlgorithmDTO;
import net.wanji.datacenter.pojo.dto.PhaseEmptyDataDTO;
......@@ -54,6 +55,8 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
entity.setExtendTime(countDown);
entity.setResponseCode(rtnType);
entity.setRtnType(rtnType);
String name = CrossInfoCache.getName(crossId);
entity.setCrossName(name);
crossStrategyResultMapper.insert(entity);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment