Commit fe61a44a authored by zhoushiguang's avatar zhoushiguang

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	wj-databus/src/main/java/net/wanji/databus/po/CrossDataRealtimePO.java
parents eee551f9 d5d6d0de
...@@ -278,6 +278,18 @@ public class TrendController { ...@@ -278,6 +278,18 @@ public class TrendController {
} }
@ApiOperation(value = "干线交通状态", notes = "干线交通状态", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/greenStatusTimeRate")
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = CrossStatusTimeRateVO.class),
})
public JsonViewObject greenStatusTimeRate(Integer greenId) throws Exception {
GreenStatusTimeRateVO crossStatusTimeRateVO = trendService.greenStatusTimeRate(greenId);
return JsonViewObject.newInstance().success(crossStatusTimeRateVO);
}
@ApiOperation(value = "车道交通指标", notes = "车道交通指标", response = JsonViewObject.class, @ApiOperation(value = "车道交通指标", notes = "车道交通指标", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/laneTrafficIndex", @PostMapping(value = "/laneTrafficIndex",
......
...@@ -3,6 +3,7 @@ package net.wanji.opt.controller.induce; ...@@ -3,6 +3,7 @@ package net.wanji.opt.controller.induce;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -20,10 +21,7 @@ import javax.annotation.Resource; ...@@ -20,10 +21,7 @@ import javax.annotation.Resource;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -175,12 +173,30 @@ public class InduceTemplateController { ...@@ -175,12 +173,30 @@ public class InduceTemplateController {
*/ */
@ApiOperation(value = "修改记录", notes = "修改记录", response = JsonViewObject.class, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) @ApiOperation(value = "修改记录", notes = "修改记录", response = JsonViewObject.class, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/updating", produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) @PostMapping(value = "/updating", produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
JsonViewObject update(@ApiParam(value = "记录的JSON格式字符串", required = true) @RequestBody @Validated({ValidationGroups.Update.class}) InduceTemplate induceTemplate){ JsonViewObject update(@ApiParam(value = "记录的JSON格式字符串", required = true) @RequestBody @Validated({ValidationGroups.Update.class}) InduceTemplate induceTemplate) {
JsonViewObject jsonView = JsonViewObject.newInstance(); JsonViewObject jsonView = JsonViewObject.newInstance();
long start=System.currentTimeMillis(); long start = System.currentTimeMillis();
try { try {
if (induceTemplate != null) { if (induceTemplate != null) {
jsonView = this.induceTemplateService.saveOrUpdate(induceTemplate)?jsonView.success():jsonView.fail(); //更新默认模板
if (Objects.nonNull(induceTemplate.getEquipCode())) {
LambdaQueryWrapper<InduceTemplate> induceTemplateQueryWrapper = new LambdaQueryWrapper<>();
induceTemplateQueryWrapper.eq(InduceTemplate::getEquipCode, induceTemplate.getEquipCode());
induceTemplateQueryWrapper.eq(InduceTemplate::getDefaultTemplate, 1);//筛选默认模板进行自动发送,目前屏幕轮播参数无效
List<InduceTemplate> induceTemplateList = this.induceTemplateService.list(induceTemplateQueryWrapper);
induceTemplateList.stream().forEach(o -> {
if (!o.getId().equals(induceTemplate.getId())) {
o.setDefaultTemplate(0);
}
});
try {
this.induceTemplateService.saveOrUpdateBatch(induceTemplateList);
} catch (Exception ex) {
log.error("default template batch update error, jsonStr:{}", JSON.toJSONString(induceTemplate), ex);
}
}
induceTemplate.setDefaultTemplate(1);//设为默认模板
jsonView = this.induceTemplateService.saveOrUpdate(induceTemplate) ? jsonView.success() : jsonView.fail();
} }
} catch (Exception e) { } catch (Exception e) {
jsonView.fail(I18nResourceBundle.getConstants("UPDATE_FAILED_MSG")); jsonView.fail(I18nResourceBundle.getConstants("UPDATE_FAILED_MSG"));
......
...@@ -79,6 +79,12 @@ public class InduceTemplate implements Serializable { ...@@ -79,6 +79,12 @@ public class InduceTemplate implements Serializable {
@TableField("text_sign") @TableField("text_sign")
private Boolean textSign; private Boolean textSign;
/**
* 是否默认模板 0:否 1:是
*/
@TableField("default_template")
private Integer defaultTemplate=0;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -59,6 +59,7 @@ public interface TrendService { ...@@ -59,6 +59,7 @@ public interface TrendService {
List<Top5IndexVO> top5Flow() throws Exception; List<Top5IndexVO> top5Flow() throws Exception;
CrossStatusTimeRateVO crossStatusTimeRate(CommonCrossIdVO commonCrossIdVO) throws Exception; CrossStatusTimeRateVO crossStatusTimeRate(CommonCrossIdVO commonCrossIdVO) throws Exception;
GreenStatusTimeRateVO greenStatusTimeRate(Integer greenId) throws Exception;
List<TableQueryVO.CycleDataElement> laneTrafficIndex(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception; List<TableQueryVO.CycleDataElement> laneTrafficIndex(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception;
......
...@@ -1948,6 +1948,60 @@ public class TrendServiceImpl implements TrendService { ...@@ -1948,6 +1948,60 @@ public class TrendServiceImpl implements TrendService {
return hotspotCrossVOS; return hotspotCrossVOS;
} }
@Override
public GreenStatusTimeRateVO greenStatusTimeRate(Integer greenId) throws Exception {
try {
GreenStatusTimeRateVO greenStatusTimeRateVO = new GreenStatusTimeRateVO();
Date date = new Date();
long time = date.getTime() / 1000;
Instant instant = Instant.ofEpochSecond(time);
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.of("+8"));
// 00:00
LocalDateTime startOfDay = localDateTime.withHour(0).withMinute(0).withSecond(0);
int startBatchTime = Long.valueOf(Date.from(startOfDay.atZone(ZoneId.of("+8")).toInstant()).getTime() / 1000).intValue();
// 23:59
LocalDateTime endOfDay = startOfDay.plus(1, ChronoUnit.DAYS).minus(1, ChronoUnit.SECONDS);
int endBatchTime = Long.valueOf(Date.from(endOfDay.atZone(ZoneId.of("+8")).toInstant()).getTime() / 1000).intValue();
LambdaQueryWrapper<GreenwaveHistPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GreenwaveHistPO::getGreenId, greenId);
queryWrapper.ge(GreenwaveHistPO::getBatchTime, startBatchTime);
queryWrapper.le(GreenwaveHistPO::getBatchTime, endBatchTime);
List<GreenwaveHistPO> greenwaveHistPOS = greenwaveHistMapper.selectList(queryWrapper);
if (!CollectionUtils.isEmpty(greenwaveHistPOS)) {
int size = greenwaveHistPOS.size();
int unblockedTimeRate = 0;
int slowTimeRate = 0;
int congestionTimeRate = 0;
for (GreenwaveHistPO greenwaveHistPO : greenwaveHistPOS) {
Integer status = greenwaveHistPO.getStatus();
if (status == 1 || status == 5) {
unblockedTimeRate += 1;
}
if (status == 2) {
slowTimeRate += 1;
}
if (status == 3 || status == 4) {
congestionTimeRate += 1;
}
}
greenStatusTimeRateVO.setUnblockedTimeRate(getRate(unblockedTimeRate, size));
greenStatusTimeRateVO.setSlowTimeRate(getRate(slowTimeRate, size));
greenStatusTimeRateVO.setCongestionTimeRate(getRate(congestionTimeRate, size));
}
return greenStatusTimeRateVO;
} catch (Exception e) {
log.error("干线运行状态监测异常: ", e);
throw new RuntimeException(e);
}
}
private int getRate(int count, int size) {
float temp = count / (float) size * 100;
temp = temp < 1 ? 0 : temp;
int rate = Math.round(temp);
return rate;
}
@Override @Override
public CrossStatusTimeRateVO crossStatusTimeRate(CommonCrossIdVO commonCrossIdVO) throws Exception { public CrossStatusTimeRateVO crossStatusTimeRate(CommonCrossIdVO commonCrossIdVO) throws Exception {
......
...@@ -45,4 +45,6 @@ public class StrategyControlDataEntity extends PageVO { ...@@ -45,4 +45,6 @@ public class StrategyControlDataEntity extends PageVO {
private String crossName; private String crossName;
@TableField(exist = false) @TableField(exist = false)
private String wkt; private String wkt;
@TableField(exist = false)
private String optMethod;
} }
...@@ -264,7 +264,9 @@ public class StrategyControlServiceImpl implements StrategyControlService { ...@@ -264,7 +264,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
String crossId = baseCrossInfoPO.getId(); String crossId = baseCrossInfoPO.getId();
strategyControlDataEntity.setBizType(0); strategyControlDataEntity.setBizType(0);
strategyControlDataEntity.setBizId(baseCrossInfoPO.getId()); strategyControlDataEntity.setBizId(baseCrossInfoPO.getId());
strategyControlDataEntity.setStrategy(null); // 转化成 0 畅通 1失衡 2拥堵 3溢出 4死锁 5空放 6干线拥堵 7干线缓行 8干线畅通
strategyControlDataEntity.setStrategy(0);
strategyControlDataEntity.setOptMethod("均衡调控");
strategyControlDataEntity.setTime(null); strategyControlDataEntity.setTime(null);
strategyControlDataEntity.setStatus(0); strategyControlDataEntity.setStatus(0);
if (map.containsKey(crossId)) { if (map.containsKey(crossId)) {
...@@ -286,7 +288,7 @@ public class StrategyControlServiceImpl implements StrategyControlService { ...@@ -286,7 +288,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
String greenId = String.valueOf(greenwaveInfoPO.getId()); String greenId = String.valueOf(greenwaveInfoPO.getId());
strategyControlDataEntity.setBizType(1); strategyControlDataEntity.setBizType(1);
strategyControlDataEntity.setBizId(String.valueOf(greenId)); strategyControlDataEntity.setBizId(String.valueOf(greenId));
strategyControlDataEntity.setStrategy(null); strategyControlDataEntity.setStrategy(8);
strategyControlDataEntity.setTime(null); strategyControlDataEntity.setTime(null);
strategyControlDataEntity.setStatus(0); strategyControlDataEntity.setStatus(0);
if (map.containsKey(greenId)) { if (map.containsKey(greenId)) {
...@@ -389,6 +391,7 @@ public class StrategyControlServiceImpl implements StrategyControlService { ...@@ -389,6 +391,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
result.setWkt(greenwaveInfoPO.getWkt()); result.setWkt(greenwaveInfoPO.getWkt());
} }
} }
result.setOptMethod(StrategyControlEnum.getMethod(result.getStrategy()));
results.add(result); results.add(result);
} }
return results; return results;
......
...@@ -55,7 +55,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService { ...@@ -55,7 +55,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService {
GreenBeltAreaIndexVO.DirDetail dirDetail = new GreenBeltAreaIndexVO.DirDetail(); GreenBeltAreaIndexVO.DirDetail dirDetail = new GreenBeltAreaIndexVO.DirDetail();
String roadDirection = realtimePO.getRoadDirection(); String roadDirection = realtimePO.getRoadDirection();
dirDetail.setDirName(GreenBeltDirEnum.getDesc(roadDirection)); dirDetail.setDirName(GreenBeltDirEnum.getDesc(roadDirection));
dirDetail.setTravelTime(realtimePO.getTrvalTime() / 60); dirDetail.setTravelTime(realtimePO.getTrvalTime());
dirDetail.setStopTimes(realtimePO.getStopTimes()); dirDetail.setStopTimes(realtimePO.getStopTimes());
status = status >= realtimePO.getStatus() ? status : realtimePO.getStatus(); status = status >= realtimePO.getStatus() ? status : realtimePO.getStatus();
dirDetails.add(dirDetail); dirDetails.add(dirDetail);
...@@ -156,18 +156,19 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService { ...@@ -156,18 +156,19 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService {
private static GreenBeltChartVO calGreenChart(GreenBeltInfoVO greenBeltInfoVO) throws JsonProcessingException { private static GreenBeltChartVO calGreenChart(GreenBeltInfoVO greenBeltInfoVO) throws JsonProcessingException {
ObjectMapper mapper = JacksonUtils.getInstance(); ObjectMapper mapper = JacksonUtils.getInstance();
Map<String, List<List<Double>>> crossRedTimesMap = new TreeMap<>(); Map<String, List<List<Double>>> crossRedTimesMap = new LinkedHashMap<>();
Map<String, List<List<Double>>> backCrossRedTimesMap = new TreeMap<>(); Map<String, List<List<Double>>> backCrossRedTimesMap = new LinkedHashMap<>();
Map<String, Double> crossGreenStartMap = new TreeMap<>(); Map<String, Double> crossGreenStartMap = new LinkedHashMap<>();
Map<String, Double> backCrossGreenStartMap = new TreeMap<>(); Map<String, Double> backCrossGreenStartMap = new LinkedHashMap<>();
Map<String, Double> distanceMap = new TreeMap<>(); Map<String, Double> distanceMap = new LinkedHashMap<>();
Map<String, Double> backDistanceMap = new TreeMap<>(); Map<String, Double> backDistanceMap = new LinkedHashMap<>();
String decideSpeed = ""; String decideSpeed = "";
String backDecideSpeed = ""; String backDecideSpeed = "";
String crossSpeed = ""; String crossSpeed = "";
String backCrossSpeed = ""; String backCrossSpeed = "";
String travelTime = ""; String travelTime = "";
String backtravelTime = ""; String backtravelTime = "";
String offset = "";
// 处理绿波时序图数据 // 处理绿波时序图数据
List<GreenBeltInfoVO.DirGreenDetail> dirGreenDetails = greenBeltInfoVO.getDirGreenDetails(); List<GreenBeltInfoVO.DirGreenDetail> dirGreenDetails = greenBeltInfoVO.getDirGreenDetails();
Double greenWidthTime = 0.0; Double greenWidthTime = 0.0;
...@@ -191,6 +192,8 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService { ...@@ -191,6 +192,8 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService {
} }
} }
crossSpeed = mapper.writeValueAsString(integerList); crossSpeed = mapper.writeValueAsString(integerList);
List<Double> offsetList = list.stream().map(GreenBeltInfoVO.CrossGreenDetail::getOffset).collect(Collectors.toList());
offset = mapper.writeValueAsString(offsetList);
} }
if (dirType == 0) { if (dirType == 0) {
backDecideSpeed = String.join("~", String.valueOf(dirGreenDetail.getMinSpeed()), String.valueOf(dirGreenDetail.getMaxSpeed())); backDecideSpeed = String.join("~", String.valueOf(dirGreenDetail.getMinSpeed()), String.valueOf(dirGreenDetail.getMaxSpeed()));
...@@ -214,6 +217,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService { ...@@ -214,6 +217,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService {
GreenBeltChartVO greenBeltChartVO = new GreenBeltChartVO(); GreenBeltChartVO greenBeltChartVO = new GreenBeltChartVO();
greenBeltChartVO.setGreenWidthTime(greenWidthTime); greenBeltChartVO.setGreenWidthTime(greenWidthTime);
greenBeltChartVO.setBackGreenWidthTime(backGreenWidthTime); greenBeltChartVO.setBackGreenWidthTime(backGreenWidthTime);
greenBeltChartVO.setCrossRedTimesMap(mapper.writeValueAsString(crossRedTimesMap)); greenBeltChartVO.setCrossRedTimesMap(mapper.writeValueAsString(crossRedTimesMap));
greenBeltChartVO.setBackCrossRedTimesMap(mapper.writeValueAsString(backCrossRedTimesMap)); greenBeltChartVO.setBackCrossRedTimesMap(mapper.writeValueAsString(backCrossRedTimesMap));
greenBeltChartVO.setGreenStartMap(mapper.writeValueAsString(crossGreenStartMap)); greenBeltChartVO.setGreenStartMap(mapper.writeValueAsString(crossGreenStartMap));
...@@ -225,6 +229,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService { ...@@ -225,6 +229,7 @@ public class StrategyGreenBeltServiceImpl implements StrategyGreenBeltService {
greenBeltChartVO.setBackTravelTime(backtravelTime); greenBeltChartVO.setBackTravelTime(backtravelTime);
greenBeltChartVO.setCrossSpeed(crossSpeed); greenBeltChartVO.setCrossSpeed(crossSpeed);
greenBeltChartVO.setBackCrossSpeed(backCrossSpeed); greenBeltChartVO.setBackCrossSpeed(backCrossSpeed);
greenBeltChartVO.setOffset(offset);
return greenBeltChartVO; return greenBeltChartVO;
} }
......
...@@ -230,12 +230,13 @@ public class InducesMonitorTask { ...@@ -230,12 +230,13 @@ public class InducesMonitorTask {
for(GreenwaveInduces greenwaveCross :greenwaveInducesList){ for(GreenwaveInduces greenwaveCross :greenwaveInducesList){
LambdaQueryWrapper<InduceTemplate> induceTemplateQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<InduceTemplate> induceTemplateQueryWrapper = new LambdaQueryWrapper<>();
induceTemplateQueryWrapper.eq(InduceTemplate::getEquipCode, greenwaveCross.getEquipCode()); induceTemplateQueryWrapper.eq(InduceTemplate::getEquipCode, greenwaveCross.getEquipCode());
induceTemplateQueryWrapper.eq(InduceTemplate::getDefaultTemplate, 1);//筛选默认模板进行自动发送,目前屏幕轮播参数无效
List<InduceTemplate> induceTemplateList=induceTemplateService.list(induceTemplateQueryWrapper); List<InduceTemplate> induceTemplateList=induceTemplateService.list(induceTemplateQueryWrapper);
for(InduceTemplate induceTemplate:induceTemplateList) { for(InduceTemplate induceTemplate:induceTemplateList) {
messageParam.setTemplateId(induceTemplate.getId()); messageParam.setTemplateId(induceTemplate.getId());
messageParam.setInduceId(greenwaveCross.getId()); messageParam.setInduceId(greenwaveCross.getId());
messageParam.setEquipCode(greenwaveCross.getEquipCode()); messageParam.setEquipCode(greenwaveCross.getEquipCode());
messageParam.setPlayorder(induceTemplateList.size()); messageParam.setPlayorder(1);//induceTemplateList.size()
messageParam.setDuration(greenwaveCross.getDuration()); messageParam.setDuration(greenwaveCross.getDuration());
if ( greenwaveInducesHist.getControlOptTimes().split("\\|").length > 0 && DateUtil.isBetween(new Date(), DateUtil.parse(greenwaveInducesHist.getControlOptTimes().split("\\|")[0], Constants.DATE_FORMAT.E_DATE_FORMAT_SECOND), DateUtil.parse(greenwaveInducesHist.getControlOptTimes().split("\\|")[1], Constants.DATE_FORMAT.E_DATE_FORMAT_SECOND))) { if ( greenwaveInducesHist.getControlOptTimes().split("\\|").length > 0 && DateUtil.isBetween(new Date(), DateUtil.parse(greenwaveInducesHist.getControlOptTimes().split("\\|")[0], Constants.DATE_FORMAT.E_DATE_FORMAT_SECOND), DateUtil.parse(greenwaveInducesHist.getControlOptTimes().split("\\|")[1], Constants.DATE_FORMAT.E_DATE_FORMAT_SECOND))) {
messageParam.setStartTime(greenwaveInducesHist.getControlOptTimes().split("\\|")[0]); messageParam.setStartTime(greenwaveInducesHist.getControlOptTimes().split("\\|")[0]);
......
...@@ -47,6 +47,7 @@ public class GreenBeltChartVO { ...@@ -47,6 +47,7 @@ public class GreenBeltChartVO {
private String backTravelTime; private String backTravelTime;
private String crossSpeed; private String crossSpeed;
private String backCrossSpeed; private String backCrossSpeed;
private String offset;
@JsonCreator @JsonCreator
public GreenBeltChartVO(){ public GreenBeltChartVO(){
......
package net.wanji.opt.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author duanruiming
* @date 2024/12/09 15:00
*/
@Data
@NoArgsConstructor
@ApiModel(value = "GreenStatusTimeRateVO")
public class GreenStatusTimeRateVO {
@ApiModelProperty(value = "干线ID")
private Integer greenId;
@ApiModelProperty(value = "干线拥堵")
private int congestionTimeRate;
@ApiModelProperty(value = "干线缓行")
private int slowTimeRate;
@ApiModelProperty(value = "干线畅通")
private int unblockedTimeRate;
}
...@@ -211,8 +211,6 @@ public class CrossDataRealtimePO { ...@@ -211,8 +211,6 @@ public class CrossDataRealtimePO {
@ApiModelProperty(value = "是否空放 0否 1是", notes = "") @ApiModelProperty(value = "是否空放 0否 1是", notes = "")
@TableField("empty_pass") @TableField("empty_pass")
private Integer emptyPass; private Integer emptyPass;
@ApiModelProperty(value = "服务水平[A-F]", notes = "")
@TableField("service_level") @TableField("service_level")
private String serviceLevel; private String serviceLevel;
} }
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<result column="optimize_count" property="optimizeCount"></result> <result column="optimize_count" property="optimizeCount"></result>
<result column="optimize_seconds" property="optimizeSeconds"></result> <result column="optimize_seconds" property="optimizeSeconds"></result>
<result column="empty_pass" property="emptyPass"></result> <result column="empty_pass" property="emptyPass"></result>
<result column="service_level" property="serviceLevel"></result>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
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 strategy, strategy_duration, optimize_count, optimize_seconds, empty_pass, service_level
</sql> </sql>
<insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataHistPO"> <insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataHistPO">
...@@ -75,7 +76,8 @@ ...@@ -75,7 +76,8 @@
#{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.strategyDuration}, #{entity.optimizeCount}, #{entity.optimizeSeconds}, #{entity.emptyPass} #{entity.strategy}, #{entity.strategyDuration}, #{entity.optimizeCount}, #{entity.optimizeSeconds},
#{entity.emptyPass}, #{entity.serviceLevel}
) )
</foreach> </foreach>
</insert> </insert>
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<result column="optimize_seconds" property="optimizeSeconds"></result> <result column="optimize_seconds" property="optimizeSeconds"></result>
<result column="empty_pass" property="emptyPass"></result> <result column="empty_pass" property="emptyPass"></result>
<result column="strategy" property="strategy"></result> <result column="strategy" property="strategy"></result>
<result column="service_level" property="serviceLevel"></result>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
load_balance,not_clear_car_nums,green_light_efficiency,effusion_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 strategy, strategy_duration, optimize_count, optimize_seconds, empty_pass, service_level
</sql> </sql>
<insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataRealtimePO"> <insert id="insertBatch" parameterType="net.wanji.databus.po.CrossDataRealtimePO">
...@@ -75,7 +76,8 @@ ...@@ -75,7 +76,8 @@
#{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.strategyDuration}, #{entity.optimizeCount}, #{entity.optimizeSeconds}, #{entity.emptyPass} #{entity.strategy}, #{entity.strategyDuration}, #{entity.optimizeCount}, #{entity.optimizeSeconds}, #{entity.emptyPass},
#{entity.serviceLevel}
) )
</foreach> </foreach>
</insert> </insert>
...@@ -93,7 +95,7 @@ ...@@ -93,7 +95,7 @@
select select
t2.id, t2.name, t2.is_signal, t1.unbalance_dirs, t1.congestion_dirs, t1.spillover_dirs, t1.status as realtimeStatus, t2.id, t2.name, t2.is_signal, t1.unbalance_dirs, t1.congestion_dirs, t1.spillover_dirs, t1.status as realtimeStatus,
t1.start_time, t1.duration, t2.location as locationStr, t1.is_unbalance, t1.is_spillover, t1.is_congestion, t1.start_time, t1.duration, t2.location as locationStr, t1.is_unbalance, t1.is_spillover, t1.is_congestion,
t1.congestion_index, t1.unbalance_index, t1.spillover_index, t1.batch_time, t1.traffic_index t1.congestion_index, t1.unbalance_index, t1.spillover_index, t1.batch_time, t1.traffic_index, t1.service_level
from t_cross_data_realtime t1 JOIN t_base_cross_info t2 from t_cross_data_realtime t1 JOIN t_base_cross_info t2
on t1.cross_id = t2.id on t1.cross_id = t2.id
<where> <where>
......
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