Browse Source

读取device_id

develop
H Vs 4 months ago
parent
commit
5e8bc21432
5 changed files with 37 additions and 37 deletions
  1. +1
    -1
      GpsCardGatewayPosition.Postion/appsettings.chaos.json
  2. +9
    -9
      GpsCardGatewayPosition.Service/Resolver/Property/GpsPositionResolver.cs
  3. +9
    -9
      GpsCardGatewayPosition.Service/Resolver/Property/LbsGsmPositionResolver.cs
  4. +9
    -9
      GpsCardGatewayPosition.Service/Resolver/Property/WifiPlus2PositionResolver.cs
  5. +9
    -9
      GpsCardGatewayPosition.Service/Resolver/Property/WifiPositionResolver.cs

+ 1
- 1
GpsCardGatewayPosition.Postion/appsettings.chaos.json View File

@@ -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": {


+ 9
- 9
GpsCardGatewayPosition.Service/Resolver/Property/GpsPositionResolver.cs View File

@@ -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);


+ 9
- 9
GpsCardGatewayPosition.Service/Resolver/Property/LbsGsmPositionResolver.cs View File

@@ -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(',');


+ 9
- 9
GpsCardGatewayPosition.Service/Resolver/Property/WifiPlus2PositionResolver.cs View File

@@ -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,
//};








+ 9
- 9
GpsCardGatewayPosition.Service/Resolver/Property/WifiPositionResolver.cs View File

@@ -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,
//};








Loading…
Cancel
Save