Commit b6cf3c68 authored by duanruiming's avatar duanruiming

Merge remote-tracking branch 'origin/master'

parents b06b3bc4 6d8bedef
......@@ -12,13 +12,13 @@ import net.wanji.opt.bo.BottomMenuBO;
import net.wanji.opt.bo.MainlineSchemeAnalysisBO;
import net.wanji.opt.service.impl.MainlineEvaluateServiceImpl;
import net.wanji.opt.vo.MainlineEvaluateBottomCurveVO;
import net.wanji.opt.vo.MainlineListVO;
import net.wanji.opt.vo.MainlineSchemeAnalysisVO;
import org.springframework.web.bind.annotation.*;
import javax.ws.rs.core.MediaType;
import java.text.ParseException;
import java.util.List;
import java.util.Set;
@Api(value = "MainlineEvaluateController", description = "干线评价")
@RequestMapping("/mainlineEvaluate")
......@@ -59,7 +59,7 @@ public class MainlineEvaluateController {
@ApiOperation(value = "干线列表", notes = "干线列表")
@GetMapping("/mainlineList")
public JsonViewObject mainlineList() {
Set<String> res = mainlineEvaluateService.mainlineList();
List<MainlineListVO> res = mainlineEvaluateService.mainlineList();
return JsonViewObject.newInstance().success(res);
}
......
......@@ -20,6 +20,7 @@ public class SceneStrategyPO {
/** 策略ID */
@ApiModelProperty(name = "策略ID",notes = "")
private Integer strategyId ;
@ApiModelProperty(name = "优先级",notes = "")
private Integer sceneStrategyPriority ;
/** 创建时间 */
......
......@@ -4,11 +4,11 @@ import net.wanji.opt.bo.BottomCurveBO;
import net.wanji.opt.bo.BottomMenuBO;
import net.wanji.opt.bo.MainlineSchemeAnalysisBO;
import net.wanji.opt.vo.MainlineEvaluateBottomCurveVO;
import net.wanji.opt.vo.MainlineListVO;
import net.wanji.opt.vo.MainlineSchemeAnalysisVO;
import java.text.ParseException;
import java.util.List;
import java.util.Set;
public interface MainlineEvaluateService {
......@@ -16,7 +16,7 @@ public interface MainlineEvaluateService {
List<MainlineEvaluateBottomCurveVO> bottomCurve(BottomCurveBO bo) throws ParseException;
Set<String> mainlineList();
List<MainlineListVO> mainlineList();
MainlineSchemeAnalysisVO mainlineSchemeAnalysis(MainlineSchemeAnalysisBO bo);
}
package net.wanji.opt.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.wanji.databus.vo.CrossIdAndNameVO;
import java.util.List;
/**
* @author Kent HAN
* @date 2023/2/9 8:38
*/
@Data
@NoArgsConstructor
@ApiModel(value = "MainlineListVO", description = "干线列表")
public class MainlineListVO {
@ApiModelProperty(value = "干线名称")
private String mainlineName;
@ApiModelProperty(value = "路口列表")
private List<CrossIdAndNameVO> crossList;
@ApiModelProperty(value = "干线坐标")
private String wkt;
}
......@@ -9,7 +9,9 @@ public class StrategyAndMetricsEnum {
public enum Strategy {
BALANCE("100030", "均衡调控"),
EFFICIENCY("100152", "效率提升"),
SECURITY("100010", "安全保障");
SECURITY("100010", "安全保障"),
LINE_EFFICIENCY("200001", "干线效率提升"),
LINE_BALANCE("200002", "干线均衡调控");
private final String code;
private final String msg;
......
......@@ -10,6 +10,12 @@ import lombok.Data;
@Data
public class GreenwaveHistPO extends GreenwaveRealtimePO{
@ApiModelProperty(value = "绿波名称",notes = "")
private String greenwaveName ;
@ApiModelProperty(value = "绿波名称")
private String greenwaveName;
@ApiModelProperty(value = "协调方向:0正向;1反向;2双向")
private Integer dir;
@ApiModelProperty(value = "时段ID")
private Integer sectionId;
}
......@@ -28,4 +28,6 @@ public interface CrossDataHistMapper extends BaseMapper<CrossDataHistPO> {
Double selectMaxSaturation(String crossId, int startStamp, int endStamp);
Integer selectCrossEmergencyCount(String crossId, int startStamp, int endStamp);
List<CrossDataHistPO> selectByCrossIdsAndTimestamp(List<String> crossIdList, int startTimeStamp, int endTimeStamp);
}
......@@ -12,4 +12,6 @@ import java.util.List;
@Repository
public interface GreenwaveCrossMapper {
List<GreenwaveCrossPO> selectByGreenwaveId(Integer id);
GreenwaveCrossPO selectByGreenwaveIdAndKeyRoute(Integer greenwaveId);
}
......@@ -12,4 +12,6 @@ public interface GreenwaveSceneMapper {
void deleteByGreenwaveId(Integer greenwaveId);
void insertOne(GreenwaveScenePO greenwaveScenePO);
GreenwaveScenePO selectByGreenwaveId(Integer greenwaveId);
}
......@@ -112,4 +112,16 @@
AND cross_id = #{crossId}
</select>
<select id="selectByCrossIdsAndTimestamp" resultType="net.wanji.databus.po.CrossDataHistPO">
select <include refid="Base_Column_List"></include>
from t_cross_data_hist
where cross_id in
<foreach collection="crossIdList" item="crossId" separator="," open="(" close=")">
#{crossId}
</foreach>
and batch_time <![CDATA[ >= ]]> #{startTimeStamp}
and batch_time <![CDATA[ <= ]]> #{endTimeStamp}
order by batch_time
</select>
</mapper>
\ No newline at end of file
......@@ -2,13 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.databus.dao.mapper.GreenwaveCrossMapper">
<sql id="Base_Column_List">
id,green_id,cross_id,in_dir,out_dir,offset,sort,section_id,next_cross_len,is_key_route,gmt_create,gmt_modified
</sql>
<select id="selectByGreenwaveId" resultType="net.wanji.databus.dao.entity.GreenwaveCrossPO">
select
id,green_id,cross_id,in_dir,out_dir,offset,sort,section_id,next_cross_len,is_key_route,gmt_create,gmt_modified
select <include refid="Base_Column_List"/>
from t_greenwave_cross
where green_id = #{id}
order by sort
</select>
<select id="selectByGreenwaveIdAndKeyRoute" resultType="net.wanji.databus.dao.entity.GreenwaveCrossPO">
select <include refid="Base_Column_List"/>
from t_greenwave_cross
where green_id = #{id} and is_key_route = 1
</select>
</mapper>
......@@ -27,7 +27,7 @@
<select id="selectByTimeSection" resultType="net.wanji.databus.dao.entity.GreenwaveHistPO">
select t1.id,t1.status,t1.type,t1.traffic_index,t1.speed,t1.trval_time,t1.stop_times,t1.queue_length,
t1.cong_rate,t1.delay_time,t1.nopark_pass_rate,t1.cord_reliability,t1.cord_queue_ratio,
t1.uncoordinate_phase_queue,t1.gmt_create,t1.gmt_modified, t2.name as greenwaveName
t1.uncoordinate_phase_queue,t1.gmt_create,t1.gmt_modified, t2.name as greenwaveName, t2.dir, t2.section_id
from t_greenwave_hist t1 join t_greenwave_info t2 on t1.id = t2.id
where t1.gmt_modified <![CDATA[ <= ]]> #{endTimeStr}
and t1.gmt_modified <![CDATA[ >= ]]> #{startTimeStr}
......
......@@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="net.wanji.databus.dao.mapper.GreenwaveSceneMapper">
<sql id="Base_Column_List">
id,greenwave_id,scene_id,gmt_create,gmt_modified
</sql>
<insert id="insertOne">
insert into t_greenwave_scene(greenwave_id,scene_id)
......@@ -10,7 +13,13 @@
<delete id="deleteByGreenwaveId">
delete from t_greenwave_scene
where greenwave_id = ${greenwaveId}
where greenwave_id = #{greenwaveId}
</delete>
<select id="selectByGreenwaveId" resultType="net.wanji.databus.po.GreenwaveScenePO">
select <include refid="Base_Column_List"/>
from t_greenwave_scene
where greenwave_id = #{greenwaveId}
</select>
</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