Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
d45d727f
提交
d45d727f
authored
4月 30, 2019
作者:
Phyday
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增交通量,路况事件模块功能(待测试)
上级
9eff798b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
1691 行增加
和
147 行删除
+1691
-147
road_condition_event.sql
db/road_condition_event.sql
+0
-46
base_organize.sql
db/road_condition_event/base_organize.sql
+0
-0
road_condition_event.sql
db/road_condition_event/road_condition_event.sql
+65
-0
初始化菜单.sql
db/traffic/初始化菜单.sql
+5
-0
观测站点.sql
db/traffic/观测站点.sql
+71
-0
路段交通量.sql
db/traffic/路段交通量.sql
+53
-0
路线交通量.sql
db/traffic/路线交通量.sql
+54
-0
CoordinatesByCodeAndM.java
...odule/roadcondition/controller/CoordinatesByCodeAndM.java
+126
-0
RoadConditionEventController.java
...oadcondition/controller/RoadConditionEventController.java
+61
-29
BaseTreeDto.java
...rk/galaxy/aroad/module/roadcondition/dto/BaseTreeDto.java
+24
-0
CityNameDto.java
...rk/galaxy/aroad/module/roadcondition/dto/CityNameDto.java
+24
-0
CitysWithOrganizes.java
...xy/aroad/module/roadcondition/dto/CitysWithOrganizes.java
+24
-0
SingleNameDto.java
.../galaxy/aroad/module/roadcondition/dto/SingleNameDto.java
+23
-0
staticByYHCityDto.java
...axy/aroad/module/roadcondition/dto/staticByYHCityDto.java
+28
-0
RoadConditionEvent.java
...aroad/module/roadcondition/entity/RoadConditionEvent.java
+32
-61
RoadConditionEventMapper.java
...module/roadcondition/mapper/RoadConditionEventMapper.java
+26
-5
RoadConditionEventService.java
...dule/roadcondition/service/RoadConditionEventService.java
+25
-0
RoadConditionEventServiceImpl.java
...condition/service/impl/RoadConditionEventServiceImpl.java
+128
-6
TCoordinatesByCodeAndM.java
...oad/module/traffic/controller/TCoordinatesByCodeAndM.java
+125
-0
TrafficRoadsectionController.java
...dule/traffic/controller/TrafficRoadsectionController.java
+82
-0
TrafficRouteController.java
...oad/module/traffic/controller/TrafficRouteController.java
+82
-0
TrafficSpotController.java
...road/module/traffic/controller/TrafficSpotController.java
+82
-0
TrafficRoadsection.java
...alaxy/aroad/module/traffic/entity/TrafficRoadsection.java
+103
-0
TrafficRoute.java
...work/galaxy/aroad/module/traffic/entity/TrafficRoute.java
+107
-0
TrafficSpot.java
...ework/galaxy/aroad/module/traffic/entity/TrafficSpot.java
+61
-0
TrafficRoadsectionMapper.java
...aroad/module/traffic/mapper/TrafficRoadsectionMapper.java
+14
-0
TrafficRouteMapper.java
...alaxy/aroad/module/traffic/mapper/TrafficRouteMapper.java
+14
-0
TrafficSpotMapper.java
...galaxy/aroad/module/traffic/mapper/TrafficSpotMapper.java
+14
-0
TrafficRoadsectionService.java
...oad/module/traffic/service/TrafficRoadsectionService.java
+14
-0
TrafficRouteService.java
...axy/aroad/module/traffic/service/TrafficRouteService.java
+14
-0
TrafficSpotService.java
...laxy/aroad/module/traffic/service/TrafficSpotService.java
+14
-0
TrafficRoadsectionServiceImpl.java
...e/traffic/service/impl/TrafficRoadsectionServiceImpl.java
+18
-0
TrafficRouteServiceImpl.java
.../module/traffic/service/impl/TrafficRouteServiceImpl.java
+18
-0
TrafficSpotServiceImpl.java
...d/module/traffic/service/impl/TrafficSpotServiceImpl.java
+18
-0
RoadConditionEventMapper.xml
...sources/mapper/roadcondition/RoadConditionEventMapper.xml
+54
-0
TrafficRoadsectionMapper.xml
...ain/resources/mapper/traffic/TrafficRoadsectionMapper.xml
+29
-0
TrafficRouteMapper.xml
src/main/resources/mapper/traffic/TrafficRouteMapper.xml
+30
-0
TrafficSpotMapper.xml
src/main/resources/mapper/traffic/TrafficSpotMapper.xml
+29
-0
没有找到文件。
db/road_condition_event.sql
deleted
100644 → 0
浏览文件 @
9eff798b
/*
Navicat Premium Data Transfer
Source Server : local-mysql
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aroad
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 25/04/2019 08:45:15
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for road_condition_event
-- ----------------------------
DROP
TABLE
IF
EXISTS
`road_condition_event`
;
CREATE
TABLE
`road_condition_event`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`road_code`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线编码'
,
`road_name`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线名称'
,
`startM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'开始桩号'
,
`endM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'结束桩号'
,
`event_type`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件类型'
,
`event_title`
varchar
(
60
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件标题'
,
`event_content`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件详情'
,
`influence`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'影响程度'
,
`cars_length`
varchar
(
8
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'压车长度'
,
`solution`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'绕行方案'
,
`start_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'发布时间'
,
`start_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布单位'
,
`start_person`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布人'
,
`pre_end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'预撤时间'
,
`end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'撤销时间'
,
`end_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销单位'
,
`end_reason`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销原因'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
11
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'路况事件管理'
ROW_FORMAT
=
Dynamic
;
SET
FOREIGN_KEY_CHECKS
=
1
;
db/road_condition_event/base_organize.sql
0 → 100644
浏览文件 @
d45d727f
差异被折叠。
点击展开。
db/road_condition_event/road_condition_event.sql
0 → 100644
浏览文件 @
d45d727f
/*
Navicat Premium Data Transfer
Source Server : local-mysql
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aroad
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 25/04/2019 08:45:15
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for road_condition_event
-- ----------------------------
DROP
TABLE
IF
EXISTS
`road_condition_event`
;
CREATE
TABLE
`road_condition_event`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`road_code`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线编码'
,
`road_name`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线名称'
,
`startM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'开始桩号'
,
`endM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'结束桩号'
,
`event_type`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件类型'
,
`event_title`
varchar
(
60
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件标题'
,
`event_content`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件详情'
,
`influence`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'影响程度'
,
`cars_length`
varchar
(
8
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'压车长度'
,
`solution`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'绕行方案'
,
`start_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'发布时间'
,
`start_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布单位'
,
`start_person`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布人'
,
`pre_end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'预撤时间'
,
`end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'撤销时间'
,
`end_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销单位'
,
`end_reason`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销原因'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
11
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'路况事件管理'
ROW_FORMAT
=
Dynamic
;
SET
FOREIGN_KEY_CHECKS
=
1
;
INSERT
INTO
`aroad`
.
`sys_menu`
(
`menu_id`
,
`name`
,
`permission`
,
`path`
,
`parent_id`
,
`icon`
,
`component`
,
`sort`
,
`keep_alive`
,
`type`
,
`create_time`
,
`update_time`
,
`del_flag`
)
VALUES
(
70000
,
'路况管理'
,
NULL
,
'/roadcondition'
,
-
1
,
NULL
,
NULL
,
7
,
'0'
,
'0'
,
'2019-04-23 11:16:58'
,
'2019-04-23 11:17:22'
,
'0'
);
INSERT
INTO
`aroad`
.
`sys_menu`
(
`menu_id`
,
`name`
,
`permission`
,
`path`
,
`parent_id`
,
`icon`
,
`component`
,
`sort`
,
`keep_alive`
,
`type`
,
`create_time`
,
`update_time`
,
`del_flag`
)
VALUES
(
71000
,
'路况事件统计'
,
NULL
,
'/roadConditionShow'
,
70000
,
NULL
,
'views/roadcondition/roadConditionShow/index'
,
1
,
'0'
,
'0'
,
'2019-04-23 11:19:38'
,
NULL
,
'0'
);
INSERT
INTO
`aroad`
.
`sys_menu`
(
`menu_id`
,
`name`
,
`permission`
,
`path`
,
`parent_id`
,
`icon`
,
`component`
,
`sort`
,
`keep_alive`
,
`type`
,
`create_time`
,
`update_time`
,
`del_flag`
)
VALUES
(
72000
,
'路况事件查询'
,
NULL
,
'/roadConditionManage'
,
70000
,
NULL
,
'views/roadcondition/roadConditionManage/index'
,
2
,
'0'
,
'0'
,
'2019-04-24 17:18:24'
,
NULL
,
'0'
);
db/traffic/初始化菜单.sql
0 → 100644
浏览文件 @
d45d727f
INSERT
INTO
`sys_menu`
VALUES
(
80000
,
'交通量分析'
,
NULL
,
'/traffic'
,
-
1
,
NULL
,
''
,
8
,
'0'
,
'0'
,
'2019-04-28 20:38:32'
,
'2019-04-28 20:38:46'
,
'0'
);
INSERT
INTO
`sys_menu`
VALUES
(
81000
,
'观测站点'
,
NULL
,
'/spot'
,
80000
,
NULL
,
'views/traffic/trafficspot/index'
,
1
,
'0'
,
'0'
,
'2019-04-28 20:44:03'
,
'2019-04-28 20:44:22'
,
'0'
);
INSERT
INTO
`sys_menu`
VALUES
(
82000
,
'路线交通量分析'
,
NULL
,
'/trafficroute'
,
80000
,
NULL
,
'views/traffic/trafficroute/index'
,
2
,
'0'
,
'0'
,
'2019-04-28 20:46:10'
,
'2019-04-29 13:52:04'
,
'0'
);
INSERT
INTO
`sys_menu`
VALUES
(
83000
,
'路段交通量分析'
,
NULL
,
'/trafficroadsection'
,
80000
,
NULL
,
'views/traffic/trafficroadsection/index'
,
3
,
'0'
,
'0'
,
'2019-04-28 20:47:18'
,
'2019-04-29 13:52:07'
,
'0'
);
\ No newline at end of file
db/traffic/观测站点.sql
0 → 100644
浏览文件 @
d45d727f
/*
Navicat Premium Data Transfer
Source Server : local-mysql
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aroad
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 30/04/2019 16:36:01
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for traffic_spot
-- ----------------------------
DROP
TABLE
IF
EXISTS
`traffic_spot`
;
CREATE
TABLE
`traffic_spot`
(
`row_id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`spot_code`
varchar
(
30
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'站点编码'
,
`spot_name`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'站点名称'
,
`road_code`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线编码'
,
`road_name`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线名称'
,
`XZQH`
varchar
(
12
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'行政区划'
,
`spot_type`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测站类型'
,
`spotM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测站桩号'
,
`startM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'起点桩号'
,
`endM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'终点桩号'
,
`length`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测里程'
,
`start_name`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'起点名称'
,
`end_name`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'终点名称'
,
`tech_level`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'技术等级'
,
`car_rows`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'行车道数'
,
`face_type`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'面层类型'
,
`width`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路面宽度'
,
`speed`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'设计时速'
,
`landscape`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'地形'
,
`stop_month`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'停测月份'
,
PRIMARY
KEY
(
`row_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
20
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'观测站点'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of traffic_spot
-- ----------------------------
INSERT
INTO
`traffic_spot`
VALUES
(
1
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
2
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
3
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
4
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
5
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
6
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
7
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
8
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
9
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
10
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
11
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
12
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
13
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
14
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
15
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
16
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
17
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
18
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
INSERT
INTO
`traffic_spot`
VALUES
(
19
,
'G104J101371422'
,
'大柳'
,
'G104'
,
'北京-平潭'
,
'德州市宁津县'
,
'间隙'
,
'18.050'
,
'0.000'
,
'23.389'
,
'23.389'
,
'河北京津界'
,
'宁津路家'
,
'二级公路'
,
'2'
,
'沥青混凝土'
,
'19'
,
'80'
,
'平原'
,
NULL
);
SET
FOREIGN_KEY_CHECKS
=
1
;
db/traffic/路段交通量.sql
0 → 100644
浏览文件 @
d45d727f
/*
Navicat Premium Data Transfer
Source Server : local-mysql
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aroad
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 30/04/2019 16:35:43
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for traffic_roadsection
-- ----------------------------
DROP
TABLE
IF
EXISTS
`traffic_roadsection`
;
CREATE
TABLE
`traffic_roadsection`
(
`id`
int
(
11
)
NOT
NULL
,
`spot_name`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测点名称'
,
`spot_code`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测点编号'
,
`spot_length`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测里程'
,
`tech_level`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'技术等级'
,
`road_width`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路面宽度'
,
`QC_s_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'小型货车'
,
`QC_m_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'中型货车'
,
`QC_l_turck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'大型货车'
,
`QC_xl_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'特大货车'
,
`QC_jzx_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'集装箱车'
,
`QC_sm_bus`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'中小客车'
,
`QC_l_bus`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'大客车'
,
`QC_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'汽车自然合计'
,
`QC_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'汽车当量合计'
,
`motor`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'摩托车'
,
`TLJ_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'拖拉机当量合计'
,
`TLJ_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'拖拉机自然合计'
,
`JDC_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'机动车当量合计'
,
`JDC_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'机动车自然合计'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'路段交通量'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of traffic_roadsection
-- ----------------------------
INSERT
INTO
`traffic_roadsection`
VALUES
(
1
,
'索庄'
,
'G104L076371402'
,
'10.680'
,
'一级公路'
,
'23.0'
,
'970'
,
'269'
,
'333'
,
'1480'
,
'113'
,
'6606'
,
'404'
,
'10175'
,
'15951'
,
'704'
,
'0'
,
'0'
,
'10879'
,
'16655'
);
SET
FOREIGN_KEY_CHECKS
=
1
;
db/traffic/路线交通量.sql
0 → 100644
浏览文件 @
d45d727f
/*
Navicat Premium Data Transfer
Source Server : local-mysql
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : aroad
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 30/04/2019 16:35:52
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for traffic_route
-- ----------------------------
DROP
TABLE
IF
EXISTS
`traffic_route`
;
CREATE
TABLE
`traffic_route`
(
`id`
int
(
11
)
NOT
NULL
,
`road_code`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线编码'
,
`road_name`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线名称'
,
`spot_length`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'观测里程'
,
`JDC_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'机动车当量合计'
,
`JDC_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'机动车自然合计'
,
`QC_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'汽车当量合计'
,
`QC_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'汽车自然合计'
,
`QC_s_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'小型货车'
,
`QC_m_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'中型货车'
,
`QC_l_turck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'大型货车'
,
`QC_xl_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'特大货车'
,
`QC_jzx_truck`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'集装箱车'
,
`QC_sm_bus`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'中小客车'
,
`QC_l_bus`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'大客车'
,
`motor`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'摩托车'
,
`TLJ_current_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'拖拉机当量合计'
,
`TLJ_natural_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'拖拉机自然合计'
,
`drive_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'行驶量(万车公里/日)'
,
`adapt_amount`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'适应交通量(辆/日)'
,
`crowd`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'交通拥挤度'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'路线交通量'
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of traffic_route
-- ----------------------------
INSERT
INTO
`traffic_route`
VALUES
(
1
,
'G2'
,
'北京-上海高速'
,
'273.977'
,
'38379'
,
'19137'
,
'38379'
,
'19137'
,
'1149'
,
'1166'
,
'1121'
,
'5007'
,
'337'
,
'9548'
,
'809'
,
'0'
,
'0'
,
'0'
,
'1051'
,
'55000'
,
'0.698'
);
SET
FOREIGN_KEY_CHECKS
=
1
;
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/controller/CoordinatesByCodeAndM.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
controller
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.util.List
;
import
java.util.Map
;
/**
* *
*
* @description: 通过路段编码查询线型经纬度
* @author : Xingyuyang
* @date : 2019/4/19 0019 9:37
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/getCoordinatesByRoadCode"
)
public
class
CoordinatesByCodeAndM
{
public
static
String
replaceLast
(
String
text
,
String
regex
,
String
replacement
)
{
return
text
.
replaceFirst
(
"(?s)"
+
regex
+
"(?!.*?"
+
regex
+
")"
,
replacement
);
}
/**
* *
*
* @author : Xingyuyang
* @date : 2019/4/19 0019 9:37
* @param roadInfo:
* @return
*/
@GetMapping
(
"/{roadInfo}"
)
String
getCoordinatesByRoadCode
(
@PathVariable
(
"roadInfo"
)
String
roadInfo
)
{
String
RoadCode
=
roadInfo
.
split
(
","
)[
0
];
String
startM
=
roadInfo
.
split
(
","
)[
1
].
replace
(
"K"
,
""
);
String
endM
=
roadInfo
.
split
(
","
)[
2
].
replace
(
"K"
,
""
);
String
urls
=
"http://47.105.99.44:8080/sdlkapi/LRS/GetRoadSectionGeometry"
;
String
result
=
""
;
// 访问返回结果
BufferedReader
read
=
null
;
// 读取访问结果
try
{
URL
realurl
=
new
URL
(
urls
+
"?roadcode="
+
RoadCode
+
"&fromM="
+
startM
+
"&endM="
+
endM
);
// 打开连接
URLConnection
connection
=
realurl
.
openConnection
();
// 设置通用的请求属性
connection
.
setRequestProperty
(
"accept"
,
"*/*"
);
connection
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
connection
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
// 建立连接
connection
.
connect
();
// 获取所有响应头字段
Map
<
String
,
List
<
String
>>
map
=
connection
.
getHeaderFields
();
// 遍历所有的响应头字段,获取到cookies等
for
(
String
key
:
map
.
keySet
())
{
System
.
out
.
println
(
key
+
"--->"
+
map
.
get
(
key
));
}
// 定义 BufferedReader输入流来读取URL的响应
read
=
new
BufferedReader
(
new
InputStreamReader
(
connection
.
getInputStream
(),
"UTF-8"
));
String
line
;
// 循环读取
while
((
line
=
read
.
readLine
())
!=
null
)
{
result
+=
line
;
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
read
!=
null
)
{
try
{
read
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
// String a =
// "[\n"
// + " {\n"
// + " \"longitude\": 121.35026615250384,\n"
// + " \"latitude\": 32.376700873233865\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 118.16719561602959,\n"
// + " \"latitude\": 34.917386856816904\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 116.68559017702764,\n"
// + " \"latitude\": 36.492319275295657\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 119.74509279731635,\n"
// + " \"latitude\": 36.292381987051705\n"
// + " }\n"
// + "]";
// List<RoadCodeCoordinateDto> results = new ArrayList<>();
// String[] aA = a.replace("{", "").replace("}", "").replace("(", "").replace(")",
// "").split(",");
// RoadCodeCoordinateDto roadCodeCoordinateDto = new RoadCodeCoordinateDto();
// List<String> x = new ArrayList<>();
// List<String> y = new ArrayList<>();
// Map<String,String> xy = new HashMap<>();
// for (int i = 0; i < aA.length; i++) {
// if (i % 2 == 0) {
// x.add(aA[i]);
// } else {
// y.add(aA[i]);
// }
// }
// // roadCodeCoordinateDto.setLongituateDto););
// //// results.add(roadCodeCoordinateDto);
// for(int i = 0;i<x.size();i++){
// xy.put(x.get(i), y.get(i));
// }
// roadCodeCoordinateDto.setLatitude(new BigDecimal(aA[i]));
// roadCodeCoordinateDto.setLongitude(new BigDecimal(aA[i]));
result
=
result
.
replace
(
"\\r"
,
""
).
replace
(
"\\n"
,
""
).
replace
(
"\\"
,
""
).
replaceFirst
(
"\""
,
""
);
result
=
replaceLast
(
result
,
"\""
,
""
);
return
result
;
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/controller/RoadConditionEventController.java
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
/**
* 路况事件统计
...
...
@@ -17,135 +16,168 @@ import com.elephant.framework.galaxy.aroad.module.common.controller.BaseControll
* @author Xingyuyang
* @date 2019-04-23 16:41:06
*/
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping
(
"/roadconditionevent"
)
public
class
RoadConditionEventController
extends
BaseController
{
public
class
RoadConditionEventController
extends
BaseController
{
private
final
RoadConditionEventService
roadConditionEventService
;
private
final
RoadConditionEventService
roadConditionEventService
;
/**
* 分页查询
*
* @param page 分页对象
* @param roadConditionEvent 路况事件统计
* @return
*/
@GetMapping
(
"/page"
)
public
R
getRoadConditionEventPage
(
Page
page
,
RoadConditionEvent
roadConditionEvent
)
{
return
new
R
<>(
roadConditionEventService
.
page
(
page
,
Wrappers
.
query
(
roadConditionEvent
)));
@PostMapping
(
"/page"
)
public
R
getRoadConditionEventPage
(
Page
page
,
@RequestBody
RoadConditionEvent
roadConditionEvent
)
{
// log.error("接收实体:{}", roadConditionEvent);
page
.
setCurrent
(
roadConditionEvent
.
getCurrent
());
return
new
R
<>(
roadConditionEventService
.
getRoadConditionEventPage
(
page
,
roadConditionEvent
));
}
/**
*
* @description : 根据事件类型统计
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:33
* @param
* @return : null
*
*/
@GetMapping
(
"/eventtype"
)
public
R
staticByEventType
(){
public
R
staticByEventType
()
{
return
new
R
<>(
roadConditionEventService
.
staticByEventType
());
}
/**
*
* @description : 根据事件类型统计
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:33
* @param
* @return : null
*/
// @GetMapping("/location")
// public R locatioinOnMap() {
// return new R<>(roadConditionEventService.locatioinOnMap());
// }
/**
* @description : 根据影响程度统计
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:33
* @param
* @return : null
*
*/
@GetMapping
(
"/influence"
)
public
R
staticByInfluence
(){
public
R
staticByInfluence
()
{
return
new
R
<>(
roadConditionEventService
.
staticByInfluence
());
}
/**
*
* @description : 根据月份统计
* @author : Xingyuyang
* @date : 2019-4-24 10:26:49
* @param
* @return : null
*
*/
@GetMapping
(
"/month"
)
public
R
staticByMonth
(){
public
R
staticByMonth
()
{
return
new
R
<>(
roadConditionEventService
.
staticByMonth
());
}
/**
*
* @description : 根据路段编码统计
* @author : Xingyuyang
* @date : 2019-4-24 10:26:49
* @param
* @return : null
*
*/
@GetMapping
(
"/roadcode"
)
public
R
staticByRoadCode
(){
public
R
staticByRoadCode
()
{
return
new
R
<>(
roadConditionEventService
.
staticByRoadCode
());
}
/**
*
* @description : 根据路段编码统计
* @author : Xingyuyang
* @date : 2019-4-24 10:26:49
* @param
* @return : null
*
*/
@GetMapping
(
"/city"
)
public
R
staticByCity
(){
public
R
staticByCity
()
{
return
new
R
<>(
roadConditionEventService
.
staticByCity
());
}
/**
* @description : 根据路段编码统计
* @author : Xingyuyang
* @date : 2019-4-24 10:26:49
* @param
* @return : null
*/
@GetMapping
(
"/yhcity"
)
public
R
staticByYHCity
()
{
return
new
R
<>(
roadConditionEventService
.
staticByYHCity
());
}
/**
* @Description: 查询市/局树 @Param: []
*
* @return: com.elephant.framework.galaxy.travel.response.R @Author: XingYuyang @Date: 2019/4/10
*/
@GetMapping
(
"/tree"
)
public
R
getTree
()
{
return
new
R
<>(
roadConditionEventService
.
getTree
());
}
/**
* 通过id查询路况事件统计
*
* @param id id
* @return R
*/
@GetMapping
(
"/{id}"
)
public
R
getById
(
@PathVariable
(
"id"
)
Integer
id
){
public
R
getById
(
@PathVariable
(
"id"
)
Integer
id
)
{
// Integer idi = Integer.parseInt(id);
return
new
R
<>(
roadConditionEventService
.
getById
(
id
));
}
/**
* 新增路况事件统计
*
* @param roadConditionEvent 路况事件统计
* @return R
*/
@SysLog
(
"新增路况事件统计"
)
@PostMapping
public
R
save
(
@RequestBody
RoadConditionEvent
roadConditionEvent
){
public
R
save
(
@RequestBody
RoadConditionEvent
roadConditionEvent
)
{
return
new
R
<>(
roadConditionEventService
.
save
(
roadConditionEvent
));
}
/**
* 修改路况事件统计
*
* @param roadConditionEvent 路况事件统计
* @return R
*/
@SysLog
(
"修改路况事件统计"
)
@PutMapping
public
R
updateById
(
@RequestBody
RoadConditionEvent
roadConditionEvent
){
public
R
updateById
(
@RequestBody
RoadConditionEvent
roadConditionEvent
)
{
return
new
R
<>(
roadConditionEventService
.
updateById
(
roadConditionEvent
));
}
/**
* 通过id删除路况事件统计
*
* @param id id
* @return R
*/
@SysLog
(
"删除路况事件统计"
)
@DeleteMapping
(
"/{id}"
)
public
R
removeById
(
@PathVariable
Integer
id
){
public
R
removeById
(
@PathVariable
Integer
id
)
{
return
new
R
<>(
roadConditionEventService
.
removeById
(
id
));
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/BaseTreeDto.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
* @description : 市/局树层结构
* @author : Xingyuyang
* @date : 2019/4/25 0025 16:25
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
BaseTreeDto
implements
Serializable
{
private
List
<
CitysWithOrganizes
>
citysWithOrganizes
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/CityNameDto.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
*
* @description : 市/局树层结构
* @author : Xingyuyang
* @date : 2019/4/25 0025 16:25
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CityNameDto
implements
Serializable
{
private
String
cityName
;
private
String
organizeName
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/CitysWithOrganizes.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
*
* @description : 市/局树层结构
* @author : Xingyuyang
* @date : 2019/4/25 0025 16:25
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CitysWithOrganizes
{
private
String
city
;
private
List
<
SingleNameDto
>
names
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/SingleNameDto.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
*
* @description : 市/局树层结构
* @author : Xingyuyang
* @date : 2019/4/25 0025 16:25
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SingleNameDto
implements
Serializable
{
private
String
organizeName
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/staticByYHCityDto.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @Author: XingYuyang
* @Description:
* @Date: Created in 2019/4/23 0023 1832
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
staticByYHCityDto
implements
Serializable
{
/**
* 数量
*/
private
String
count
;
/**
* 城市
*/
private
String
startunit
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/entity/RoadConditionEvent.java
浏览文件 @
d45d727f
...
...
@@ -3,10 +3,11 @@ package com.elephant.framework.galaxy.aroad.module.roadcondition.entity;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.
time.LocalDateTim
e
;
import
java.
util.Dat
e
;
/**
* 路况事件统计
...
...
@@ -18,80 +19,50 @@ import java.time.LocalDateTime;
@TableName
(
"road_condition_event"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
RoadConditionEvent
extends
Model
<
RoadConditionEvent
>
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Integer
id
;
/**
* 路线编码
*/
/** */
@TableId
private
Integer
id
;
/** 路线编码 */
private
String
roadCode
;
/**
* 路线名称
*/
/** 路线名称 */
private
String
roadName
;
/**
* 开始桩号
*/
/** 开始桩号 */
private
String
startm
;
/**
* 结束桩号
*/
/** 结束桩号 */
private
String
endm
;
/**
* 事件类型
*/
/** 事件类型 */
private
String
eventType
;
/**
* 事件标题
*/
/** 事件标题 */
private
String
eventTitle
;
/**
* 事件详情
*/
/** 事件详情 */
private
String
eventContent
;
/**
* 影响程度
*/
/** 影响程度 */
private
String
influence
;
/**
* 压车长度
*/
/** 压车长度 */
private
String
carsLength
;
/**
* 绕行方案
*/
/** 绕行方案 */
private
String
solution
;
/**
* 发布时间
*/
private
LocalDateTime
startTime
;
/**
* 发布单位
*/
/** 发布时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
startTime
;
/** 发布单位 */
private
String
startUnit
;
/**
* 发布人
*/
/** 发布人 */
private
String
startPerson
;
/**
* 预撤时间
*/
private
LocalDateTime
preEndTime
;
/**
* 撤销时间
*/
private
LocalDateTime
endTime
;
/**
* 撤销单位
*/
/** 预撤时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
preEndTime
;
/** 撤销时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
endTime
;
/** 撤销单位 */
private
String
endUnit
;
/**
* 撤销原因
*/
/** 撤销原因 */
private
String
endReason
;
private
Long
current
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/mapper/RoadConditionEventMapper.java
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -13,9 +15,28 @@ import java.util.List;
* @date 2019-04-23 16:41:06
*/
public
interface
RoadConditionEventMapper
extends
BaseMapper
<
RoadConditionEvent
>
{
List
<
staticByEventTypeDto
>
staticByEventType
();
List
<
staticByInfluenceDto
>
staticByInfluence
();
List
<
staticByMonthDto
>
staticByMonth
();
List
<
staticByRoadCodeDto
>
staticByRoadCode
();
List
<
staticByCityDto
>
staticByCity
();
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
IPage
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
List
<
staticByEventTypeDto
>
staticByEventType
();
List
<
staticByInfluenceDto
>
staticByInfluence
();
List
<
staticByMonthDto
>
staticByMonth
();
List
<
staticByRoadCodeDto
>
staticByRoadCode
();
List
<
staticByCityDto
>
staticByCity
();
List
<
staticByYHCityDto
>
staticByYHCity
();
/**
* @Description: 查询树形 @Param: []
*
* @return:
* java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea> @Author:
* Xingyuyang @Date: 2019/4/25
*/
List
<
CityNameDto
>
getTree
();
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
);
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/RoadConditionEventService.java
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
...
...
@@ -13,6 +15,7 @@ import java.util.List;
* @date 2019-04-23 16:41:06
*/
public
interface
RoadConditionEventService
extends
IService
<
RoadConditionEvent
>
{
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
/**
*
* @description : 根据事件类型查询
...
...
@@ -67,4 +70,26 @@ public interface RoadConditionEventService extends IService<RoadConditionEvent>
*
*/
List
<
staticByCityDto
>
staticByCity
();
/**
*
* @description : 根据城市查询
* @author : Xingyuyang
* @date : 2019/4/24 14:28
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
*
*/
List
<
staticByYHCityDto
>
staticByYHCity
();
/**
* @Description: 查询树形结构
* @Param: []
* @return: java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea>
* @Author: XingYuyang
* @Date: 2019/4/10
*/
BaseTreeDto
getTree
();
RoadConditionEvent
getById
(
Integer
id
);
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/impl/RoadConditionEventServiceImpl.java
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.mapper.RoadConditionEventMapper
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -20,7 +24,15 @@ public class RoadConditionEventServiceImpl
extends
ServiceImpl
<
RoadConditionEventMapper
,
RoadConditionEvent
>
implements
RoadConditionEventService
{
/**
public
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
){
return
baseMapper
.
getById
(
id
);
}
public
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
)
{
return
baseMapper
.
getRoadConditionEventPage
(
page
,
roadConditionEvent
);
}
/**
* @description : 根据事件类型查询
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:54
...
...
@@ -69,15 +81,125 @@ public class RoadConditionEventServiceImpl
}
/**
*
* @description : 根据城市查询
* @description : 根据城市查询
* @author : Xingyuyang
* @date : 2019/4/24 0024 14:27
* @return :
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
*/
public
List
<
staticByCityDto
>
staticByCity
()
{
return
baseMapper
.
staticByCity
();
}
/**
* @description : 根据城市查询
* @author : Xingyuyang
* @date : 2019/4/24 0024 14:27
* @return :
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
*/
public
List
<
staticByYHCityDto
>
staticByYHCity
()
{
return
baseMapper
.
staticByYHCity
();
}
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
/**
* @Description: 查询所有服务区所属路线名称和编码的树形结构 @Param: []
*
* @return:
* java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea> @Author:
* songwenjie @Date: 2019/4/10
*/
public
List
<
staticByCityDto
>
staticByCity
(){
return
baseMapper
.
staticByCity
();
// @Cacheable(value="cityTree")
public
BaseTreeDto
getTree
()
{
List
<
CityNameDto
>
cityTree
=
baseMapper
.
getTree
();
List
<
SingleNameDto
>
Jinan
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Qingdao
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Zibo
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Dongying
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Yantai
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Weihai
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Rizhao
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Taian
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Binzhou
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Dezhou
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Liaocheng
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Heze
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Weifang
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Linyi
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Jining
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Zaozhuang
=
new
ArrayList
<>();
List
<
CitysWithOrganizes
>
citysWithOrganizes
=
new
ArrayList
<>();
cityTree
.
forEach
(
a
->
{
if
(
a
.
getCityName
().
equals
(
"济南"
))
{
Jinan
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"青岛"
))
{
Qingdao
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"东营"
))
{
Dongying
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"临沂"
))
{
Linyi
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"日照"
))
{
Rizhao
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"潍坊"
))
{
Weifang
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"淄博"
))
{
Zibo
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"烟台"
))
{
Yantai
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"菏泽"
))
{
Heze
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"济宁"
))
{
Jining
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"泰安"
))
{
Taian
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"威海"
))
{
Weihai
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"枣庄"
))
{
Zaozhuang
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"滨州"
))
{
Binzhou
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"德州"
))
{
Dezhou
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
if
(
a
.
getCityName
().
equals
(
"聊城"
))
{
Liaocheng
.
add
(
SingleNameDto
.
builder
().
organizeName
(
a
.
getOrganizeName
()).
build
());
}
});
{
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"济南"
).
names
(
Jinan
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"青岛"
).
names
(
Qingdao
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"淄博"
).
names
(
Zibo
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"潍坊"
).
names
(
Weifang
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"东营"
).
names
(
Dongying
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"滨州"
).
names
(
Binzhou
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"德州"
).
names
(
Dezhou
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"威海"
).
names
(
Weihai
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"烟台"
).
names
(
Yantai
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"聊城"
).
names
(
Liaocheng
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"泰安"
).
names
(
Taian
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"临沂"
).
names
(
Linyi
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"日照"
).
names
(
Rizhao
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"枣庄"
).
names
(
Zaozhuang
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"济宁"
).
names
(
Jining
).
build
());
citysWithOrganizes
.
add
(
CitysWithOrganizes
.
builder
().
city
(
"菏泽"
).
names
(
Heze
).
build
());
}
return
BaseTreeDto
.
builder
().
citysWithOrganizes
(
citysWithOrganizes
).
build
();
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/controller/TCoordinatesByCodeAndM.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
controller
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.util.List
;
import
java.util.Map
;
/**
* *
*
* @description: 通过路段编码查询线型经纬度
* @author : Xingyuyang
* @date : 2019/4/19 0019 9:37
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/getTrafficCoordinates"
)
public
class
TCoordinatesByCodeAndM
{
public
static
String
replaceLast
(
String
text
,
String
regex
,
String
replacement
)
{
return
text
.
replaceFirst
(
"(?s)"
+
regex
+
"(?!.*?"
+
regex
+
")"
,
replacement
);
}
/**
* *
*
* @author : Xingyuyang
* @date : 2019/4/19 0019 9:37
* @param roadInfo:
* @return
*/
@GetMapping
(
"/{roadInfo}"
)
String
getCoordinatesByRoadCode
(
@PathVariable
(
"roadInfo"
)
String
roadInfo
)
{
String
RoadCode
=
roadInfo
.
split
(
","
)[
0
];
String
spotM
=
roadInfo
.
split
(
","
)[
1
].
replace
(
"K"
,
""
);
String
urls
=
"http://47.105.99.44:8080/sdlkapi/LRS/GetRoadSectionGeometry"
;
String
result
=
""
;
// 访问返回结果
BufferedReader
read
=
null
;
// 读取访问结果
try
{
URL
realurl
=
new
URL
(
urls
+
"?roadcode="
+
RoadCode
+
"&fromM="
+
spotM
);
// 打开连接
URLConnection
connection
=
realurl
.
openConnection
();
// 设置通用的请求属性
connection
.
setRequestProperty
(
"accept"
,
"*/*"
);
connection
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
connection
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
// 建立连接
connection
.
connect
();
// 获取所有响应头字段
Map
<
String
,
List
<
String
>>
map
=
connection
.
getHeaderFields
();
// 遍历所有的响应头字段,获取到cookies等
for
(
String
key
:
map
.
keySet
())
{
System
.
out
.
println
(
key
+
"--->"
+
map
.
get
(
key
));
}
// 定义 BufferedReader输入流来读取URL的响应
read
=
new
BufferedReader
(
new
InputStreamReader
(
connection
.
getInputStream
(),
"UTF-8"
));
String
line
;
// 循环读取
while
((
line
=
read
.
readLine
())
!=
null
)
{
result
+=
line
;
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
read
!=
null
)
{
try
{
read
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
// String a =
// "[\n"
// + " {\n"
// + " \"longitude\": 121.35026615250384,\n"
// + " \"latitude\": 32.376700873233865\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 118.16719561602959,\n"
// + " \"latitude\": 34.917386856816904\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 116.68559017702764,\n"
// + " \"latitude\": 36.492319275295657\n"
// + " },\n"
// + " {\n"
// + " \"longitude\": 119.74509279731635,\n"
// + " \"latitude\": 36.292381987051705\n"
// + " }\n"
// + "]";
// List<RoadCodeCoordinateDto> results = new ArrayList<>();
// String[] aA = a.replace("{", "").replace("}", "").replace("(", "").replace(")",
// "").split(",");
// RoadCodeCoordinateDto roadCodeCoordinateDto = new RoadCodeCoordinateDto();
// List<String> x = new ArrayList<>();
// List<String> y = new ArrayList<>();
// Map<String,String> xy = new HashMap<>();
// for (int i = 0; i < aA.length; i++) {
// if (i % 2 == 0) {
// x.add(aA[i]);
// } else {
// y.add(aA[i]);
// }
// }
// // roadCodeCoordinateDto.setLongituateDto););
// //// results.add(roadCodeCoordinateDto);
// for(int i = 0;i<x.size();i++){
// xy.put(x.get(i), y.get(i));
// }
// roadCodeCoordinateDto.setLatitude(new BigDecimal(aA[i]));
// roadCodeCoordinateDto.setLongitude(new BigDecimal(aA[i]));
result
=
result
.
replace
(
"\\r"
,
""
).
replace
(
"\\n"
,
""
).
replace
(
"\\"
,
""
).
replaceFirst
(
"\""
,
""
);
result
=
replaceLast
(
result
,
"\""
,
""
);
return
result
;
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/controller/TrafficRoadsectionController.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficRoadsectionService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
/**
* 路段交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:48:34
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/trafficroadsection"
)
public
class
TrafficRoadsectionController
extends
BaseController
{
private
final
TrafficRoadsectionService
trafficRoadsectionService
;
/**
* 分页查询
* @param page 分页对象
* @param trafficRoadsection 路段交通量
* @return
*/
@GetMapping
(
"/page"
)
public
R
getTrafficRoadsectionPage
(
Page
page
,
TrafficRoadsection
trafficRoadsection
)
{
return
new
R
<>(
trafficRoadsectionService
.
page
(
page
,
Wrappers
.
query
(
trafficRoadsection
)));
}
/**
* 通过id查询路段交通量
* @param id id
* @return R
*/
@GetMapping
(
"/{id}"
)
public
R
getById
(
@PathVariable
(
"id"
)
Integer
id
){
return
new
R
<>(
trafficRoadsectionService
.
getById
(
id
));
}
/**
* 新增路段交通量
* @param trafficRoadsection 路段交通量
* @return R
*/
@SysLog
(
"新增路段交通量"
)
@PostMapping
public
R
save
(
@RequestBody
TrafficRoadsection
trafficRoadsection
){
return
new
R
<>(
trafficRoadsectionService
.
save
(
trafficRoadsection
));
}
/**
* 修改路段交通量
* @param trafficRoadsection 路段交通量
* @return R
*/
@SysLog
(
"修改路段交通量"
)
@PutMapping
public
R
updateById
(
@RequestBody
TrafficRoadsection
trafficRoadsection
){
return
new
R
<>(
trafficRoadsectionService
.
updateById
(
trafficRoadsection
));
}
/**
* 通过id删除路段交通量
* @param id id
* @return R
*/
@SysLog
(
"删除路段交通量"
)
@DeleteMapping
(
"/{id}"
)
public
R
removeById
(
@PathVariable
Integer
id
){
return
new
R
<>(
trafficRoadsectionService
.
removeById
(
id
));
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/controller/TrafficRouteController.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficRouteService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
/**
* 路线交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:44:18
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/trafficroute"
)
public
class
TrafficRouteController
extends
BaseController
{
private
final
TrafficRouteService
trafficRouteService
;
/**
* 分页查询
* @param page 分页对象
* @param trafficRoute 路线交通量
* @return
*/
@GetMapping
(
"/page"
)
public
R
getTrafficRoutePage
(
Page
page
,
TrafficRoute
trafficRoute
)
{
return
new
R
<>(
trafficRouteService
.
page
(
page
,
Wrappers
.
query
(
trafficRoute
)));
}
/**
* 通过id查询路线交通量
* @param id id
* @return R
*/
@GetMapping
(
"/{id}"
)
public
R
getById
(
@PathVariable
(
"id"
)
Integer
id
){
return
new
R
<>(
trafficRouteService
.
getById
(
id
));
}
/**
* 新增路线交通量
* @param trafficRoute 路线交通量
* @return R
*/
@SysLog
(
"新增路线交通量"
)
@PostMapping
public
R
save
(
@RequestBody
TrafficRoute
trafficRoute
){
return
new
R
<>(
trafficRouteService
.
save
(
trafficRoute
));
}
/**
* 修改路线交通量
* @param trafficRoute 路线交通量
* @return R
*/
@SysLog
(
"修改路线交通量"
)
@PutMapping
public
R
updateById
(
@RequestBody
TrafficRoute
trafficRoute
){
return
new
R
<>(
trafficRouteService
.
updateById
(
trafficRoute
));
}
/**
* 通过id删除路线交通量
* @param id id
* @return R
*/
@SysLog
(
"删除路线交通量"
)
@DeleteMapping
(
"/{id}"
)
public
R
removeById
(
@PathVariable
Integer
id
){
return
new
R
<>(
trafficRouteService
.
removeById
(
id
));
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/controller/TrafficSpotController.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficSpotService
;
import
lombok.AllArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
com.elephant.framework.galaxy.aroad.module.common.controller.BaseController
;
/**
* 观测站点表
*
* @author Xingyuyang
* @date 2019-04-29 14:38:10
*/
@RestController
@AllArgsConstructor
@RequestMapping
(
"/trafficspot"
)
public
class
TrafficSpotController
extends
BaseController
{
private
final
TrafficSpotService
trafficSpotService
;
/**
* 分页查询
* @param page 分页对象
* @param trafficSpot 观测站点表
* @return
*/
@GetMapping
(
"/page"
)
public
R
getTrafficSpotPage
(
Page
page
,
TrafficSpot
trafficSpot
)
{
return
new
R
<>(
trafficSpotService
.
page
(
page
,
Wrappers
.
query
(
trafficSpot
)));
}
/**
* 通过id查询观测站点表
* @param rowId id
* @return R
*/
@GetMapping
(
"/{rowId}"
)
public
R
getById
(
@PathVariable
(
"rowId"
)
Integer
rowId
){
return
new
R
<>(
trafficSpotService
.
getById
(
rowId
));
}
/**
* 新增观测站点表
* @param trafficSpot 观测站点表
* @return R
*/
@SysLog
(
"新增观测站点表"
)
@PostMapping
public
R
save
(
@RequestBody
TrafficSpot
trafficSpot
){
return
new
R
<>(
trafficSpotService
.
save
(
trafficSpot
));
}
/**
* 修改观测站点表
* @param trafficSpot 观测站点表
* @return R
*/
@SysLog
(
"修改观测站点表"
)
@PutMapping
public
R
updateById
(
@RequestBody
TrafficSpot
trafficSpot
){
return
new
R
<>(
trafficSpotService
.
updateById
(
trafficSpot
));
}
/**
* 通过id删除观测站点表
* @param rowId id
* @return R
*/
@SysLog
(
"删除观测站点表"
)
@DeleteMapping
(
"/{rowId}"
)
public
R
removeById
(
@PathVariable
Integer
rowId
){
return
new
R
<>(
trafficSpotService
.
removeById
(
rowId
));
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/entity/TrafficRoadsection.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 路段交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:48:34
*/
@Data
@TableName
(
"traffic_roadsection"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
TrafficRoadsection
extends
Model
<
TrafficRoadsection
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Integer
id
;
/**
* 观测点名称
*/
private
String
spotName
;
/**
* 观测点编号
*/
private
String
spotCode
;
/**
* 观测里程
*/
private
String
spotLength
;
/**
* 技术等级
*/
private
String
techLevel
;
/**
* 路面宽度
*/
private
String
roadWidth
;
/**
* 小型货车
*/
private
String
qcSTruck
;
/**
* 中型货车
*/
private
String
qcMTruck
;
/**
* 大型货车
*/
private
String
qcLTurck
;
/**
* 特大货车
*/
private
String
qcXlTruck
;
/**
* 集装箱车
*/
private
String
qcJzxTruck
;
/**
* 中小客车
*/
private
String
qcSmBus
;
/**
* 大客车
*/
private
String
qcLBus
;
/**
* 汽车自然合计
*/
private
String
qcNaturalAmount
;
/**
* 汽车当量合计
*/
private
String
qcCurrentAmount
;
/**
* 摩托车
*/
private
String
motor
;
/**
* 拖拉机当量合计
*/
private
String
tljCurrentAmount
;
/**
* 拖拉机自然合计
*/
private
String
tljNaturalAmount
;
/**
* 机动车当量合计
*/
private
String
jdcCurrentAmount
;
/**
* 机动车自然合计
*/
private
String
jdcNaturalAmount
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/entity/TrafficRoute.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 路线交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:44:18
*/
@Data
@TableName
(
"traffic_route"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
TrafficRoute
extends
Model
<
TrafficRoute
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Integer
id
;
/**
* 路线编码
*/
private
String
roadCode
;
/**
* 路线名称
*/
private
String
roadName
;
/**
* 观测里程
*/
private
String
spotLength
;
/**
* 机动车当量合计
*/
private
String
jdcCurrentAmount
;
/**
* 机动车自然合计
*/
private
String
jdcNaturalAmount
;
/**
* 汽车当量合计
*/
private
String
qcCurrentAmount
;
/**
* 汽车自然合计
*/
private
String
qcNaturalAmount
;
/**
* 小型货车
*/
private
String
qcSTruck
;
/**
* 中型货车
*/
private
String
qcMTruck
;
/**
* 大型货车
*/
private
String
qcLTurck
;
/**
* 特大货车
*/
private
String
qcXlTruck
;
/**
* 集装箱车
*/
private
String
qcJzxTruck
;
/**
* 中小客车
*/
private
String
qcSmBus
;
/**
* 大客车
*/
private
String
qcLBus
;
/**
* 摩托车
*/
private
String
motor
;
/**
* 拖拉机当量合计
*/
private
String
tljCurrentAmount
;
/**
* 拖拉机自然合计
*/
private
String
tljNaturalAmount
;
/**
* 行驶量(万车公里/日)
*/
private
String
driveAmount
;
/**
* 适应交通量(辆/日)
*/
private
String
adaptAmount
;
/**
* 交通拥挤度
*/
private
String
crowd
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/entity/TrafficSpot.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 观测站点表
*
* @author Xingyuyang
* @date 2019-04-29 14:38:10
*/
@Data
@TableName
(
"traffic_spot"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
TrafficSpot
extends
Model
<
TrafficSpot
>
{
private
static
final
long
serialVersionUID
=
1L
;
/** */
@TableId
private
Integer
rowId
;
/** 站点编码 */
private
String
spotCode
;
/** 站点名称 */
private
String
spotName
;
/** 路线编码 */
private
String
roadCode
;
/** 路线名称 */
private
String
roadName
;
/** 行政区划 */
private
String
xzqh
;
/** 观测站类型 */
private
String
spotType
;
/** 观测站桩号 */
private
String
spotm
;
/** 起点桩号 */
private
String
startm
;
/** 终点桩号 */
private
String
endm
;
/** 观测里程 */
private
String
length
;
/** 起点名称 */
private
String
startName
;
/** 终点名称 */
private
String
endName
;
/** 技术等级 */
private
String
techLevel
;
/** 行车道数 */
private
String
carRows
;
/** 面层类型 */
private
String
faceType
;
/** 路面宽度 */
private
String
width
;
/** 设计时速 */
private
String
speed
;
/** 地形 */
private
String
landscape
;
/** 停测月份 */
private
String
stopMonth
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/mapper/TrafficRoadsectionMapper.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection
;
/**
* 路段交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:48:34
*/
public
interface
TrafficRoadsectionMapper
extends
BaseMapper
<
TrafficRoadsection
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/mapper/TrafficRouteMapper.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute
;
/**
* 路线交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:44:18
*/
public
interface
TrafficRouteMapper
extends
BaseMapper
<
TrafficRoute
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/mapper/TrafficSpotMapper.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot
;
/**
* 观测站点表
*
* @author Xingyuyang
* @date 2019-04-29 14:38:10
*/
public
interface
TrafficSpotMapper
extends
BaseMapper
<
TrafficSpot
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/TrafficRoadsectionService.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection
;
/**
* 路段交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:48:34
*/
public
interface
TrafficRoadsectionService
extends
IService
<
TrafficRoadsection
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/TrafficRouteService.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute
;
/**
* 路线交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:44:18
*/
public
interface
TrafficRouteService
extends
IService
<
TrafficRoute
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/TrafficSpotService.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot
;
/**
* 观测站点表
*
* @author Xingyuyang
* @date 2019-04-29 14:38:10
*/
public
interface
TrafficSpotService
extends
IService
<
TrafficSpot
>
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/impl/TrafficRoadsectionServiceImpl.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection
;
import
com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRoadsectionMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficRoadsectionService
;
import
org.springframework.stereotype.Service
;
/**
* 路段交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:48:34
*/
@Service
public
class
TrafficRoadsectionServiceImpl
extends
ServiceImpl
<
TrafficRoadsectionMapper
,
TrafficRoadsection
>
implements
TrafficRoadsectionService
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/impl/TrafficRouteServiceImpl.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute
;
import
com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRouteMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficRouteService
;
import
org.springframework.stereotype.Service
;
/**
* 路线交通量
*
* @author Xingyuyang
* @date 2019-04-30 10:44:18
*/
@Service
public
class
TrafficRouteServiceImpl
extends
ServiceImpl
<
TrafficRouteMapper
,
TrafficRoute
>
implements
TrafficRouteService
{
}
src/main/java/com/elephant/framework/galaxy/aroad/module/traffic/service/impl/TrafficSpotServiceImpl.java
0 → 100644
浏览文件 @
d45d727f
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
traffic
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot
;
import
com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficSpotMapper
;
import
com.elephant.framework.galaxy.aroad.module.traffic.service.TrafficSpotService
;
import
org.springframework.stereotype.Service
;
/**
* 观测站点表
*
* @author Xingyuyang
* @date 2019-04-29 14:38:10
*/
@Service
public
class
TrafficSpotServiceImpl
extends
ServiceImpl
<
TrafficSpotMapper
,
TrafficSpot
>
implements
TrafficSpotService
{
}
src/main/resources/mapper/roadcondition/RoadConditionEventMapper.xml
浏览文件 @
d45d727f
...
...
@@ -57,6 +57,41 @@
<result
property=
"city"
column=
"city"
/>
</resultMap>
<resultMap
id=
"staticByYHCityMap"
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByYHCityDto"
>
<result
property=
"count"
column=
"count"
/>
<result
property=
"startunit"
column=
"startunit"
/>
</resultMap>
<resultMap
id=
"citysWithOrganizesMap"
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.dto.CityNameDto"
>
<result
property=
"cityName"
column=
"city"
/>
<result
property=
"organizeName"
column=
"organize"
/>
</resultMap>
<select
id=
"getRoadConditionEventPage"
resultMap=
"roadConditionEventMap"
parameterType=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
SELECT
id,road_code,concat(road_code,'·',road_name) as
road_name,startm,endm,event_type,event_title,event_content,influence,cars_length,solution,start_time,start_unit,start_person,pre_end_time,end_time,end_unit,end_reason
FROM road_condition_event
<where>
<if
test=
"roadConditionEvent.startUnit != null"
>
start_unit = #{roadConditionEvent.startUnit} and
</if>
<if
test=
"roadConditionEvent.eventType != null"
>
event_type = #{roadConditionEvent.eventType} and
</if>
<if
test=
"roadConditionEvent.influence != null"
>
influence = #{roadConditionEvent.influence} and
</if>
<if
test=
"roadConditionEvent.carsLength != null"
>
cars_length = #{roadConditionEvent.carsLength} and
</if>
<if
test=
"roadConditionEvent.startTime != null"
>
start_time
>
#{roadConditionEvent.startTime} and
</if>
<if
test=
"roadConditionEvent.endTime != null"
>
end_time
<
#{roadConditionEvent.endTime} and
</if>
road_name is not null
</where>
</select>
<select
id=
"getById"
resultMap=
"roadConditionEventMap"
>
SELECT *
FROM road_condition_event
where id = #{id}
</select>
<select
id=
"staticByEventType"
resultMap=
"staticByEventTypeMap"
>
SELECT count(*) as count,
event_type
...
...
@@ -76,6 +111,7 @@
YEAR(start_time) AS year,
MONTH(start_time) AS month
FROM road_condition_event
WHERE event_type = '养护施工'
GROUP BY YEAR(start_time),
MONTH(start_time)
</select>
...
...
@@ -84,6 +120,7 @@
SELECT count(*) AS count,
road_code as roadcode
FROM road_condition_event
WHERE event_type = '养护施工'
GROUP BY road_code
</select>
...
...
@@ -96,5 +133,22 @@
GROUP BY city
</select>
<select
id=
"staticByYHCity"
resultMap=
"staticByYHCityMap"
>
SELECT count(*) as count,
start_unit as startunit
FROM road_condition_event
WHERE event_type = '养护施工'
GROUP BY start_unit
</select>
<select
id=
"getTree"
resultMap=
"citysWithOrganizesMap"
>
SELECT city,
fullname as organize
FROM base_organize
WHERE city IS NOT NULL
AND city != '山东'
GROUP BY city,
fullname
</select>
</mapper>
src/main/resources/mapper/traffic/TrafficRoadsectionMapper.xml
0 → 100644
浏览文件 @
d45d727f
<?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=
"com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRoadsectionMapper"
>
<resultMap
id=
"trafficRoadsectionMap"
type=
"com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"spotName"
column=
"spot_name"
/>
<result
property=
"spotCode"
column=
"spot_code"
/>
<result
property=
"spotLength"
column=
"spot_length"
/>
<result
property=
"techLevel"
column=
"tech_level"
/>
<result
property=
"roadWidth"
column=
"road_width"
/>
<result
property=
"qcSTruck"
column=
"QC_s_truck"
/>
<result
property=
"qcMTruck"
column=
"QC_m_truck"
/>
<result
property=
"qcLTurck"
column=
"QC_l_turck"
/>
<result
property=
"qcXlTruck"
column=
"QC_xl_truck"
/>
<result
property=
"qcJzxTruck"
column=
"QC_jzx_truck"
/>
<result
property=
"qcSmBus"
column=
"QC_sm_bus"
/>
<result
property=
"qcLBus"
column=
"QC_l_bus"
/>
<result
property=
"qcNaturalAmount"
column=
"QC_natural_amount"
/>
<result
property=
"qcCurrentAmount"
column=
"QC_current_amount"
/>
<result
property=
"motor"
column=
"motor"
/>
<result
property=
"tljCurrentAmount"
column=
"TLJ_current_amount"
/>
<result
property=
"tljNaturalAmount"
column=
"TLJ_natural_amount"
/>
<result
property=
"jdcCurrentAmount"
column=
"JDC_current_amount"
/>
<result
property=
"jdcNaturalAmount"
column=
"JDC_natural_amount"
/>
</resultMap>
</mapper>
src/main/resources/mapper/traffic/TrafficRouteMapper.xml
0 → 100644
浏览文件 @
d45d727f
<?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=
"com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRouteMapper"
>
<resultMap
id=
"trafficRouteMap"
type=
"com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoute"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"roadCode"
column=
"road_code"
/>
<result
property=
"roadName"
column=
"road_name"
/>
<result
property=
"spotLength"
column=
"spot_length"
/>
<result
property=
"jdcCurrentAmount"
column=
"JDC_current_amount"
/>
<result
property=
"jdcNaturalAmount"
column=
"JDC_natural_amount"
/>
<result
property=
"qcCurrentAmount"
column=
"QC_current_amount"
/>
<result
property=
"qcNaturalAmount"
column=
"QC_natural_amount"
/>
<result
property=
"qcSTruck"
column=
"QC_s_truck"
/>
<result
property=
"qcMTruck"
column=
"QC_m_truck"
/>
<result
property=
"qcLTurck"
column=
"QC_l_turck"
/>
<result
property=
"qcXlTruck"
column=
"QC_xl_truck"
/>
<result
property=
"qcJzxTruck"
column=
"QC_jzx_truck"
/>
<result
property=
"qcSmBus"
column=
"QC_sm_bus"
/>
<result
property=
"qcLBus"
column=
"QC_l_bus"
/>
<result
property=
"motor"
column=
"motor"
/>
<result
property=
"tljCurrentAmount"
column=
"TLJ_current_amount"
/>
<result
property=
"tljNaturalAmount"
column=
"TLJ_natural_amount"
/>
<result
property=
"driveAmount"
column=
"drive_amount"
/>
<result
property=
"adaptAmount"
column=
"adapt_amount"
/>
<result
property=
"crowd"
column=
"crowd"
/>
</resultMap>
</mapper>
src/main/resources/mapper/traffic/TrafficSpotMapper.xml
0 → 100644
浏览文件 @
d45d727f
<?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=
"com.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficSpotMapper"
>
<resultMap
id=
"trafficSpotMap"
type=
"com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficSpot"
>
<id
property=
"rowId"
column=
"row_id"
/>
<result
property=
"spotCode"
column=
"spot_code"
/>
<result
property=
"spotName"
column=
"spot_name"
/>
<result
property=
"roadCode"
column=
"road_code"
/>
<result
property=
"roadName"
column=
"road_name"
/>
<result
property=
"xzqh"
column=
"XZQH"
/>
<result
property=
"spotType"
column=
"spot_type"
/>
<result
property=
"spotm"
column=
"spotM"
/>
<result
property=
"startm"
column=
"startM"
/>
<result
property=
"endm"
column=
"endM"
/>
<result
property=
"length"
column=
"length"
/>
<result
property=
"startName"
column=
"start_name"
/>
<result
property=
"endName"
column=
"end_name"
/>
<result
property=
"techLevel"
column=
"tech_level"
/>
<result
property=
"carRows"
column=
"car_rows"
/>
<result
property=
"faceType"
column=
"face_type"
/>
<result
property=
"width"
column=
"width"
/>
<result
property=
"speed"
column=
"speed"
/>
<result
property=
"landscape"
column=
"landscape"
/>
<result
property=
"stopMonth"
column=
"stop_month"
></result>
</resultMap>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论