Commit 2620d515 authored by duanruiming's avatar duanruiming

[update] 关键路口优化

parent 75b39318
......@@ -34,7 +34,7 @@ public class GreenBeltDataConsumerHandler implements KafkaListenerErrorHandler {
* @param acknowledgment
* @throws Exception
*/
@KafkaListener(topics = {"${kafka-consumer.greenBeltInfoDataTopic}"}, groupId = "group ")
@KafkaListener(topics = {"${kafka-consumer.greenBeltInfoDataTopic}"}, groupId = "group")
public void receiveGreenBeltInfoData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) throws Exception {
try {
String message = String.valueOf(record.value());
......
......@@ -77,5 +77,7 @@ public class GreenBeltKafkaDTO {
private Map<String, Double> distanceForward;
@JsonProperty("distance_backward")
private Map<String, Double> distanceBackward;
@JsonProperty("key_cross")
private String keyCross;
}
......@@ -45,6 +45,8 @@ public class StrategyGreenOptHistEntity {
private Double greenWidthTime;
@TableField("cross_green_detail")
private String crossGreenDetail;
@TableField("key_cross")
private String keyCross;
@TableField("create_time")
private Date createTime;
@TableField("modify_time")
......
......@@ -34,6 +34,8 @@ public class GreenBeltOptInfoVO {
private Integer dynamic;
@ApiModelProperty("-1=stop by error, 0=no control, 1=control")
private Integer controlMethod;
@ApiModelProperty("绿波关键路口")
private String keyCross;
private List<DirGreenDetail> dirGreenDetails;
......
......@@ -213,6 +213,7 @@ public class GreenBeltInfoServiceImpl implements GreenBeltInfoService {
greenBeltOptInfoVO.setDynamic(kafkaDTO.getDynamic());
greenBeltOptInfoVO.setControlMethod(kafkaDTO.getControlMethod());
greenBeltOptInfoVO.setDirGreenDetails(null);
greenBeltOptInfoVO.setKeyCross(kafkaDTO.getKeyCross());
return greenBeltOptInfoVO;
}
// 正反绿波容器
......@@ -232,6 +233,7 @@ public class GreenBeltInfoServiceImpl implements GreenBeltInfoService {
greenBeltOptInfoVO.setDynamic(kafkaDTO.getDynamic());
greenBeltOptInfoVO.setControlMethod(kafkaDTO.getControlMethod());
greenBeltOptInfoVO.setDirGreenDetails(dirGreenDetails);
greenBeltOptInfoVO.setKeyCross(kafkaDTO.getKeyCross());
return greenBeltOptInfoVO;
}
......@@ -259,6 +261,7 @@ public class GreenBeltInfoServiceImpl implements GreenBeltInfoService {
entity.setMinSpeed(dirGreenDetail.getMinSpeed());
entity.setGreenWidthTime(dirGreenDetail.getGreenWidthTime());
entity.setCrossGreenDetail(JacksonUtils.getInstance().writeValueAsString(dirGreenDetail.getCrossGreenDetailList()));
entity.setKeyCross(infoVO.getKeyCross());
strategyGreenOptHistMapper.insert(entity);
}
}
......
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