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 0dab0baa
authored
Aug 30, 2021
by
黄小葱
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改位置点
1 parent
933cbafd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
20 deletions
src/main/java/cn/com/glsx/devicemonitor/config/IceServerConfig.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/bs/BsData.java
src/main/java/cn/com/glsx/devicemonitor/modules/components/HDaoMileComponent.java
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
src/test/java/cn/com/glsx/test/gpsbs/MonitorTest.java
src/main/java/cn/com/glsx/devicemonitor/config/IceServerConfig.java
View file @
0dab0ba
...
...
@@ -38,7 +38,7 @@ public class IceServerConfig {
Ice
.
Communicator
ic
=
Ice
.
Util
.
initialize
();
Ice
.
ObjectPrx
base
=
ic
.
stringToProxy
(
url
).
ice_timeout
(
iceProperties
.
getIceLowTimeout
());
DaoGpsServicePrx
prx
=
DaoGpsServicePrxHelper
.
checkedCast
(
base
);
log
.
info
(
"ICE init HDaoGpsSvc server:"
+
iceProperties
.
getHdaoGpsServer
()
+
" success!"
);
log
.
info
(
"ICE init HDaoGpsSvc server:"
+
url
+
" success!"
);
return
prx
;
}
...
...
@@ -50,7 +50,7 @@ public class IceServerConfig {
Ice
.
Communicator
ic
=
Ice
.
Util
.
initialize
();
Ice
.
ObjectPrx
base
=
ic
.
stringToProxy
(
url
).
ice_timeout
(
iceProperties
.
getIceLowTimeout
());
IPOISearchNearPrx
prx
=
IPOISearchNearPrxHelper
.
checkedCast
(
base
);
log
.
info
(
"ICE init PoiSearchNear server:"
+
iceProperties
.
getPoiSearchNearServer
()
+
" success!"
);
log
.
info
(
"ICE init PoiSearchNear server:"
+
url
+
" success!"
);
return
prx
;
}
...
...
@@ -62,7 +62,7 @@ public class IceServerConfig {
Ice
.
Communicator
ic
=
Ice
.
Util
.
initialize
();
Ice
.
ObjectPrx
base
=
ic
.
stringToProxy
(
url
).
ice_timeout
(
iceProperties
.
getIceLowTimeout
());
BaseStationServicePrx
prx
=
BaseStationServicePrxHelper
.
checkedCast
(
base
);
log
.
info
(
"ICE init BsdObjectId server:"
+
iceProperties
.
getBsServer
()
+
" success!"
);
log
.
info
(
"ICE init BsdObjectId server:"
+
url
+
" success!"
);
return
prx
;
}
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/bs/BsData.java
View file @
0dab0ba
...
...
@@ -115,16 +115,5 @@ public class BsData implements Cloneable, java.io.Serializable
cellid
=
__is
.
readInt
();
}
@Override
public
String
toString
()
{
return
"BsData [mnc="
+
mnc
+
", lac="
+
lac
+
", cellid="
+
cellid
+
", hashCode()="
+
hashCode
()
+
", getClass()="
+
getClass
()
+
", toString()="
+
super
.
toString
()
+
"]"
;
}
public
static
final
long
serialVersionUID
=
-
1180175726157969065L
;
public
static
final
long
serialVersionUID
=
-
1180175726157969065L
;
}
src/main/java/cn/com/glsx/devicemonitor/modules/components/HDaoMileComponent.java
View file @
0dab0ba
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.devicemonitor.modules.components;
import
cn.com.glsx.devicemonitor.iceprotocol.mile.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Calendar
;
...
...
@@ -17,6 +18,7 @@ import java.util.Date;
@Component
public
class
HDaoMileComponent
{
@Autowired
private
DaoMileServicePrx
daoMileServicePrx
;
/**
...
...
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
View file @
0dab0ba
...
...
@@ -19,6 +19,7 @@ import cn.com.glsx.devicemonitor.modules.entity.inner.DataGpsLocation;
import
cn.com.glsx.devicemonitor.modules.model.*
;
import
cn.com.glsx.devicemonitor.modules.utils.*
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
...
@@ -164,9 +165,10 @@ public class HdaoGpsComponent {
BsInfo
[]
bsInfos
=
res
.
value
.
record
.
bsInfos
;
if
(
bsInfos
!=
null
&&
bsInfos
.
length
>
0
)
{
log
.
info
(
"基站位置信息:{}"
,
JSON
.
toJSONString
(
bsInfos
));
for
(
int
i
=
0
;
i
<
bsInfos
.
length
;
i
++)
{
BsInfo
bsInfo
=
bsInfos
[
i
];
if
(
bsInfo
.
lac
>
0
&&
bsInfo
.
cellId
>
0
)
{
if
(
bsInfo
.
lac
>
0
&&
bsInfo
.
cellId
>
0
&&
bsInfo
.
signal
>
0
)
{
dataBsLocation
.
setLac
(
String
.
valueOf
(
bsInfo
.
lac
));
dataBsLocation
.
setLcid
(
String
.
valueOf
(
bsInfo
.
cellId
));
break
;
...
...
@@ -285,9 +287,7 @@ public class HdaoGpsComponent {
BsDataRespHolder
resp
=
new
BsDataRespHolder
();
try
{
boolean
ret
=
baseStationServicePrx
.
GetGpsByBs
(
req
,
resp
);
if
(
ret
&&
resp
.
value
.
gps
!=
null
&&
resp
.
value
.
gps
.
lat
>
0
&&
resp
.
value
.
gps
.
lng
>
0
)
{
if
(
ret
&&
resp
.
value
.
gps
!=
null
&&
resp
.
value
.
ret
==
0
)
{
dataGpsLocation
=
new
DataGpsLocation
();
dataGpsLocation
.
setSn
(
dataBsLocation
.
getSn
());
...
...
@@ -309,6 +309,7 @@ public class HdaoGpsComponent {
dataGpsLocation
.
setStoreTime
(
dataBsLocation
.
getStoreTime
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"mapGeoBsConvert invoker baseStationServicePrx.GetGpsByBs ICE_EXCEP:"
+
e
.
getMessage
(),
e
);
}
return
dataGpsLocation
;
...
...
src/test/java/cn/com/glsx/test/gpsbs/MonitorTest.java
View file @
0dab0ba
...
...
@@ -17,7 +17,7 @@ public class MonitorTest {
private
static
String
serverUrl
=
localUrl
;
public
static
void
main
(
String
[]
args
)
{
listTrackPoint
Test
();
getdevicemonitorinfo
Test
();
}
public
static
void
listTrackPointTest
()
{
...
...
@@ -31,4 +31,31 @@ public class MonitorTest {
String
res
=
HttpUtil
.
get
(
url
,
paramMap
,
30000
);
System
.
out
.
println
(
res
);
}
public
static
void
getdevicemonitorinfoTest
()
{
String
url
=
serverUrl
+
"/monitor/getdevicemonitorinfo"
;
String
sn
=
"1610816002"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"sns"
,
sn
);
paramMap
.
put
(
"deviceCode"
,
"gps"
);
String
res
=
HttpUtil
.
get
(
url
,
paramMap
,
30000
);
System
.
out
.
println
(
res
);
}
public
static
void
liststaypointTest
()
{
String
url
=
serverUrl
+
"/monitor/liststaypoint"
;
String
sn
=
"1610816002"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"sn"
,
sn
);
paramMap
.
put
(
"locationType"
,
"1"
);
paramMap
.
put
(
"startTime"
,
"2021-08-21 15:29:00"
);
paramMap
.
put
(
"endTime"
,
"2021-08-24 15:29:00"
);
String
res
=
HttpUtil
.
get
(
url
,
paramMap
,
30000
);
System
.
out
.
println
(
res
);
}
}
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