Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
7e976f2b
Commit
7e976f2b
authored
May 11, 2021
by
YANGYANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆徘徊 和 活动区域接口提交
parent
eac80a6e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
129 additions
and
2 deletions
+129
-2
common/common_utils/src/main/java/com/founder/commonutils/carEntity/TrackYstldResultCountSort.java
+76
-0
common/common_utils/src/main/java/com/founder/commonutils/util/DataUtil.java
+31
-0
serviceapi/carapi/src/main/java/com/founder/carapi/controller/CarController.java
+16
-0
serviceapi/carapi/src/main/java/com/founder/carapi/mapper/xml/RegInfoMapper.xml
+3
-2
serviceapi/carapi/src/main/java/com/founder/carapi/service/CarService.java
+3
-0
serviceapi/carapi/src/main/java/com/founder/carapi/service/impl/CarServiceImpl.java
+0
-0
No files found.
common/common_utils/src/main/java/com/founder/commonutils/carEntity/TrackYstldResultCountSort.java
0 → 100644
View file @
7e976f2b
package
com
.
founder
.
commonutils
.
carEntity
;
/**
* Created by Founder on 2019/6/27.
* 轨迹疑似停留点实体表
*/
public
class
TrackYstldResultCountSort
implements
Comparable
<
TrackYstldResultCountSort
>{
private
String
x
;
//经度
private
String
y
;
//纬度
private
String
tlsjStr
;
//停留时间差
private
int
tlsj
;
private
int
count
;
//停留次数
private
String
address
;
//地址
private
long
kssj
;
//开始时间时间戳
public
long
getKssj
()
{
return
kssj
;
}
public
void
setKssj
(
long
kssj
)
{
this
.
kssj
=
kssj
;
}
public
String
getY
()
{
return
y
;
}
public
void
setY
(
String
y
)
{
this
.
y
=
y
;
}
public
String
getX
()
{
return
x
;
}
public
void
setX
(
String
x
)
{
this
.
x
=
x
;
}
public
String
getTlsjStr
()
{
return
tlsjStr
;
}
public
void
setTlsjStr
(
String
tlsjStr
)
{
this
.
tlsjStr
=
tlsjStr
;
}
public
int
getTlsj
()
{
return
tlsj
;
}
public
void
setTlsj
(
int
tlsj
)
{
this
.
tlsj
=
tlsj
;
}
public
int
getCount
()
{
return
count
;
}
public
void
setCount
(
int
count
)
{
this
.
count
=
count
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
@Override
public
int
compareTo
(
TrackYstldResultCountSort
o
)
{
//重写Comparable接口的compareTo方法,
return
o
.
getCount
()-
this
.
getCount
();
// 根据次数降序排列,升序修改相减顺序即可
}
}
common/common_utils/src/main/java/com/founder/commonutils/util/DataUtil.java
View file @
7e976f2b
package
com
.
founder
.
commonutils
.
util
;
import
com.founder.commonutils.carEntity.CarReceiving
;
import
com.founder.commonutils.peopleEntity.FaceSearchResult
;
import
java.text.DateFormat
;
...
...
@@ -55,6 +56,36 @@ public class DataUtil {
}
return
lists
;
}
//数据批量 方法
public
static
List
<
List
<
CarReceiving
>>
cpldata
(
List
<
CarReceiving
>
list
,
int
limit
)
throws
Exception
{
long
start
=
System
.
currentTimeMillis
();
int
size
=
list
.
size
();
//特殊处理
if
(
limit
==
0
){
limit
=
1
;
}
long
threadNum
=
size
/
limit
;
int
startnum
=
0
;
int
endnum
=
0
;
List
<
List
<
CarReceiving
>>
lists
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
threadNum
+
1
;
i
++)
{
startnum
=
i
*
limit
;
endnum
=
((
i
+
1
)
*
limit
);
if
(
startnum
>
list
.
size
())
{
break
;
}
if
(
endnum
>
list
.
size
())
{
endnum
=
list
.
size
();
}
if
(
startnum
==
endnum
)
{
break
;
}
List
<
CarReceiving
>
pllist
=
list
.
subList
(
startnum
,
endnum
);
//从fromIndex(包含),到toIndex(不包含)
lists
.
add
(
pllist
);
}
return
lists
;
}
/*public static List<List<CameraFaceResult>> plCameraFaceResult(List<CameraFaceResult> list, int limit) throws Exception {
long start = System.currentTimeMillis();
int size = list.size();
...
...
serviceapi/carapi/src/main/java/com/founder/carapi/controller/CarController.java
View file @
7e976f2b
...
...
@@ -61,6 +61,15 @@ public class CarController {
return
result
;
}
//区域徘徊 -结果展示(徘徊次数3次以上)
@OperLog
(
message
=
"车辆徘徊接口"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"车辆徘徊接口"
)
@PostMapping
(
"/carOneAreaInfoTrampResultThread"
)
public
MapRestResult
carOneAreaInfoTrampResultThread
(
@RequestBody
AreaInfo
areaInfo
)
throws
Exception
{
MapRestResult
xzxtRestResult
=
carService
.
OneAreaInfoTrampResultThread
(
areaInfo
);
return
xzxtRestResult
;
}
//轨迹疑似停留点
@ApiOperation
(
value
=
"轨迹疑似停留点"
)
@PostMapping
(
"/getTrackYstld"
)
...
...
@@ -74,6 +83,13 @@ public class CarController {
return
carService
.
getTrackYsljd
(
track
);
}
//轨迹疑似活动区域
@ApiOperation
(
value
=
"轨迹疑似活动区域"
)
@PostMapping
(
"/getTrackYshdqy"
)
public
MapRestResult
getTrackYshdqy
(
@RequestBody
TrackYsModelCondition
track
){
return
carService
.
getTrackYshdqy
(
track
);
}
@ApiOperation
(
value
=
"车碰撞结果获取"
)
@PostMapping
(
"/getRegionalsResult"
)
public
MapRestResult
getRegionalsResult
(
@RequestBody
TbStRegionalstaskresult
tbStRegionalstaskresult
)
throws
Exception
{
...
...
serviceapi/carapi/src/main/java/com/founder/carapi/mapper/xml/RegInfoMapper.xml
View file @
7e976f2b
...
...
@@ -198,8 +198,9 @@
task_Object as taskObject,
to_char(djsj,'yyyy-mm-dd hh24:mi:ss') as djsj,
fsr_Xm as fsrXm,
carNum as carNum
FROM tb_st_regionals_task
carNum as carNum,
(select count(*) from tb_st_regionals_results r where t.task_id = r.task_id) as counts
FROM tb_st_regionals_task t
where 1=1
<if
test=
"startTime != null and startTime != ''"
>
and DJSJ
<![CDATA[>=]]>
TO_DATE(#{ startTime , jdbcType=VARCHAR },'yyyy-MM-dd')
</if>
<if
test=
"endTime != null and endTime != ''"
>
and DJSJ
<![CDATA[<]]>
(TO_DATE(#{ endTime , jdbcType=VARCHAR },'yyyy-MM-dd')+1)
</if>
...
...
serviceapi/carapi/src/main/java/com/founder/carapi/service/CarService.java
View file @
7e976f2b
...
...
@@ -33,4 +33,7 @@ public interface CarService {
MapRestResult
getRegionalsResultFl
(
TbStRegionalstaskresult
tbStRegionalstaskresult
)
throws
Exception
;
MapRestResult
getTrackYshdqy
(
TrackYsModelCondition
track
);
MapRestResult
OneAreaInfoTrampResultThread
(
AreaInfo
areaInfo
)
throws
Exception
;
}
serviceapi/carapi/src/main/java/com/founder/carapi/service/impl/CarServiceImpl.java
View file @
7e976f2b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment