|
|
@@ -295,23 +295,29 @@ namespace HealthMonitor.Service.Biz |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var data = new |
|
|
|
{ |
|
|
|
imeis = new string[] { serialno }, |
|
|
|
enabled = (int)watchConfig["enabled"]!, |
|
|
|
interval= (int)watchConfig["interval"]!, |
|
|
|
triggerHighFreqHigh = maxValue == 0 ? (int)watchConfig["triggerHighFreqHigh"]! : maxValue, |
|
|
|
triggerHighFreqLow = minValue == 0 ? (int)watchConfig["triggerHighFreqLow"]! : minValue, |
|
|
|
highFreqSampleTimes = (int)watchConfig["highFreqSampleTimes"]!, |
|
|
|
highFreqSampleInterval = (int)watchConfig["highFreqSampleInterval"]!, |
|
|
|
stopHighFreqSampleCount = (int)watchConfig["stopHighFreqSampleCount"]!, |
|
|
|
mode = modeStatus, |
|
|
|
edoc = watchConfig["EDOC"]!, |
|
|
|
vibrateEnabled = (int)watchConfig["vibrateEnabled"]!, |
|
|
|
lcdEnabled = (int)watchConfig["lcdEnabled"]!, |
|
|
|
upperAlarmThreshold = (int)watchConfig["upperAlarmThreshold"]!, |
|
|
|
lowerAlarmThreshold = (int)watchConfig["lowerAlarmThreshold"]! |
|
|
|
}; |
|
|
|
//var data = new |
|
|
|
//{ |
|
|
|
// imeis = new string[] { serialno }, |
|
|
|
// enabled = (int)watchConfig["enabled"]!, |
|
|
|
// interval= (int)watchConfig["interval"]!, |
|
|
|
// triggerHighFreqHigh = maxValue == 0 ? (int)watchConfig["triggerHighFreqHigh"]! : maxValue, |
|
|
|
// triggerHighFreqLow = minValue == 0 ? (int)watchConfig["triggerHighFreqLow"]! : minValue, |
|
|
|
// highFreqSampleTimes = (int)watchConfig["highFreqSampleTimes"]!, |
|
|
|
// highFreqSampleInterval = (int)watchConfig["highFreqSampleInterval"]!, |
|
|
|
// stopHighFreqSampleCount = (int)watchConfig["stopHighFreqSampleCount"]!, |
|
|
|
// mode = modeStatus, |
|
|
|
// edoc = watchConfig["EDOC"]!, |
|
|
|
// vibrateEnabled = (int)watchConfig["vibrateEnabled"]!, |
|
|
|
// lcdEnabled = (int)watchConfig["lcdEnabled"]!, |
|
|
|
// upperAlarmThreshold = (int)watchConfig["upperAlarmThreshold"]!, |
|
|
|
// lowerAlarmThreshold = (int)watchConfig["lowerAlarmThreshold"]! |
|
|
|
//}; |
|
|
|
watchConfig["mode"] = modeStatus; |
|
|
|
watchConfig["triggerHighFreqHigh"] = maxValue == 0 ? (int)watchConfig["triggerHighFreqHigh"]! : maxValue; |
|
|
|
watchConfig["triggerHighFreqLow"] = minValue == 0 ? (int)watchConfig["triggerHighFreqLow"]! : minValue; |
|
|
|
|
|
|
|
var data = watchConfig; |
|
|
|
|
|
|
|
var setUrl = $"{_configService.IotCore}/SetFetalConfig"; |
|
|
|
_logger.LogInformation($"{setUrl} 请求 {JsonConvert.SerializeObject(JsonConvert.SerializeObject(data))}"); |
|
|
|
var res = await _httpHelper.HttpToPostAsync(setUrl, data, headers).ConfigureAwait(false); |
|
|
|