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 7b82ca1f
authored
Mar 14, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.7.0 开发区域查车ICE调用接口
1 parent
462025f3
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1178 additions
and
35 deletions
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/Callback_DaoGpsService_getDeviceInfoOfRegion.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/DeviceInfo.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceInfoHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceListHelper.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceListHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/InRegionDevices.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/InRegionDevicesHolder.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/RegionData.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/RegionDataHolder.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/api/FeignRegionalSearchController.java
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/RegionalSearchService.java
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/RegionalSearchsServiceImpl.java
src/test/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImplTest.java
src/test/java/cn/com/glsx/devicemonitor/modules/service/impl/RegionalSearchsServiceImplTest.java
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/Callback_DaoGpsService_getDeviceInfoOfRegion.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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_getDeviceInfoOfRegion
extends
Ice
.
TwowayCallback
{
public
abstract
void
response
(
boolean
__ret
,
InRegionDevices
res
);
public
final
void
__completed
(
Ice
.
AsyncResult
__result
)
{
DaoGpsServicePrx
__proxy
=
(
DaoGpsServicePrx
)
__result
.
getProxy
();
boolean
__ret
=
false
;
InRegionDevicesHolder
res
=
new
InRegionDevicesHolder
();
try
{
__ret
=
__proxy
.
end_getDeviceInfoOfRegion
(
res
,
__result
);
}
catch
(
Ice
.
LocalException
__ex
)
{
exception
(
__ex
);
return
;
}
response
(
__ret
,
res
.
value
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrx.java
View file @
7b82ca1
...
@@ -669,4 +669,22 @@ public interface DaoGpsServicePrx extends Ice.ObjectPrx
...
@@ -669,4 +669,22 @@ public interface DaoGpsServicePrx extends Ice.ObjectPrx
public
Ice
.
AsyncResult
begin_getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getGpsByBsRecordsOfLatesBs
__cb
);
public
Ice
.
AsyncResult
begin_getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getGpsByBsRecordsOfLatesBs
__cb
);
public
boolean
end_getGpsByBsRecordsOfLatesBs
(
DaoBsDataRespHolder
res
,
Ice
.
AsyncResult
__result
);
public
boolean
end_getGpsByBsRecordsOfLatesBs
(
DaoBsDataRespHolder
res
,
Ice
.
AsyncResult
__result
);
public
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
);
public
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
Ice
.
Callback
__cb
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Callback
__cb
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
Callback_DaoGpsService_getDeviceInfoOfRegion
__cb
);
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getDeviceInfoOfRegion
__cb
);
public
boolean
end_getDeviceInfoOfRegion
(
InRegionDevicesHolder
res
,
Ice
.
AsyncResult
__result
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DaoGpsServicePrxHelper.java
View file @
7b82ca1
...
@@ -702,6 +702,142 @@ public final class DaoGpsServicePrxHelper extends Ice.ObjectPrxHelperBase implem
...
@@ -702,6 +702,142 @@ public final class DaoGpsServicePrxHelper extends Ice.ObjectPrxHelperBase implem
}
}
}
}
private
static
final
String
__getDeviceInfoOfRegion_name
=
"getDeviceInfoOfRegion"
;
public
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
)
{
return
getDeviceInfoOfRegion
(
req
,
res
,
null
,
false
);
}
public
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
)
{
return
getDeviceInfoOfRegion
(
req
,
res
,
__ctx
,
true
);
}
private
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
boolean
__explicitCtx
)
{
if
(
__explicitCtx
&&
__ctx
==
null
)
{
__ctx
=
_emptyContext
;
}
final
Ice
.
Instrumentation
.
InvocationObserver
__observer
=
IceInternal
.
ObserverHelper
.
get
(
this
,
"getDeviceInfoOfRegion"
,
__ctx
);
int
__cnt
=
0
;
try
{
while
(
true
)
{
Ice
.
_ObjectDel
__delBase
=
null
;
try
{
__checkTwowayOnly
(
"getDeviceInfoOfRegion"
);
__delBase
=
__getDelegate
(
false
);
_DaoGpsServiceDel
__del
=
(
_DaoGpsServiceDel
)
__delBase
;
return
__del
.
getDeviceInfoOfRegion
(
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_getDeviceInfoOfRegion
(
RegionData
req
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
null
,
false
,
null
);
}
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
__ctx
,
true
,
null
);
}
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
Ice
.
Callback
__cb
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
null
,
false
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Callback
__cb
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
__ctx
,
true
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
Callback_DaoGpsService_getDeviceInfoOfRegion
__cb
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
null
,
false
,
__cb
);
}
public
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Callback_DaoGpsService_getDeviceInfoOfRegion
__cb
)
{
return
begin_getDeviceInfoOfRegion
(
req
,
__ctx
,
true
,
__cb
);
}
private
Ice
.
AsyncResult
begin_getDeviceInfoOfRegion
(
RegionData
req
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
boolean
__explicitCtx
,
IceInternal
.
CallbackBase
__cb
)
{
__checkAsyncTwowayOnly
(
__getDeviceInfoOfRegion_name
);
IceInternal
.
OutgoingAsync
__result
=
new
IceInternal
.
OutgoingAsync
(
this
,
__getDeviceInfoOfRegion_name
,
__cb
);
try
{
__result
.
__prepare
(
__getDeviceInfoOfRegion_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_getDeviceInfoOfRegion
(
InRegionDevicesHolder
res
,
Ice
.
AsyncResult
__result
)
{
Ice
.
AsyncResult
.
__check
(
__result
,
this
,
__getDeviceInfoOfRegion_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
InRegionDevices
();
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
__getDevicesGpsInfo_name
=
"getDevicesGpsInfo"
;
private
static
final
String
__getDevicesGpsInfo_name
=
"getDevicesGpsInfo"
;
public
boolean
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
res
)
public
boolean
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
res
)
...
...
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceInfo.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
DeviceInfo
implements
Cloneable
,
java
.
io
.
Serializable
{
public
long
sn
;
public
int
lng
;
public
int
lat
;
public
int
gpsTime
;
public
String
addr
;
public
DeviceInfo
()
{
}
public
DeviceInfo
(
long
sn
,
int
lng
,
int
lat
,
int
gpsTime
,
String
addr
)
{
this
.
sn
=
sn
;
this
.
lng
=
lng
;
this
.
lat
=
lat
;
this
.
gpsTime
=
gpsTime
;
this
.
addr
=
addr
;
}
public
boolean
equals
(
Object
rhs
)
{
if
(
this
==
rhs
)
{
return
true
;
}
DeviceInfo
_r
=
null
;
if
(
rhs
instanceof
DeviceInfo
)
{
_r
=
(
DeviceInfo
)
rhs
;
}
if
(
_r
!=
null
)
{
if
(
sn
!=
_r
.
sn
)
{
return
false
;
}
if
(
lng
!=
_r
.
lng
)
{
return
false
;
}
if
(
lat
!=
_r
.
lat
)
{
return
false
;
}
if
(
gpsTime
!=
_r
.
gpsTime
)
{
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::DeviceInfo"
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
sn
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
lng
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
lat
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
gpsTime
);
__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
.
writeLong
(
sn
);
__os
.
writeInt
(
lng
);
__os
.
writeInt
(
lat
);
__os
.
writeInt
(
gpsTime
);
__os
.
writeString
(
addr
);
}
public
void
__read
(
IceInternal
.
BasicStream
__is
)
{
sn
=
__is
.
readLong
();
lng
=
__is
.
readInt
();
lat
=
__is
.
readInt
();
gpsTime
=
__is
.
readInt
();
addr
=
__is
.
readString
();
}
public
static
final
long
serialVersionUID
=
-
6174067657958401057L
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceInfoHolder.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
DeviceInfoHolder
{
public
DeviceInfoHolder
()
{
}
public
DeviceInfoHolder
(
DeviceInfo
value
)
{
this
.
value
=
value
;
}
public
DeviceInfo
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceListHelper.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
DeviceListHelper
{
public
static
void
write
(
IceInternal
.
BasicStream
__os
,
DeviceInfo
[]
__v
)
{
if
(
__v
==
null
)
{
__os
.
writeSize
(
0
);
}
else
{
__os
.
writeSize
(
__v
.
length
);
for
(
int
__i0
=
0
;
__i0
<
__v
.
length
;
__i0
++)
{
__v
[
__i0
].
__write
(
__os
);
}
}
}
public
static
DeviceInfo
[]
read
(
IceInternal
.
BasicStream
__is
)
{
DeviceInfo
[]
__v
;
final
int
__len0
=
__is
.
readAndCheckSeqSize
(
21
);
__v
=
new
DeviceInfo
[
__len0
];
for
(
int
__i0
=
0
;
__i0
<
__len0
;
__i0
++)
{
__v
[
__i0
]
=
new
DeviceInfo
();
__v
[
__i0
].
__read
(
__is
);
}
return
__v
;
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/DeviceListHolder.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
DeviceListHolder
{
public
DeviceListHolder
()
{
}
public
DeviceListHolder
(
DeviceInfo
[]
value
)
{
this
.
value
=
value
;
}
public
DeviceInfo
[]
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/InRegionDevices.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
InRegionDevices
implements
Cloneable
,
java
.
io
.
Serializable
{
public
int
ret
;
public
DeviceInfo
[]
devInfo
;
public
InRegionDevices
()
{
}
public
InRegionDevices
(
int
ret
,
DeviceInfo
[]
devInfo
)
{
this
.
ret
=
ret
;
this
.
devInfo
=
devInfo
;
}
public
boolean
equals
(
Object
rhs
)
{
if
(
this
==
rhs
)
{
return
true
;
}
InRegionDevices
_r
=
null
;
if
(
rhs
instanceof
InRegionDevices
)
{
_r
=
(
InRegionDevices
)
rhs
;
}
if
(
_r
!=
null
)
{
if
(
ret
!=
_r
.
ret
)
{
return
false
;
}
if
(!
java
.
util
.
Arrays
.
equals
(
devInfo
,
_r
.
devInfo
))
{
return
false
;
}
return
true
;
}
return
false
;
}
public
int
hashCode
()
{
int
__h
=
5381
;
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
"::HDaoGps::InRegionDevices"
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
ret
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
devInfo
);
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
);
DeviceListHelper
.
write
(
__os
,
devInfo
);
}
public
void
__read
(
IceInternal
.
BasicStream
__is
)
{
ret
=
__is
.
readInt
();
devInfo
=
DeviceListHelper
.
read
(
__is
);
}
public
static
final
long
serialVersionUID
=
7218141244529665699L
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/InRegionDevicesHolder.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
InRegionDevicesHolder
{
public
InRegionDevicesHolder
()
{
}
public
InRegionDevicesHolder
(
InRegionDevices
value
)
{
this
.
value
=
value
;
}
public
InRegionDevices
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/RegionData.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
RegionData
implements
Cloneable
,
java
.
io
.
Serializable
{
public
int
leftLng
;
public
int
leftLat
;
public
int
rightLng
;
public
int
rightLat
;
public
RegionData
()
{
}
public
RegionData
(
int
leftLng
,
int
leftLat
,
int
rightLng
,
int
rightLat
)
{
this
.
leftLng
=
leftLng
;
this
.
leftLat
=
leftLat
;
this
.
rightLng
=
rightLng
;
this
.
rightLat
=
rightLat
;
}
public
boolean
equals
(
Object
rhs
)
{
if
(
this
==
rhs
)
{
return
true
;
}
RegionData
_r
=
null
;
if
(
rhs
instanceof
RegionData
)
{
_r
=
(
RegionData
)
rhs
;
}
if
(
_r
!=
null
)
{
if
(
leftLng
!=
_r
.
leftLng
)
{
return
false
;
}
if
(
leftLat
!=
_r
.
leftLat
)
{
return
false
;
}
if
(
rightLng
!=
_r
.
rightLng
)
{
return
false
;
}
if
(
rightLat
!=
_r
.
rightLat
)
{
return
false
;
}
return
true
;
}
return
false
;
}
public
int
hashCode
()
{
int
__h
=
5381
;
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
"::HDaoGps::RegionData"
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
leftLng
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
leftLat
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
rightLng
);
__h
=
IceInternal
.
HashUtil
.
hashAdd
(
__h
,
rightLat
);
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
(
leftLng
);
__os
.
writeInt
(
leftLat
);
__os
.
writeInt
(
rightLng
);
__os
.
writeInt
(
rightLat
);
}
public
void
__read
(
IceInternal
.
BasicStream
__is
)
{
leftLng
=
__is
.
readInt
();
leftLat
=
__is
.
readInt
();
rightLng
=
__is
.
readInt
();
rightLat
=
__is
.
readInt
();
}
public
static
final
long
serialVersionUID
=
-
7716826721285397147L
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/RegionDataHolder.java
0 → 100644
View file @
7b82ca1
// **********************************************************************
//
// 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
RegionDataHolder
{
public
RegionDataHolder
()
{
}
public
RegionDataHolder
(
RegionData
value
)
{
this
.
value
=
value
;
}
public
RegionData
value
;
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceDel.java
View file @
7b82ca1
...
@@ -129,4 +129,7 @@ public interface _DaoGpsServiceDel extends Ice._ObjectDel
...
@@ -129,4 +129,7 @@ public interface _DaoGpsServiceDel extends Ice._ObjectDel
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__obsv
)
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__obsv
)
throws
IceInternal
.
LocalExceptionWrapper
;
throws
IceInternal
.
LocalExceptionWrapper
;
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
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 @
7b82ca1
...
@@ -282,6 +282,58 @@ public final class _DaoGpsServiceDelD extends Ice._ObjectDelD implements _DaoGps
...
@@ -282,6 +282,58 @@ public final class _DaoGpsServiceDelD extends Ice._ObjectDelD implements _DaoGps
return
__result
.
value
;
return
__result
.
value
;
}
}
public
boolean
getDeviceInfoOfRegion
(
final
RegionData
req
,
final
InRegionDevicesHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
{
final
Ice
.
Current
__current
=
new
Ice
.
Current
();
__initCurrent
(
__current
,
"getDeviceInfoOfRegion"
,
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
.
getDeviceInfoOfRegion
(
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
getDevicesGpsInfo
(
final
BatchGpsDevInfoRequest
req
,
final
BatchGpsDevInfoResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
public
boolean
getDevicesGpsInfo
(
final
BatchGpsDevInfoRequest
req
,
final
BatchGpsDevInfoResponseHolder
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 @
7b82ca1
...
@@ -273,6 +273,56 @@ public final class _DaoGpsServiceDelM extends Ice._ObjectDelM implements _DaoGps
...
@@ -273,6 +273,56 @@ public final class _DaoGpsServiceDelM extends Ice._ObjectDelM implements _DaoGps
}
}
public
boolean
public
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
throws
IceInternal
.
LocalExceptionWrapper
{
IceInternal
.
Outgoing
__og
=
__handler
.
getOutgoing
(
"getDeviceInfoOfRegion"
,
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
InRegionDevices
();
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
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
res
,
java
.
util
.
Map
<
String
,
String
>
__ctx
,
Ice
.
Instrumentation
.
InvocationObserver
__observer
)
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
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 @
7b82ca1
...
@@ -95,6 +95,11 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -95,6 +95,11 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
return
getDayLastGpsRecord
(
req
,
res
,
null
);
return
getDayLastGpsRecord
(
req
,
res
,
null
);
}
}
public
final
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
)
{
return
getDeviceInfoOfRegion
(
req
,
res
,
null
);
}
public
final
boolean
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
res
)
public
final
boolean
getDevicesGpsInfo
(
BatchGpsDevInfoRequest
req
,
BatchGpsDevInfoResponseHolder
res
)
{
{
return
getDevicesGpsInfo
(
req
,
res
,
null
);
return
getDevicesGpsInfo
(
req
,
res
,
null
);
...
@@ -862,6 +867,23 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -862,6 +867,23 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
return
Ice
.
DispatchStatus
.
DispatchOK
;
return
Ice
.
DispatchStatus
.
DispatchOK
;
}
}
public
static
Ice
.
DispatchStatus
___getDeviceInfoOfRegion
(
DaoGpsService
__obj
,
IceInternal
.
Incoming
__inS
,
Ice
.
Current
__current
)
{
__checkMode
(
Ice
.
OperationMode
.
Normal
,
__current
.
mode
);
IceInternal
.
BasicStream
__is
=
__inS
.
startReadParams
();
RegionData
req
;
req
=
new
RegionData
();
req
.
__read
(
__is
);
__inS
.
endReadParams
();
InRegionDevicesHolder
res
=
new
InRegionDevicesHolder
();
boolean
__ret
=
__obj
.
getDeviceInfoOfRegion
(
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"
,
...
@@ -869,6 +891,7 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -869,6 +891,7 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
"getBsWorkModeRecords"
,
"getBsWorkModeRecords"
,
"getDataCardInfo"
,
"getDataCardInfo"
,
"getDayLastGpsRecord"
,
"getDayLastGpsRecord"
,
"getDeviceInfoOfRegion"
,
"getDevicesGpsInfo"
,
"getDevicesGpsInfo"
,
"getDevicesTotalCount"
,
"getDevicesTotalCount"
,
"getFirstBsRecord"
,
"getFirstBsRecord"
,
...
@@ -938,142 +961,146 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
...
@@ -938,142 +961,146 @@ public abstract class _DaoGpsServiceDisp extends Ice.ObjectImpl implements DaoGp
}
}
case
5
:
case
5
:
{
{
return
___getDevice
sGpsInfo
(
this
,
in
,
__current
);
return
___getDevice
InfoOfRegion
(
this
,
in
,
__current
);
}
}
case
6
:
case
6
:
{
{
return
___getDevices
TotalCount
(
this
,
in
,
__current
);
return
___getDevices
GpsInfo
(
this
,
in
,
__current
);
}
}
case
7
:
case
7
:
{
{
return
___get
FirstBsRecord
(
this
,
in
,
__current
);
return
___get
DevicesTotalCount
(
this
,
in
,
__current
);
}
}
case
8
:
case
8
:
{
{
return
___getFirst
Gps
BsRecord
(
this
,
in
,
__current
);
return
___getFirstBsRecord
(
this
,
in
,
__current
);
}
}
case
9
:
case
9
:
{
{
return
___getFirstGpsRecord
(
this
,
in
,
__current
);
return
___getFirstGps
Bs
Record
(
this
,
in
,
__current
);
}
}
case
10
:
case
10
:
{
{
return
___get
GpsBsRecords
(
this
,
in
,
__current
);
return
___get
FirstGpsRecord
(
this
,
in
,
__current
);
}
}
case
11
:
case
11
:
{
{
return
___getGpsB
yBsRecordsOfLatesB
s
(
this
,
in
,
__current
);
return
___getGpsB
sRecord
s
(
this
,
in
,
__current
);
}
}
case
12
:
case
12
:
{
{
return
___getGpsBy
LatestBsRecord
(
this
,
in
,
__current
);
return
___getGpsBy
BsRecordsOfLatesBs
(
this
,
in
,
__current
);
}
}
case
13
:
case
13
:
{
{
return
___getGps
Records
(
this
,
in
,
__current
);
return
___getGps
ByLatestBsRecord
(
this
,
in
,
__current
);
}
}
case
14
:
case
14
:
{
{
return
___getGpsRecords
ByImei
(
this
,
in
,
__current
);
return
___getGpsRecords
(
this
,
in
,
__current
);
}
}
case
15
:
case
15
:
{
{
return
___getGpsRecordsBy
MapSn
(
this
,
in
,
__current
);
return
___getGpsRecordsBy
Imei
(
this
,
in
,
__current
);
}
}
case
16
:
case
16
:
{
{
return
___getGpsRecords
Ex
(
this
,
in
,
__current
);
return
___getGpsRecords
ByMapSn
(
this
,
in
,
__current
);
}
}
case
17
:
case
17
:
{
{
return
___getGps
WorkModeRecords
(
this
,
in
,
__current
);
return
___getGps
RecordsEx
(
this
,
in
,
__current
);
}
}
case
18
:
case
18
:
{
{
return
___get
LatestBatteryRecord
(
this
,
in
,
__current
);
return
___get
GpsWorkModeRecords
(
this
,
in
,
__current
);
}
}
case
19
:
case
19
:
{
{
return
___getLatestB
s
Record
(
this
,
in
,
__current
);
return
___getLatestB
attery
Record
(
this
,
in
,
__current
);
}
}
case
20
:
case
20
:
{
{
return
___getLatest
Gps
BsRecord
(
this
,
in
,
__current
);
return
___getLatestBsRecord
(
this
,
in
,
__current
);
}
}
case
21
:
case
21
:
{
{
return
___getLatestGpsRecord
(
this
,
in
,
__current
);
return
___getLatestGps
Bs
Record
(
this
,
in
,
__current
);
}
}
case
22
:
case
22
:
{
{
return
___getLatestGpsRecord
ByImei
(
this
,
in
,
__current
);
return
___getLatestGpsRecord
(
this
,
in
,
__current
);
}
}
case
23
:
case
23
:
{
{
return
___getLatestGpsRecordBy
MapSn
(
this
,
in
,
__current
);
return
___getLatestGpsRecordBy
Imei
(
this
,
in
,
__current
);
}
}
case
24
:
case
24
:
{
{
return
___getLatestGps
Time
(
this
,
in
,
__current
);
return
___getLatestGps
RecordByMapSn
(
this
,
in
,
__current
);
}
}
case
25
:
case
25
:
{
{
return
___getLatestGps
WifiRecords
(
this
,
in
,
__current
);
return
___getLatestGps
Time
(
this
,
in
,
__current
);
}
}
case
26
:
case
26
:
{
{
return
___getLatest
LocationByLbsRecord
(
this
,
in
,
__current
);
return
___getLatest
GpsWifiRecords
(
this
,
in
,
__current
);
}
}
case
27
:
case
27
:
{
{
return
___getLatest
Rgp
sRecord
(
this
,
in
,
__current
);
return
___getLatest
LocationByLb
sRecord
(
this
,
in
,
__current
);
}
}
case
28
:
case
28
:
{
{
return
___getLatest
Vol
Record
(
this
,
in
,
__current
);
return
___getLatest
Rgps
Record
(
this
,
in
,
__current
);
}
}
case
29
:
case
29
:
{
{
return
___get
MaxVolDiff
(
this
,
in
,
__current
);
return
___get
LatestVolRecord
(
this
,
in
,
__current
);
}
}
case
30
:
case
30
:
{
{
return
___get
ParadeCarAlarmRecords
(
this
,
in
,
__current
);
return
___get
MaxVolDiff
(
this
,
in
,
__current
);
}
}
case
31
:
case
31
:
{
{
return
___getParadeCar
Gps
Records
(
this
,
in
,
__current
);
return
___getParadeCar
Alarm
Records
(
this
,
in
,
__current
);
}
}
case
32
:
case
32
:
{
{
return
___get
RecentB
sRecords
(
this
,
in
,
__current
);
return
___get
ParadeCarGp
sRecords
(
this
,
in
,
__current
);
}
}
case
33
:
case
33
:
{
{
return
___getRecent
Gp
sRecords
(
this
,
in
,
__current
);
return
___getRecent
B
sRecords
(
this
,
in
,
__current
);
}
}
case
34
:
case
34
:
{
{
return
___get
SnMap
Records
(
this
,
in
,
__current
);
return
___get
RecentGps
Records
(
this
,
in
,
__current
);
}
}
case
35
:
case
35
:
{
{
return
___get
Voltage
Records
(
this
,
in
,
__current
);
return
___get
SnMap
Records
(
this
,
in
,
__current
);
}
}
case
36
:
case
36
:
{
{
return
___
ice_id
(
this
,
in
,
__current
);
return
___
getVoltageRecords
(
this
,
in
,
__current
);
}
}
case
37
:
case
37
:
{
{
return
___ice_id
s
(
this
,
in
,
__current
);
return
___ice_id
(
this
,
in
,
__current
);
}
}
case
38
:
case
38
:
{
{
return
___ice_i
sA
(
this
,
in
,
__current
);
return
___ice_i
ds
(
this
,
in
,
__current
);
}
}
case
39
:
case
39
:
{
{
return
___ice_isA
(
this
,
in
,
__current
);
}
case
40
:
{
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 @
7b82ca1
...
@@ -93,4 +93,6 @@ public interface _DaoGpsServiceOperations
...
@@ -93,4 +93,6 @@ public interface _DaoGpsServiceOperations
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
Ice
.
Current
__current
);
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
,
Ice
.
Current
__current
);
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
,
Ice
.
Current
__current
);
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
,
Ice
.
Current
__current
);
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
,
Ice
.
Current
__current
);
}
}
src/main/java/cn/com/glsx/devicemonitor/iceprotocol/hdao/_DaoGpsServiceOperationsNC.java
View file @
7b82ca1
...
@@ -93,4 +93,6 @@ public interface _DaoGpsServiceOperationsNC
...
@@ -93,4 +93,6 @@ public interface _DaoGpsServiceOperationsNC
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
);
boolean
getGpsByLatestBsRecord
(
LatestBsGetRequest
req
,
DaoBsDataRespHolder
res
);
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
);
boolean
getGpsByBsRecordsOfLatesBs
(
BsGetRequest
req
,
DaoBsDataRespHolder
res
);
boolean
getDeviceInfoOfRegion
(
RegionData
req
,
InRegionDevicesHolder
res
);
}
}
src/main/java/cn/com/glsx/devicemonitor/modules/api/FeignRegionalSearchController.java
0 → 100644
View file @
7b82ca1
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
api
;
import
cn.com.glsx.devicemonitor.api.dto.request.RegionalSearchRequest
;
import
cn.com.glsx.devicemonitor.api.dto.response.RegionalSearchDTO
;
import
cn.com.glsx.devicemonitor.api.dto.response.StayPointRecordDTO
;
import
cn.com.glsx.devicemonitor.api.feign.RegionalSearchServiceApi
;
import
cn.com.glsx.devicemonitor.modules.service.RegionalSearchService
;
import
cn.hutool.core.date.StopWatch
;
import
cn.hutool.json.JSONUtil
;
import
com.glsx.plat.core.web.R
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.openfeign.SpringQueryMap
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author Yanglinlong
* @date 2023/3/13 14:02
*/
@Slf4j
@Validated
@RestController
@RequestMapping
(
"/api/regional"
)
@Api
(
value
=
"区域查车"
,
tags
=
"区域查车"
)
public
class
FeignRegionalSearchController
implements
RegionalSearchServiceApi
{
@Autowired
private
RegionalSearchService
regionalSearchService
;
@GetMapping
(
"/getDeviceInfoOfRegion"
)
@Override
public
R
<
List
<
RegionalSearchDTO
>>
getDeviceInfoOfRegion
(
@SpringQueryMap
RegionalSearchRequest
regionalSearchRequest
)
{
log
.
info
(
"regionalSearchRequest ==="
+
JSONUtil
.
toJsonStr
(
regionalSearchRequest
));
StopWatch
sw
=
new
StopWatch
();
sw
.
start
(
"Controller getDeviceInfoOfRegion"
);
List
<
RegionalSearchDTO
>
list
=
regionalSearchService
.
getDeviceInfoOfRegion
(
regionalSearchRequest
.
getLeftLngLat
(),
regionalSearchRequest
.
getRightLngLat
());
sw
.
stop
();
log
.
info
(
sw
.
getLastTaskName
()
+
"总耗时:"
+
sw
.
getTotalTimeSeconds
()
+
"s"
);
return
R
.
ok
().
data
(
list
);
}
}
src/main/java/cn/com/glsx/devicemonitor/modules/components/HdaoGpsComponent.java
View file @
7b82ca1
...
@@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @author wangxw
* @author wangxw
...
@@ -1010,4 +1011,52 @@ public class HdaoGpsComponent {
...
@@ -1010,4 +1011,52 @@ public class HdaoGpsComponent {
log
.
info
(
"failed!!"
);
log
.
info
(
"failed!!"
);
return
null
;
return
null
;
}
}
/**
* 根据左下右上经纬度点查询设备
*
* @param leftLngLat 左经纬度点
* @param rightLngLat 右经纬度点
* @return
*/
public
List
<
DataGpsLocation
>
getDeviceInfoOfRegion
(
String
leftLngLat
,
String
rightLngLat
)
{
log
.
info
(
"开始调用getDeviceInfoOfRegion===左经纬度:"
+
leftLngLat
+
";右经纬度:"
+
rightLngLat
);
int
convert
=
1000000
;
RegionData
req
=
new
RegionData
();
req
.
leftLng
=
(
int
)
(
Float
.
parseFloat
(
leftLngLat
.
split
(
","
)[
0
])
*
convert
);
req
.
leftLat
=
(
int
)
(
Float
.
parseFloat
(
leftLngLat
.
split
(
","
)[
1
])
*
convert
);
req
.
rightLng
=
(
int
)
(
Float
.
parseFloat
(
rightLngLat
.
split
(
","
)[
0
])
*
convert
);
req
.
rightLat
=
(
int
)
(
Float
.
parseFloat
(
rightLngLat
.
split
(
","
)[
1
])
*
convert
);
log
.
info
(
"req==="
+
JSONUtil
.
toJsonStr
(
req
));
try
{
InRegionDevicesHolder
res
=
new
InRegionDevicesHolder
();
boolean
ret
=
daoGpsServicePrx
.
getDeviceInfoOfRegion
(
req
,
res
);
if
(
ret
)
{
if
(
res
.
value
.
ret
==
0
)
{
DeviceInfo
[]
deviceInfos
=
res
.
value
.
devInfo
;
return
Arrays
.
stream
(
deviceInfos
).
parallel
().
map
(
deviceInfo
->
{
DataGpsLocation
gpsLocation
=
new
DataGpsLocation
();
gpsLocation
.
setSn
(
String
.
valueOf
(
deviceInfo
.
sn
));
gpsLocation
.
setLat
(
LocationUtil
.
latlng
(
deviceInfo
.
lat
));
gpsLocation
.
setLng
(
LocationUtil
.
latlng
(
deviceInfo
.
lng
));
gpsLocation
.
setDateTime
(
DateFormatUtil
.
toStringFromTimestamp
(
deviceInfo
.
gpsTime
,
DateFormatUtil
.
pattern01
));
gpsLocation
.
setAddress
(
deviceInfo
.
addr
);
return
gpsLocation
;
}).
collect
(
Collectors
.
toList
());
}
if
(
res
.
value
.
ret
==
1
)
{
log
.
info
(
"getDeviceInfoOfRegion no recod!!"
);
return
Lists
.
newArrayList
();
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"getDeviceInfoOfRegion:Exception!!!!message:"
+
e
.
getMessage
());
e
.
printStackTrace
();
return
Lists
.
newArrayList
();
}
log
.
info
(
"failed!!"
);
return
Lists
.
newArrayList
();
}
}
}
src/main/java/cn/com/glsx/devicemonitor/modules/service/RegionalSearchService.java
0 → 100644
View file @
7b82ca1
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
service
;
import
cn.com.glsx.devicemonitor.api.dto.response.RegionalSearchDTO
;
import
java.util.List
;
/**
* @author Yanglinlong
* @date 2023/3/13 14:03
*/
public
interface
RegionalSearchService
{
/**
* 根据经纬度点查询设备号
*
* @param leftLngLat 左经纬度点
* @param rightLngLat 右经纬度点
* @return
*/
List
<
RegionalSearchDTO
>
getDeviceInfoOfRegion
(
String
leftLngLat
,
String
rightLngLat
);
}
src/main/java/cn/com/glsx/devicemonitor/modules/service/impl/RegionalSearchsServiceImpl.java
0 → 100644
View file @
7b82ca1
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
service
.
impl
;
import
cn.com.glsx.devicemonitor.api.dto.response.RegionalSearchDTO
;
import
cn.com.glsx.devicemonitor.modules.components.HdaoGpsComponent
;
import
cn.com.glsx.devicemonitor.modules.entity.inner.DataGpsLocation
;
import
cn.com.glsx.devicemonitor.modules.service.RegionalSearchService
;
import
cn.hutool.core.date.StopWatch
;
import
cn.hutool.json.JSONUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 区域查车
*
* @author Yanglinlong
* @date 2023/3/13 14:03
*/
@Slf4j
@Service
public
class
RegionalSearchsServiceImpl
implements
RegionalSearchService
{
@Autowired
private
HdaoGpsComponent
hdaoGpsComponent
;
public
List
<
RegionalSearchDTO
>
getDeviceInfoOfRegion
(
String
leftLngLat
,
String
rightLngLat
)
{
StopWatch
sw
=
new
StopWatch
();
sw
.
start
(
"getDeviceInfoOfRegion"
);
List
<
DataGpsLocation
>
deviceInfoOfRegionList
=
hdaoGpsComponent
.
getDeviceInfoOfRegion
(
leftLngLat
,
rightLngLat
);
log
.
debug
(
"deviceInfoOfRegionList==="
+
JSONUtil
.
toJsonStr
(
deviceInfoOfRegionList
));
log
.
info
(
"deviceInfoOfRegionList size==="
+
deviceInfoOfRegionList
.
size
());
sw
.
stop
();
log
.
info
(
sw
.
getLastTaskName
()
+
"耗时:"
+
sw
.
getLastTaskTimeMillis
()
+
"ms"
);
sw
.
start
(
"mapGeoConvert"
);
List
<
RegionalSearchDTO
>
regionalSearchList
=
deviceInfoOfRegionList
.
parallelStream
().
map
(
dataGpsLocation
->
{
RegionalSearchDTO
dto
=
new
RegionalSearchDTO
();
dto
.
setSn
(
dataGpsLocation
.
getSn
());
dto
.
setLng
(
dataGpsLocation
.
getLng
());
dto
.
setLat
(
dataGpsLocation
.
getLat
());
dto
.
setGpsTime
(
dataGpsLocation
.
getDateTime
());
// 经纬度转为地址
// String address = hdaoGpsComponent.mapGeoConvert(dataGpsLocation.getLat(), dataGpsLocation.getLng());
dto
.
setAddress
(
dataGpsLocation
.
getAddress
());
return
dto
;
}).
collect
(
Collectors
.
toList
());
sw
.
stop
();
log
.
info
(
sw
.
getLastTaskName
()
+
"耗时:"
+
sw
.
getLastTaskTimeMillis
()
+
"ms"
);
log
.
info
(
"RegionalSearchService 总耗时:"
+
sw
.
getTotalTimeSeconds
()
+
"s"
);
log
.
debug
(
"regionalSearchList==="
+
JSONUtil
.
toJsonStr
(
regionalSearchList
));
return
regionalSearchList
;
}
}
src/test/java/cn/com/glsx/devicemonitor/modules/service/impl/GpsBsLocationServiceImplTest.java
View file @
7b82ca1
...
@@ -63,7 +63,7 @@ public class GpsBsLocationServiceImplTest {
...
@@ -63,7 +63,7 @@ public class GpsBsLocationServiceImplTest {
@Test
@Test
public
void
testGetGpsByBsRecordsOfLatesBs
()
{
public
void
testGetGpsByBsRecordsOfLatesBs
()
{
GpsLocation
bsRecordsOfLatesBs
=
gpsBsLocationService
.
getGpsByBsRecordsOfLatesBs
(
"
2192801101"
,
DeviceTypeRelationEnum
.
GPS
,
"2022-11-07 10:40:32"
,
"2022-11-07 16:40:32
"
);
GpsLocation
bsRecordsOfLatesBs
=
gpsBsLocationService
.
getGpsByBsRecordsOfLatesBs
(
"
93107720006"
,
DeviceTypeRelationEnum
.
GPS
,
"2022-10-24 13:48:35"
,
"2022-11-08 13:48:35
"
);
System
.
out
.
println
(
"bsRecordsOfLatesBs = "
+
JSONUtil
.
toJsonStr
(
bsRecordsOfLatesBs
));
System
.
out
.
println
(
"bsRecordsOfLatesBs = "
+
JSONUtil
.
toJsonStr
(
bsRecordsOfLatesBs
));
}
}
...
...
src/test/java/cn/com/glsx/devicemonitor/modules/service/impl/RegionalSearchsServiceImplTest.java
0 → 100644
View file @
7b82ca1
package
cn
.
com
.
glsx
.
devicemonitor
.
modules
.
service
.
impl
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.devicemonitor.api.dto.response.RegionalSearchDTO
;
import
cn.com.glsx.devicemonitor.iceprotocol.hdao.DeviceInfo
;
import
cn.com.glsx.devicemonitor.modules.entity.inner.DataGpsLocation
;
import
cn.com.glsx.devicemonitor.modules.service.RegionalSearchService
;
import
cn.com.glsx.devicemonitor.modules.utils.DateFormatUtil
;
import
cn.com.glsx.devicemonitor.modules.utils.LocationUtil
;
import
cn.hutool.json.JSONUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
org
.
junit
.
Assert
.*;
@Slf4j
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
Application
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
public
class
RegionalSearchsServiceImplTest
{
@Autowired
private
RegionalSearchService
regionalSearchService
;
@Test
public
void
getDeviceInfoOfRegion
()
{
List
<
RegionalSearchDTO
>
deviceInfoOfRegion
=
regionalSearchService
.
getDeviceInfoOfRegion
(
"113,22.3"
,
"120,45.1"
);
// List<RegionalSearchDTO> deviceInfoOfRegion = regionalSearchService.getDeviceInfoOfRegion("0,0", "90,180");
System
.
out
.
println
(
"deviceInfoOfRegion = "
+
JSONUtil
.
toJsonStr
(
deviceInfoOfRegion
.
get
(
0
)));
System
.
out
.
println
(
"deviceInfoOfRegion = "
+
deviceInfoOfRegion
.
size
());
}
@Test
public
void
testParallelMap
()
{
DeviceInfo
[]
deviceInfos
=
new
DeviceInfo
[
5
];
List
<
DataGpsLocation
>
collect
=
Arrays
.
stream
(
deviceInfos
).
parallel
().
map
(
deviceInfo
->
{
DataGpsLocation
gpsLocation
=
new
DataGpsLocation
();
gpsLocation
.
setSn
(
String
.
valueOf
(
deviceInfo
.
sn
));
gpsLocation
.
setLat
(
LocationUtil
.
latlng
(
deviceInfo
.
lat
));
gpsLocation
.
setLng
(
LocationUtil
.
latlng
(
deviceInfo
.
lng
));
gpsLocation
.
setDateTime
(
DateFormatUtil
.
toStringFromTimestamp
(
deviceInfo
.
gpsTime
,
DateFormatUtil
.
pattern01
));
gpsLocation
.
setAddress
(
deviceInfo
.
addr
);
return
gpsLocation
;
}).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
"collect = "
+
JSONUtil
.
toJsonStr
(
collect
));
}
}
\ No newline at end of file
\ No newline at end of file
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