Commit 73aad604 authored by duanruiming's avatar duanruiming

[add] 增加绿波rid表查询

parent 4989b034
...@@ -241,93 +241,99 @@ ...@@ -241,93 +241,99 @@
</attributes> </attributes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<!--<version>2.6</version>--> <!-- &lt;!&ndash; mavenjar打包方式&ndash;&gt;-->
<executions> <!-- <plugin>-->
<!--将启动脚本复制到指定目录--> <!-- <artifactId>maven-resources-plugin</artifactId>-->
<execution> <!-- &lt;!&ndash;<version>2.6</version>&ndash;&gt;-->
<id>copy-bin</id> <!-- <executions>-->
<phase>package</phase> <!-- &lt;!&ndash;将启动脚本复制到指定目录&ndash;&gt;-->
<goals> <!-- <execution>-->
<goal>copy-resources</goal> <!-- <id>copy-bin</id>-->
</goals> <!-- <phase>package</phase>-->
<configuration> <!-- <goals>-->
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/bin</outputDirectory> <!-- <goal>copy-resources</goal>-->
<resources> <!-- </goals>-->
<resource> <!-- <configuration>-->
<directory>src/main/bin</directory> <!-- <outputDirectory>${project.parent.basedir}/assembly/${project.name}/bin</outputDirectory>-->
<filtering>false</filtering> <!-- <resources>-->
</resource> <!-- <resource>-->
</resources> <!-- <directory>src/main/bin</directory>-->
</configuration> <!-- <filtering>false</filtering>-->
</execution> <!-- </resource>-->
<!--将配置文件复制到指定目录--> <!-- </resources>-->
<execution> <!-- </configuration>-->
<id>copy-configs</id> <!-- </execution>-->
<phase>package</phase> <!-- &lt;!&ndash;将配置文件复制到指定目录&ndash;&gt;-->
<goals> <!-- <execution>-->
<goal>copy-resources</goal> <!-- <id>copy-configs</id>-->
</goals> <!-- <phase>package</phase>-->
<configuration> <!-- <goals>-->
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/resources <!-- <goal>copy-resources</goal>-->
</outputDirectory> <!-- </goals>-->
<resources> <!-- <configuration>-->
<resource> <!-- <outputDirectory>${project.parent.basedir}/assembly/${project.name}/resources-->
<directory>src/main/resources</directory> <!-- </outputDirectory>-->
<excludes> <!-- <resources>-->
<exclude>**/bin/*</exclude> <!-- <resource>-->
</excludes> <!-- <directory>src/main/resources</directory>-->
</resource> <!-- <excludes>-->
</resources> <!-- <exclude>**/bin/*</exclude>-->
</configuration> <!-- </excludes>-->
</execution> <!-- </resource>-->
</executions> <!-- </resources>-->
</plugin> <!-- </configuration>-->
<plugin> <!-- </execution>-->
<groupId>org.apache.maven.plugins</groupId> <!-- </executions>-->
<artifactId>maven-dependency-plugin</artifactId> <!-- </plugin>-->
<version>2.8</version> <!-- <plugin>-->
<executions> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<!--将依赖jar包复制到lib目录--> <!-- <artifactId>maven-dependency-plugin</artifactId>-->
<execution> <!-- <version>2.8</version>-->
<id>copy-dependencies</id> <!-- <executions>-->
<phase>package</phase> <!-- &lt;!&ndash;将依赖jar包复制到lib目录&ndash;&gt;-->
<goals> <!-- <execution>-->
<goal>copy-dependencies</goal> <!-- <id>copy-dependencies</id>-->
</goals> <!-- <phase>package</phase>-->
<configuration> <!-- <goals>-->
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory> <!-- <goal>copy-dependencies</goal>-->
</configuration> <!-- </goals>-->
</execution> <!-- <configuration>-->
</executions> <!-- <outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory>-->
</plugin> <!-- </configuration>-->
<plugin> <!-- </execution>-->
<!--指定生成jar包目录--> <!-- </executions>-->
<groupId>org.apache.maven.plugins</groupId> <!-- </plugin>-->
<artifactId>maven-jar-plugin</artifactId> <!-- <plugin>-->
<configuration> <!-- &lt;!&ndash;指定生成jar包目录&ndash;&gt;-->
<archive> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<manifest> <!-- <artifactId>maven-jar-plugin</artifactId>-->
<addClasspath>true</addClasspath> <!-- <configuration>-->
<!--<classpathPrefix>lib/</classpathPrefix>--> <!-- <archive>-->
<classpathPrefix></classpathPrefix> <!-- <manifest>-->
<mainClass> net.wanji.web.SignalApplication</mainClass> <!-- <addClasspath>true</addClasspath>-->
</manifest> <!-- &lt;!&ndash;<classpathPrefix>lib/</classpathPrefix>&ndash;&gt;-->
<manifestEntries> <!-- <classpathPrefix></classpathPrefix>-->
<Class-Path>../resources/</Class-Path> <!-- <mainClass>net.wanji.web.SignalApplication</mainClass>-->
</manifestEntries> <!-- </manifest>-->
</archive> <!-- <manifestEntries>-->
<excludes> <!-- <Class-Path>../resources/</Class-Path>-->
<exclude>*.**</exclude> <!-- </manifestEntries>-->
<exclude>*/*.xml</exclude> <!-- </archive>-->
<!--<exclude>configs/**/**</exclude>--> <!-- <excludes>-->
</excludes> <!-- <exclude>*.**</exclude>-->
<outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory> <!-- <exclude>*/*.xml</exclude>-->
<classesDirectory> <!-- &lt;!&ndash;<exclude>configs/**/**</exclude>&ndash;&gt;-->
</classesDirectory> <!-- </excludes>-->
</configuration> <!-- <outputDirectory>${project.parent.basedir}/assembly/${project.name}/lib</outputDirectory>-->
</plugin> <!-- <classesDirectory>-->
<!-- </classesDirectory>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- &lt;!&ndash; mavenjar打包方式end&ndash;&gt;-->
<!-- mvn clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true --> <!-- mvn clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true -->
<!-- 使用jib 无需深入学习docker, 无需编写Dockerfile --> <!-- 使用jib 无需深入学习docker, 无需编写Dockerfile -->
<plugin> <plugin>
...@@ -378,7 +384,7 @@ ...@@ -378,7 +384,7 @@
<port>32001</port> <port>32001</port>
<port>15116</port> <port>15116</port>
</ports> </ports>
<!-- <creationTime>2022-10-14T10:08:59.304+08:00</creationTime>--> <!-- <creationTime>2022-10-14T10:08:59.304+08:00</creationTime>-->
<creationTime>${maven.build.timestamp}</creationTime> <creationTime>${maven.build.timestamp}</creationTime>
<mainClass>net.wanji.web.SignalApplication</mainClass> <mainClass>net.wanji.web.SignalApplication</mainClass>
......
...@@ -5,10 +5,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -5,10 +5,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponses;
import net.wanji.common.framework.rest.JsonViewObject; import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.dao.entity.GreenwaveCrossPO; import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.entity.GreenwaveInfoPO;
import net.wanji.databus.dao.entity.LinkInfoEntity;
import net.wanji.databus.dao.entity.RidInfoEntity;
import net.wanji.databus.po.BaseCrossInfoPO; import net.wanji.databus.po.BaseCrossInfoPO;
import net.wanji.databus.po.CrossBaseLaneInfoPO; import net.wanji.databus.po.CrossBaseLaneInfoPO;
import net.wanji.databus.po.CrossTurnInfoPO; import net.wanji.databus.po.CrossTurnInfoPO;
...@@ -38,7 +35,7 @@ public class CrossBaseInfoController { ...@@ -38,7 +35,7 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/crossInfoList") @GetMapping(value = "/crossInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = BaseCrossInfoPO.class),
}) })
public JsonViewObject crossInfoList() { public JsonViewObject crossInfoList() {
List<BaseCrossInfoPO> baseCrossInfoPOS = baseInfoService.crossInfoList(); List<BaseCrossInfoPO> baseCrossInfoPOS = baseInfoService.crossInfoList();
...@@ -49,7 +46,7 @@ public class CrossBaseInfoController { ...@@ -49,7 +46,7 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/laneInfoList") @GetMapping(value = "/laneInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = CrossBaseLaneInfoPO.class),
}) })
public JsonViewObject laneInfoList() { public JsonViewObject laneInfoList() {
List<CrossBaseLaneInfoPO> crossBaseLaneInfoPOS = baseInfoService.laneInfoList(); List<CrossBaseLaneInfoPO> crossBaseLaneInfoPOS = baseInfoService.laneInfoList();
...@@ -60,7 +57,7 @@ public class CrossBaseInfoController { ...@@ -60,7 +57,7 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/ridInfoList") @GetMapping(value = "/ridInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = RidInfoEntity.class),
}) })
public JsonViewObject ridInfoList() { public JsonViewObject ridInfoList() {
List<RidInfoEntity> ridInfoEntities = baseInfoService.ridInfoList(); List<RidInfoEntity> ridInfoEntities = baseInfoService.ridInfoList();
...@@ -71,7 +68,7 @@ public class CrossBaseInfoController { ...@@ -71,7 +68,7 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/turnInfoList") @GetMapping(value = "/turnInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = CrossTurnInfoPO.class),
}) })
public JsonViewObject turnInfoList() { public JsonViewObject turnInfoList() {
List<CrossTurnInfoPO> crossTurnInfoPOS = baseInfoService.turnInfoList(); List<CrossTurnInfoPO> crossTurnInfoPOS = baseInfoService.turnInfoList();
...@@ -82,7 +79,7 @@ public class CrossBaseInfoController { ...@@ -82,7 +79,7 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/linkInfoList") @GetMapping(value = "/linkInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = LinkInfoEntity.class),
}) })
public JsonViewObject linkInfoList(String rid) { public JsonViewObject linkInfoList(String rid) {
List<LinkInfoEntity> linkInfoEntities = baseInfoService.linkInfoList(rid); List<LinkInfoEntity> linkInfoEntities = baseInfoService.linkInfoList(rid);
...@@ -94,18 +91,29 @@ public class CrossBaseInfoController { ...@@ -94,18 +91,29 @@ public class CrossBaseInfoController {
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/greenInfoList") @GetMapping(value = "/greenInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = GreenwaveInfoPO.class),
}) })
public JsonViewObject greenInfoList() { public JsonViewObject greenInfoList() {
List<GreenwaveInfoPO> greenwaveInfoPOS = baseInfoService.greenInfoList(); List<GreenwaveInfoPO> greenwaveInfoPOS = baseInfoService.greenInfoList();
return JsonViewObject.newInstance().success(greenwaveInfoPOS); return JsonViewObject.newInstance().success(greenwaveInfoPOS);
} }
@ApiOperation(value = "绿波路段基础信息查询", notes = "绿波路段基础信息查询", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@GetMapping(value = "/greenRidInfoList")
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = GreenwaveRidPO.class),
})
public JsonViewObject greenRidInfoList() {
List<GreenwaveRidPO> greenwaveRidPOS = baseInfoService.greenRidInfoList();
return JsonViewObject.newInstance().success(greenwaveRidPOS);
}
@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)
@GetMapping(value = "/greenCrossInfoList") @GetMapping(value = "/greenCrossInfoList")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = JsonViewObject.class), @ApiResponse(code = 200, message = "OK", response = GreenwaveCrossPO.class),
}) })
public JsonViewObject greenCrossInfoList() { public JsonViewObject greenCrossInfoList() {
List<GreenwaveCrossPO> greenwaveCrossPOS = baseInfoService.greenCrossInfoList(); List<GreenwaveCrossPO> greenwaveCrossPOS = baseInfoService.greenCrossInfoList();
......
package net.wanji.web.service; package net.wanji.web.service;
import net.wanji.databus.dao.entity.GreenwaveCrossPO; import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.entity.GreenwaveInfoPO;
import net.wanji.databus.dao.entity.LinkInfoEntity;
import net.wanji.databus.dao.entity.RidInfoEntity;
import net.wanji.databus.po.BaseCrossInfoPO; import net.wanji.databus.po.BaseCrossInfoPO;
import net.wanji.databus.po.CrossBaseLaneInfoPO; import net.wanji.databus.po.CrossBaseLaneInfoPO;
import net.wanji.databus.po.CrossTurnInfoPO; import net.wanji.databus.po.CrossTurnInfoPO;
...@@ -22,6 +19,7 @@ public interface BaseInfoService { ...@@ -22,6 +19,7 @@ public interface BaseInfoService {
List<CrossTurnInfoPO> turnInfoList(); List<CrossTurnInfoPO> turnInfoList();
List<GreenwaveInfoPO> greenInfoList(); List<GreenwaveInfoPO> greenInfoList();
List<GreenwaveCrossPO> greenCrossInfoList(); List<GreenwaveCrossPO> greenCrossInfoList();
List<GreenwaveRidPO> greenRidInfoList();
List<LinkInfoEntity> linkInfoList(String rid); List<LinkInfoEntity> linkInfoList(String rid);
} }
...@@ -3,10 +3,7 @@ package net.wanji.web.service.impl; ...@@ -3,10 +3,7 @@ package net.wanji.web.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.jsonwebtoken.lang.Objects; import io.jsonwebtoken.lang.Objects;
import io.netty.util.internal.StringUtil; import io.netty.util.internal.StringUtil;
import net.wanji.databus.dao.entity.GreenwaveCrossPO; import net.wanji.databus.dao.entity.*;
import net.wanji.databus.dao.entity.GreenwaveInfoPO;
import net.wanji.databus.dao.entity.LinkInfoEntity;
import net.wanji.databus.dao.entity.RidInfoEntity;
import net.wanji.databus.dao.mapper.*; import net.wanji.databus.dao.mapper.*;
import net.wanji.databus.po.BaseCrossInfoPO; import net.wanji.databus.po.BaseCrossInfoPO;
import net.wanji.databus.po.CrossBaseLaneInfoPO; import net.wanji.databus.po.CrossBaseLaneInfoPO;
...@@ -38,6 +35,8 @@ public class BaseInfoServiceImpl implements BaseInfoService { ...@@ -38,6 +35,8 @@ public class BaseInfoServiceImpl implements BaseInfoService {
private GreenwaveInfoMapper greenwaveInfoMapper; private GreenwaveInfoMapper greenwaveInfoMapper;
@Resource @Resource
private GreenwaveCrossMapper greenwaveCrossMapper; private GreenwaveCrossMapper greenwaveCrossMapper;
@Resource
private GreenwaveRidMapper greenwaveRidMapper;
@Resource @Resource
private LinkInfoMapper linkInfoMapper; private LinkInfoMapper linkInfoMapper;
...@@ -80,6 +79,13 @@ public class BaseInfoServiceImpl implements BaseInfoService { ...@@ -80,6 +79,13 @@ public class BaseInfoServiceImpl implements BaseInfoService {
return greenwaveCrossPOS; return greenwaveCrossPOS;
} }
@Override
public List<GreenwaveRidPO> greenRidInfoList() {
LambdaQueryWrapper<GreenwaveRidPO> queryWrapper = new LambdaQueryWrapper<>();
List<GreenwaveRidPO> greenwaveRidPOS = greenwaveRidMapper.selectList(queryWrapper);
return greenwaveRidPOS;
}
@Override @Override
public List<LinkInfoEntity> linkInfoList(String rid) { public List<LinkInfoEntity> linkInfoList(String rid) {
List<LinkInfoEntity> linkInfoEntities=new ArrayList<>(); List<LinkInfoEntity> linkInfoEntities=new ArrayList<>();
......
package net.wanji.opt.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @author duanruiming
* @date 2024/11/21 11:04
*/
@Data
@ApiModel(value = "GreenBeltChartVO", description = "绿波时序图返回实体")
@JsonIgnoreProperties(ignoreUnknown = true)
public class GreenBeltChartVO {
@ApiModelProperty("绿波路口红灯范围")
Map<String, List<Double[]>> crossRedTimesMap;
@ApiModelProperty("绿波路口绿波开始时间")
Map<String, Double> greenStartMap;
@ApiModelProperty("绿波路口距离下一个路口距离")
Map<String, Double> distanceMap;
@ApiModelProperty("绿波带宽")
private Double greenWidthTime;
}
package net.wanji.databus.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* @author duanruiming
* @date 2024/11/22 17:22
*/
@TableName("t_greenwave_rid")
@Data
public class GreenwaveRidPO {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableField("green_id")
private Integer greenId;
@TableField("cross_id")
private String crossId;
@TableField("crossdir_id")
private String crossDirId;
@TableField("rid")
private String rid;
@TableField("in_out_type")
private Integer inOutType;
@TableField("sort")
private Integer sort;
@TableField("gmt_create")
private Date gmtCreate;
@TableField("gmt_modified")
private Date gmtModified;
}
package net.wanji.databus.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.databus.dao.entity.GreenwaveRidPO;
import org.springframework.stereotype.Repository;
/**
* @author duanruiming
* @date 2024/11/22 17:30
*/
@Repository
public interface GreenwaveRidMapper extends BaseMapper<GreenwaveRidPO> {
}
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