Commit 0cf88a56 authored by duanruiming's avatar duanruiming

[update] 优化系统bug

parent a8950a44
......@@ -1103,11 +1103,13 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService {
private boolean calcBalance(Double maxSaturation, Double greenLightEfficiencyMax) {
// 如果饱和度<0.8,则需绿灯利用率大于50%;如果饱和度>0.8,则需绿灯利用率大于80%
if (Objects.nonNull(maxSaturation) && Objects.nonNull(greenLightEfficiencyMax)) {
if (maxSaturation < 0.8 && greenLightEfficiencyMax > 0.5) {
return true;
} else if (maxSaturation >= 0.8 && greenLightEfficiencyMax > 0.8) {
return true;
}
}
return false;
}
......
......@@ -44,7 +44,9 @@ public interface CrossDirDataHistMapper extends BaseMapper<CrossDirDataHistPO> {
Double selectMaxSaturation(String crossId, Integer dirType, Integer inOutType, int startStamp, int endStamp);
Double selectMaxGreenLightEfficiency(String crossId, Integer dirCode, Integer code, int startTimeStamp, int endTimeStamp);
Double selectMaxGreenLightEfficiency(@Param("crossId") String crossId, @Param("dirCode") Integer dirCode,
@Param("code")Integer code, @Param("startTimeStamp") int startTimeStamp,
@Param("endTimeStamp") int endTimeStamp);
List<CrossDirDataHistPOExt> selectByMetrics(String crossId, int dirInt, int startTimeStamp, int endTimeStamp, List<String> laneIds);
......
......@@ -156,9 +156,9 @@
<select id="selectMaxGreenLightEfficiency" resultType="java.lang.Double">
select max(green_light_efficiency)
from t_cross_dir_data_hist
where cross_id = #{crossId} and dir_type = #{dirType} and in_out_type = #{inOutType}
and batch_time <![CDATA[ >= ]]> #{startStamp}
and batch_time <![CDATA[ <= ]]> #{endStamp}
where cross_id = #{crossId} and dir_type = #{dirCode} and in_out_type = #{code}
and batch_time <![CDATA[ >= ]]> #{startTimeStamp}
and batch_time <![CDATA[ <= ]]> #{endTimeStamp}
</select>
<select id="selectByMetrics" resultType="net.wanji.databus.po.CrossDirDataHistPOExt">
......
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