Commit f661a921 authored by duanruiming's avatar duanruiming

[add] 优化

parent d11b2d6c
...@@ -45,7 +45,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -45,7 +45,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
private final HoloForeignDeviceMapper holoForeignDeviceMapper; private final HoloForeignDeviceMapper holoForeignDeviceMapper;
@Transactional @Transactional
@KafkaListener(topics = {"cross_real_time_lane_data"}) //@KafkaListener(topics = {"cross_real_time_lane_data"})
public void receiveCrossRealTimeLaneData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveCrossRealTimeLaneData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String crossRealTimeLaneData = String.valueOf(record.value()); String crossRealTimeLaneData = String.valueOf(record.value());
...@@ -81,7 +81,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -81,7 +81,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
} }
@Transactional @Transactional
@KafkaListener(topics = {"cross_real_time_data"}) //@KafkaListener(topics = {"cross_real_time_data"})
public void receiveCrossRealTimeData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveCrossRealTimeData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String crossRealTimeData = String.valueOf(record.value()); String crossRealTimeData = String.valueOf(record.value());
...@@ -130,7 +130,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -130,7 +130,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
} }
@Transactional @Transactional
@KafkaListener(topics = {"cross_real_time_dir_data"}) //@KafkaListener(topics = {"cross_real_time_dir_data"})
public void receiveCrossRealTimeDirData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveCrossRealTimeDirData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String crossRealTimeDirData = String.valueOf(record.value()); String crossRealTimeDirData = String.valueOf(record.value());
...@@ -155,7 +155,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -155,7 +155,7 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
} }
@Transactional @Transactional
@KafkaListener(topics = {"cross_real_time_turn_data"}) //@KafkaListener(topics = {"cross_real_time_turn_data"})
public void receiveCrossRealTimeTurnData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception { public void receiveCrossRealTimeTurnData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try { try {
String crossRealTimeTurnData = String.valueOf(record.value()); String crossRealTimeTurnData = String.valueOf(record.value());
......
...@@ -2,9 +2,11 @@ package net.wanji.databus.po; ...@@ -2,9 +2,11 @@ package net.wanji.databus.po;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.omg.CORBA.UNKNOWN;
import java.util.Date; import java.util.Date;
...@@ -192,13 +194,17 @@ public class CrossDataRealtimePO { ...@@ -192,13 +194,17 @@ public class CrossDataRealtimePO {
private double vehicleLengthRatioMean; private double vehicleLengthRatioMean;
/** add 20241123 适配神思数据 */ /** add 20241123 适配神思数据 */
@ApiModelProperty(value = "执行策略 失衡 2拥堵 3溢出 4死锁 5 空放", notes = "") @ApiModelProperty(value = "执行策略 失衡 2拥堵 3溢出 4死锁 5 空放", notes = "")
private int strategy; private Integer strategy;
@ApiModelProperty(value = "策略执行持续时间;单位:s", notes = "") @ApiModelProperty(value = "策略执行持续时间;单位:s", notes = "")
private int strategyDuration; @TableField("strategy_duration")
private Integer strategyDuration;
@ApiModelProperty(value = "优化执行次数", notes = "") @ApiModelProperty(value = "优化执行次数", notes = "")
private int optimizeCount; @TableField("optimize_count")
private Integer optimizeCount;
@ApiModelProperty(value = "优化时长,单位秒", notes = "") @ApiModelProperty(value = "优化时长,单位秒", notes = "")
private int optimizeSeconds; @TableField("optimize_seconds")
private Integer optimizeSeconds;
@ApiModelProperty(value = "是否空放 0否 1是", notes = "") @ApiModelProperty(value = "是否空放 0否 1是", notes = "")
private int emptyPass; @TableField("empty_pass")
private Integer emptyPass;
} }
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
<result column="traffic_flow_C" property="trafficFlowC"></result> <result column="traffic_flow_C" property="trafficFlowC"></result>
<result column="vehicle_length_ratio_mean" property="vehicleLengthRatioMean"></result> <result column="vehicle_length_ratio_mean" property="vehicleLengthRatioMean"></result>
<result column="time_occupancy" property="timeOccupancy"></result> <result column="time_occupancy" property="timeOccupancy"></result>
<!-- add 20241123 适配神思数据 -->
<result column="strategy" property="strategy"></result>
<result column="strategy_duration" property="strategyDuration"></result>
<result column="optimize_count" property="optimizeCount"></result>
<result column="optimize_seconds" property="optimizeSeconds"></result>
<result column="empty_pass" property="emptyPass"></result>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -53,7 +59,8 @@ ...@@ -53,7 +59,8 @@
flow, flow_rate, speed, queue_length, stop_times, delay_time, sturation, batch_time, gmt_create, gmt_modified, flow, flow_rate, speed, queue_length, stop_times, delay_time, sturation, batch_time, gmt_create, gmt_modified,
clear_rate,load_balance,not_clear_car_nums,green_light_efficiency,effusion_rate, clear_rate,load_balance,not_clear_car_nums,green_light_efficiency,effusion_rate,
no_stop_rate,one_stop_rate,two_stop_rate,three_stop_rate,non_motor_flow,v_85, no_stop_rate,one_stop_rate,two_stop_rate,three_stop_rate,non_motor_flow,v_85,
traffic_flow_A,traffic_flow_B,traffic_flow_C,vehicle_length_ratio_mean,time_occupancy traffic_flow_A,traffic_flow_B,traffic_flow_C,vehicle_length_ratio_mean,time_occupancy,
strategy, strategy_duration, optimize_count, optimize_seconds, empty_pass
</sql> </sql>
<insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataHistPO"> <insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataHistPO">
...@@ -67,7 +74,8 @@ ...@@ -67,7 +74,8 @@
#{entity.clearRate},#{entity.loadBalance},#{entity.notClearCarNums},#{entity.greenLightEfficiency},#{entity.effusionRate}, #{entity.clearRate},#{entity.loadBalance},#{entity.notClearCarNums},#{entity.greenLightEfficiency},#{entity.effusionRate},
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate}, #{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},
#{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB}, #{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},
#{entity.trafficFlowC},#{entity.vehicleLengthRatioMean},#{entity.timeOccupancy}) #{entity.trafficFlowC},#{entity.vehicleLengthRatioMean},#{entity.timeOccupancy}),
#{entity.strategy}, #{entity.strategy_duration}, #{entity.optimize_count}, #{entity.optimize_seconds}, #{entity.empty_pass}
</foreach> </foreach>
</insert> </insert>
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate}, #{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},
#{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},#{entity.trafficFlowC}, #{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},#{entity.trafficFlowC},
#{entity.vehicleLengthRatioMean},#{entity.timeOccupancy}, #{entity.vehicleLengthRatioMean},#{entity.timeOccupancy},
#{entity.strategy}, #{entity.strategy_duration}, #{entity.optimize_count}, #{entity.optimize_seconds}, #{entity.empty_pass}, #{entity.strategy}, #{entity.strategy_duration}, #{entity.optimize_count}, #{entity.optimize_seconds}, #{entity.empty_pass}
) )
</foreach> </foreach>
</insert> </insert>
......
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