public async Task <IActionResult> SubmitForm([FromBody] SubmitFormInput input) { foreach (var item in input.Items) { var find = await _qualityItemApp.GetForm(item.ItemId); if (find == null) { continue; } var entity = new QualityResultEntity { F_Pid = input.PatientId, F_ItemId = item.ItemId, F_ItemType = find.F_ItemType, F_ItemCode = find.F_ItemCode, F_ItemName = find.F_ItemName, F_ReportTime = item.ReportTime?.ToDate() ?? DateTime.Now, F_Result = item.Result, F_Flag = item.Flag, F_Memo = item.Memo, F_UpperValue = find.F_UpperValue, F_LowerValue = find.F_LowerValue, F_Unit = find.F_Unit, F_LowerCriticalValue = find.F_LowerCriticalValue, F_UpperCriticalValue = find.F_UpperCriticalValue, F_ResultType = find.F_ResultType }; await _qualityResultApp.SubmitForm(entity, null); } return(Success("操作成功。")); }
public async Task <IActionResult> GetFormJson(string keyValue) { var data = await _qualityItemApp.GetForm(keyValue); return(Content(data.ToJson())); }