Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
ec7ee022
提交
ec7ee022
authored
5月 17, 2019
作者:
Phyday
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接平台路况数据,提供移动端接口
上级
587f94bc
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
1227 行增加
和
146 行删除
+1227
-146
road_condition_event.sql
db/road_condition_event/road_condition_event.sql
+33
-21
pom.xml
pom.xml
+41
-0
ARoadApplication.java
...com/elephant/framework/galaxy/aroad/ARoadApplication.java
+2
-0
RoadConditionEventController.java
...oadcondition/controller/RoadConditionEventController.java
+166
-3
CoordinateDto.java
.../galaxy/aroad/module/roadcondition/dto/CoordinateDto.java
+2
-0
RoadConditionEvent.java
...aroad/module/roadcondition/entity/RoadConditionEvent.java
+146
-33
RoadConditionEventMapper.java
...module/roadcondition/mapper/RoadConditionEventMapper.java
+25
-1
GetRoadPlatformService.java
.../module/roadcondition/service/GetRoadPlatformService.java
+5
-0
RoadConditionEventService.java
...dule/roadcondition/service/RoadConditionEventService.java
+80
-26
GetRoadPlatformImpl.java
...odule/roadcondition/service/impl/GetRoadPlatformImpl.java
+117
-0
RoadConditionEventServiceImpl.java
...condition/service/impl/RoadConditionEventServiceImpl.java
+101
-5
ResourceServerConfiguration.java
...xy/aroad/security/config/ResourceServerConfiguration.java
+3
-4
RoadConditionEventMapper.xml
...sources/mapper/roadcondition/RoadConditionEventMapper.xml
+506
-53
没有找到文件。
db/road_condition_event/road_condition_event.sql
浏览文件 @
ec7ee022
...
@@ -24,29 +24,41 @@ DROP TABLE IF EXISTS `road_condition_event`;
...
@@ -24,29 +24,41 @@ DROP TABLE IF EXISTS `road_condition_event`;
CREATE
TABLE
`road_condition_event`
CREATE
TABLE
`road_condition_event`
(
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`road_code`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线编码'
,
`event_id`
varchar
(
30
)
DEFAULT
NULL
COMMENT
'事件id'
,
`road_name`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'路线名称'
,
`road_code`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'路线编码'
,
`startM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'开始桩号'
,
`road_name`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'路线名称'
,
`endM`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'结束桩号'
,
`maintain_unit`
varchar
(
30
)
DEFAULT
NULL
COMMENT
'管养单位'
,
`event_type`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件类型'
,
`sToeM`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'起止桩号'
,
`event_title`
varchar
(
60
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件标题'
,
`startM`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'开始桩号'
,
`event_content`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'事件详情'
,
`endM`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'结束桩号'
,
`influence`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'影响程度'
,
`event_type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'事件类型'
,
`cars_length`
varchar
(
8
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'压车长度'
,
`event_title`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'事件标题'
,
`solution`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'绕行方案'
,
`event_content`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'事件详情'
,
`start_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'发布时间'
,
`influence`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'影响程度(1=封闭交通/2=影响交通/3=可正常通行)'
,
`start_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布单位'
,
`cars_length`
varchar
(
8
)
DEFAULT
NULL
COMMENT
'压车长度'
,
`start_person`
varchar
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'发布人'
,
`solution`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'绕行方案'
,
`pre_end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'预撤时间'
,
`start_person`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'发布人'
,
`end_time`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'撤销时间'
,
`start_time`
datetime
DEFAULT
NULL
COMMENT
'发布时间'
,
`end_unit`
varchar
(
15
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销单位'
,
`start_unit`
varchar
(
15
)
DEFAULT
NULL
COMMENT
'发布单位'
,
`end_reason`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'撤销原因'
,
`start_unit_no`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'发布单位代码'
,
`start_bz`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`pre_end_time`
datetime
DEFAULT
NULL
COMMENT
'预撤时间'
,
`end_person`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'撤销人'
,
`end_time`
datetime
DEFAULT
NULL
COMMENT
'撤销时间'
,
`end_unit`
varchar
(
15
)
DEFAULT
NULL
COMMENT
'撤销单位'
,
`end_unit_no`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'撤销单位代码'
,
`end_reason`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'撤销原因'
,
`end_bz`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'撤销备注'
,
`check_person`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'审核人'
,
`check_time`
datetime
DEFAULT
NULL
COMMENT
'审核时间'
,
`longitude`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'经度'
,
`latitude`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'纬度'
,
`current`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'当前页'
,
`size`
varchar
(
10
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
11
AUTO_INCREMENT
=
5987
CHARACTER
SET
=
utf8mb4
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'路况事件管理'
;
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'路况事件管理'
ROW_FORMAT
=
Dynamic
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
...
...
pom.xml
浏览文件 @
ec7ee022
...
@@ -155,6 +155,47 @@
...
@@ -155,6 +155,47 @@
<artifactId>
fastdfs-client
</artifactId>
<artifactId>
fastdfs-client
</artifactId>
<version>
${fastdfs.version}
</version>
<version>
${fastdfs.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
javax.xml.rpc
</groupId>
<artifactId>
javax.xml.rpc-api
</artifactId>
<version>
1.1.2
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
2.9.2
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.9.2
</version>
</dependency>
<dependency>
<groupId>
org.apache.axis
</groupId>
<artifactId>
axis
</artifactId>
<version>
1.4
</version>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
<classifier>
jdk15
</classifier>
</dependency>
<dependency>
<groupId>
commons-discovery
</groupId>
<artifactId>
commons-discovery
</artifactId>
<version>
0.5
</version>
</dependency>
<dependency>
<groupId>
wsdl4j
</groupId>
<artifactId>
wsdl4j
</artifactId>
<version>
1.6.3
</version>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.5
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
src/main/java/com/elephant/framework/galaxy/aroad/ARoadApplication.java
浏览文件 @
ec7ee022
...
@@ -2,6 +2,7 @@ package com.elephant.framework.galaxy.aroad;
...
@@ -2,6 +2,7 @@ package com.elephant.framework.galaxy.aroad;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
/**
/**
...
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*/
*/
@EnableScheduling
@SpringBootApplication
@SpringBootApplication
public
class
ARoadApplication
{
public
class
ARoadApplication
{
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/controller/RoadConditionEventController.java
浏览文件 @
ec7ee022
...
@@ -6,10 +6,21 @@ import com.elephant.framework.galaxy.aroad.module.common.controller.BaseControll
...
@@ -6,10 +6,21 @@ import com.elephant.framework.galaxy.aroad.module.common.controller.BaseControll
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
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.module.roadcondition.service.RoadConditionEventService
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.ezmorph.object.DateMorpher
;
import
net.sf.json.JSONArray
;
import
net.sf.json.util.JSONUtils
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 路况事件统计
* 路况事件统计
*
*
...
@@ -42,12 +53,11 @@ public class RoadConditionEventController extends BaseController {
...
@@ -42,12 +53,11 @@ public class RoadConditionEventController extends BaseController {
/**
/**
* 分页查询
* 分页查询
*
*
* @param text 路况事件统计
* @return
* @return
*/
*/
@GetMapping
(
"/mobilepage"
)
@GetMapping
(
"/mobilepage"
)
public
R
getRoadConditionEventMobilePage
(
@RequestParam
(
"text"
)
String
text
)
{
public
R
getRoadConditionEventMobilePage
()
{
return
new
R
<>(
roadConditionEventService
.
getRoadConditionEventMobilePage
(
text
));
return
new
R
<>(
roadConditionEventService
.
getRoadConditionEventMobilePage
());
}
}
/**
/**
* @description : 根据事件类型统计
* @description : 根据事件类型统计
...
@@ -221,4 +231,157 @@ public class RoadConditionEventController extends BaseController {
...
@@ -221,4 +231,157 @@ public class RoadConditionEventController extends BaseController {
public
R
removeById
(
@PathVariable
Integer
id
)
{
public
R
removeById
(
@PathVariable
Integer
id
)
{
return
new
R
<>(
roadConditionEventService
.
removeById
(
id
));
return
new
R
<>(
roadConditionEventService
.
removeById
(
id
));
}
}
/**
* 新增养护施工事件
* @param
* @return List<String>
*/
@SysLog
(
"新增养护施工事件"
)
@PostMapping
(
"/saveRoadMaintainEvent"
)
@ApiOperation
(
value
=
"新增养护施工事件"
)
@ApiImplicitParam
(
name
=
"jsonString"
,
value
=
"养护施工事件JSON格式字符串"
,
required
=
true
,
dataType
=
"String"
)
public
R
saveRoadMaintainEvent
(
@RequestBody
String
jsonString
){
String
msg
=
""
;
Integer
code
=
0
;
List
<
MultiValueMap
<
String
,
String
>>
errorEventIds
=
new
ArrayList
<
MultiValueMap
<
String
,
String
>>();
List
<
Map
<
String
,
Object
>>
listMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
jsonString
);
String
[]
dateFormats
=
new
String
[]
{
"yyyy-MM-dd HH:mm:ss"
};
JSONUtils
.
getMorpherRegistry
().
registerMorpher
(
new
DateMorpher
(
dateFormats
));
List
<
RoadConditionEvent
>
roadConditionEvents
=
(
List
<
RoadConditionEvent
>)
JSONArray
.
toCollection
(
jsonArray
,
RoadConditionEvent
.
class
);
try
{
for
(
RoadConditionEvent
event
:
roadConditionEvents
){
if
(
getRoadMaintainEventByEventID
(
event
.
getEventId
())
>
0
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"eventId"
,
event
.
getEventId
());
listMap
.
add
(
map
);
msg
=
"该路况事件ID已存在,请调用路况事件更新接口,更新路况事件"
;
code
=
203
;
continue
;
}
else
{
roadConditionEventService
.
save
(
event
);
if
(
code
!=
203
){
msg
=
"success"
;
code
=
200
;
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
new
R
<>(
code
,
msg
,
listMap
);
}
/**
* 根据事件ID查询该路况事件是否已经存在(大于0表示已存在)
* @return
*/
public
Integer
getRoadMaintainEventByEventID
(
String
eventID
)
{
return
roadConditionEventService
.
getRoadMaintainEventByEventID
(
eventID
);
}
/**
* 更新养护施工事件
* 保存历史数据
* @param
* @return void
*/
@SysLog
(
"更新养护施工事件"
)
@PostMapping
(
"/updateRoadMaintainEvent"
)
@ApiOperation
(
value
=
"更新养护施工事件"
)
@ApiImplicitParam
(
name
=
"jsonString"
,
value
=
"养护施工事件JSON格式字符串"
,
required
=
true
,
dataType
=
"String"
)
public
R
updateRoadMaintainEvent
(
@RequestBody
String
jsonString
)
throws
Exception
{
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
String
msg
=
""
;
Integer
code
=
0
;
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
jsonString
);
String
[]
dateFormats
=
new
String
[]
{
"yyyy-MM-dd HH:mm:ss"
};
JSONUtils
.
getMorpherRegistry
().
registerMorpher
(
new
DateMorpher
(
dateFormats
));
List
<
RoadConditionEvent
>
roadConditionEvents
=
(
List
<
RoadConditionEvent
>)
JSONArray
.
toCollection
(
jsonArray
,
RoadConditionEvent
.
class
);
try
{
for
(
int
i
=
0
;
i
<
roadConditionEvents
.
size
();
i
++){
RoadConditionEvent
event
=
(
RoadConditionEvent
)
roadConditionEvents
.
get
(
i
);
RoadConditionEvent
result
=
getRoadMaintainEvent
(
event
);
if
(
result
!=
null
){
infoList
.
add
(
jsonArray
.
get
(
i
));
msg
=
"存在重复数据,请核实"
;
code
=
204
;
continue
;
}
else
{
roadConditionEventService
.
save
(
event
);
if
(
code
!=
204
){
msg
=
"success"
;
code
=
200
;
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
new
R
<>(
code
,
msg
,
infoList
);
}
/**
* 查询该路况事件是否已经存在(大于0表示已存在) *
* @return
*/
public
RoadConditionEvent
getRoadMaintainEvent
(
RoadConditionEvent
event
)
{
return
roadConditionEventService
.
selectRoadMaintainEvent
(
event
);
}
/**
* 删除养护施工事件(通过主键id)
* flag(删除:1)
* @param
* @return R
*/
@SysLog
(
"删除养护施工事件,假删除"
)
@DeleteMapping
(
"/deleteRoadMaintainEvent"
)
@ApiOperation
(
value
=
"删除养护施工事件"
)
@ApiImplicitParam
(
name
=
"jsonString"
,
value
=
"养护施工事件JSON格式字符串"
,
required
=
true
,
dataType
=
"String"
)
public
R
deleteRoadMaintainEvent
(
@RequestBody
String
jsonString
){
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
jsonString
);
String
[]
dateFormats
=
new
String
[]
{
"yyyy-MM-dd HH:mm:ss"
};
JSONUtils
.
getMorpherRegistry
().
registerMorpher
(
new
DateMorpher
(
dateFormats
));
List
<
RoadConditionEvent
>
roadConditionEvents
=
(
List
<
RoadConditionEvent
>)
JSONArray
.
toCollection
(
jsonArray
,
RoadConditionEvent
.
class
);
try
{
for
(
RoadConditionEvent
event
:
roadConditionEvents
){
roadConditionEventService
.
deleteBatchByEvent
(
event
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
new
R
<>(
200
,
"success"
);
}
/**
* 撤销养护施工事件(通过eventId)
* flag(撤销:0)
* @param
* @return R
*/
@SysLog
(
"撤销养护施工事件"
)
@PutMapping
(
"/revokeRoadMaintainEventByEventId"
)
@ApiOperation
(
value
=
"撤销养护施工事件"
)
@ApiImplicitParam
(
name
=
"jsonString"
,
value
=
"养护施工事件JSON格式字符串"
,
required
=
true
,
dataType
=
"String"
)
public
R
revokeRoadMaintainEventByEventId
(
@RequestBody
String
jsonString
){
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
jsonString
);
List
<
RoadConditionEvent
>
roadMaintainEvents
=
(
List
<
RoadConditionEvent
>)
JSONArray
.
toCollection
(
jsonArray
,
RoadConditionEvent
.
class
);
List
<
Object
>
eventIdList
=
new
ArrayList
<
Object
>();
try
{
for
(
RoadConditionEvent
event
:
roadMaintainEvents
){
eventIdList
.
add
(
event
.
getEventId
());
}
Integer
rowNumber
=
roadConditionEventService
.
updateBatchByEventId
(
eventIdList
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
new
R
<>(
200
,
"success"
);
}
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/dto/CoordinateDto.java
浏览文件 @
ec7ee022
...
@@ -20,6 +20,8 @@ import java.io.Serializable;
...
@@ -20,6 +20,8 @@ import java.io.Serializable;
public
class
CoordinateDto
implements
Serializable
{
public
class
CoordinateDto
implements
Serializable
{
/** 主键 */
/** 主键 */
private
int
id
;
private
int
id
;
/** 事件标题 */
private
String
eventTitle
;
/** 事件类型 */
/** 事件类型 */
private
String
eventType
;
private
String
eventType
;
/** 经度 */
/** 经度 */
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/entity/RoadConditionEvent.java
浏览文件 @
ec7ee022
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
entity
;
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
*
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* 路况事件
统计
* 路况事件
表
*
*
* @author Xingyuyang
* @author Xingyuyang
* @date 2019-0
4-23 16:41:06
* @date 2019-0
5-16 15:28:40
*/
*/
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@Data
@TableName
(
"road_condition_event"
)
@TableName
(
"road_condition_event"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
RoadConditionEvent
extends
Model
<
RoadConditionEvent
>
{
public
class
RoadConditionEvent
extends
Model
<
RoadConditionEvent
>
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
/** */
@ApiModelProperty
(
value
=
"事件ID"
,
name
=
"eventId"
)
@TableId
private
Integer
id
;
private
String
eventId
;
/** 路线编码 */
/**
* 路线编码
*/
@ApiModelProperty
(
value
=
"路线编号"
,
name
=
"roadCode"
)
private
String
roadCode
;
private
String
roadCode
;
/** 路线名称 */
/**
* 路线名称
*/
@ApiModelProperty
(
value
=
"路线名称"
,
name
=
"roadName"
)
private
String
roadName
;
private
String
roadName
;
/** 开始桩号 */
/**
* 管养单位
*/
@ApiModelProperty
(
value
=
"管养单位"
,
name
=
"maintainUnit"
)
private
String
maintainUnit
;
/**
* 起止桩号
*/
@ApiModelProperty
(
value
=
"起止桩号"
,
name
=
"stoem"
)
private
String
stoem
;
/**
* 开始桩号
*/
@ApiModelProperty
(
value
=
"开始桩号"
,
name
=
"startm"
)
private
String
startm
;
private
String
startm
;
/** 结束桩号 */
/**
* 结束桩号
*/
@ApiModelProperty
(
value
=
"结束桩号"
,
name
=
"endm"
)
private
String
endm
;
private
String
endm
;
/** 事件类型 */
/**
* 事件类型
*/
@ApiModelProperty
(
value
=
"事件类型"
,
name
=
"eventType"
)
private
String
eventType
;
private
String
eventType
;
/** 事件标题 */
/**
* 事件标题
*/
@ApiModelProperty
(
value
=
"事件标题"
,
name
=
"eventTitle"
)
private
String
eventTitle
;
private
String
eventTitle
;
/** 事件详情 */
/**
* 事件详情
*/
@ApiModelProperty
(
value
=
"事件详情"
,
name
=
"eventContent"
)
private
String
eventContent
;
private
String
eventContent
;
/** 影响程度 */
/**
* 影响程度(1=封闭交通/2=影响交通/3=可正常通行)
*/
@ApiModelProperty
(
value
=
"影响程度(1=封闭交通/2=影响交通/3=可正常通行)"
,
name
=
"influence"
)
private
String
influence
;
private
String
influence
;
/** 压车长度 */
/**
* 压车长度
*/
@ApiModelProperty
(
value
=
"压车长度"
,
name
=
"carsLength"
)
private
String
carsLength
;
private
String
carsLength
;
/** 绕行方案 */
/**
* 绕行方案
*/
@ApiModelProperty
(
value
=
"绕行方案"
,
name
=
"solution"
)
private
String
solution
;
private
String
solution
;
/** 发布时间 */
/**
* 发布人
*/
@ApiModelProperty
(
value
=
"发布人"
,
name
=
"startPerson"
)
private
String
startPerson
;
/**
* 发布时间
*/
@ApiModelProperty
(
value
=
"发布时间"
,
name
=
"startTime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
startTime
;
private
Date
startTime
;
/** 发布单位 */
/**
* 发布单位
*/
@ApiModelProperty
(
value
=
"发布单位"
,
name
=
"startUnit"
)
private
String
startUnit
;
private
String
startUnit
;
/** 发布人 */
/**
private
String
startPerson
;
* 发布单位代码
/** 预撤时间 */
*/
@ApiModelProperty
(
value
=
"发布单位代码"
,
name
=
"startUnitNo"
)
private
String
startUnitNo
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
,
name
=
"startBz"
)
private
String
startBz
;
/**
* 预撤时间
*/
@ApiModelProperty
(
value
=
"预撤时间"
,
name
=
"preEndTime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
preEndTime
;
private
Date
preEndTime
;
/** 撤销时间 */
/**
* 撤销人
*/
@ApiModelProperty
(
value
=
"撤销人"
,
name
=
"endPerson"
)
private
String
endPerson
;
/**
* 撤销时间
*/
@ApiModelProperty
(
value
=
"撤销时间"
,
name
=
"endTime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private
Date
endTime
;
private
Date
endTime
;
/** 撤销单位 */
/**
* 撤销单位
*/
@ApiModelProperty
(
value
=
"撤销单位"
,
name
=
"endUnit"
)
private
String
endUnit
;
private
String
endUnit
;
/** 撤销原因 */
/**
* 撤销单位代码
*/
@ApiModelProperty
(
value
=
"撤销单位代码"
,
name
=
"endUnitNo"
)
private
String
endUnitNo
;
/**
* 撤销原因
*/
@ApiModelProperty
(
value
=
"撤销原因"
,
name
=
"endReason"
)
private
String
endReason
;
private
String
endReason
;
/**
private
Long
current
;
* 撤销备注
*/
private
Long
size
;
@ApiModelProperty
(
value
=
"撤销备注"
,
name
=
"endBz"
)
private
String
endBz
;
/**
* 审核人
*/
@ApiModelProperty
(
value
=
"审核人"
,
name
=
"checkPerson"
)
private
String
checkPerson
;
/**
* 审核时间
*/
@ApiModelProperty
(
value
=
"审核时间"
,
name
=
"checkTime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
checkTime
;
/**
/**
* 经度
* 经度
*/
*/
@ApiModelProperty
(
value
=
"经度"
,
name
=
"longitude"
)
private
String
longitude
;
private
String
longitude
;
/**
/**
* 纬度
* 纬度
*/
*/
@ApiModelProperty
(
value
=
"纬度"
,
name
=
"latitude"
)
private
String
latitude
;
private
String
latitude
;
}
/**
* 当前页
*/
@ApiModelProperty
(
value
=
"当前页"
,
name
=
"current"
)
private
long
current
;
/**
* 一页的数量
*/
@ApiModelProperty
(
value
=
"一页的数量"
,
name
=
"size"
)
private
long
size
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/mapper/RoadConditionEventMapper.java
浏览文件 @
ec7ee022
...
@@ -18,7 +18,7 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
...
@@ -18,7 +18,7 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
IPage
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
IPage
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
(
@Param
(
"text"
)
String
text
);
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
();
List
<
staticByEventTypeDto
>
staticByEventType
();
List
<
staticByEventTypeDto
>
staticByEventType
();
...
@@ -51,4 +51,28 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
...
@@ -51,4 +51,28 @@ public interface RoadConditionEventMapper extends BaseMapper<RoadConditionEvent>
List
<
CityNameDto
>
getTree
();
List
<
CityNameDto
>
getTree
();
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
);
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
);
/**
* 查询数据库是否存在该实体
*
* @param event
* @return
*/
RoadConditionEvent
selectRoadMaintainEvent
(
RoadConditionEvent
event
);
/**
* 撤销事件,更新flag标识为0
*
* @param eventIdList
* @return
*/
Integer
updateBatchByEventId
(
@Param
(
"eventIdList"
)
List
<
Object
>
eventIdList
);
/**
* 删除养护施工事件(假删除)更新flag标识为1
*
* @param event
* @return
*/
Integer
deleteBatchByEvent
(
RoadConditionEvent
event
);
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/GetRoadPlatformService.java
0 → 100644
浏览文件 @
ec7ee022
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
;
public
interface
GetRoadPlatformService
{
void
scheduledSaveRoadInfo
();
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/RoadConditionEventService.java
浏览文件 @
ec7ee022
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.dto.*
;
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.entity.RoadConditionEvent
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -15,80 +16,133 @@ import java.util.List;
...
@@ -15,80 +16,133 @@ import java.util.List;
* @date 2019-04-23 16:41:06
* @date 2019-04-23 16:41:06
*/
*/
public
interface
RoadConditionEventService
extends
IService
<
RoadConditionEvent
>
{
public
interface
RoadConditionEventService
extends
IService
<
RoadConditionEvent
>
{
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
(
String
text
);
/**
* 根据事件ID查询该路况事件是否已经存在(大于0表示已存在)
*
* @param eventID
* @return * @return
*/
Integer
getRoadMaintainEventByEventID
(
String
eventID
);
/**
/**
* 查询数据库是否存在该实体
*
*
* @param event
* @return
*/
RoadConditionEvent
selectRoadMaintainEvent
(
RoadConditionEvent
event
);
/**
* 根据事件id更新标识
*
* @param
* @return
*/
Integer
updateBatchByEventId
(
List
<
Object
>
eventIdList
);
/** 删除事件(假删除),更新flag标识为1 */
Integer
deleteBatchByEvent
(
RoadConditionEvent
event
);
/**
* 普通国省道养护施工事件信息是否已存在
*
* @return
*/
public
Integer
getRoadMaintainEventByRoadPlatform
(
// String infid,
String
inftypename
,
String
inftitle
,
String
infcontent
,
String
infwrinter
,
Date
writerdate
,
String
infchecker
,
Date
checkdate
,
Date
removedate
,
// String remark,
String
glno
,
String
writerno
,
String
loctx
,
String
locty
,
String
zhuanghao
,
String
daolu
,
// String removereson,
// String departname,
// String removedepart,
// Date expdate,
// String impact,
// String zhfrom,
// String zhto,
String
yccd
);
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
);
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
();
/**
* @description : 根据事件类型查询
* @description : 根据事件类型查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:52
* @date : 2019/4/23 0023 17:52
* @param :
* @param :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
* @return :
*
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
*/
*/
List
<
staticByEventTypeDto
>
staticByEventType
();
List
<
staticByEventTypeDto
>
staticByEventType
();
/**
/**
*
* @description : 根据事件类型查询
* @description : 根据事件类型查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019/4/23 0023 17:52
* @date : 2019/4/23 0023 17:52
* @param :
* @param :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
* @return :
*
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
*/
*/
List
<
staticByInfluenceDto
>
staticByInfluence
();
List
<
staticByInfluenceDto
>
staticByInfluence
();
/**
/**
*
* @description : 根据月份查询
* @description : 根据月份查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019-4-24 10:28:31
* @date : 2019-4-24 10:28:31
* @param :
* @param :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
* @return :
*
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
*/
*/
List
<
staticByMonthDto
>
staticByMonth
();
List
<
staticByMonthDto
>
staticByMonth
();
/**
/**
*
* @description : 根据路段编码查询
* @description : 根据路段编码查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019-4-24 10:28:31
* @date : 2019-4-24 10:28:31
* @param :
* @param :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
* @return :
*
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent>
*/
*/
List
<
staticByRoadCodeDto
>
staticByRoadCode
();
List
<
staticByRoadCodeDto
>
staticByRoadCode
();
/**
/**
*
* @description : 根据城市查询
* @description : 根据城市查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019/4/24 14:28
* @date : 2019/4/24 14:28
* @return :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
*
*/
*/
List
<
staticByCityDto
>
staticByCity
();
List
<
staticByCityDto
>
staticByCity
();
/**
/**
*
* @description : 根据城市查询
* @description : 根据城市查询
* @author : Xingyuyang
* @author : Xingyuyang
* @date : 2019/4/24 14:28
* @date : 2019/4/24 14:28
* @return :
* @return : java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
* java.util.List<com.elephant.framework.galaxy.aroad.module.roadcondition.dto.staticByCityDto>
*
*/
*/
List
<
staticByYHCityDto
>
staticByYHCity
();
List
<
staticByYHCityDto
>
staticByYHCity
();
/**
/**
* @Description: 查询树形结构
* @Description: 查询树形结构 @Param: []
* @Param: []
*
* @return: java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea>
* @return:
* @Author: XingYuyang
* java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea> @Author:
*
@Date: 2019/4/10
* XingYuyang
@Date: 2019/4/10
*/
*/
BaseTreeDto
getTree
();
BaseTreeDto
getTree
();
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/impl/GetRoadPlatformImpl.java
0 → 100644
浏览文件 @
ec7ee022
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
.
impl
;
import
cn.hutool.core.date.DateTime
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.GetRoadPlatformService
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
javax.xml.namespace.QName
;
import
javax.xml.rpc.ParameterMode
;
import
javax.xml.rpc.encoding.XMLType
;
import
java.text.SimpleDateFormat
;
import
java.util.Map
;
/** 普通国省道路况接口 */
@Slf4j
@Service
public
class
GetRoadPlatformImpl
implements
GetRoadPlatformService
{
@Autowired
private
RoadConditionEventService
roadConditionEventService
;
/** 定时任务间隔1分钟获取接口数据 */
@Override
@Scheduled
(
cron
=
"0 0/1 * * * ?"
)
public
void
scheduledSaveRoadInfo
()
{
log
.
info
(
"执行定时任务获取路况平台路况事件时间: {}"
,
DateTime
.
now
());
try
{
String
endPoint
=
"http://103.239.155.114:17001/lkxxfw/RoadInfoService?wsdl"
;
String
nameSpace
=
"http://services.team.com/"
;
org
.
apache
.
axis
.
client
.
Service
service
=
new
org
.
apache
.
axis
.
client
.
Service
();
javax
.
xml
.
rpc
.
Call
call
=
service
.
createCall
();
call
.
setTargetEndpointAddress
(
new
java
.
net
.
URL
(
endPoint
).
toString
());
call
.
setOperationName
(
new
QName
(
nameSpace
,
"getLkInfo"
));
call
.
addParameter
(
"arg0"
,
XMLType
.
XSD_STRING
,
ParameterMode
.
IN
);
call
.
setReturnType
(
org
.
apache
.
axis
.
encoding
.
XMLType
.
XSD_STRING
);
// 设置返回类型
String
res
=
(
String
)
call
.
invoke
(
new
Object
[]
{
"B"
});
Map
mapTypes
=
JSON
.
parseObject
(
res
);
// System.out.println(res);
for
(
Object
obj
:
mapTypes
.
keySet
())
{
JSONArray
ojb
=
(
JSONArray
)
mapTypes
.
get
(
"ROADINFO"
);
Object
[]
array
=
ojb
.
toArray
();
for
(
Object
o
:
array
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Integer
rowNum
=
null
;
rowNum
=
roadConditionEventService
.
getRoadMaintainEventByRoadPlatform
(
// ((JSONObject) o).get("infid").toString(),
((
JSONObject
)
o
).
get
(
"inftypename"
).
toString
(),
((
JSONObject
)
o
).
get
(
"inftitle"
).
toString
(),
((
JSONObject
)
o
).
get
(
"infcontent"
).
toString
(),
((
JSONObject
)
o
).
get
(
"infwrinter"
).
toString
(),
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"writerdate"
).
toString
()),
((
JSONObject
)
o
).
get
(
"infchecker"
).
toString
(),
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"checkdate"
).
toString
()),
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"removedate"
).
toString
().
equals
(
"null"
)?
"1900-01-01 00:00:00"
:((
JSONObject
)
o
).
get
(
"removedate"
).
toString
()),
// ((JSONObject) o).get("remark").toString(),
((
JSONObject
)
o
).
get
(
"glno"
).
toString
(),
((
JSONObject
)
o
).
get
(
"writerno"
).
toString
(),
((
JSONObject
)
o
).
get
(
"loctx"
).
toString
(),
((
JSONObject
)
o
).
get
(
"locty"
).
toString
(),
((
JSONObject
)
o
).
get
(
"zhuanghao"
).
toString
(),
((
JSONObject
)
o
).
get
(
"daolu"
).
toString
(),
// ((JSONObject) o).get("removereson").toString(),
// ((JSONObject) o).get("departname").toString(),
// ((JSONObject) o).get("removedepart").toString(),
// formatter.parse(((JSONObject) o).get("expdate").toString()),
// ((JSONObject) o).get("impact").toString(),
// ((JSONObject) o).get("zhfrom").toString(),
// ((JSONObject) o).get("zhto").toString(),
((
JSONObject
)
o
).
get
(
"yccd"
).
toString
());
if
(
rowNum
>
0
)
{
continue
;
}
else
{
roadConditionEventService
.
save
(
RoadConditionEvent
.
builder
()
.
eventId
(((
JSONObject
)
o
).
get
(
"infid"
).
toString
())
.
eventType
(((
JSONObject
)
o
).
get
(
"inftypename"
).
toString
())
.
eventTitle
(((
JSONObject
)
o
).
get
(
"inftitle"
).
toString
())
.
eventContent
(((
JSONObject
)
o
).
get
(
"infcontent"
).
toString
())
.
startPerson
(((
JSONObject
)
o
).
get
(
"infwrinter"
).
toString
())
.
startTime
(
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"writerdate"
).
toString
()))
.
checkPerson
(((
JSONObject
)
o
).
get
(
"infchecker"
).
toString
())
.
checkTime
(
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"checkdate"
).
toString
()))
.
endTime
(
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"removedate"
).
toString
().
equals
(
"null"
)?
"1900-01-01 00:00:00"
:((
JSONObject
)
o
).
get
(
"removedate"
).
toString
()))
.
startBz
(((
JSONObject
)
o
).
get
(
"remark"
).
toString
())
.
roadCode
(((
JSONObject
)
o
).
get
(
"glno"
).
toString
())
.
startUnitNo
(((
JSONObject
)
o
).
get
(
"writerno"
).
toString
())
.
longitude
(((
JSONObject
)
o
).
get
(
"loctx"
).
toString
())
.
latitude
(((
JSONObject
)
o
).
get
(
"locty"
).
toString
())
.
stoem
(((
JSONObject
)
o
).
get
(
"zhuanghao"
).
toString
())
.
roadName
(((
JSONObject
)
o
).
get
(
"daolu"
).
toString
())
.
endReason
(((
JSONObject
)
o
).
get
(
"removereson"
).
toString
().
equals
(
"null"
)?
""
:((
JSONObject
)
o
).
get
(
"removereson"
).
toString
())
.
maintainUnit
(((
JSONObject
)
o
).
get
(
"departname"
).
toString
())
.
endUnit
(((
JSONObject
)
o
).
get
(
"removedepart"
).
toString
().
equals
(
"null"
)?
""
:((
JSONObject
)
o
).
get
(
"removedepart"
).
toString
())
.
preEndTime
(
formatter
.
parse
(((
JSONObject
)
o
).
get
(
"expdate"
).
toString
()))
.
influence
(((
JSONObject
)
o
).
get
(
"impact"
).
toString
())
.
startm
(((
JSONObject
)
o
).
get
(
"zhfrom"
).
toString
())
.
endm
(((
JSONObject
)
o
).
get
(
"zhto"
).
toString
())
.
carsLength
(((
JSONObject
)
o
).
get
(
"yccd"
).
toString
())
.
solution
(
""
)
.
startUnit
(
""
)
.
endUnitNo
(
""
)
.
endBz
(
""
)
.
endPerson
(
""
)
.
build
());
}
}
}
}
catch
(
Exception
e
)
{
log
.
info
(
"调用路况平台 exception: {}"
,
e
);
}
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/roadcondition/service/impl/RoadConditionEventServiceImpl.java
浏览文件 @
ec7ee022
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
.
impl
;
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
roadcondition
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.dto.*
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent
;
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.mapper.RoadConditionEventMapper
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService
;
import
com.elephant.framework.galaxy.aroad.module.roadcondition.service.RoadConditionEventService
;
import
lombok.AllArgsConstructor
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -21,20 +24,113 @@ import java.util.List;
...
@@ -21,20 +24,113 @@ import java.util.List;
* @date 2019-04-23 16:41:06
* @date 2019-04-23 16:41:06
*/
*/
@Service
@Service
@AllArgsConstructor
public
class
RoadConditionEventServiceImpl
public
class
RoadConditionEventServiceImpl
extends
ServiceImpl
<
RoadConditionEventMapper
,
RoadConditionEvent
>
extends
ServiceImpl
<
RoadConditionEventMapper
,
RoadConditionEvent
>
implements
RoadConditionEventService
{
implements
RoadConditionEventService
{
public
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
){
private
final
RoadConditionEventMapper
roadConditionEventMapper
;
/**
* 根据事件ID查询该路况事件是否已经存在(大于0表示已存在)
*
* @param eventID
* @return
*/
public
Integer
getRoadMaintainEventByEventID
(
String
eventID
)
{
return
roadConditionEventMapper
.
selectCount
(
Wrappers
.<
RoadConditionEvent
>
query
().
lambda
().
eq
(
RoadConditionEvent:
:
getId
,
eventID
));
}
/**
* 查询数据库是否存在该实体
*
* @param event
* @return
*/
public
RoadConditionEvent
selectRoadMaintainEvent
(
RoadConditionEvent
event
)
{
return
baseMapper
.
selectRoadMaintainEvent
(
event
);
}
/** 撤销事件,根据事件ID更新flag标识 */
public
Integer
updateBatchByEventId
(
List
<
Object
>
eventIdList
)
{
return
baseMapper
.
updateBatchByEventId
(
eventIdList
);
}
/** 删除事件(假删除),更新flag标识为1 */
public
Integer
deleteBatchByEvent
(
RoadConditionEvent
event
)
{
return
baseMapper
.
deleteBatchByEvent
(
event
);
}
/**
* 普通国省道养护施工事件信息是否已存在
*
* @param
* @return
*/
public
Integer
getRoadMaintainEventByRoadPlatform
(
String
inftypename
,
String
inftitle
,
String
infcontent
,
String
infwrinter
,
Date
writerdate
,
String
infchecker
,
Date
checkdate
,
Date
removedate
,
// String remark,
String
glno
,
String
writerno
,
String
loctx
,
String
locty
,
String
zhuanghao
,
String
daolu
,
// String removereson,
// String departname,
// String removedepart,
// Date expdate,
// String impact,
// String zhfrom,
// String zhto,
String
yccd
)
{
return
roadConditionEventMapper
.
selectCount
(
Wrappers
.<
RoadConditionEvent
>
query
()
.
lambda
()
// .eq(RoadConditionEvent::getEventId, infid)
.
eq
(
RoadConditionEvent:
:
getEventType
,
inftypename
)
.
eq
(
RoadConditionEvent:
:
getEventTitle
,
inftitle
)
.
eq
(
RoadConditionEvent:
:
getEventContent
,
infcontent
)
.
eq
(
RoadConditionEvent:
:
getStartPerson
,
infwrinter
)
.
eq
(
RoadConditionEvent:
:
getStartTime
,
writerdate
)
.
eq
(
RoadConditionEvent:
:
getCheckPerson
,
infchecker
)
.
eq
(
RoadConditionEvent:
:
getCheckTime
,
checkdate
)
.
eq
(
RoadConditionEvent:
:
getEndTime
,
removedate
)
// .eq(RoadConditionEvent::getStartBz, remark)
.
eq
(
RoadConditionEvent:
:
getRoadCode
,
glno
)
.
eq
(
RoadConditionEvent:
:
getStartUnitNo
,
writerno
)
.
eq
(
RoadConditionEvent:
:
getLongitude
,
loctx
)
.
eq
(
RoadConditionEvent:
:
getLatitude
,
locty
)
.
eq
(
RoadConditionEvent:
:
getStoem
,
zhuanghao
)
.
eq
(
RoadConditionEvent:
:
getRoadName
,
daolu
)
// .eq(RoadConditionEvent::getEndReason, removereson)
// .eq(RoadConditionEvent::getMaintainUnit, departname)
// .eq(RoadConditionEvent::getEndUnit, removedepart)
// .eq(RoadConditionEvent::getPreEndTime, expdate)
// .eq(RoadConditionEvent::getInfluence, impact)
// .eq(RoadConditionEvent::getStartm, zhfrom)
// .eq(RoadConditionEvent::getEndm, zhto)
.
eq
(
RoadConditionEvent:
:
getCarsLength
,
yccd
));
}
public
RoadConditionEvent
getById
(
@Param
(
"id"
)
Integer
id
)
{
return
baseMapper
.
getById
(
id
);
return
baseMapper
.
getById
(
id
);
}
}
public
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
)
{
public
IPage
<
RoadConditionEvent
>
getRoadConditionEventPage
(
Page
<
RoadConditionEvent
>
page
,
RoadConditionEvent
roadConditionEvent
)
{
return
baseMapper
.
getRoadConditionEventPage
(
page
,
roadConditionEvent
);
return
baseMapper
.
getRoadConditionEventPage
(
page
,
roadConditionEvent
);
}
}
public
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
(
@Param
(
"text"
)
String
text
)
{
public
List
<
RoadConditionEvent
>
getRoadConditionEventMobilePage
(
)
{
return
baseMapper
.
getRoadConditionEventMobilePage
(
text
);
return
baseMapper
.
getRoadConditionEventMobilePage
(
);
}
}
/**
/**
...
@@ -139,7 +235,7 @@ public class RoadConditionEventServiceImpl
...
@@ -139,7 +235,7 @@ public class RoadConditionEventServiceImpl
* java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea> @Author:
* java.util.List<com.elephant.framework.galaxy.travel.module.basic_resources.entity.BaseServiceArea> @Author:
* songwenjie @Date: 2019/4/10
* songwenjie @Date: 2019/4/10
*/
*/
// @Cacheable(value="cityTree")
// @Cacheable(value="cityTree")
public
BaseTreeDto
getTree
()
{
public
BaseTreeDto
getTree
()
{
List
<
CityNameDto
>
cityTree
=
baseMapper
.
getTree
();
List
<
CityNameDto
>
cityTree
=
baseMapper
.
getTree
();
List
<
SingleNameDto
>
Jinan
=
new
ArrayList
<>();
List
<
SingleNameDto
>
Jinan
=
new
ArrayList
<>();
...
...
src/main/java/com/elephant/framework/galaxy/aroad/security/config/ResourceServerConfiguration.java
浏览文件 @
ec7ee022
...
@@ -3,12 +3,12 @@ package com.elephant.framework.galaxy.aroad.security.config;
...
@@ -3,12 +3,12 @@ package com.elephant.framework.galaxy.aroad.security.config;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.builders.WebSecurity
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
;
/**
/**
* @Description OAuth 资源服务器配置
* @Description OAuth 资源服务器配置
*
* @auther wangjian
* @auther wangjian
* @create 2019-02-21 21:23
* @create 2019-02-21 21:23
*/
*/
...
@@ -22,13 +22,12 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter
...
@@ -22,13 +22,12 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter
http
.
formLogin
()
http
.
formLogin
()
.
and
()
.
and
()
.
authorizeRequests
()
.
authorizeRequests
()
.
antMatchers
(
"/roadconditionevent/**"
)
.
permitAll
()
.
anyRequest
()
.
anyRequest
()
.
authenticated
()
.
authenticated
()
.
and
()
.
and
()
.
csrf
()
.
csrf
()
.
disable
();
.
disable
();
}
}
}
}
src/main/resources/mapper/roadcondition/RoadConditionEventMapper.xml
浏览文件 @
ec7ee022
...
@@ -7,8 +7,11 @@
...
@@ -7,8 +7,11 @@
<resultMap
id=
"roadConditionEventMap"
<resultMap
id=
"roadConditionEventMap"
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
<id
property=
"id"
column=
"id"
/>
<id
property=
"id"
column=
"id"
/>
<result
property=
"eventId"
column=
"event_id"
/>
<result
property=
"roadCode"
column=
"road_code"
/>
<result
property=
"roadCode"
column=
"road_code"
/>
<result
property=
"roadName"
column=
"road_name"
/>
<result
property=
"roadName"
column=
"road_name"
/>
<result
property=
"maintainUnit"
column=
"maintain_unit"
/>
<result
property=
"stoem"
column=
"sToeM"
/>
<result
property=
"startm"
column=
"startM"
/>
<result
property=
"startm"
column=
"startM"
/>
<result
property=
"endm"
column=
"endM"
/>
<result
property=
"endm"
column=
"endM"
/>
<result
property=
"eventType"
column=
"event_type"
/>
<result
property=
"eventType"
column=
"event_type"
/>
...
@@ -17,15 +20,24 @@
...
@@ -17,15 +20,24 @@
<result
property=
"influence"
column=
"influence"
/>
<result
property=
"influence"
column=
"influence"
/>
<result
property=
"carsLength"
column=
"cars_length"
/>
<result
property=
"carsLength"
column=
"cars_length"
/>
<result
property=
"solution"
column=
"solution"
/>
<result
property=
"solution"
column=
"solution"
/>
<result
property=
"startPerson"
column=
"start_person"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"startTime"
column=
"start_time"
/>
<result
property=
"startUnit"
column=
"start_unit"
/>
<result
property=
"startUnit"
column=
"start_unit"
/>
<result
property=
"startPerson"
column=
"start_person"
/>
<result
property=
"startUnitNo"
column=
"start_unit_no"
/>
<result
property=
"startBz"
column=
"start_bz"
/>
<result
property=
"preEndTime"
column=
"pre_end_time"
/>
<result
property=
"preEndTime"
column=
"pre_end_time"
/>
<result
property=
"endPerson"
column=
"end_person"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"endTime"
column=
"end_time"
/>
<result
property=
"endUnit"
column=
"end_unit"
/>
<result
property=
"endUnit"
column=
"end_unit"
/>
<result
property=
"endUnitNo"
column=
"end_unit_no"
/>
<result
property=
"endReason"
column=
"end_reason"
/>
<result
property=
"endReason"
column=
"end_reason"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
property=
"endBz"
column=
"end_bz"
/>
<result
column=
"latitude"
property=
"latitude"
/>
<result
property=
"checkPerson"
column=
"check_person"
/>
<result
property=
"checkTime"
column=
"check_time"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"current"
column=
"current"
/>
<result
property=
"size"
column=
"size"
/>
</resultMap>
</resultMap>
<resultMap
id=
"staticByEventTypeMap"
<resultMap
id=
"staticByEventTypeMap"
...
@@ -75,6 +87,7 @@
...
@@ -75,6 +87,7 @@
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.dto.CoordinateDto"
>
type=
"com.elephant.framework.galaxy.aroad.module.roadcondition.dto.CoordinateDto"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
property=
"eventType"
column=
"event_type"
/>
<result
property=
"eventType"
column=
"event_type"
/>
<result
property=
"eventTitle"
column=
"event_title"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
column=
"latitude"
property=
"latitude"
/>
<result
column=
"latitude"
property=
"latitude"
/>
</resultMap>
</resultMap>
...
@@ -82,46 +95,44 @@
...
@@ -82,46 +95,44 @@
<select
id=
"getRoadConditionEventPage"
resultMap=
"roadConditionEventMap"
<select
id=
"getRoadConditionEventPage"
resultMap=
"roadConditionEventMap"
parameterType=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
parameterType=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
SELECT
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,longitude,latitude
FROM road_condition_event
FROM road_condition_event
<where>
<where>
<if
test=
"roadConditionEvent.startUnit != null"
>
start_unit = #{roadConditionEvent.startUnit}
and
</if>
<if
test=
"roadConditionEvent.startUnit != null"
>
maintain_unit like CONCAT('%',#{roadConditionEvent.startUnit},'%')
and
</if>
<if
test=
"roadConditionEvent.eventType != null"
>
event_type
= #{roadConditionEvent.eventType}
and
</if>
<if
test=
"roadConditionEvent.eventType != null"
>
event_type
like concat('%',#{roadConditionEvent.eventType},'%')
and
</if>
<if
test=
"roadConditionEvent.influence != null"
>
influence = #{roadConditionEvent.influence} 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.startTime != null"
>
start_time
>
#{roadConditionEvent.startTime} and
</if>
<if
test=
"roadConditionEvent.endTime != null"
>
end_time
<
#{roadConditionEvent.endTime} and
</if>
<if
test=
"roadConditionEvent.endTime != null"
>
end_time
<
#{roadConditionEvent.endTime} and
</if>
road_name is not null
1=1
</where>
</where>
</select>
</select>
<select
id=
"getRoadConditionEventMobilePage"
resultMap=
"roadConditionEventMap"
>
<select
id=
"getRoadConditionEventMobilePage"
resultMap=
"roadConditionEventMap"
>
SELECT
SELECT
*
id,road_code,concat(road_code,'·',road_name) as
#
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,longitude,latitude
#
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,longitude,latitude
FROM road_condition_event
FROM road_condition_event
<where
>
<!-- <where>--
>
<if
test=
"text!= null"
>
<!-- <if test="text!= null">--
>
road_code like CONCAT('%',#{text},'%')
<!-- road_code like CONCAT('%',#{text},'%')-->
or
<!-- or-->
road_name like CONCAT('%',#{text},'%')
<!-- road_name like CONCAT('%',#{text},'%')-->
or
<!-- or-->
event_type like CONCAT('%',#{text},'%')
<!-- event_type like CONCAT('%',#{text},'%')-->
or
<!-- or-->
event_title like CONCAT('%',#{text},'%')
<!-- event_title like CONCAT('%',#{text},'%')-->
or
<!-- or-->
event_content like CONCAT('%',#{text},'%')
<!-- event_content like CONCAT('%',#{text},'%')-->
or
<!-- or-->
influence like CONCAT('%',#{text},'%')
<!-- influence like CONCAT('%',#{text},'%')-->
or
<!-- or-->
cars_length like CONCAT('%',#{text},'%')
<!-- cars_length like CONCAT('%',#{text},'%')-->
or
<!-- or-->
start_unit like CONCAT('%',#{text},'%')
<!-- start_unit like CONCAT('%',#{text},'%')-->
and
<!-- and-->
</if
>
<!-- </if>--
>
road_name is not null
<!-- road_name is not null-->
</where
>
<!-- </where>--
>
</select>
</select>
<select
id=
"getById"
resultMap=
"roadConditionEventMap"
>
<select
id=
"getById"
resultMap=
"roadConditionEventMap"
>
...
@@ -149,7 +160,7 @@
...
@@ -149,7 +160,7 @@
YEAR(start_time) AS year,
YEAR(start_time) AS year,
MONTH(start_time) AS month
MONTH(start_time) AS month
FROM road_condition_event
FROM road_condition_event
WHERE event_type = '养护施工'
WHERE event_type = '养护施工
信息
'
GROUP BY YEAR(start_time),
GROUP BY YEAR(start_time),
MONTH(start_time)
MONTH(start_time)
</select>
</select>
...
@@ -158,25 +169,28 @@
...
@@ -158,25 +169,28 @@
SELECT count(*) AS count,
SELECT count(*) AS count,
road_code as roadcode
road_code as roadcode
FROM road_condition_event
FROM road_condition_event
WHERE event_type = '养护施工'
WHERE event_type = '养护施工
信息
'
GROUP BY road_code
GROUP BY road_code
</select>
</select>
<select
id=
"staticByCity"
resultMap=
"staticByCityMap"
>
<select
id=
"staticByCity"
resultMap=
"staticByCityMap"
>
SELECT count(shortName) as count,
SELECT
city
count( * ) AS count,
FROM base_organize
# maintain_unit,
WHERE city IS NOT NULL
SUBSTRING( maintain_unit FROM 1 FOR 2 ) as city
AND city != '山东'
FROM
GROUP BY city
road_condition_event
where SUBSTRING( maintain_unit FROM 1 FOR 2 )!='山东'
GROUP BY
maintain_unit
</select>
</select>
<select
id=
"staticByYHCity"
resultMap=
"staticByYHCityMap"
>
<select
id=
"staticByYHCity"
resultMap=
"staticByYHCityMap"
>
SELECT count(*) as count,
SELECT count(*) as count,
start
_unit as startunit
maintain
_unit as startunit
FROM road_condition_event
FROM road_condition_event
WHERE event_type = '养护施工'
WHERE event_type = '养护施工
信息
'
GROUP BY
start
_unit
GROUP BY
maintain
_unit
</select>
</select>
<select
id=
"getTree"
resultMap=
"citysWithOrganizesMap"
>
<select
id=
"getTree"
resultMap=
"citysWithOrganizesMap"
>
...
@@ -190,31 +204,470 @@
...
@@ -190,31 +204,470 @@
</select>
</select>
<select
id=
"getCoordinates"
resultMap=
"CoordinateDtoMap"
>
<select
id=
"getCoordinates"
resultMap=
"CoordinateDtoMap"
>
select id, longitude, latitude, event_type
select id, longitude, latitude, event_type
,event_title
from `road_condition_event`;
from `road_condition_event`;
</select>
</select>
<select
id=
"getTQCoordinates"
resultMap=
"CoordinateDtoMap"
>
<select
id=
"getTQCoordinates"
resultMap=
"CoordinateDtoMap"
>
select id, longitude, latitude, event_type
select id, longitude, latitude, event_type
,event_title
from `road_condition_event`
from `road_condition_event`
where event_t
yp
e = '异常天气';
where event_t
itl
e = '异常天气';
</select>
</select>
<select
id=
"getYHCoordinates"
resultMap=
"roadConditionEventMap"
>
<select
id=
"getYHCoordinates"
resultMap=
"roadConditionEventMap"
>
select id, longitude, latitude, event_type
select id, longitude, latitude, event_type
,event_title
from `road_condition_event`
from `road_condition_event`
where event_t
yp
e = '养护施工';
where event_t
itl
e = '养护施工';
</select>
</select>
<select
id=
"getTFCoordinates"
resultMap=
"CoordinateDtoMap"
>
<select
id=
"getTFCoordinates"
resultMap=
"CoordinateDtoMap"
>
select id, longitude, latitude, event_type
select id, longitude, latitude, event_type
,event_title
from `road_condition_event`
from `road_condition_event`
where event_t
yp
e = '突发事件';
where event_t
itl
e = '突发事件';
</select>
</select>
<select
id=
"getSFZCoordinates"
resultMap=
"CoordinateDtoMap"
>
<select
id=
"getSFZCoordinates"
resultMap=
"CoordinateDtoMap"
>
select id, longitude, latitude, event_type
select id, longitude, latitude, event_type
,event_title
from `road_condition_event`
from `road_condition_event`
where event_t
yp
e = '收费站异常';
where event_t
itl
e = '收费站异常';
</select>
</select>
<select
id=
"selectRoadMaintainEvent"
parameterType=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
resultMap=
"roadConditionEventMap"
>
SELECT * FROM road_condition_event
WHERE
<if
test=
"id != null"
>
id = #{id} AND
</if>
<if
test=
"id == null"
>
ISNULL(id) AND
</if>
<if
test=
"eventId != null"
>
event_id = #{eventId} AND
</if>
<if
test=
"eventId == null"
>
ISNULL(event_id) AND
</if>
<if
test=
"roadCode != null"
>
road_code = #{roadCode} AND
</if>
<if
test=
"roadCode == null"
>
ISNULL(road_code) AND
</if>
<if
test=
"roadName != null"
>
road_name = #{roadName} AND
</if>
<if
test=
"roadName == null"
>
ISNULL(road_name) AND
</if>
<if
test=
"maintainUnit != null"
>
maintain_unit = #{maintainUnit} AND
</if>
<if
test=
"maintainUnit == null"
>
ISNULL(maintain_unit) AND
</if>
<if
test=
"stoem != null"
>
sToeM = #{stoem} AND
</if>
<if
test=
"stoem == null"
>
ISNULL(sToeM) AND
</if>
<if
test=
"startm != null"
>
startM = #{startm} AND
</if>
<if
test=
"startm == null"
>
ISNULL(startM) AND
</if>
<if
test=
"endm != null"
>
endM = #{endm} AND
</if>
<if
test=
"endm == null"
>
ISNULL(endM) AND
</if>
<if
test=
"eventType != null"
>
event_type = #{eventType} AND
</if>
<if
test=
"eventType == null"
>
ISNULL(event_type) AND
</if>
<if
test=
"eventTitle != null"
>
event_title = #{eventTitle} AND
</if>
<if
test=
"eventTitle == null"
>
ISNULL(event_title) AND
</if>
<if
test=
"eventContent != null"
>
event_content = #{eventContent} AND
</if>
<if
test=
"eventContent == null"
>
ISNULL(event_content) AND
</if>
<if
test=
"influence != null"
>
influence = #{influence} AND
</if>
<if
test=
"influence == null"
>
ISNULL(influence) AND
</if>
<if
test=
"carsLength != null"
>
cars_length = #{carsLength} AND
</if>
<if
test=
"carsLength == null"
>
ISNULL(cars_length) AND
</if>
<if
test=
"solution != null"
>
solution = #{solution} AND
</if>
<if
test=
"solution == null"
>
ISNULL(solution) AND
</if>
<if
test=
"startPerson != null"
>
start_person = #{startPerson} AND
</if>
<if
test=
"startPerson == null"
>
ISNULL(start_person) AND
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime} AND
</if>
<if
test=
"startTime == null"
>
ISNULL(start_time) AND
</if>
<if
test=
"startUnit != null"
>
start_unit = #{startUnit} AND
</if>
<if
test=
"startUnit == null"
>
ISNULL(start_unit) AND
</if>
<if
test=
"startUnitNo != null"
>
start_unit_no = #{startUnitNo} AND
</if>
<if
test=
"startUnitNo == null"
>
ISNULL(start_unit_no) AND
</if>
<if
test=
"startBz != null"
>
start_bz = #{startBz} AND
</if>
<if
test=
"startBz == null"
>
ISNULL(start_bz) AND
</if>
<if
test=
"preEndTime != null"
>
pre_end_time = #{preEndTime} AND
</if>
<if
test=
"preEndTime == null"
>
ISNULL(pre_end_time) AND
</if>
<if
test=
"endPerson != null"
>
end_person = #{endPerson} AND
</if>
<if
test=
"endPerson == null"
>
ISNULL(end_person) AND
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime} AND
</if>
<if
test=
"endTime == null"
>
ISNULL(end_time) AND
</if>
<if
test=
"endUnit != null"
>
end_unit = #{endUnit} AND
</if>
<if
test=
"endUnit == null"
>
ISNULL(end_unit) AND
</if>
<if
test=
"endUnitNo != null"
>
end_unit_no = #{endUnitNo} AND
</if>
<if
test=
"endUnitNo == null"
>
ISNULL(end_unit_no) AND
</if>
<if
test=
"endReason != null"
>
end_reason = #{endReason} AND
</if>
<if
test=
"endReason == null"
>
ISNULL(end_reason) AND
</if>
<if
test=
"endBz != null"
>
end_bz = #{endBz} AND
</if>
<if
test=
"endBz == null"
>
ISNULL(end_bz) AND
</if>
<if
test=
"checkPerson != null"
>
check_person = #{checkPerson} AND
</if>
<if
test=
"checkPerson == null"
>
ISNULL(check_person) AND
</if>
<if
test=
"checkTime != null"
>
check_time = #{checkTime} AND
</if>
<if
test=
"checkTime == null"
>
ISNULL(check_time) AND
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude} AND
</if>
<if
test=
"longitude == null"
>
ISNULL(longitude) AND
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude} AND
</if>
<if
test=
"latitude == null"
>
ISNULL(latitude) AND
</if>
</select>
<update
id=
"updateBatchByEventId"
parameterType=
"java.util.List"
>
UPDATE road_condition_event
WHERE event_id IN
<foreach
collection=
"eventIdList"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</update>
<update
id=
"deleteBatchByEvent"
parameterType=
"com.elephant.framework.galaxy.aroad.module.roadcondition.entity.RoadConditionEvent"
>
UPDATE road_condition_event
WHERE
<if
test=
"id != null"
>
id = #{id} AND
</if>
<if
test=
"id == null"
>
ISNULL(id) AND
</if>
<if
test=
"eventId != null"
>
event_id = #{eventId} AND
</if>
<if
test=
"eventId == null"
>
ISNULL(event_id) AND
</if>
<if
test=
"roadCode != null"
>
road_code = #{roadCode} AND
</if>
<if
test=
"roadCode == null"
>
ISNULL(road_code) AND
</if>
<if
test=
"roadName != null"
>
road_name = #{roadName} AND
</if>
<if
test=
"roadName == null"
>
ISNULL(road_name) AND
</if>
<if
test=
"maintainUnit != null"
>
maintain_unit = #{maintainUnit} AND
</if>
<if
test=
"maintainUnit == null"
>
ISNULL(maintain_unit) AND
</if>
<if
test=
"stoem != null"
>
sToeM = #{stoem} AND
</if>
<if
test=
"stoem == null"
>
ISNULL(sToeM) AND
</if>
<if
test=
"startm != null"
>
startM = #{startm} AND
</if>
<if
test=
"startm == null"
>
ISNULL(startM) AND
</if>
<if
test=
"endm != null"
>
endM = #{endm} AND
</if>
<if
test=
"endm == null"
>
ISNULL(endM) AND
</if>
<if
test=
"eventType != null"
>
event_type = #{eventType} AND
</if>
<if
test=
"eventType == null"
>
ISNULL(event_type) AND
</if>
<if
test=
"eventTitle != null"
>
event_title = #{eventTitle} AND
</if>
<if
test=
"eventTitle == null"
>
ISNULL(event_title) AND
</if>
<if
test=
"eventContent != null"
>
event_content = #{eventContent} AND
</if>
<if
test=
"eventContent == null"
>
ISNULL(event_content) AND
</if>
<if
test=
"influence != null"
>
influence = #{influence} AND
</if>
<if
test=
"influence == null"
>
ISNULL(influence) AND
</if>
<if
test=
"carsLength != null"
>
cars_length = #{carsLength} AND
</if>
<if
test=
"carsLength == null"
>
ISNULL(cars_length) AND
</if>
<if
test=
"solution != null"
>
solution = #{solution} AND
</if>
<if
test=
"solution == null"
>
ISNULL(solution) AND
</if>
<if
test=
"startPerson != null"
>
start_person = #{startPerson} AND
</if>
<if
test=
"startPerson == null"
>
ISNULL(start_person) AND
</if>
<if
test=
"startTime != null"
>
start_time = #{startTime} AND
</if>
<if
test=
"startTime == null"
>
ISNULL(start_time) AND
</if>
<if
test=
"startUnit != null"
>
start_unit = #{startUnit} AND
</if>
<if
test=
"startUnit == null"
>
ISNULL(start_unit) AND
</if>
<if
test=
"startUnitNo != null"
>
start_unit_no = #{startUnitNo} AND
</if>
<if
test=
"startUnitNo == null"
>
ISNULL(start_unit_no) AND
</if>
<if
test=
"startBz != null"
>
start_bz = #{startBz} AND
</if>
<if
test=
"startBz == null"
>
ISNULL(start_bz) AND
</if>
<if
test=
"preEndTime != null"
>
pre_end_time = #{preEndTime} AND
</if>
<if
test=
"preEndTime == null"
>
ISNULL(pre_end_time) AND
</if>
<if
test=
"endPerson != null"
>
end_person = #{endPerson} AND
</if>
<if
test=
"endPerson == null"
>
ISNULL(end_person) AND
</if>
<if
test=
"endTime != null"
>
end_time = #{endTime} AND
</if>
<if
test=
"endTime == null"
>
ISNULL(end_time) AND
</if>
<if
test=
"endUnit != null"
>
end_unit = #{endUnit} AND
</if>
<if
test=
"endUnit == null"
>
ISNULL(end_unit) AND
</if>
<if
test=
"endUnitNo != null"
>
end_unit_no = #{endUnitNo} AND
</if>
<if
test=
"endUnitNo == null"
>
ISNULL(end_unit_no) AND
</if>
<if
test=
"endReason != null"
>
end_reason = #{endReason} AND
</if>
<if
test=
"endReason == null"
>
ISNULL(end_reason) AND
</if>
<if
test=
"endBz != null"
>
end_bz = #{endBz} AND
</if>
<if
test=
"endBz == null"
>
ISNULL(end_bz) AND
</if>
<if
test=
"checkPerson != null"
>
check_person = #{checkPerson} AND
</if>
<if
test=
"checkPerson == null"
>
ISNULL(check_person) AND
</if>
<if
test=
"checkTime != null"
>
check_time = #{checkTime} AND
</if>
<if
test=
"checkTime == null"
>
ISNULL(check_time) AND
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude} AND
</if>
<if
test=
"longitude == null"
>
ISNULL(longitude) AND
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude} AND
</if>
<if
test=
"latitude == null"
>
ISNULL(latitude) AND
</if>
</update>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论