Commit e93ffaa0 authored by hanbing's avatar hanbing

[update] 城市大脑-信号评价-评价指标

parent ee5b973e
...@@ -45,6 +45,7 @@ import java.util.stream.Collectors; ...@@ -45,6 +45,7 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
private final GreenwaveRealtimeMapper greenwaveRealtimeMapper;
@Value("${spring.kafka.bootstrap-servers}") @Value("${spring.kafka.bootstrap-servers}")
private String bootstrapServers; private String bootstrapServers;
...@@ -84,7 +85,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -84,7 +85,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
@Qualifier("baseCrossTurnInfoMapper") BaseCrossTurnInfoMapper baseCrossTurnInfoMapper, @Qualifier("baseCrossTurnInfoMapper") BaseCrossTurnInfoMapper baseCrossTurnInfoMapper,
CrossBaseLaneInfoMapper crossBaseLaneInfoMapper, CrossBaseLaneInfoMapper crossBaseLaneInfoMapper,
@Qualifier("laneInfoMapper") LaneInfoMapper laneInfoMapper, @Qualifier("laneInfoMapper") LaneInfoMapper laneInfoMapper,
CrossDirDataHistMapper crossDirDataHistMapper, CrossDataHistMapper crossDataHistMapper, CrossTurnDataHistMapper crossTurnDataHistMapper, CrossLaneDataHistMapper crossLaneDataHistMapper, @Qualifier("greenwaveInfoMapper") GreenwaveInfoMapper greenwaveInfoMapper, @Qualifier("greenwaveHistMapper") GreenwaveHistMapper greenwaveHistMapper, @Qualifier("greenwaveCrossMapper") GreenwaveCrossMapper greenwaveCrossMapper, @Qualifier("baseCrossInfoMapper") BaseCrossInfoMapper baseCrossInfoMapper, @Qualifier("greenwaveSceneMapper") GreenwaveSceneMapper greenwaveSceneMapper, @Qualifier("sceneStrategyMapper") SceneStrategyMapper sceneStrategyMapper, @Qualifier("strategyMapper") StrategyMapper strategyMapper, @Qualifier("baseCrossSectionMapper") BaseCrossSectionMapper baseCrossSectionMapper, @Qualifier("ridInfoMapper") RidInfoMapper ridInfoMapper, @Qualifier("baseCrossPlanMapper") BaseCrossPlanMapper baseCrossPlanMapper, @Qualifier("baseCrossSchemeMapper") BaseCrossSchemeMapper baseCrossSchemeMapper, @Qualifier("greenwaveMergeMapper") GreenwaveMergeMapper greenwaveMergeMapper) { CrossDirDataHistMapper crossDirDataHistMapper, CrossDataHistMapper crossDataHistMapper, CrossTurnDataHistMapper crossTurnDataHistMapper, CrossLaneDataHistMapper crossLaneDataHistMapper, @Qualifier("greenwaveInfoMapper") GreenwaveInfoMapper greenwaveInfoMapper, @Qualifier("greenwaveHistMapper") GreenwaveHistMapper greenwaveHistMapper, @Qualifier("greenwaveCrossMapper") GreenwaveCrossMapper greenwaveCrossMapper, @Qualifier("baseCrossInfoMapper") BaseCrossInfoMapper baseCrossInfoMapper, @Qualifier("greenwaveSceneMapper") GreenwaveSceneMapper greenwaveSceneMapper, @Qualifier("sceneStrategyMapper") SceneStrategyMapper sceneStrategyMapper, @Qualifier("strategyMapper") StrategyMapper strategyMapper, @Qualifier("baseCrossSectionMapper") BaseCrossSectionMapper baseCrossSectionMapper, @Qualifier("ridInfoMapper") RidInfoMapper ridInfoMapper, @Qualifier("baseCrossPlanMapper") BaseCrossPlanMapper baseCrossPlanMapper, @Qualifier("baseCrossSchemeMapper") BaseCrossSchemeMapper baseCrossSchemeMapper, @Qualifier("greenwaveMergeMapper") GreenwaveMergeMapper greenwaveMergeMapper, @Qualifier("greenwaveRealtimeMapper") GreenwaveRealtimeMapper greenwaveRealtimeMapper) {
this.baseCrossDirInfoMapper = baseCrossDirInfoMapper; this.baseCrossDirInfoMapper = baseCrossDirInfoMapper;
this.baseCrossTurnInfoMapper = baseCrossTurnInfoMapper; this.baseCrossTurnInfoMapper = baseCrossTurnInfoMapper;
this.laneInfoMapper = laneInfoMapper; this.laneInfoMapper = laneInfoMapper;
...@@ -104,6 +105,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -104,6 +105,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
this.baseCrossPlanMapper = baseCrossPlanMapper; this.baseCrossPlanMapper = baseCrossPlanMapper;
this.baseCrossSchemeMapper = baseCrossSchemeMapper; this.baseCrossSchemeMapper = baseCrossSchemeMapper;
this.greenwaveMergeMapper = greenwaveMergeMapper; this.greenwaveMergeMapper = greenwaveMergeMapper;
this.greenwaveRealtimeMapper = greenwaveRealtimeMapper;
} }
@Override @Override
...@@ -283,6 +285,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -283,6 +285,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.sum(); .sum();
int round = (int) (Math.round(v)); int round = (int) (Math.round(v));
vo.setValue(round); vo.setValue(round);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.FLOW.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossDataHistPOExt::getFlow)
.sum();
int round = (int) (Math.round(v));
vo.setValue(round);
} }
res.add(vo); res.add(vo);
...@@ -388,6 +396,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -388,6 +396,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.orElse(0.0); .orElse(0.0);
int round = (int) (Math.round(v * 100)); int round = (int) (Math.round(v * 100));
vo.setValue(round); vo.setValue(round);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.FLOW.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossDirDataHistPO::getFlow)
.sum();
int round = (int) (Math.round(v));
vo.setValue(round);
} }
res.add(vo); res.add(vo);
...@@ -496,6 +510,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -496,6 +510,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.orElse(0.0); .orElse(0.0);
int round = (int) (Math.round(v * 100)); int round = (int) (Math.round(v * 100));
vo.setValue(round); vo.setValue(round);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.FLOW.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossTurnDataHistPO::getFlow)
.sum();
int round = (int) (Math.round(v));
vo.setValue(round);
} }
res.add(vo); res.add(vo);
...@@ -609,6 +629,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -609,6 +629,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.orElse(0.0); .orElse(0.0);
int round = (int) (Math.round(v * 100)); int round = (int) (Math.round(v * 100));
vo.setValue(round); vo.setValue(round);
} else if (Objects.equals(metricCode, StrategyAndMetricsEnum.Metrics.FLOW.getCode())) {
double v = filteredList.stream()
.mapToDouble(CrossLaneDataHistPOExt::getFlow)
.sum();
int round = (int) (Math.round(v));
vo.setValue(round);
} }
res.add(vo); res.add(vo);
...@@ -642,10 +668,14 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService { ...@@ -642,10 +668,14 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
mainlineListVO.setMainlineName(prefix); mainlineListVO.setMainlineName(prefix);
Integer greenwaveId = greenwaveInfoPO.getId(); Integer greenwaveId = greenwaveInfoPO.getId();
GreenwaveRealtimePO greenwaveRealtimePO = greenwaveRealtimeMapper.selectById(greenwaveId);
mainlineListVO.setTrafficIndex(greenwaveRealtimePO.getTrafficIndex());
setCrossListAndwkt(mainlineListVO, greenwaveId); setCrossListAndwkt(mainlineListVO, greenwaveId);
res.add(mainlineListVO); res.add(mainlineListVO);
} }
res.sort(Comparator.comparingDouble(MainlineListVO::getTrafficIndex).reversed());
return res; return res;
} }
......
...@@ -110,20 +110,20 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService { ...@@ -110,20 +110,20 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
@Override @Override
public List<RunningEvaluateCrossListVO> crossList(CrossNameBO crossNameBO) { public List<RunningEvaluateCrossListVO> crossList(CrossNameBO crossNameBO) {
String crossName = crossNameBO.getCrossName(); String crossName = crossNameBO.getCrossName();
List<RunningEvaluateCrossListVO> crossDataRealtimePOList = crossDataRealtimeMapper.selectByCrossName(crossName); List<RunningEvaluateCrossListVO> voList = crossDataRealtimeMapper.selectByCrossName(crossName);
for (RunningEvaluateCrossListVO runningEvaluateCrossListVO : crossDataRealtimePOList) { for (RunningEvaluateCrossListVO vo : voList) {
Double sturation = runningEvaluateCrossListVO.getSturation(); Double sturation = vo.getSturation();
runningEvaluateCrossListVO.setServiceLevel(CrossUtil.getServiceLevel(sturation)); vo.setServiceLevel(CrossUtil.getServiceLevel(sturation));
// 路口经纬度 // 路口经纬度
String crossId = runningEvaluateCrossListVO.getCrossId(); String crossId = vo.getCrossId();
BaseCrossInfoPO baseCrossInfoPO = baseCrossInfoMapper.selectById(crossId); BaseCrossInfoPO baseCrossInfoPO = baseCrossInfoMapper.selectById(crossId);
String location = baseCrossInfoPO.getLocation(); String location = baseCrossInfoPO.getLocation();
double[] lonLat = CrossUtil.getLonLat(location); double[] lonLat = CrossUtil.getLonLat(location);
runningEvaluateCrossListVO.setLongitude(lonLat[0]); vo.setLongitude(lonLat[0]);
runningEvaluateCrossListVO.setLatitude(lonLat[1]); vo.setLatitude(lonLat[1]);
} }
// 按服务水平降序排序 // 按服务水平降序排序
List<RunningEvaluateCrossListVO> res = crossDataRealtimePOList.stream() List<RunningEvaluateCrossListVO> res = voList.stream()
.sorted(Comparator.comparing(RunningEvaluateCrossListVO::getSturation).reversed()) .sorted(Comparator.comparing(RunningEvaluateCrossListVO::getSturation).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -155,10 +155,58 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService { ...@@ -155,10 +155,58 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
List<CrossDataHistPO> congestionEventList = buildCongestionEvents(crossDataHistPOList); // 获取拥堵事件集合 List<CrossDataHistPO> congestionEventList = buildCongestionEvents(crossDataHistPOList); // 获取拥堵事件集合
vo.setCongestionTimes(congestionEventList.size()); vo.setCongestionTimes(congestionEventList.size());
int congestionSum = congestionEventList.stream()
.filter(Objects::nonNull)
.map(CrossDataHistPO::getDuration)
.filter(Objects::nonNull)
.mapToInt(Integer::intValue)
.sum();
vo.setCongestionSum(congestionSum);
List<CrossDataHistPO> unbalanceEventList = buildUnbalanceEvents(crossDataHistPOList); // 获取失衡事件集合 List<CrossDataHistPO> unbalanceEventList = buildUnbalanceEvents(crossDataHistPOList); // 获取失衡事件集合
vo.setUnbalanceTimes(unbalanceEventList.size()); vo.setUnbalanceTimes(unbalanceEventList.size());
int unbalanceSum = unbalanceEventList.stream()
.filter(Objects::nonNull)
.map(CrossDataHistPO::getDuration)
.filter(Objects::nonNull)
.mapToInt(Integer::intValue)
.sum();
vo.setUnbalanceSum(unbalanceSum);
List<CrossDataHistPO> spilloverEventList = buildSpilloverEvents(crossDataHistPOList); // 获取溢出事件集合 List<CrossDataHistPO> spilloverEventList = buildSpilloverEvents(crossDataHistPOList); // 获取溢出事件集合
vo.setSpilloverTimes(spilloverEventList.size()); vo.setSpilloverTimes(spilloverEventList.size());
int spilloverSum = spilloverEventList.stream()
.filter(Objects::nonNull)
.map(CrossDataHistPO::getDuration)
.filter(Objects::nonNull)
.mapToInt(Integer::intValue)
.sum();
vo.setSpilloverSum(spilloverSum);
// 相位空放指标
Date startDate = bo.getStartDate();
Date endDate = bo.getEndDate();
if (isZeros(endDate)) {
endDate = DateUtil.offsetDay(endDate, 1); // 包含最后一天
}
long startTime = startDate.getTime();
long endTime = endDate.getTime();
KafkaConsumerUtil kafkaConsumerUtil = new KafkaConsumerUtil(bootstrapServers, "empty-phase-evaluate");
List<PhaseEmptyResult> phaseEmptyResults =
kafkaConsumerUtil.consumeEmptyPhaseForTimeRange(emptyPhaseTopic, 0, startTime, endTime);
int emptyPhaseCount = (int) phaseEmptyResults.stream()
.filter(result -> result != null && crossId.equals(result.getCrossId()))
.count();
int emptyPhaseSum = phaseEmptyResults.stream()
.filter(result -> result != null && crossId.equals(result.getCrossId()))
.map(PhaseEmptyResult::getDuration)
.filter(Objects::nonNull)
.mapToInt(Integer::intValue)
.sum();
vo.setEmptyPhaseTimes(emptyPhaseCount);
vo.setEmptyPhaseSum(emptyPhaseSum);
Integer schemeProblems = calcSchemeProblems( Integer schemeProblems = calcSchemeProblems(
congestionEventList, unbalanceEventList, spilloverEventList, crossId); // 计算方案问题 congestionEventList, unbalanceEventList, spilloverEventList, crossId); // 计算方案问题
vo.setSchemeProblems(schemeProblems); vo.setSchemeProblems(schemeProblems);
...@@ -178,7 +226,9 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService { ...@@ -178,7 +226,9 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
private List<CrossDataHistPO> buildCrossDataHistPOList(CrossIdAndStartEndDateBO bo, String crossId) { private List<CrossDataHistPO> buildCrossDataHistPOList(CrossIdAndStartEndDateBO bo, String crossId) {
Date startDate = bo.getStartDate(); Date startDate = bo.getStartDate();
Date endDate = bo.getEndDate(); Date endDate = bo.getEndDate();
if (isZeros(endDate)) {
endDate = DateUtil.offsetDay(endDate, 1); // 包含最后一天 endDate = DateUtil.offsetDay(endDate, 1); // 包含最后一天
}
int startStamp = (int) (startDate.getTime() / 1000); // 10位时间戳 int startStamp = (int) (startDate.getTime() / 1000); // 10位时间戳
int endStamp = (int) (endDate.getTime() / 1000); int endStamp = (int) (endDate.getTime() / 1000);
List<CrossDataHistPO> crossDataHistPOList = crossDataHistMapper.selectByCrossIdAndStartEnd( List<CrossDataHistPO> crossDataHistPOList = crossDataHistMapper.selectByCrossIdAndStartEnd(
...@@ -186,6 +236,15 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService { ...@@ -186,6 +236,15 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
return crossDataHistPOList; return crossDataHistPOList;
} }
private boolean isZeros(Date endDate) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(endDate);
return calendar.get(Calendar.HOUR_OF_DAY) == 0 &&
calendar.get(Calendar.MINUTE) == 0 &&
calendar.get(Calendar.SECOND) == 0 &&
calendar.get(Calendar.MILLISECOND) == 0;
}
@Override @Override
public RunningEvaluateStatusVO congestionStatus(CrossIdAndStartEndDateBO bo) { public RunningEvaluateStatusVO congestionStatus(CrossIdAndStartEndDateBO bo) {
return evaluateStatus(bo, CrossStatusEnum.CONGESTION); return evaluateStatus(bo, CrossStatusEnum.CONGESTION);
......
...@@ -24,4 +24,7 @@ public class MainlineListVO { ...@@ -24,4 +24,7 @@ public class MainlineListVO {
@ApiModelProperty(value = "干线坐标") @ApiModelProperty(value = "干线坐标")
private String wkt; private String wkt;
@ApiModelProperty(value = "干线拥堵指数")
private Double trafficIndex ;
} }
...@@ -13,14 +13,30 @@ import lombok.NoArgsConstructor; ...@@ -13,14 +13,30 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@ApiModel(value = "RunningEvaluateCrossEvaluateVO", description = "运行评价-路口评价") @ApiModel(value = "RunningEvaluateCrossEvaluateVO", description = "运行评价-路口评价")
public class RunningEvaluateCrossEvaluateVO { public class RunningEvaluateCrossEvaluateVO {
@ApiModelProperty(value = "服务水平") @ApiModelProperty(value = "服务水平")
String serviceLevel; String serviceLevel;
@ApiModelProperty(value = "拥堵次数") @ApiModelProperty(value = "拥堵次数")
Integer congestionTimes; Integer congestionTimes;
@ApiModelProperty(value = "拥堵时长")
Integer congestionSum;
@ApiModelProperty(value = "失衡次数") @ApiModelProperty(value = "失衡次数")
Integer unbalanceTimes; Integer unbalanceTimes;
@ApiModelProperty(value = "失衡时长")
Integer unbalanceSum;
@ApiModelProperty(value = "溢出次数") @ApiModelProperty(value = "溢出次数")
Integer spilloverTimes; Integer spilloverTimes;
@ApiModelProperty(value = "溢出时长")
Integer spilloverSum;
@ApiModelProperty(value = "空放次数")
Integer emptyPhaseTimes;
@ApiModelProperty(value = "空放时长")
Integer emptyPhaseSum;
@ApiModelProperty(value = "方案问题") @ApiModelProperty(value = "方案问题")
Integer schemeProblems; Integer schemeProblems;
} }
...@@ -53,7 +53,8 @@ public class StrategyAndMetricsEnum { ...@@ -53,7 +53,8 @@ public class StrategyAndMetricsEnum {
UNCOORDINATE_PHASE_QUEUE("17", "非协调相位二次排队", "%", "uncoordinatePhaseQueue"), UNCOORDINATE_PHASE_QUEUE("17", "非协调相位二次排队", "%", "uncoordinatePhaseQueue"),
TRVAL_TIME("18", "干线行程时间", "s", "trvalTime"), TRVAL_TIME("18", "干线行程时间", "s", "trvalTime"),
TRAFFIC_INDEX("19", "拥堵指数", "", "trafficIndex"), TRAFFIC_INDEX("19", "拥堵指数", "", "trafficIndex"),
EMPTY_PHASE("20", "绿灯空放时长", "m", "emptyPhase"); EMPTY_PHASE("20", "绿灯空放时长", "m", "emptyPhase"),
FLOW("21", "交通流量", "辆", "flow");
private final String code; private final String code;
private final String description; private final String description;
......
package net.wanji.databus.bo; package net.wanji.databus.bo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -11,11 +11,11 @@ public class CrossIdAndStartEndDateBO { ...@@ -11,11 +11,11 @@ public class CrossIdAndStartEndDateBO {
@ApiModelProperty(value = "路口ID") @ApiModelProperty(value = "路口ID")
private String crossId; private String crossId;
@ApiModelProperty(value = "开始日期 yyyy-MM-dd") @ApiModelProperty(value = "开始日期 yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonDeserialize(using = CustomDateDeserializer.class)
private Date startDate; private Date startDate;
@ApiModelProperty(value = "结束日期 yyyy-MM-dd") @ApiModelProperty(value = "结束日期 yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonDeserialize(using = CustomDateDeserializer.class)
private Date endDate; private Date endDate;
} }
package net.wanji.databus.bo;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
public class CustomDateDeserializer extends StdDeserializer<Date> {
public CustomDateDeserializer() {
super(Date.class);
}
@Override
public Date deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
String date = p.getText();
try {
return DateConverter.parseDate(date);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
}
\ No newline at end of file
package net.wanji.databus.bo;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateConverter {
public static Date parseDate(String dateString) throws ParseException {
SimpleDateFormat formatter;
if (dateString.contains(" ")) {
formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
} else {
formatter = new SimpleDateFormat("yyyy-MM-dd");
}
return formatter.parse(dateString);
}
}
...@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/** /**
* @author Kent HAN * @author Kent HAN
* @date 2023/2/9 8:38 * @date 2023/2/9 8:38
...@@ -34,4 +36,7 @@ public class RunningEvaluateCrossListVO { ...@@ -34,4 +36,7 @@ public class RunningEvaluateCrossListVO {
@ApiModelProperty(value = "路口纬度") @ApiModelProperty(value = "路口纬度")
private Double latitude ; private Double latitude ;
@ApiModelProperty(value = "拥堵指数")
private BigDecimal congestionIndex;
} }
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</select> </select>
<select id="selectByCrossName" resultType="net.wanji.databus.vo.RunningEvaluateCrossListVO"> <select id="selectByCrossName" resultType="net.wanji.databus.vo.RunningEvaluateCrossListVO">
select t1.cross_id as crossId, t1.sturation as sturation, t2.name as crossName select t1.cross_id as crossId, t1.sturation as sturation, t2.name as crossName, t1.congestion_index
from t_cross_data_realtime t1 join t_base_cross_info t2 on t1.cross_id = t2.id and t2.is_signal = 1 from t_cross_data_realtime t1 join t_base_cross_info t2 on t1.cross_id = t2.id and t2.is_signal = 1
<where> <where>
<if test="crossName != null and crossName != ''"> <if test="crossName != null and crossName != ''">
......
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