Commit b038a1e2 authored by duanruiming's avatar duanruiming

[update] 代码优化,修改方法名称

parent 4a30e14f
......@@ -32,7 +32,7 @@ public class CrossDirWeekAvgFlowCache implements CommandLineRunner {
LocalDate currentDate = LocalDate.now();
LocalDate lastDay = currentDate.minus(1, ChronoUnit.DAYS);
LocalDate lastWeek = currentDate.minus(1, ChronoUnit.WEEKS);
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
for (String crossId : crossIds) {
// 前一周
LambdaQueryWrapper<CrossDirDataHistPO> queryWrapper = new LambdaQueryWrapper<>();
......
......@@ -34,7 +34,7 @@ public class CrossDirWeekMaxFlowCache implements CommandLineRunner {
LocalDate currentDate = LocalDate.now();
LocalDate lastDay = currentDate.minus(1, ChronoUnit.DAYS);
LocalDate lastWeek = currentDate.minus(1, ChronoUnit.WEEKS);
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
for (String crossId : crossIds) {
// 前一周
LambdaQueryWrapper<CrossDirDataHistPO> queryWrapper = new LambdaQueryWrapper<>();
......
......@@ -29,7 +29,7 @@ public class CrossInfoCache implements InitializingBean {
private BaseCrossInfoMapper baseCrossInfoMapper;
public static List<String> getSingalIds(){
public static List<String> getSignalIds(){
List<String> signalIds = crossInfoList.stream()
.filter(po -> Objects.equals(1, po.getIsSignal()))
.map(BaseCrossInfoPO::getId)
......
......@@ -28,7 +28,7 @@ public class CrossLaneInfoCache implements InitializingBean {
private LaneInfoMapper laneInfoMapper;
private void init() throws Exception {
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
for (String crossId : crossIds) {
List<LaneInfoPO> laneInfoPOS = laneInfoMapper.selectBycrossId(crossId);
if (!CollectionUtils.isEmpty(laneInfoPOS)) {
......
......@@ -35,7 +35,7 @@ public class CrossTurnWeekMaxFlowCache implements CommandLineRunner {
LocalDate currentDate = LocalDate.now();
LocalDate lastDay = currentDate.minus(1, ChronoUnit.DAYS);
LocalDate lastWeek = currentDate.minus(1, ChronoUnit.WEEKS);
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
for (String crossId : crossIds) {
// 前一周
LambdaQueryWrapper<CrossTurnDataHistPO> queryWrapper = new LambdaQueryWrapper<>();
......
......@@ -36,7 +36,7 @@ public class WeekDirFreeFlowSpeedCache implements CommandLineRunner {
LocalDate currentDate = LocalDate.now();
LocalDate lastDay = currentDate.minus(1, ChronoUnit.DAYS);
LocalDate lastWeek = currentDate.minus(1, ChronoUnit.WEEKS);
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
List<CrossDirFreeFlowSpeedDTO> crossDirFreeFlowSpeedDTOS = new ArrayList<>();
for (String crossId : crossIds) {
// 前一周
......
......@@ -35,7 +35,7 @@ public class WeekTurnFreeFlowSpeedCache implements CommandLineRunner {
LocalDate currentDate = LocalDate.now();
LocalDate lastDay = currentDate.minus(1, ChronoUnit.DAYS);
LocalDate lastWeek = currentDate.minus(1, ChronoUnit.WEEKS);
List<String> crossIds = CrossInfoCache.getSingalIds();
List<String> crossIds = CrossInfoCache.getSignalIds();
for (String crossId : crossIds) {
// 前一周
LambdaQueryWrapper<CrossTurnDataHistPO> queryWrapper = new LambdaQueryWrapper<>();
......
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