diff --git a/HealthMonitor.Service/Biz/IotWebApiService.cs b/HealthMonitor.Service/Biz/IotWebApiService.cs index 5c07cb3..dc6cf19 100644 --- a/HealthMonitor.Service/Biz/IotWebApiService.cs +++ b/HealthMonitor.Service/Biz/IotWebApiService.cs @@ -281,10 +281,12 @@ namespace HealthMonitor.Service.Biz { // 保证实时性,先更新缓存,再更新数据库 var personCache = await _personCacheMgr.GetDeviceGpsPersonCacheObjectBySerialNoAsync(new Guid().ToString(), imei).ConfigureAwait(false); - if (personCache != null - && - string.IsNullOrWhiteSpace(personCache["person"]!["remarks"]!.ToString()) - ) + + if (personCache == null) + { + _logger.LogInformation($"Person remarks数据异常,检查缓存和数据库"); + } + else if (string.IsNullOrWhiteSpace(personCache["person"]!["remarks"]!.ToString())) { var newRemarkData = new { @@ -323,7 +325,7 @@ namespace HealthMonitor.Service.Biz person!.Remarks = newRemarkStr; await _gpsPersonApiClient.UpdateAsync(person, new RequestHeader() { RequestId = $"{imei}" }).ConfigureAwait(false); _logger.LogInformation($"更新Person remarks字段|{person.Remarks}"); - + } else { @@ -332,10 +334,6 @@ namespace HealthMonitor.Service.Biz } flag = cacheFlag; } - else if (personCache == null) - { - _logger.LogInformation($"Person remarks数据异常,检查缓存和数据库"); - } } catch (Exception ex) { diff --git a/HealthMonitor.Service/Resolver/BloodpressResolver.cs b/HealthMonitor.Service/Resolver/BloodpressResolver.cs index 7f6481f..50ffcad 100644 --- a/HealthMonitor.Service/Resolver/BloodpressResolver.cs +++ b/HealthMonitor.Service/Resolver/BloodpressResolver.cs @@ -309,6 +309,7 @@ namespace HealthMonitor.Service.Resolver }; // 下发 IOT 增量值 var flagIot = await _serviceIotWebApi.SetBloodPressCalibrationConfigAsync(bpIncData).ConfigureAwait(false); + if (flagIot) { #region 保存下推记录 stb_hm_bp_push_ref_inc_value