Commit 1e01b681 authored by duanruiming's avatar duanruiming

Merge remote-tracking branch 'origin/master'

parents ff855602 3f5c9534
...@@ -440,9 +440,6 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService { ...@@ -440,9 +440,6 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService {
.mapToDouble(CrossTurnDataHistPO::getSturation) .mapToDouble(CrossTurnDataHistPO::getSturation)
.max() .max()
.orElse(0); .orElse(0);
metricsMap.put(StrategyAndMetricsEnum.Metrics.SATURATION.getCode(),
maxSaturation + StrategyAndMetricsEnum.Metrics.SATURATION.getUnit());
// 计算指标是否合格 // 计算指标是否合格
boolean isQualified = calcSecurity(maxSaturation, OptionalDouble.of(clearRateMax)); boolean isQualified = calcSecurity(maxSaturation, OptionalDouble.of(clearRateMax));
if (!isQualified) { if (!isQualified) {
......
...@@ -39,16 +39,24 @@ ...@@ -39,16 +39,24 @@
</select> </select>
<select id="selectDirEmergencyCount" resultType="java.lang.Integer"> <select id="selectDirEmergencyCount" resultType="java.lang.Integer">
<choose>
<when test="laneIds != null and laneIds.size() > 0">
SELECT COUNT(*) SELECT COUNT(*)
FROM holo_roadnet_jinan.t_event_info FROM holo_roadnet_jinan.t_event_info
WHERE type IN ('33', '34', '35', '6') WHERE type IN ('33', '34', '35', '6')
AND UNIX_TIMESTAMP(start_time) <![CDATA[ >= ]]> #{startStamp} AND UNIX_TIMESTAMP(start_time) <![CDATA[ >= ]]> #{startTimeStamp}
AND UNIX_TIMESTAMP(start_time) <![CDATA[ <= ]]> #{endStamp} AND UNIX_TIMESTAMP(start_time) <![CDATA[ <= ]]> #{endTimeStamp}
AND cross_id = #{crossId} AND cross_id = #{crossId}
AND lane_id in AND lane_id in
<foreach collection="laneIds" item="id" separator="," open="(" close=")"> <foreach collection="laneIds" item="id" separator="," open="(" close=")">
#{id} #{id}
</foreach> </foreach>
</when>
<otherwise>
SELECT 0
</otherwise>
</choose>
</select> </select>
</mapper> </mapper>
...@@ -19,17 +19,25 @@ ...@@ -19,17 +19,25 @@
</select> </select>
<select id="selectTurnEmergencyCount" resultType="java.lang.Integer"> <select id="selectTurnEmergencyCount" resultType="java.lang.Integer">
<choose>
<when test="laneIds != null and laneIds.size() > 0">
SELECT COUNT(*) SELECT COUNT(*)
FROM holo_roadnet_jinan.t_event_info FROM holo_roadnet_jinan.t_event_info
WHERE type IN ('33', '34', '35', '6') WHERE type IN ('33', '34', '35', '6')
AND UNIX_TIMESTAMP(start_time) <![CDATA[ >= ]]> #{startStamp} AND UNIX_TIMESTAMP(start_time) <![CDATA[ >= ]]> #{startTimeStamp}
AND UNIX_TIMESTAMP(start_time) <![CDATA[ <= ]]> #{endStamp} AND UNIX_TIMESTAMP(start_time) <![CDATA[ <= ]]> #{endTimeStamp}
AND cross_id = #{crossId} AND cross_id = #{crossId}
AND lane_id in AND lane_id in
<foreach collection="laneIds" item="id" separator="," open="(" close=")"> <foreach collection="laneIds" item="id" separator="," open="(" close=")">
#{id} #{id}
</foreach> </foreach>
</when>
<otherwise>
SELECT 0
</otherwise>
</choose>
</select> </select>
</mapper> </mapper>
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