@@ -1,7 +1,7 @@ | |||||
{ | { | ||||
"AllowedHosts": "*", | "AllowedHosts": "*", | ||||
"ServiceConfig": { | "ServiceConfig": { | ||||
"TelpoDataUrl": "http://192.168.12.134:6699", | |||||
"TelpoDataUrl": "http://192.168.12.120/data/", | |||||
"MqServerAddress": "192.168.12.124:9092,192.168.12.125:9092,192.168.12.126:9092" | "MqServerAddress": "192.168.12.124:9092,192.168.12.125:9092,192.168.12.126:9092" | ||||
}, | }, | ||||
"Appsettings": { | "Appsettings": { | ||||
@@ -90,16 +90,16 @@ namespace GpsCardGatewayPosition.Service.Resolver.Property | |||||
if (propertyValue == null) return; | if (propertyValue == null) return; | ||||
if (propertyValue.Value.Latitude == 0 || propertyValue.Value.Longitude == 0) return; | if (propertyValue.Value.Latitude == 0 || propertyValue.Value.Longitude == 0) return; | ||||
//var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
//if (device == null) | |||||
//{ | |||||
// _logger.LogError($"非法设备:{serialno}"); | |||||
// return; | |||||
//} | |||||
var device = new GpsDevice() | |||||
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
if (device == null) | |||||
{ | { | ||||
DeviceId = serialno, | |||||
}; | |||||
_logger.LogError($"非法设备:{serialno}"); | |||||
return; | |||||
} | |||||
//var device = new GpsDevice() | |||||
//{ | |||||
// DeviceId = serialno, | |||||
//}; | |||||
#region 定位解析 | #region 定位解析 | ||||
decimal[] latLng = GeoConvert.ConvertGoogleBaiduLatLng(propertyValue.Value.Latitude, propertyValue.Value.Longitude); | decimal[] latLng = GeoConvert.ConvertGoogleBaiduLatLng(propertyValue.Value.Latitude, propertyValue.Value.Longitude); | ||||
@@ -93,16 +93,16 @@ namespace GpsCardGatewayPosition.Service.Resolver.Property | |||||
var messageId = _messageId.Value; | var messageId = _messageId.Value; | ||||
var propertyValue = _propertyValue.Value; | var propertyValue = _propertyValue.Value; | ||||
//var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
//if (device == null) | |||||
//{ | |||||
// _logger.LogError($"非法设备:{serialno}"); | |||||
// return; | |||||
//} | |||||
var device = new GpsDevice() | |||||
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
if (device == null) | |||||
{ | { | ||||
DeviceId = serialno, | |||||
}; | |||||
_logger.LogError($"非法设备:{serialno}"); | |||||
return; | |||||
} | |||||
//var device = new GpsDevice() | |||||
//{ | |||||
// DeviceId = serialno, | |||||
//}; | |||||
#region 定位解析 | #region 定位解析 | ||||
var bts = propertyValue.Value.Bts.Split(','); | var bts = propertyValue.Value.Bts.Split(','); | ||||
@@ -92,16 +92,16 @@ namespace GpsCardGatewayPosition.Service.Resolver.Property | |||||
var messageId = _messageId.Value; | var messageId = _messageId.Value; | ||||
var propertyValue = _propertyValue.Value; | var propertyValue = _propertyValue.Value; | ||||
//var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
//if (device == null) | |||||
//{ | |||||
// _logger.LogError($"非法设备:{serialno}"); | |||||
// return; | |||||
//} | |||||
var device = new GpsDevice() | |||||
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
if (device == null) | |||||
{ | { | ||||
DeviceId = serialno, | |||||
}; | |||||
_logger.LogError($"非法设备:{serialno}"); | |||||
return; | |||||
} | |||||
//var device = new GpsDevice() | |||||
//{ | |||||
// DeviceId = serialno, | |||||
//}; | |||||
@@ -121,16 +121,16 @@ namespace GpsCardGatewayPosition.Service.Resolver.Property | |||||
var startTwo = TimeSpan.Parse(_configWifiParam.StartTwo); | var startTwo = TimeSpan.Parse(_configWifiParam.StartTwo); | ||||
var endTwo = TimeSpan.Parse(_configWifiParam.EndTwo); | var endTwo = TimeSpan.Parse(_configWifiParam.EndTwo); | ||||
//var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
//if (device == null) | |||||
//{ | |||||
// _logger.LogError($"非法设备:{serialno}"); | |||||
// return; | |||||
//} | |||||
var device = new GpsDevice() | |||||
var device = await _deviceCacheMgr.GetDeviceBySerialNoAsync(messageId!, serialno!).ConfigureAwait(false); | |||||
if (device == null) | |||||
{ | { | ||||
DeviceId = serialno, | |||||
}; | |||||
_logger.LogError($"非法设备:{serialno}"); | |||||
return; | |||||
} | |||||
//var device = new GpsDevice() | |||||
//{ | |||||
// DeviceId = serialno, | |||||
//}; | |||||