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 35ab4e07
authored
Oct 18, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发1.12.0版本 优化监控基站经纬度显示
1 parent
e2512f01
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
788 additions
and
35 deletions
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/Callback_DaoGpsService_getGpsByLatestBsRecord.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/ConvType.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoBsDataResp.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoBsDataRespHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsData.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsDataHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrx.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrxHelper.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/GpsBsRecordsHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDel.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDelD.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDelM.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDisp.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceOperations.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceOperationsNC.java
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
src/test/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponentTest.java
src/test/java/cn/com/glsx/test/MainTest.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/Callback_DaoGpsService_getGpsByLatestBsRecord.java
0 → 100644
View file @
35ab4e0
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package
cn
.
com
.
glsx
.
devicemonitor
.
iceprotocol
.
hdao
;
public
abstract
class
Callback_DaoGpsService_getGpsByLatestBsRecord
extends
Ice
.
TwowayCallback
{
public
abstract
void
response
(
boolean
__ret
,
DaoBsDataResp
res
);
public
final
void
__completed
(
Ice
.
AsyncResult
__result
)
{
DaoGpsServicePrx
__proxy
=
(
DaoGpsServicePrx
)
__result
.
getProxy
();
boolean
__ret
=
false
;
DaoBsDataRespHolder
res
=
new
DaoBsDataRespHolder
();
try
{
__ret
=
__proxy
.
end_getGpsByLatestBsRecord
(
res
,
__result
);
}
catch
(
Ice
.
LocalException
__ex
)
{
exception
(
__ex
);
return
;
}
response
(
__ret
,
res
.
value
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/ConvType.java
View file @
35ab4e0
...
@@ -22,9 +22,9 @@ package cn.com.glsx.devicemonitor.iceprotocol.hdao;
...
@@ -22,9 +22,9 @@ package cn.com.glsx.devicemonitor.iceprotocol.hdao;
public
enum
ConvType
implements
java
.
io
.
Serializable
public
enum
ConvType
implements
java
.
io
.
Serializable
{
{
WGS2GG
(
0
),
WGS2GG
(
0
),
WGS2BD
(
1
);
WGS2BD
(
1
);
public
int
public
int
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoBsDataResp.java
0 → 100644
View file @
35ab4e0
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package
cn
.
com
.
glsx
.
devicemonitor
.
iceprotocol
.
hdao
;
public
class
DaoBsDataResp
implements
Cloneable
,
java
.
io
.
Serializable
{
public
int
ret
;
public
DaoGpsData
gps
;
public
DaoBsDataResp
()
{
}
public
DaoBsDataResp
(
int
ret
,
DaoGpsData
gps
)
{
this
.
ret
=
ret
;
this
.
gps
=
gps
;
}
public
boolean
equals
(
Object
rhs
)
{
if
(
this
==
rhs
)
{
return
true
;
}
DaoBsDataResp
_r
=
null
;
if
(
rhs
instanceof
DaoBsDataResp
)
{
_r
=
(
DaoBsDataResp
)
rhs
;
}
if
(
_r
!=
null
)
{
if
(
ret
!=
_r
.
ret
)
{
return
false
;
}
if
(
gps
!=
_r
.
gps
)
{
if
(
gps
==
null
||
_r
.
gps
==
null
||
!
gps
.
equals
(
_r
.
gps
))
{
return
false
;
}
}
return
true
;
}
return
false
;
}
public
int
hashCode
()
{
int
__h
=
5381
;
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
"::HDaoGps::DaoBsDataResp"
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
ret
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
gps
);
return
__h
;
}
public
Object
clone
()
{
Object
o
=
null
;
try
{
o
=
super
.
clone
();
}
catch
(
CloneNotSupportedException
ex
)
{
assert
false
;
// impossible
}
return
o
;
}
public
void
__write
(
IceInternal
.
BasicStream
__os
)
{
__os
.
writeInt
(
ret
);
gps
.
__write
(
__os
);
}
public
void
__read
(
IceInternal
.
BasicStream
__is
)
{
ret
=
__is
.
readInt
();
gps
=
new
DaoGpsData
();
gps
.
__read
(
__is
);
}
public
static
final
long
serialVersionUID
=
2797866113578909109L
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoBsDataRespHolder.java
0 → 100644
View file @
35ab4e0
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package
cn
.
com
.
glsx
.
devicemonitor
.
iceprotocol
.
hdao
;
public
final
class
DaoBsDataRespHolder
{
public
DaoBsDataRespHolder
()
{
}
public
DaoBsDataRespHolder
(
DaoBsDataResp
value
)
{
this
.
value
=
value
;
}
public
DaoBsDataResp
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsData.java
0 → 100644
View file @
35ab4e0
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package
cn
.
com
.
glsx
.
devicemonitor
.
iceprotocol
.
hdao
;
public
class
DaoGpsData
implements
Cloneable
,
java
.
io
.
Serializable
{
public
int
gpsTime
;
public
int
storeTime
;
public
int
lng
;
public
int
lat
;
public
String
addr
;
public
DaoGpsData
()
{
}
public
DaoGpsData
(
int
gpsTime
,
int
storeTime
,
int
lng
,
int
lat
,
String
addr
)
{
this
.
gpsTime
=
gpsTime
;
this
.
storeTime
=
storeTime
;
this
.
lng
=
lng
;
this
.
lat
=
lat
;
this
.
addr
=
addr
;
}
public
boolean
equals
(
Object
rhs
)
{
if
(
this
==
rhs
)
{
return
true
;
}
DaoGpsData
_r
=
null
;
if
(
rhs
instanceof
DaoGpsData
)
{
_r
=
(
DaoGpsData
)
rhs
;
}
if
(
_r
!=
null
)
{
if
(
gpsTime
!=
_r
.
gpsTime
)
{
return
false
;
}
if
(
storeTime
!=
_r
.
storeTime
)
{
return
false
;
}
if
(
lng
!=
_r
.
lng
)
{
return
false
;
}
if
(
lat
!=
_r
.
lat
)
{
return
false
;
}
if
(
addr
!=
_r
.
addr
)
{
if
(
addr
==
null
||
_r
.
addr
==
null
||
!
addr
.
equals
(
_r
.
addr
))
{
return
false
;
}
}
return
true
;
}
return
false
;
}
public
int
hashCode
()
{
int
__h
=
5381
;
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
"::HDaoGps::DaoGpsData"
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
gpsTime
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
storeTime
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
lng
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
lat
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
addr
);
return
__h
;
}
public
Object
clone
()
{
Object
o
=
null
;
try
{
o
=
super
.
clone
();
}
catch
(
CloneNotSupportedException
ex
)
{
assert
false
;
// impossible
}
return
o
;
}
public
void
__write
(
IceInternal
.
BasicStream
__os
)
{
__os
.
writeInt
(
gpsTime
);
__os
.
writeInt
(
storeTime
);
__os
.
writeInt
(
lng
);
__os
.
writeInt
(
lat
);
__os
.
writeString
(
addr
);
}
public
void
__read
(
IceInternal
.
BasicStream
__is
)
{
gpsTime
=
__is
.
readInt
();
storeTime
=
__is
.
readInt
();
lng
=
__is
.
readInt
();
lat
=
__is
.
readInt
();
addr
=
__is
.
readString
();
}
public
static
final
long
serialVersionUID
=
-
3426953938416699424L
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsDataHolder.java
0 → 100644
View file @
35ab4e0
// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
package
cn
.
com
.
glsx
.
devicemonitor
.
iceprotocol
.
hdao
;
public
final
class
DaoGpsDataHolder
{
public
DaoGpsDataHolder
()
{
}
public
DaoGpsDataHolder
(
DaoGpsData
value
)
{
this
.
value
=
value
;
}
public
DaoGpsData
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrx.java
View file @
35ab4e0
...
@@ -633,4 +633,22 @@ public interface DaoGpsServicePrx extends Ice.ObjectPrx
...
@@ -633,4 +633,22 @@ public interface DaoGpsServicePrx extends Ice.ObjectPrx
public
Ice
.
AsyncResult
begin_getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getLatestGpsWifiRecords
__cb
);
public
Ice
.
AsyncResult
begin_getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getLatestGpsWifiRecords
__cb
);
public
boolean
end_getLatestGpsWifiRecords
(
GpsWifiGetResponseHolder
res
,
Ice
.
AsyncResult
__result
);
public
boolean
end_getLatestGpsWifiRecords
(
GpsWifiGetResponseHolder
res
,
Ice
.
AsyncResult
__result
);
public
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
);
public
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
Ice
.
Callback
__cb
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Callback
__cb
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
Callback_DaoGpsService_getGpsByLatestBsRecord
__cb
);
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getGpsByLatestBsRecord
__cb
);
public
boolean
end_getGpsByLatestBsRecord
(
DaoBsDataRespHolder
res
,
Ice
.
AsyncResult
__result
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrxHelper.java
View file @
35ab4e0
...
@@ -1518,6 +1518,142 @@ public final class DaoGpsServicePrxHelper extends Ice.ObjectPrxHelperBase implem
...
@@ -1518,6 +1518,142 @@ public final class DaoGpsServicePrxHelper extends Ice.ObjectPrxHelperBase implem
}
}
}
}
private
static
final
String
__getGpsByLatestBsRecord_name
=
"getGpsByLatestBsRecord"
;
public
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
)
{
return
getGpsByLatestBsRecord
(
req
,
res
,
null
,
false
);
}
public
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
)
{
return
getGpsByLatestBsRecord
(
req
,
res
,
__ctx
,
true
);
}
private
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
boolean
__explicitCtx
)
{
if
(
__explicitCtx
&&
__ctx
==
null
)
{
__ctx
=
_emptyContext
;
}
final
Ice
.
Instrumentation
.
InvocationObserver
__observer
=
IceInternal
.
ObserverHelper
.
get
(
this
,
"getGpsByLatestBsRecord"
,
__ctx
);
int
__cnt
=
0
;
try
{
while
(
true
)
{
Ice
.
_ObjectDel
__delBase
=
null
;
try
{
__checkTwowayOnly
(
"getGpsByLatestBsRecord"
);
__delBase
=
__getDelegate
(
false
);
_DaoGpsServiceDel
__del
=
(
_DaoGpsServiceDel
)
__delBase
;
return
__del
.
getGpsByLatestBsRecord
(
req
,
res
,
__ctx
,
__observer
);
}
catch
(
IceInternal
.
LocalExceptionWrapper
__ex
)
{
__handleExceptionWrapper
(
__delBase
,
__ex
,
__observer
);
}
catch
(
Ice
.
LocalException
__ex
)
{
__cnt
=
__handleException
(
__delBase
,
__ex
,
null
,
__cnt
,
__observer
);
}
}
}
finally
{
if
(
__observer
!=
null
)
{
__observer
.
detach
();
}
}
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
null
,
false
,
null
);
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
__ctx
,
true
,
null
);
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
Ice
.
Callback
__cb
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
null
,
false
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Callback
__cb
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
__ctx
,
true
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
Callback_DaoGpsService_getGpsByLatestBsRecord
__cb
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
null
,
false
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getGpsByLatestBsRecord
__cb
)
{
return
begin_getGpsByLatestBsRecord
(
req
,
__ctx
,
true
,
__cb
);
}
private
Ice
.
AsyncResult
begin_getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
boolean
__explicitCtx
,
IceInternal
.
CallbackBase
__cb
)
{
__checkAsyncTwowayOnly
(
__getGpsByLatestBsRecord_name
);
IceInternal
.
OutgoingAsync
__result
=
new
IceInternal
.
OutgoingAsync
(
this
,
__getGpsByLatestBsRecord_name
,
__cb
);
try
{
__result
.
__prepare
(
__getGpsByLatestBsRecord_name
,
Ice
.
OperationMode
.
Normal
,
__ctx
,
__explicitCtx
);
IceInternal
.
BasicStream
__os
=
__result
.
__startWriteParams
(
Ice
.
FormatType
.
DefaultFormat
);
req
.
__write
(
__os
);
__result
.
__endWriteParams
();
__result
.
__send
(
true
);
}
catch
(
Ice
.
LocalException
__ex
)
{
__result
.
__exceptionAsync
(
__ex
);
}
return
__result
;
}
public
boolean
end_getGpsByLatestBsRecord
(
DaoBsDataRespHolder
res
,
Ice
.
AsyncResult
__result
)
{
Ice
.
AsyncResult
.
__check
(
__result
,
this
,
__getGpsByLatestBsRecord_name
);
boolean
__ok
=
__result
.
__wait
();
try
{
if
(!
__ok
)
{
try
{
__result
.
__throwUserException
();
}
catch
(
Ice
.
UserException
__ex
)
{
throw
new
Ice
.
UnknownUserException
(
__ex
.
ice_name
(),
__ex
);
}
}
IceInternal
.
BasicStream
__is
=
__result
.
__startReadParams
();
res
.
value
=
new
DaoBsDataResp
();
res
.
value
.
__read
(
__is
);
boolean
__ret
;
__ret
=
__is
.
readBool
();
__result
.
__endReadParams
();
return
__ret
;
}
catch
(
Ice
.
LocalException
ex
)
{
Ice
.
Instrumentation
.
InvocationObserver
__obsv
=
__result
.
__getObserver
();
if
(
__obsv
!=
null
)
{
__obsv
.
failed
(
ex
.
ice_name
());
}
throw
ex
;
}
}
private
static
final
String
__getGpsRecords_name
=
"getGpsRecords"
;
private
static
final
String
__getGpsRecords_name
=
"getGpsRecords"
;
public
boolean
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
)
public
boolean
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
)
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/GpsBsRecordsHolder.java
View file @
35ab4e0
...
@@ -22,11 +22,13 @@ package cn.com.glsx.devicemonitor.iceprotocol.hdao;
...
@@ -22,11 +22,13 @@ package cn.com.glsx.devicemonitor.iceprotocol.hdao;
public
final
class
GpsBsRecordsHolder
public
final
class
GpsBsRecordsHolder
{
{
public
GpsBsRecordsHolder
()
{
public
GpsBsRecordsHolder
()
{
}
}
public
GpsBsRecordsHolder
(
GpsBsRecord
[]
value
)
public
GpsBsRecordsHolder
(
GpsBsRecord
[]
value
)
{
{
this
.
value
=
value
;
this
.
value
=
value
;
}
}
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDel.java
View file @
35ab4e0
...
@@ -123,4 +123,7 @@ public interface _DaoGpsServiceDel extends Ice._ObjectDel
...
@@ -123,4 +123,7 @@ public interface _DaoGpsServiceDel extends Ice._ObjectDel
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__obsv
)
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__obsv
)
throws
IceInternal
.
LocalExceptionWrapper
;
throws
IceInternal
.
LocalExceptionWrapper
;
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__obsv
)
throws
IceInternal
.
LocalExceptionWrapper
;
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDelD.java
View file @
35ab4e0
...
@@ -594,6 +594,58 @@ public final class _DaoGpsServiceDelD extends Ice._ObjectDelD implements _DaoGps
...
@@ -594,6 +594,58 @@ public final class _DaoGpsServiceDelD extends Ice._ObjectDelD implements _DaoGps
return
__result
.
value
;
return
__result
.
value
;
}
}
public
boolean
getGpsByLatestBsRecord
(
final
LatestBsGetRequest
req
,
final
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
{
final
Ice
.
Current
__current
=
new
Ice
.
Current
();
__initCurrent
(
__current
,
"getGpsByLatestBsRecord"
,
Ice
.
OperationMode
.
Normal
,
__ctx
);
final
Ice
.
BooleanHolder
__result
=
new
Ice
.
BooleanHolder
();
IceInternal
.
Direct
__direct
=
null
;
try
{
__direct
=
new
IceInternal
.
Direct
(
__current
)
{
public
Ice
.
DispatchStatus
run
(
Ice
.
Object
__obj
)
{
DaoGpsService
__servant
=
null
;
if
(
__obj
==
null
||
__obj
instanceof
DaoGpsService
)
{
__servant
=
(
DaoGpsService
)
__obj
;
}
else
{
throw
new
Ice
.
OperationNotExistException
(
__current
.
id
,
__current
.
facet
,
__current
.
operation
);
}
__result
.
value
=
__servant
.
getGpsByLatestBsRecord
(
req
,
res
,
__current
);
return
Ice
.
DispatchStatus
.
DispatchOK
;
}
};
try
{
Ice
.
DispatchStatus
__status
=
__direct
.
getServant
().
__collocDispatch
(
__direct
);
if
(
__status
==
Ice
.
DispatchStatus
.
DispatchUserException
)
{
__direct
.
throwUserException
();
}
assert
__status
==
Ice
.
DispatchStatus
.
DispatchOK
;
return
__result
.
value
;
}
finally
{
__direct
.
destroy
();
}
}
catch
(
Ice
.
SystemException
__ex
)
{
throw
__ex
;
}
catch
(
Throwable
__ex
)
{
IceInternal
.
LocalExceptionWrapper
.
throwWrapper
(
__ex
);
}
return
__result
.
value
;
}
public
boolean
getGpsRecords
(
final
GpsGetRequest
req
,
final
GpsGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
public
boolean
getGpsRecords
(
final
GpsGetRequest
req
,
final
GpsGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
throws
IceInternal
.
LocalExceptionWrapper
{
{
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDelM.java
View file @
35ab4e0
...
@@ -573,6 +573,56 @@ public final class _DaoGpsServiceDelM extends Ice._ObjectDelM implements _DaoGps
...
@@ -573,6 +573,56 @@ public final class _DaoGpsServiceDelM extends Ice._ObjectDelM implements _DaoGps
}
}
public
boolean
public
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
{
IceInternal
.
Outgoing
__og
=
__handler
.
getOutgoing
(
"getGpsByLatestBsRecord"
,
Ice
.
OperationMode
.
Normal
,
__ctx
,
__observer
);
try
{
try
{
IceInternal
.
BasicStream
__os
=
__og
.
startWriteParams
(
Ice
.
FormatType
.
DefaultFormat
);
req
.
__write
(
__os
);
__og
.
endWriteParams
();
}
catch
(
Ice
.
LocalException
__ex
)
{
__og
.
abort
(
__ex
);
}
boolean
__ok
=
__og
.
invoke
();
try
{
if
(!
__ok
)
{
try
{
__og
.
throwUserException
();
}
catch
(
Ice
.
UserException
__ex
)
{
throw
new
Ice
.
UnknownUserException
(
__ex
.
ice_name
(),
__ex
);
}
}
IceInternal
.
BasicStream
__is
=
__og
.
startReadParams
();
res
.
value
=
new
DaoBsDataResp
();
res
.
value
.
__read
(
__is
);
boolean
__ret
;
__ret
=
__is
.
readBool
();
__og
.
endReadParams
();
return
__ret
;
}
catch
(
Ice
.
LocalException
__ex
)
{
throw
new
IceInternal
.
LocalExceptionWrapper
(
__ex
,
false
);
}
}
finally
{
__handler
.
reclaimOutgoing
(
__og
);
}
}
public
boolean
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
throws
IceInternal
.
LocalExceptionWrapper
{
{
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDisp.java
View file @
35ab4e0
...
@@ -125,6 +125,11 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -125,6 +125,11 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
return
getGpsBsRecords
(
req
,
res
,
null
);
return
getGpsBsRecords
(
req
,
res
,
null
);
}
}
public
final
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
)
{
return
getGpsByLatestBsRecord
(
req
,
res
,
null
);
}
public
final
boolean
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
)
public
final
boolean
getGpsRecords
(
GpsGetRequest
req
,
GpsGetResponseHolder
res
)
{
{
return
getGpsRecords
(
req
,
res
,
null
);
return
getGpsRecords
(
req
,
res
,
null
);
...
@@ -818,6 +823,23 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -818,6 +823,23 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
return
Ice
.
DispatchStatus
.
DispatchOK
;
return
Ice
.
DispatchStatus
.
DispatchOK
;
}
}
public
static
Ice
.
DispatchStatus
___getGpsByLatestBsRecord
(
DaoGpsService
__obj
,
IceInternal
.
Incoming
__inS
,
Ice
.
Current
__current
)
{
__checkMode
(
Ice
.
OperationMode
.
Normal
,
__current
.
mode
);
IceInternal
.
BasicStream
__is
=
__inS
.
startReadParams
();
LatestBsGetRequest
req
;
req
=
new
LatestBsGetRequest
();
req
.
__read
(
__is
);
__inS
.
endReadParams
();
DaoBsDataRespHolder
res
=
new
DaoBsDataRespHolder
();
boolean
__ret
=
__obj
.
getGpsByLatestBsRecord
(
req
,
res
,
__current
);
IceInternal
.
BasicStream
__os
=
__inS
.
__startWriteParams
(
Ice
.
FormatType
.
DefaultFormat
);
res
.
value
.
__write
(
__os
);
__os
.
writeBool
(
__ret
);
__inS
.
__endWriteParams
(
true
);
return
Ice
.
DispatchStatus
.
DispatchOK
;
}
private
final
static
String
[]
__all
=
private
final
static
String
[]
__all
=
{
{
"convGeoGps"
,
"convGeoGps"
,
...
@@ -831,6 +853,7 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -831,6 +853,7 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
"getFirstGpsBsRecord"
,
"getFirstGpsBsRecord"
,
"getFirstGpsRecord"
,
"getFirstGpsRecord"
,
"getGpsBsRecords"
,
"getGpsBsRecords"
,
"getGpsByLatestBsRecord"
,
"getGpsRecords"
,
"getGpsRecords"
,
"getGpsRecordsByImei"
,
"getGpsRecordsByImei"
,
"getGpsRecordsByMapSn"
,
"getGpsRecordsByMapSn"
,
...
@@ -916,110 +939,114 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -916,110 +939,114 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
}
}
case
11
:
case
11
:
{
{
return
___getGps
Records
(
this
,
in
,
__current
);
return
___getGps
ByLatestBsRecord
(
this
,
in
,
__current
);
}
}
case
12
:
case
12
:
{
{
return
___getGpsRecords
ByImei
(
this
,
in
,
__current
);
return
___getGpsRecords
(
this
,
in
,
__current
);
}
}
case
13
:
case
13
:
{
{
return
___getGpsRecordsBy
MapSn
(
this
,
in
,
__current
);
return
___getGpsRecordsBy
Imei
(
this
,
in
,
__current
);
}
}
case
14
:
case
14
:
{
{
return
___getGpsRecords
Ex
(
this
,
in
,
__current
);
return
___getGpsRecords
ByMapSn
(
this
,
in
,
__current
);
}
}
case
15
:
case
15
:
{
{
return
___getGps
WorkModeRecords
(
this
,
in
,
__current
);
return
___getGps
RecordsEx
(
this
,
in
,
__current
);
}
}
case
16
:
case
16
:
{
{
return
___get
LatestBatteryRecord
(
this
,
in
,
__current
);
return
___get
GpsWorkModeRecords
(
this
,
in
,
__current
);
}
}
case
17
:
case
17
:
{
{
return
___getLatestB
s
Record
(
this
,
in
,
__current
);
return
___getLatestB
attery
Record
(
this
,
in
,
__current
);
}
}
case
18
:
case
18
:
{
{
return
___getLatest
Gps
BsRecord
(
this
,
in
,
__current
);
return
___getLatestBsRecord
(
this
,
in
,
__current
);
}
}
case
19
:
case
19
:
{
{
return
___getLatestGpsRecord
(
this
,
in
,
__current
);
return
___getLatestGps
Bs
Record
(
this
,
in
,
__current
);
}
}
case
20
:
case
20
:
{
{
return
___getLatestGpsRecord
ByImei
(
this
,
in
,
__current
);
return
___getLatestGpsRecord
(
this
,
in
,
__current
);
}
}
case
21
:
case
21
:
{
{
return
___getLatestGpsRecordBy
MapSn
(
this
,
in
,
__current
);
return
___getLatestGpsRecordBy
Imei
(
this
,
in
,
__current
);
}
}
case
22
:
case
22
:
{
{
return
___getLatestGps
Time
(
this
,
in
,
__current
);
return
___getLatestGps
RecordByMapSn
(
this
,
in
,
__current
);
}
}
case
23
:
case
23
:
{
{
return
___getLatestGps
WifiRecords
(
this
,
in
,
__current
);
return
___getLatestGps
Time
(
this
,
in
,
__current
);
}
}
case
24
:
case
24
:
{
{
return
___getLatest
LocationByLbsRecord
(
this
,
in
,
__current
);
return
___getLatest
GpsWifiRecords
(
this
,
in
,
__current
);
}
}
case
25
:
case
25
:
{
{
return
___getLatest
Rgp
sRecord
(
this
,
in
,
__current
);
return
___getLatest
LocationByLb
sRecord
(
this
,
in
,
__current
);
}
}
case
26
:
case
26
:
{
{
return
___getLatest
Vol
Record
(
this
,
in
,
__current
);
return
___getLatest
Rgps
Record
(
this
,
in
,
__current
);
}
}
case
27
:
case
27
:
{
{
return
___get
MaxVolDiff
(
this
,
in
,
__current
);
return
___get
LatestVolRecord
(
this
,
in
,
__current
);
}
}
case
28
:
case
28
:
{
{
return
___get
ParadeCarAlarmRecords
(
this
,
in
,
__current
);
return
___get
MaxVolDiff
(
this
,
in
,
__current
);
}
}
case
29
:
case
29
:
{
{
return
___getParadeCar
Gps
Records
(
this
,
in
,
__current
);
return
___getParadeCar
Alarm
Records
(
this
,
in
,
__current
);
}
}
case
30
:
case
30
:
{
{
return
___get
RecentB
sRecords
(
this
,
in
,
__current
);
return
___get
ParadeCarGp
sRecords
(
this
,
in
,
__current
);
}
}
case
31
:
case
31
:
{
{
return
___getRecent
Gp
sRecords
(
this
,
in
,
__current
);
return
___getRecent
B
sRecords
(
this
,
in
,
__current
);
}
}
case
32
:
case
32
:
{
{
return
___get
SnMap
Records
(
this
,
in
,
__current
);
return
___get
RecentGps
Records
(
this
,
in
,
__current
);
}
}
case
33
:
case
33
:
{
{
return
___get
Voltage
Records
(
this
,
in
,
__current
);
return
___get
SnMap
Records
(
this
,
in
,
__current
);
}
}
case
34
:
case
34
:
{
{
return
___
ice_id
(
this
,
in
,
__current
);
return
___
getVoltageRecords
(
this
,
in
,
__current
);
}
}
case
35
:
case
35
:
{
{
return
___ice_id
s
(
this
,
in
,
__current
);
return
___ice_id
(
this
,
in
,
__current
);
}
}
case
36
:
case
36
:
{
{
return
___ice_i
sA
(
this
,
in
,
__current
);
return
___ice_i
ds
(
this
,
in
,
__current
);
}
}
case
37
:
case
37
:
{
{
return
___ice_isA
(
this
,
in
,
__current
);
}
case
38
:
{
return
___ice_ping
(
this
,
in
,
__current
);
return
___ice_ping
(
this
,
in
,
__current
);
}
}
}
}
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceOperations.java
View file @
35ab4e0
...
@@ -89,4 +89,6 @@ public interface _DaoGpsServiceOperations
...
@@ -89,4 +89,6 @@ public interface _DaoGpsServiceOperations
boolean
getDevicesTotalCount
(
DevicesTotalCountGetRequest
req
,
DevicesTotalCountResHolder
res
,
Ice
.
Current
__current
);
boolean
getDevicesTotalCount
(
DevicesTotalCountGetRequest
req
,
DevicesTotalCountResHolder
res
,
Ice
.
Current
__current
);
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
,
Ice
.
Current
__current
);
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
,
Ice
.
Current
__current
);
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
Ice
.
Current
__current
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceOperationsNC.java
View file @
35ab4e0
...
@@ -89,4 +89,6 @@ public interface _DaoGpsServiceOperationsNC
...
@@ -89,4 +89,6 @@ public interface _DaoGpsServiceOperationsNC
boolean
getDevicesTotalCount
(
DevicesTotalCountGetRequest
req
,
DevicesTotalCountResHolder
res
);
boolean
getDevicesTotalCount
(
DevicesTotalCountGetRequest
req
,
DevicesTotalCountResHolder
res
);
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
);
boolean
getLatestGpsWifiRecords
(
GpsWifiRequest
req
,
GpsWifiGetResponseHolder
res
);
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
);
}
}
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
View file @
35ab4e0
...
@@ -877,4 +877,66 @@ public class HdaoGpsComponent {
...
@@ -877,4 +877,66 @@ public class HdaoGpsComponent {
return
gpsLocation
;
return
gpsLocation
;
}
}
/**
* 获取设备号直接获取基站的经纬度地址数据
*
* @param sn 设备号
* @param deviceTypeRelationEnum 设备类型枚举类
* @return
*/
public
DataGpsLocation
getGpsByLatestBsRecord
(
String
sn
,
DeviceTypeRelationEnum
deviceTypeRelationEnum
)
{
DataGpsLocation
dataGpsLocation
=
null
;
try
{
LatestBsGetRequest
req
=
new
LatestBsGetRequest
();
DaoBsDataRespHolder
res
=
new
DaoBsDataRespHolder
();
req
.
userID
=
Long
.
parseLong
(
sn
);
req
.
apType
=
deviceTypeRelationEnum
.
getDataDeviceType
();
boolean
gpsByLatestBsRecordFlag
=
this
.
daoGpsServicePrx
.
getGpsByLatestBsRecord
(
req
,
res
);
if
(!
gpsByLatestBsRecordFlag
)
{
log
.
info
(
"getGpsByLatestBsRecord fail!! sn:"
+
sn
);
return
null
;
}
DaoBsDataResp
resp
=
res
.
value
;
int
ret
=
resp
.
ret
;
if
(
ret
==
0
)
{
dataGpsLocation
=
new
DataGpsLocation
();
dataGpsLocation
.
setSn
(
sn
);
String
lat
=
LocationUtil
.
latlng
(
resp
.
gps
.
lat
);
String
lng
=
LocationUtil
.
latlng
(
resp
.
gps
.
lng
);
dataGpsLocation
.
setLat
(
lat
);
dataGpsLocation
.
setLng
(
lng
);
double
[]
googleGps
=
GpsCorrect
.
gpsToGoogle
(
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
lng
));
String
elat
=
LocationUtil
.
latlng
(
googleGps
[
0
]);
String
elng
=
LocationUtil
.
latlng
(
googleGps
[
1
]);
dataGpsLocation
.
setElat
(
elat
);
dataGpsLocation
.
setElng
(
elng
);
double
[]
baiduGps
=
GpsCorrect
.
gpsToBaidu
(
Double
.
parseDouble
(
lat
),
Double
.
parseDouble
(
lng
));
String
blat
=
LocationUtil
.
latlng
(
baiduGps
[
0
]);
String
blng
=
LocationUtil
.
latlng
(
baiduGps
[
1
]);
dataGpsLocation
.
setBlat
(
blat
);
dataGpsLocation
.
setBlng
(
blng
);
dataGpsLocation
.
setDateTime
(
DateFormatUtil
.
toStringFromTimestamp
(
res
.
value
.
gps
.
gpsTime
,
DateFormatUtil
.
pattern01
));
dataGpsLocation
.
setStoreTime
(
DateFormatUtil
.
toStringFromTimestamp
(
res
.
value
.
gps
.
storeTime
,
DateFormatUtil
.
pattern01
));
dataGpsLocation
.
setAddress
(
resp
.
gps
.
addr
);
return
dataGpsLocation
;
}
if
(
ret
==
1
)
{
log
.
info
(
"getGpsByLatestBsRecord no recod!!"
);
return
null
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"getGpsByLatestBsRecord:Exception!!!!message:"
+
e
.
getMessage
());
e
.
printStackTrace
();
return
null
;
}
log
.
info
(
"failed!!"
);
return
null
;
}
}
}
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImpl.java
View file @
35ab4e0
...
@@ -88,7 +88,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
...
@@ -88,7 +88,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
if
(
dataGpsLocation
.
getGeoLocationEnum
().
equals
(
GeoLocationEnum
.
GPS
))
{
if
(
dataGpsLocation
.
getGeoLocationEnum
().
equals
(
GeoLocationEnum
.
GPS
))
{
gpsBsData
.
setGpsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
dataGpsLocation
));
gpsBsData
.
setGpsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
dataGpsLocation
));
// 2.1 如果是GPS,则补充获取基站的数据
// 2.1 如果是GPS,则补充获取基站的数据
DataGpsLocation
bsLocation
=
hdaoGpsComponent
.
get
DeviceLastGPSInfoFullByBs
(
sn
,
deviceTypeMap
.
get
(
sn
));
DataGpsLocation
bsLocation
=
hdaoGpsComponent
.
get
GpsByLatestBsRecord
(
sn
,
deviceTypeMap
.
get
(
sn
));
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
bsLocation
));
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
bsLocation
));
}
else
if
(
dataGpsLocation
.
getGeoLocationEnum
().
equals
(
GeoLocationEnum
.
BS
))
{
}
else
if
(
dataGpsLocation
.
getGeoLocationEnum
().
equals
(
GeoLocationEnum
.
BS
))
{
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
dataGpsLocation
));
gpsBsData
.
setBsLocation
(
DataLocationConvert
.
convertDataToGpsLocation
(
dataGpsLocation
));
...
...
src/test/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponentTest.java
View file @
35ab4e0
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
components
;
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
components
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.devicemonitor.api.enums.DeviceTypeRelationEnum
;
import
cn.com.glsx.devicemonitor.modules.entity.inner.DataGpsLocation
;
import
cn.com.glsx.devicemonitor.modules.entity.inner.DataGpsLocation
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
...
@@ -25,9 +27,15 @@ class HdaoGpsComponentTest {
...
@@ -25,9 +27,15 @@ class HdaoGpsComponentTest {
private
HdaoGpsComponent
hdaoGpsComponent
;
private
HdaoGpsComponent
hdaoGpsComponent
;
@Test
@Test
public
void
testGet
()
{
public
void
testGet
Wifi
()
{
DataGpsLocation
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
"4711124038"
);
DataGpsLocation
wifiLocation
=
hdaoGpsComponent
.
getWifiLocation
(
"4711124038"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
wifiLocation
));
System
.
out
.
println
(
JSON
.
toJSONString
(
wifiLocation
));
}
}
@Test
public
void
testGetGpsByLatestBsRecord
()
{
DataGpsLocation
gpsByLatestBsRecord
=
hdaoGpsComponent
.
getGpsByLatestBsRecord
(
"1610522773"
,
DeviceTypeRelationEnum
.
GPS
);
System
.
out
.
println
(
"gpsByLatestBsRecord = "
+
JSONUtil
.
toJsonStr
(
gpsByLatestBsRecord
));
}
}
}
\ No newline at end of file
\ No newline at end of file
src/test/java/cn/com/glsx/test/MainTest.java
View file @
35ab4e0
package
cn
.
com
.
glsx
.
test
;
package
cn
.
com
.
glsx
.
test
;
import
cn.com.glsx.devicemonitor.api.dto.response.DeviceStatusModel
;
import
cn.com.glsx.devicemonitor.common.constants.ConstantsDevice
;
import
cn.com.glsx.devicemonitor.modules.entity.DeviceLocation
;
import
cn.com.glsx.devicemonitor.modules.utils.DeviceUtils
;
import
cn.com.glsx.devicemonitor.modules.utils.JsonUtils
;
import
cn.hutool.json.JSONUtil
;
import
com.glsx.plat.common.utils.DateUtils
;
import
com.glsx.plat.common.utils.DateUtils
;
/**
/**
...
@@ -8,7 +14,20 @@ import com.glsx.plat.common.utils.DateUtils;
...
@@ -8,7 +14,20 @@ import com.glsx.plat.common.utils.DateUtils;
*/
*/
public
class
MainTest
{
public
class
MainTest
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
s
=
DateUtils
.
formatTimeInSec
(
1338
);
// String s = DateUtils.formatTimeInSec(1338);
System
.
out
.
println
(
"s = "
+
s
);
// System.out.println("s = " + s);
DeviceLocation
deviceLogin
=
new
DeviceLocation
();
deviceLogin
.
setLastBsTime
(
DateUtils
.
parse
(
"2022-09-08 16:30:29"
));
deviceLogin
.
setLastBsTime
(
DateUtils
.
parse
(
"2022-09-08 16:30:29"
));
deviceLogin
.
setSn
(
"15208110659"
);
deviceLogin
.
setSpeed
(
0
);
deviceLogin
.
setStayStatus
(
1
);
deviceLogin
.
setStayStatusUpdatetime
(
DateUtils
.
parse
(
"2022-09-08 16:05:00"
));
int
deviceType
=
1
;
long
offlineTime
=
ConstantsDevice
.
OFFLINE_TIME_OTHER
;
DeviceStatusModel
deviceStatusModel
=
DeviceUtils
.
parseDeviceStatus
(
deviceLogin
,
deviceType
,
offlineTime
);
System
.
out
.
println
(
"deviceStatusModel = "
+
JSONUtil
.
toJsonStr
(
deviceStatusModel
));
}
}
}
}
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