Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
f0d18106
Commit
f0d18106
authored
Feb 03, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 通用持久层数据ridInfo
parent
3088091a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
246 additions
and
0 deletions
+246
-0
RidInfoEntity.java
...main/java/net/wanji/databus/dao/entity/RidInfoEntity.java
+149
-0
RidInfoMapper.java
...main/java/net/wanji/databus/dao/mapper/RidInfoMapper.java
+26
-0
RidInfoMapper.xml
wj-databus/src/main/resources/mapper/RidInfoMapper.xml
+71
-0
No files found.
wj-databus/src/main/java/net/wanji/databus/dao/entity/RidInfoEntity.java
0 → 100644
View file @
f0d18106
package
net
.
wanji
.
databus
.
dao
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author Kent HAN
* @date 2022/11/10 8:40
*/
@Data
public
class
RidInfoEntity
{
/**
* 路段编号(开始路口编号+结束路口编号+顺序号0)
*/
@ApiModelProperty
(
name
=
"路段编号(开始路口编号+结束路口编号+顺序号0)"
,
notes
=
""
)
private
String
id
;
/**
* 路段名称
*/
@ApiModelProperty
(
name
=
"路段名称"
,
notes
=
""
)
private
String
name
;
/**
* 道路编号
*/
@ApiModelProperty
(
name
=
"道路编号"
,
notes
=
""
)
private
String
roadId
;
/**
* 道路名称
*/
@ApiModelProperty
(
name
=
"道路名称"
,
notes
=
""
)
private
String
roadName
;
/**
* 道路方向编号
*/
@ApiModelProperty
(
name
=
"道路方向编号"
,
notes
=
""
)
private
String
roadDirId
;
/**
* 开始路口编号
*/
@ApiModelProperty
(
name
=
"开始路口编号"
,
notes
=
""
)
private
String
startCrossId
;
/**
* 结束路口编号
*/
@ApiModelProperty
(
name
=
"结束路口编号"
,
notes
=
""
)
private
String
endCrossId
;
/**
* 出口方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北
*/
@ApiModelProperty
(
name
=
"驶出方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
,
notes
=
""
)
private
Integer
outDir
;
/**
* 入口方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北
*/
@ApiModelProperty
(
name
=
"驶入方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
,
notes
=
""
)
private
Integer
inDir
;
/**
* 出口绝对角度;正北方向顺时针计算角度0~359
*/
@ApiModelProperty
(
name
=
"出口绝对角度"
,
notes
=
"正北方向顺时针计算角度0~359"
)
private
Double
startAngle
;
/**
* 入口绝对角度;正北方向顺时针计算角度0~359
*/
@ApiModelProperty
(
name
=
"入口绝对角度"
,
notes
=
"正北方向顺时针计算角度0~359"
)
private
Double
endAngle
;
/**
* 行驶方向:0上行;1下行
*/
@ApiModelProperty
(
name
=
"行驶方向:0上行;1下行"
,
notes
=
""
)
private
Integer
direction
;
@ApiModelProperty
(
name
=
"顺序号:路段在道路方向的顺序号"
,
notes
=
""
)
private
Integer
sort
;
/**
* 路段走向:1;南向北;2 西向东;3 北向南;4 东向西;5 内环;6 外环;99 其他(参见路段走向字典)
*/
@ApiModelProperty
(
name
=
"路段走向:1"
,
notes
=
"南向北;2 西向东;3 北向南;4 东向西;5 内环;6 外环;99 其他(参见路段走向字典)"
)
private
Integer
trend
;
/**
* 道路等级:
* 41000 高速公路
* 42000 国道
* 43000 城市快速路
* 44000 城市主干道
* 45000 城市次干道
* 47000 城市普通道路
* 51000 省道
* 52000 县道
* 53000 乡道
* 54000 县乡村内部道路
* 49 小路(参见道路等级字典)
*/
@ApiModelProperty
(
name
=
"道路等级"
,
notes
=
"道路等级"
)
private
Integer
level
;
@ApiModelProperty
(
name
=
"行政区划代码,跨区数据会以逗号分开"
,
notes
=
""
)
private
String
areaCode
;
/**
* 路段长度(米)
*/
@ApiModelProperty
(
name
=
"路段长度(米)"
,
notes
=
""
)
private
Double
length
;
/**
* 路段宽度(米)
*/
@ApiModelProperty
(
name
=
"路段宽度(米)"
,
notes
=
""
)
private
Double
width
;
/**
* 是否单行线:0;否 1 是 99 其他
*/
@ApiModelProperty
(
name
=
"是否单行线:0 否 1 是 99 其他"
,
notes
=
""
)
private
Integer
isOneway
;
/**
* 路段类型:1路段;3匝道;4隧道;5桥梁;6高架;99其他
*/
@ApiModelProperty
(
name
=
"路段类型:1路段;3匝道;4隧道;5桥梁;6高架;99其他"
,
notes
=
""
)
private
Integer
type
;
/**
* RID;空间对象
*/
@ApiModelProperty
(
name
=
"空间对象"
,
notes
=
"空间对象"
)
private
String
wkt
;
/**
* 信控路段编号
*/
@ApiModelProperty
(
name
=
"信控路段编号"
,
notes
=
""
)
private
String
scRid
;
/**
* 信控路段名称
*/
@ApiModelProperty
(
name
=
"信控路段名称"
,
notes
=
""
)
private
String
scName
;
/**
* 信控路段RID顺序号
*/
@ApiModelProperty
(
name
=
"信控路段顺序号"
,
notes
=
""
)
private
Integer
scSort
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"创建时间"
,
notes
=
""
)
private
Date
gmtCreate
;
/**
* 修改时间
*/
@ApiModelProperty
(
name
=
"修改时间"
,
notes
=
""
)
private
Date
gmtModified
;
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/RidInfoMapper.java
0 → 100644
View file @
f0d18106
package
net
.
wanji
.
databus
.
dao
.
mapper
;
import
net.wanji.databus.dao.entity.RidInfoEntity
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* @author Kent HAN
* @date 2022/11/8 16:22
*/
@Repository
public
interface
RidInfoMapper
{
Double
selectRoadLength
(
@Param
(
"startCrossid"
)
String
startCrossid
,
@Param
(
"endCrossid"
)
String
endCrossid
);
String
selectStartCrossOutDir
(
@Param
(
"startCrossid"
)
String
startCrossid
,
@Param
(
"endCrossid"
)
String
endCrossid
);
String
selectWkt
(
@Param
(
"startCrossid"
)
String
startCrossid
,
@Param
(
"endCrossid"
)
String
endCrossid
);
List
<
RidInfoEntity
>
selectOne
(
@Param
(
"startCrossid"
)
String
startCrossid
,
@Param
(
"endCrossid"
)
String
endCrossid
);
}
wj-databus/src/main/resources/mapper/RidInfoMapper.xml
0 → 100644
View file @
f0d18106
<?xml version="1.0" encoding="UTF-8"?>
<!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.RidInfoMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
type=
"net.wanji.databus.dao.entity.RidInfoEntity"
id=
"BaseResultMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"roadId"
column=
"road_id"
/>
<result
property=
"roadName"
column=
"road_name"
/>
<result
property=
"roadDirId"
column=
"road_dir_id"
/>
<result
property=
"startCrossId"
column=
"start_cross_id"
/>
<result
property=
"endCrossId"
column=
"end_cross_id"
/>
<result
property=
"outDir"
column=
"out_dir"
/>
<result
property=
"inDir"
column=
"in_dir"
/>
<result
property=
"startAngle"
column=
"start_angle"
/>
<result
property=
"endAngle"
column=
"end_angle"
/>
<result
property=
"direction"
column=
"direction"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"trend"
column=
"trend"
/>
<result
property=
"level"
column=
"level"
/>
<result
property=
"areaCode"
column=
"area_code"
/>
<result
property=
"length"
column=
"length"
/>
<result
property=
"width"
column=
"width"
/>
<result
property=
"isOneway"
column=
"is_oneway"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"wkt"
column=
"wkt"
/>
<result
property=
"scId"
column=
"sc_id"
/>
<result
property=
"scName"
column=
"sc_name"
/>
<result
property=
"scSort"
column=
"sc_sort"
/>
<result
property=
"gmtCreate"
column=
"gmt_create"
/>
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,name,road_id,road_name,road_dir_id,start_cross_id,end_cross_id,out_dir,in_dir,start_angle,end_angle,
direction,sort,trend,level,area_code,length,width,is_oneway,type,wkt,sc_id,sc_name,sc_sort,gmt_create,gmt_modified
</sql>
<select
id=
"selectRoadLength"
resultType=
"java.lang.Double"
>
select length
from t_base_rid_info
where start_crossid = #{startCrossid} and end_crossid = #{endCrossid}
</select>
<select
id=
"selectStartCrossOutDir"
resultType=
"java.lang.String"
>
select start_crossdirid
from t_base_rid_info
where start_crossid = #{startCrossid} and end_crossid = #{endCrossid}
</select>
<select
id=
"selectWkt"
resultType=
"java.lang.String"
>
select wkt
from t_base_rid_info
where start_crossid = #{startCrossid} and end_crossid = #{endCrossid}
</select>
<select
id=
"selectOne"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t_base_rid_info
<where>
<if
test=
"startCrossId != null and startCrossId != ''"
>
and start_cross_id = #{startCrossid}
</if>
<if
test=
"endCrossId != null and endCrossId != ''"
>
and end_cross_id = #{endCrossid}
</if>
</where>
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment