Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

494 lines
23KB

  1. using HealthMonitor.Common;
  2. using HealthMonitor.Common.helper;
  3. using HealthMonitor.Service.Biz.db;
  4. using HealthMonitor.Service.Cache;
  5. using HealthMonitor.Service.Etcd;
  6. using HealthMonitor.Service.Resolver.Interface;
  7. using HealthMonitor.Service.Sub;
  8. using HealthMonitor.Service.Sub.Topic.Model;
  9. using Microsoft.EntityFrameworkCore.Metadata;
  10. using Microsoft.Extensions.Logging;
  11. using Newtonsoft.Json;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Data.Common;
  15. using System.Linq;
  16. using System.Text;
  17. using System.Text.Json.Serialization;
  18. using System.Threading.Tasks;
  19. using TDengineTMQ;
  20. using TelpoDataService.Util.Entities.GpsCard;
  21. using TelpoDataService.Util;
  22. using TelpoDataService.Util.Entities.GpsLocationHistory;
  23. using HealthMonitor.Service.Biz;
  24. using HealthMonitor.Model.Service;
  25. namespace HealthMonitor.Service.Resolver
  26. {
  27. public class BloodpressResolver: IResolver
  28. {
  29. private readonly ILogger<BloodpressResolver> _logger;
  30. private readonly PersonCacheManager _personCacheMgr;
  31. private readonly TDengineService _serviceTDengine;
  32. private readonly BloodPressReferenceValueCacheManager _bpRefValCacheManager;
  33. private readonly HttpHelper _httpHelper = default!;
  34. private readonly GpsCardAccessorClient<GpsPerson> _gpsPersonApiClient;
  35. private readonly IotWebApiService _serviceIotWebApi;
  36. private readonly AsyncLocal<string> _messageId = new();
  37. private readonly AsyncLocal<HisGpsBloodPress> _msgData = new();
  38. private readonly EtcdService _serviceEtcd;
  39. public BloodpressResolver(
  40. TDengineService serviceDengine,
  41. BloodPressReferenceValueCacheManager bpRefValCacheManager,
  42. PersonCacheManager personCacheMgr, HttpHelper httpHelper,
  43. GpsCardAccessorClient<GpsPerson> gpsPersonApiClient,
  44. IotWebApiService iotWebApiService,
  45. EtcdService serviceEtcd,
  46. ILogger<BloodpressResolver> logger)
  47. {
  48. _httpHelper = httpHelper;
  49. _serviceTDengine = serviceDengine;
  50. _bpRefValCacheManager = bpRefValCacheManager;
  51. _gpsPersonApiClient = gpsPersonApiClient;
  52. _serviceIotWebApi = iotWebApiService;
  53. _logger = logger;
  54. _personCacheMgr = personCacheMgr;
  55. _serviceEtcd = serviceEtcd;
  56. }
  57. public void SetResolveInfo(PackageMsgModel msg)
  58. {
  59. var topicHmBloodPress = JsonConvert.DeserializeObject<TopicHmBloodPress>(msg.DetailData.ToString()!);
  60. _messageId.Value = msg.MessageId;
  61. _msgData.Value = new HisGpsBloodPress()
  62. {
  63. BloodPressId = topicHmBloodPress!.BloodPressId,
  64. MessageId = topicHmBloodPress!.MessageId,
  65. Serialno= topicHmBloodPress!.Serialno,
  66. SystolicValue = topicHmBloodPress!.SystolicValue,
  67. DiastolicValue= topicHmBloodPress!.DiastolicValue,
  68. LastUpdate= DateTimeUtil.GetDateTimeFromUnixTimeMilliseconds(SafeType.SafeInt64(topicHmBloodPress.LastUpdate) / 1000000),
  69. CreateTime= DateTimeUtil.GetDateTimeFromUnixTimeMilliseconds(SafeType.SafeInt64(topicHmBloodPress.CreateTime) / 1000000),
  70. Method= topicHmBloodPress!.Method,
  71. IsDisplay=topicHmBloodPress!.IsDisplay ? 1 : 0
  72. };
  73. }
  74. public override string ToString()
  75. {
  76. return $"{nameof(BloodpressResolver)}[{_messageId.Value}]";
  77. }
  78. public async Task ExecuteMessageAsync()
  79. {
  80. var messageId = _messageId.Value;
  81. var bp = _msgData.Value!;
  82. #region 获取个人信息
  83. var person = await _personCacheMgr.GetDeviceGpsPersonCacheBySerialNoAsync(bp.MessageId, bp.Serialno).ConfigureAwait(false);
  84. //验证这个信息是否存在
  85. if (person == null || person?.Person.BornDate == null)
  86. {
  87. _logger.LogWarning("验证个人信息,找不到个人信息,跳过此消息");
  88. return;
  89. }
  90. // 验证年龄是否在范围 (2 - 120)
  91. var age = SafeType.SafeInt(DateTime.Today.Year - person?.Person.BornDate!.Value.Year!);
  92. if (age < 1 || age > 120)
  93. {
  94. _logger.LogWarning("验证年龄,不在范围 (2 - 120)岁,跳过此消息");
  95. return;
  96. }
  97. #endregion
  98. var gender = person?.Person.Gender == true ? 1 : 2;
  99. var isHypertension = SafeType.SafeBool(person?.Person.Ishypertension!);
  100. var height = SafeType.SafeDouble(person?.Person.Height!);
  101. var weight = SafeType.SafeDouble(person?.Person.Weight!);
  102. #region 计算增量值
  103. var bpRef = await _bpRefValCacheManager.GetBloodPressReferenceValueAsync(age, gender, isHypertension);
  104. var lastPush = await _serviceTDengine.GetLastAsync("stb_hm_bp_push_ref_inc_value", $"serialno='{bp.Serialno}' order by ts desc");
  105. //var ts = last?[0];
  106. var systolicRefValue = bpRef?.Systolic;//?
  107. var diastolicRefValue = bpRef?.Diastolic;//?
  108. long duration = 7 * 24 * 3600 * 1000;
  109. int systolicInc;
  110. int diastolicInc;
  111. string sql = string.Empty;
  112. var remarkFlag = false;
  113. // 曾经有下发记录
  114. if (lastPush?.Count!=0)
  115. {
  116. // 重置设备,取正常值标定值
  117. if (
  118. (int)lastPush![2] == 0
  119. && (int)lastPush![3] == 0
  120. && (int)lastPush![4] == 0
  121. && (int)lastPush![5] == 0
  122. )
  123. {
  124. systolicRefValue = bpRef?.Systolic;//?
  125. diastolicRefValue = bpRef?.Diastolic;//?
  126. }
  127. // 取最后一条下推的标定值
  128. else
  129. {
  130. systolicRefValue = (int)lastPush?[2]!;
  131. diastolicRefValue = (int)lastPush?[3]!;
  132. }
  133. if (DateTime.TryParse(lastPush?[0]!.ToString(), out DateTime newTs))
  134. {
  135. duration = SafeType.SafeInt64(((DateTime)bp.LastUpdate! - newTs).TotalMilliseconds);
  136. }
  137. }
  138. TimeSpan ts= TimeSpan.FromMilliseconds(duration);
  139. // 获取历史数据
  140. ////DateTime now = DateTime.Now;
  141. //DateTime now = (DateTime)bp.LastUpdate!; //测试
  142. //DateTime startTime = now.AddDays(-duration);
  143. //DateTime endTime = now;
  144. DateTime endTime = (DateTime)bp.LastUpdate!; //测试
  145. DateTime startTime = endTime-ts;
  146. // 如果hm_bp_config_manual_calibration存在数据,使用最新数据
  147. //
  148. var systolicAggregate = await _serviceTDengine.GetAggregateValueAsync("systolic_value", "stb_hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}'");
  149. var diastolicAggregate = await _serviceTDengine.GetAggregateValueAsync("diastolic_value", "stb_hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}'");
  150. //var systolicAggregate = _serviceTDengine.GetAggregateValue("systolic_value", "hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}'");
  151. //var diastolicAggregate = _serviceTDengine.GetAggregateValue("diastolic_value", "hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}'");
  152. // 最大值
  153. var systolicMax = systolicAggregate.Max;
  154. var diastolicMax = diastolicAggregate.Max;
  155. // 最小值
  156. var systolicMin = systolicAggregate.Min;
  157. var diastolicMin = diastolicAggregate.Min;
  158. // 偏移参数
  159. var avgOffset = 0.25M;
  160. var systolicAvgOffset = avgOffset;
  161. var diastolicAvgOffset = avgOffset;
  162. // 计算去除最大值和最小值和异常值的平均值
  163. var systolicAvg = await _serviceTDengine.GetAvgExceptMaxMinValueAsync("systolic_value", "stb_hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}' and systolic_value < {systolicRefValue} ");
  164. var diastolicAvg = await _serviceTDengine.GetAvgExceptMaxMinValueAsync("diastolic_value", "stb_hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}' and diastolic_value < {diastolicRefValue}");
  165. //
  166. if (systolicAvg.Equals(0) || diastolicAvg.Equals(0))
  167. {
  168. _logger.LogWarning($"{bp.Serialno} 历史数据{startTime}---{endTime}除最大值和最小值和异常值的平均值为0,使用测试量当做平均值");
  169. systolicAvg = bp.SystolicValue;
  170. diastolicAvg = bp.DiastolicValue;
  171. //systolicInc = (int)((systolicRefValue - systolicAvg) * systolicAvgOffset)! > 0? (int)((systolicRefValue - systolicAvg) * systolicAvgOffset)!:0;
  172. //diastolicInc = (int)((diastolicRefValue - diastolicAvg) * diastolicAvgOffset)! >0? (int)((diastolicRefValue - diastolicAvg) * diastolicAvgOffset)!:0;
  173. //// 初始化 remark
  174. //remarkFlag = await _serviceIotWebApi.UpdatePersonRemarksAsync(bp.Serialno, (int)systolicRefValue!, (int)diastolicRefValue!, systolicInc, diastolicInc).ConfigureAwait(false);
  175. //if (remarkFlag)
  176. //{
  177. // // 下推
  178. // BloodPressCalibrationConfigModel bpIncData = new()
  179. // {
  180. // Imei = bp.Serialno,
  181. // SystolicRefValue = (int)systolicRefValue!, //收缩压标定值,值为0 表示不生效
  182. // DiastolicRefValue = (int)diastolicRefValue!, //舒张压标定值,值为0表示不生效
  183. // SystolicIncValue = systolicInc, //收缩压显示增量,值为0 表示不生效
  184. // DiastolicIncValue = diastolicInc //舒张压显示增量,值为0 表示不生效
  185. // };
  186. // // 下发 IOT 增量值
  187. // var flagIot = await _serviceIotWebApi.SetBloodPressCalibrationConfigAsync(bpIncData).ConfigureAwait(false);
  188. // if (flagIot)
  189. // {
  190. // #region 保存下推记录 stb_hm_bp_push_ref_inc_value
  191. // sql = $"INSERT INTO health_monitor.hm_bp_push_ref_inc_value_{bp.Serialno.Substring(bp.Serialno.Length - 2)} " +
  192. // $"USING health_monitor.stb_hm_bp_push_ref_inc_value " +
  193. // $"TAGS ('{bp.Serialno.Substring(bp.Serialno.Length - 2)}') " +
  194. // $"VALUES(" +
  195. // $"'{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}'," +
  196. // $"'{bp.Serialno}'," +
  197. // $"{systolicRefValue}," +
  198. // $"{diastolicRefValue}," +
  199. // $"{systolicInc}," +
  200. // $"{diastolicInc}," +
  201. // $"{true})";
  202. // _serviceTDengine.ExecuteInsertSQL(sql);
  203. // #endregion
  204. // }
  205. //}
  206. //return;
  207. }
  208. //var systolicAvg = _serviceTDengine.GetAvgExceptMaxMinValue("systolic_value", "hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}' and systolic_value < {systolicRefValue} ");
  209. //var diastolicAvg = _serviceTDengine.GetAvgExceptMaxMinValue("diastolic_value", "hm_bloodpress", $"ts>='{startTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and ts <='{endTime:yyyy-MM-ddTHH:mm:ss.fffZ}' and serialno='{bp.Serialno}' and diastolic_value < {diastolicRefValue}");
  210. // 增量值=(标定值-平均值)* 0.25
  211. systolicInc = systolicAvg.Equals(0M) ? 0 : (int)((systolicRefValue - systolicAvg) * systolicAvgOffset)!;
  212. diastolicInc = diastolicAvg.Equals(0M) ? 0 : (int)((diastolicRefValue - diastolicAvg) * diastolicAvgOffset)!;
  213. #endregion
  214. #region 插入BP增量值 hm_bloodpress_stats_inc
  215. // 自动建表
  216. sql = $"INSERT INTO health_monitor.hm_bp_stats_inc_{bp.Serialno.Substring(bp.Serialno.Length - 2)} " +
  217. $"USING health_monitor.stb_hm_bloodpress_stats_inc " +
  218. $"TAGS ('{bp.Serialno.Substring(bp.Serialno.Length - 2)}') " +
  219. $"VALUES(" +
  220. $"'{bp.LastUpdate:yyyy-MM-dd HH:mm:ss.fff}'," +
  221. $"'{bp.BloodPressId}'," +
  222. $"'{bp.MessageId}'," +
  223. $"'{bp.Serialno}'," +
  224. $"{bp.SystolicValue}," +
  225. $"{systolicRefValue}," +
  226. $"{systolicAvg}," +
  227. $"{systolicMax}," +
  228. $"{systolicMin}," +
  229. $"{systolicAvgOffset}," +
  230. $"{systolicInc}," +
  231. $"{bp.DiastolicValue}," +
  232. $"{diastolicRefValue}," +
  233. $"{diastolicAvg}," +
  234. $"{diastolicMax}," +
  235. $"{diastolicMin}," +
  236. $"{diastolicAvgOffset}," +
  237. $"{diastolicInc}," +
  238. $"{gender}," +
  239. $"{age}," +
  240. $"{height}," +
  241. $"{weight}," +
  242. $"'{bp.LastUpdate:yyyy-MM-dd HH:mm:ss.fff}'," +
  243. $"{duration}," +
  244. $"'{startTime:yyyy-MM-dd HH:mm:ss.fff}'," +
  245. $"'{endTime:yyyy-MM-dd HH:mm:ss.fff}'," +
  246. $"'{string.Empty}'," +
  247. $"{isHypertension})";
  248. _serviceTDengine.ExecuteInsertSQL(sql);
  249. // 发送到 设置设备血压标定参数
  250. #endregion
  251. #region 更新 gps_persoon remarks
  252. // 更新
  253. remarkFlag = await _serviceIotWebApi.UpdatePersonRemarksAsync(bp.Serialno, (int)systolicRefValue!, (int)diastolicRefValue!, systolicInc, diastolicInc).ConfigureAwait(false);
  254. if (remarkFlag)
  255. {
  256. // 下推
  257. BloodPressCalibrationConfigModel bpIncData = new()
  258. {
  259. Imei = bp.Serialno,
  260. SystolicRefValue = (int)systolicRefValue!, //收缩压标定值,值为0 表示不生效
  261. DiastolicRefValue = (int)diastolicRefValue!, //舒张压标定值,值为0表示不生效
  262. SystolicIncValue = systolicInc, //收缩压显示增量,值为0 表示不生效
  263. DiastolicIncValue = diastolicInc //舒张压显示增量,值为0 表示不生效
  264. };
  265. // 下发 IOT 增量值
  266. var flagIot = await _serviceIotWebApi.SetBloodPressCalibrationConfigAsync(bpIncData).ConfigureAwait(false);
  267. if (flagIot)
  268. {
  269. #region 保存下推记录 stb_hm_bp_push_ref_inc_value
  270. sql = $"INSERT INTO health_monitor.hm_bp_push_ref_inc_value_{bp.Serialno.Substring(bp.Serialno.Length - 2)} " +
  271. $"USING health_monitor.stb_hm_bp_push_ref_inc_value " +
  272. $"TAGS ('{bp.Serialno.Substring(bp.Serialno.Length - 2)}') " +
  273. $"VALUES(" +
  274. $"'{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}'," +
  275. $"'{bp.Serialno}'," +
  276. $"{systolicRefValue}," +
  277. $"{diastolicRefValue}," +
  278. $"{systolicInc}," +
  279. $"{diastolicInc}," +
  280. $"{true})";
  281. _serviceTDengine.ExecuteInsertSQL(sql);
  282. #endregion
  283. }
  284. }
  285. #endregion
  286. /** 取消
  287. // 注册定时下发事件
  288. // 获取当前时间
  289. //DateTime sNow = DateTime.Now;
  290. //// 计算距离明天12点的时间间隔
  291. //TimeSpan timeUntil = new DateTime(sNow.Year, sNow.Month, sNow.Day, 12, 0, 0) - sNow;
  292. //// 如果当前时间已经超过了12点,将等待到明天
  293. //if (timeUntil < TimeSpan.Zero)
  294. //{
  295. // timeUntil = timeUntil.Add(TimeSpan.FromHours(24));
  296. //}
  297. //var data = new
  298. //{
  299. // imei = bp.Serialno,
  300. // systolicCalibrationValue = systolicRefValue, //收缩压标定值,值为0 表示不生效
  301. // diastolicCalibrationValue = diastolicRefValue, //舒张压标定值,值为0表示不生效
  302. // systolicIncValue = systolicInc, //收缩压显示增量,值为0 表示不生效
  303. // diastolicIncValue = diastolicInc //舒张压显示增量,值为0 表示不生效
  304. //};
  305. //var url = $"http://id.ssjlai.com/webapi/api/Command/SetBloodPressCalibrationConfig";
  306. //List<KeyValuePair<string, string>> headers = new()
  307. //{
  308. // new KeyValuePair<string, string>("AuthKey", "key1")
  309. //};
  310. //var data = new
  311. //{
  312. // imei = bp.Serialno,
  313. // systolicCalibrationValue = systolicRefValue, //收缩压标定值,值为0 表示不生效
  314. // diastolicCalibrationValue = diastolicRefValue, //舒张压标定值,值为0表示不生效
  315. // systolicIncValue = systolicInc, //收缩压显示增量,值为0 表示不生效
  316. // diastolicIncValue = diastolicInc //舒张压显示增量,值为0 表示不生效
  317. //};
  318. //var result = JsonConvert.SerializeObject(data);
  319. //var result = bp.Serialno;
  320. */
  321. #region 定时下发触发器
  322. var key = $"health_moniter/schedule_push/imei/{bp.Serialno}";
  323. var schedule_push = await _serviceEtcd.GetValAsync(key).ConfigureAwait(false);
  324. if (string.IsNullOrWhiteSpace(schedule_push))
  325. {
  326. // 注册首次下推
  327. #if DEBUG
  328. // await _serviceEtcd.PutValAsync(key, result, 60*1, false).ConfigureAwait(false);
  329. var interval = 0;
  330. // 获取当前时间
  331. DateTime now = DateTime.Now;
  332. // 计算距离下一个$interval天后的8点的时间间隔
  333. DateTime nextRunTime = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute+1, 58).AddDays(interval);
  334. TimeSpan timeUntilNextRun = nextRunTime - now;
  335. // 如果当前时间已经超过了8点,将等待到明天后的8点
  336. if (timeUntilNextRun < TimeSpan.Zero)
  337. {
  338. timeUntilNextRun = timeUntilNextRun.Add(TimeSpan.FromMinutes(1));
  339. nextRunTime += timeUntilNextRun;
  340. }
  341. var ttl = (long)timeUntilNextRun.TotalSeconds;
  342. var data = new
  343. {
  344. imei = bp.Serialno,
  345. create_time = now.ToString("yyyy-MM-dd HH:mm:ss"),
  346. ttl,
  347. next_run_time= nextRunTime.ToString("yyyy-MM-dd HH:mm:ss")
  348. };
  349. var result=JsonConvert.SerializeObject(data);
  350. await _serviceEtcd.PutValAsync(key, result, ttl, false).ConfigureAwait(false);
  351. #else
  352. //DateTime sNow = DateTime.Now;
  353. //// 计算距离19:59:55点的时间间隔
  354. //TimeSpan timeUntil = new DateTime(sNow.Year, sNow.Month, sNow.Day, 19, 59, 55) - sNow;
  355. //// 如果当前时间已经超过了12点,将等待到明天
  356. //if (timeUntil < TimeSpan.Zero)
  357. //{
  358. // timeUntil = timeUntil.Add(TimeSpan.FromHours(24));
  359. //}
  360. //var ttl = (long)timeUntil.TotalSeconds;
  361. var interval = 0;
  362. // 获取当前时间
  363. DateTime now = DateTime.Now;
  364. // 计算距离下一个$interval天后的8点的时间间隔
  365. DateTime nextRunTime = new DateTime(now.Year, now.Month, now.Day, 19, 59, 58).AddDays(interval);
  366. TimeSpan timeUntilNextRun = nextRunTime - now;
  367. // 如果当前时间已经超过了8点,将等待到明天后的8点
  368. if (timeUntilNextRun < TimeSpan.Zero)
  369. {
  370. timeUntilNextRun = timeUntilNextRun.Add(TimeSpan.FromDays(1));
  371. nextRunTime += timeUntilNextRun;
  372. }
  373. var ttl =(long)timeUntilNextRun.TotalSeconds;
  374. var data = new
  375. {
  376. imei = bp.Serialno,
  377. create_time = now.ToString("yyyy-MM-dd HH:mm:ss"),
  378. ttl,
  379. next_run_time = nextRunTime.ToString("yyyy-MM-dd HH:mm:ss")
  380. };
  381. var result = JsonConvert.SerializeObject(data);
  382. await _serviceEtcd.PutValAsync(key, result,ttl, false).ConfigureAwait(false);
  383. #endif
  384. }
  385. #endregion
  386. /** 取消
  387. //// 生效
  388. //if (DateTime.Now.Hour == 1)
  389. //{
  390. // var data = new
  391. // {
  392. // imei = bp.Serialno,
  393. // systolicCalibrationValue = systolicRefValue, //收缩压标定值,值为0 表示不生效
  394. // diastolicCalibrationValue = diastolicRefValue, //舒张压标定值,值为0表示不生效
  395. // systolicIncValue = systolicInc, //收缩压显示增量,值为0 表示不生效
  396. // diastolicIncValue = diastolicInc //舒张压显示增量,值为0 表示不生效
  397. // };
  398. // var result = await _httpHelper.HttpToPostAsync(url, data, headers).ConfigureAwait(false);
  399. // _logger.LogInformation($"将 {JsonConvert.SerializeObject(data)}发送到 {url} 并且返回 {JsonConvert.SerializeObject(result)}");
  400. //}
  401. //// 不生效
  402. //else if (DateTime.Now.Hour == 3)
  403. //{
  404. // var data = new
  405. // {
  406. // imei = bp.Serialno,
  407. // systolicCalibrationValue = 0, //收缩压标定值,值为0 表示不生效
  408. // diastolicCalibrationValue = 0, //舒张压标定值,值为0表示不生效
  409. // systolicIncValue = 0, //收缩压显示增量,值为0 表示不生效
  410. // diastolicIncValue = 0 //舒张压显示增量,值为0 表示不生效
  411. // };
  412. // var result = await _httpHelper.HttpToPostAsync(url, data, headers).ConfigureAwait(false);
  413. // _logger.LogInformation($"将 {JsonConvert.SerializeObject(data)}发送到 {url} 并且返回 {JsonConvert.SerializeObject(result)}");
  414. //}
  415. */
  416. }
  417. }
  418. }