Commit 35ab4e07 by 杨林龙

开发1.12.0版本 优化监控基站经纬度显示

1 parent e2512f01
Showing 19 changed files with 786 additions and 33 deletions
// **********************************************************************
//
// 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);
}
}
// **********************************************************************
//
// 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;
}
// **********************************************************************
//
// 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;
}
// **********************************************************************
//
// 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;
}
// **********************************************************************
//
// 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;
}
...@@ -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);
} }
...@@ -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)
......
...@@ -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;
} }
......
...@@ -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;
} }
...@@ -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
{ {
......
...@@ -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
{ {
......
...@@ -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 ___getGpsRecords(this, in, __current); return ___getGpsByLatestBsRecord(this, in, __current);
} }
case 12: case 12:
{ {
return ___getGpsRecordsByImei(this, in, __current); return ___getGpsRecords(this, in, __current);
} }
case 13: case 13:
{ {
return ___getGpsRecordsByMapSn(this, in, __current); return ___getGpsRecordsByImei(this, in, __current);
} }
case 14: case 14:
{ {
return ___getGpsRecordsEx(this, in, __current); return ___getGpsRecordsByMapSn(this, in, __current);
} }
case 15: case 15:
{ {
return ___getGpsWorkModeRecords(this, in, __current); return ___getGpsRecordsEx(this, in, __current);
} }
case 16: case 16:
{ {
return ___getLatestBatteryRecord(this, in, __current); return ___getGpsWorkModeRecords(this, in, __current);
} }
case 17: case 17:
{ {
return ___getLatestBsRecord(this, in, __current); return ___getLatestBatteryRecord(this, in, __current);
} }
case 18: case 18:
{ {
return ___getLatestGpsBsRecord(this, in, __current); return ___getLatestBsRecord(this, in, __current);
} }
case 19: case 19:
{ {
return ___getLatestGpsRecord(this, in, __current); return ___getLatestGpsBsRecord(this, in, __current);
} }
case 20: case 20:
{ {
return ___getLatestGpsRecordByImei(this, in, __current); return ___getLatestGpsRecord(this, in, __current);
} }
case 21: case 21:
{ {
return ___getLatestGpsRecordByMapSn(this, in, __current); return ___getLatestGpsRecordByImei(this, in, __current);
} }
case 22: case 22:
{ {
return ___getLatestGpsTime(this, in, __current); return ___getLatestGpsRecordByMapSn(this, in, __current);
} }
case 23: case 23:
{ {
return ___getLatestGpsWifiRecords(this, in, __current); return ___getLatestGpsTime(this, in, __current);
} }
case 24: case 24:
{ {
return ___getLatestLocationByLbsRecord(this, in, __current); return ___getLatestGpsWifiRecords(this, in, __current);
} }
case 25: case 25:
{ {
return ___getLatestRgpsRecord(this, in, __current); return ___getLatestLocationByLbsRecord(this, in, __current);
} }
case 26: case 26:
{ {
return ___getLatestVolRecord(this, in, __current); return ___getLatestRgpsRecord(this, in, __current);
} }
case 27: case 27:
{ {
return ___getMaxVolDiff(this, in, __current); return ___getLatestVolRecord(this, in, __current);
} }
case 28: case 28:
{ {
return ___getParadeCarAlarmRecords(this, in, __current); return ___getMaxVolDiff(this, in, __current);
} }
case 29: case 29:
{ {
return ___getParadeCarGpsRecords(this, in, __current); return ___getParadeCarAlarmRecords(this, in, __current);
} }
case 30: case 30:
{ {
return ___getRecentBsRecords(this, in, __current); return ___getParadeCarGpsRecords(this, in, __current);
} }
case 31: case 31:
{ {
return ___getRecentGpsRecords(this, in, __current); return ___getRecentBsRecords(this, in, __current);
} }
case 32: case 32:
{ {
return ___getSnMapRecords(this, in, __current); return ___getRecentGpsRecords(this, in, __current);
} }
case 33: case 33:
{ {
return ___getVoltageRecords(this, in, __current); return ___getSnMapRecords(this, in, __current);
} }
case 34: case 34:
{ {
return ___ice_id(this, in, __current); return ___getVoltageRecords(this, in, __current);
} }
case 35: case 35:
{ {
return ___ice_ids(this, in, __current); return ___ice_id(this, in, __current);
} }
case 36: case 36:
{ {
return ___ice_isA(this, in, __current); return ___ice_ids(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);
} }
} }
......
...@@ -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);
} }
...@@ -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);
} }
...@@ -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;
}
} }
...@@ -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.getDeviceLastGPSInfoFullByBs(sn, deviceTypeMap.get(sn)); DataGpsLocation bsLocation = hdaoGpsComponent.getGpsByLatestBsRecord(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));
......
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 testGetWifi() {
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
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));
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!