|
|
@@ -74,7 +74,7 @@ namespace HealthMonitor.WebApi.Controllers.HealthMonitor |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
public async Task<object> SetMockMode2(string sn, int mockMax, int mockMin, int highFreqSampleTimes , int highFreqSampleInterval , int stopHighFreqSampleCount , int triggerHighFreqHigh , int triggerHighFreqLow,string remark = "mock") |
|
|
|
public async Task<object> SetMockMode2(string sn, int highFreqSampleTimes , int highFreqSampleInterval , int stopHighFreqSampleCount , int triggerHighFreqHigh , int triggerHighFreqLow,string remark = "mock") |
|
|
|
{ |
|
|
|
var res = await _serviceTDengine.GetBySerialNoAsync<PregnancyCommonHeartRateModel>(sn); |
|
|
|
var pchr = res.FirstOrDefault(); |
|
|
@@ -83,15 +83,15 @@ namespace HealthMonitor.WebApi.Controllers.HealthMonitor |
|
|
|
{ |
|
|
|
return "NULL"; |
|
|
|
} |
|
|
|
pchr.MaxValue = mockMax; |
|
|
|
pchr.MinValue = mockMin; |
|
|
|
pchr.MaxValue = triggerHighFreqHigh; |
|
|
|
pchr.MinValue = triggerHighFreqLow; |
|
|
|
pchr.Remark = remark; |
|
|
|
pchr.Timestamp = DateTime.Now; |
|
|
|
pchr.SerialTailNumber = sn[^2..]; |
|
|
|
|
|
|
|
await _serviceTDengine.InsertAsync<PregnancyCommonHeartRateModel>("hm_pchr", pchr); |
|
|
|
var flag = await _serviceIotApi.SetFetalConfigMockAsync(pchr.SerialNumber, 1, pchr.MaxValue, pchr.MinValue, |
|
|
|
highFreqSampleTimes, highFreqSampleInterval, stopHighFreqSampleCount, triggerHighFreqHigh, triggerHighFreqLow); |
|
|
|
var flag = await _serviceIotApi.SetFetalConfigMockAsync(pchr.SerialNumber, 1, triggerHighFreqHigh, triggerHighFreqLow, |
|
|
|
highFreqSampleTimes, highFreqSampleInterval, stopHighFreqSampleCount); |
|
|
|
return new |
|
|
|
{ |
|
|
|
flag, |
|
|
|