|
|
@@ -116,6 +116,7 @@ namespace HealthMonitor.WebApi.Controllers.HealthMonitor |
|
|
|
{ |
|
|
|
//return await IotSetBloodPressCalibrationConfigResponseAsync(model.Imei, 0, 0, 0, 0).ConfigureAwait(false); |
|
|
|
var statNow = DateTime.Now; |
|
|
|
_logger.LogInformation($"{imei} 重置设备"); |
|
|
|
return await IotSetBloodPressCalibrationConfigResponseAsync(imei, 0, 0, 0, 0, 0, 0, 0, 0, statNow, statNow).ConfigureAwait(false); |
|
|
|
|
|
|
|
//return ApiResponse<object>.Success(new |
|
|
@@ -134,6 +135,7 @@ namespace HealthMonitor.WebApi.Controllers.HealthMonitor |
|
|
|
if (model.IsPushRefOnly) |
|
|
|
{ |
|
|
|
var statNow = DateTime.Now; |
|
|
|
_logger.LogInformation($"{imei}:只下发标定值,不计算增量值,保存数据库(修改个人信息)"); |
|
|
|
return await IotSetBloodPressCalibrationConfigResponseAsync(imei, model.ManualSystolicRefValue, model.ManualDiastolicRefValue, 0, 0, 0, 0, 0, 0, statNow, statNow).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
@@ -195,7 +197,9 @@ namespace HealthMonitor.WebApi.Controllers.HealthMonitor |
|
|
|
// 累计增量 |
|
|
|
systolicInc = currentSystolicInc + lastPushSystolicInc; |
|
|
|
diastolicInc = currentDiastolicInc + lastPushDiastolicInc; |
|
|
|
|
|
|
|
_logger.LogInformation($"{imei}--{nameof(Put)}--计算增量值" + |
|
|
|
$"\n systolicInc:{systolicInc }-- currentSystolicInc:{currentSystolicInc} -- lastPushSystolicInc:{lastPushSystolicInc}" + |
|
|
|
$"\n diastolicInc:{diastolicInc} --currentDiastolicInc:{currentDiastolicInc} -- lastPushDiastolicInc:{lastPushDiastolicInc}"); |
|
|
|
return await IotSetBloodPressCalibrationConfigResponseAsync(imei, systolicRefValue, diastolicRefValue, systolicInc, diastolicInc, systolicAvg, diastolicAvg, systolicAvgOffset, diastolicAvgOffset, startTime, endTime).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
|
|