Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-devicemonitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ab159773
authored
Sep 14, 2021
by
黄小葱
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改bug
1 parent
d4689617
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
src/main/java/cn/com/glsx/devicemonitor/modules/controller/MonitorController.java
src/main/java/cn/com/glsx/devicemonitor/modules/model/report/StayPointReport.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
src/main/java/cn/com/glsx/devicemonitor/modules/controller/MonitorController.java
View file @
ab15977
...
@@ -100,7 +100,7 @@ public class MonitorController {
...
@@ -100,7 +100,7 @@ public class MonitorController {
*
*
* @return
* @return
*/
*/
@PostMapping
(
value
=
"/exportstaypoint"
)
@PostMapping
(
value
=
"/exportstaypoint"
,
consumes
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
public
void
exportStayPoint
(
@RequestBody
@Validated
ExpStayPointRequest
spRequest
)
{
public
void
exportStayPoint
(
@RequestBody
@Validated
ExpStayPointRequest
spRequest
)
{
if
(
StringUtils
.
isBlank
(
spRequest
.
getExpData
()))
{
if
(
StringUtils
.
isBlank
(
spRequest
.
getExpData
()))
{
throw
new
AdminException
(
"数据为空"
);
throw
new
AdminException
(
"数据为空"
);
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/model/report/StayPointReport.java
View file @
ab15977
...
@@ -53,7 +53,7 @@ public class StayPointReport {
...
@@ -53,7 +53,7 @@ public class StayPointReport {
* 停留地址
* 停留地址
*/
*/
@ExcelProperty
(
value
=
"停留地址"
,
index
=
8
)
@ExcelProperty
(
value
=
"停留地址"
,
index
=
8
)
private
String
stayAddr
;
private
String
transferAddress
;
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
View file @
ab15977
...
@@ -104,7 +104,6 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -104,7 +104,6 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
* @return
* @return
*/
*/
public
DataGpsLocation
getDeviceLastWifiInfoBySn
(
String
sn
)
{
public
DataGpsLocation
getDeviceLastWifiInfoBySn
(
String
sn
)
{
// 75开头的设备是沃达孚的无线设备,需要显示wifi定位
//具有wifi定位的设备起始号
//具有wifi定位的设备起始号
String
wifiSns
=
PropertiesUtils
.
getProperty
(
"wifi.sn.start.location"
);
String
wifiSns
=
PropertiesUtils
.
getProperty
(
"wifi.sn.start.location"
);
boolean
hasWifi
=
false
;
boolean
hasWifi
=
false
;
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/MonitorServiceImpl.java
View file @
ab15977
...
@@ -174,8 +174,15 @@ public class MonitorServiceImpl implements MonitorService {
...
@@ -174,8 +174,15 @@ public class MonitorServiceImpl implements MonitorService {
public
List
<
StayPointReport
>
listExportStayPoint
(
ExpStayPointRequest
espRequest
)
throws
UnsupportedEncodingException
{
public
List
<
StayPointReport
>
listExportStayPoint
(
ExpStayPointRequest
espRequest
)
throws
UnsupportedEncodingException
{
//将json数据封装为实体对象
//将json数据封装为实体对象
String
jsonData
=
URLDecoder
.
decode
(
espRequest
.
getExpData
(),
"UTF-8"
);
String
jsonData
=
URLDecoder
.
decode
(
espRequest
.
getExpData
(),
"UTF-8"
);
//TODO 待完成 report中的index
String
name
=
espRequest
.
getName
();
String
vin
=
espRequest
.
getVin
();
String
locationType
=
espRequest
.
getLocationType
()
==
1
?
"基站"
:
"gps"
;
List
<
StayPointReport
>
dtoList
=
JsonUtils
.
getDTOList
(
jsonData
,
StayPointReport
.
class
);
List
<
StayPointReport
>
dtoList
=
JsonUtils
.
getDTOList
(
jsonData
,
StayPointReport
.
class
);
dtoList
.
forEach
(
stayPoint
->
{
stayPoint
.
setName
(
name
);
stayPoint
.
setVin
(
vin
);
stayPoint
.
setLocationType
(
locationType
);
});
return
dtoList
;
return
dtoList
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment