public async Task <IActionResult> GetForm(BaseInput input) { var entity = await _infectionApp.GetForm(input.KeyValue); var data = new { id = entity.F_Id, reportDate = entity.F_ReportDate, item1 = entity.F_Item1.ToFloat(2), item2 = entity.F_Item2.ToFloat(2), item3 = entity.F_Item3.ToFloat(2), item4 = entity.F_Item4.ToFloat(2), item5 = entity.F_Item5.ToFloat(2), item6 = entity.F_Item6.ToFloat(2), item7 = entity.F_Item7.ToFloat(2), recordPerson = entity.F_RecordPerson == null ? "" : (await _usersService.FindUserAsync(entity.F_RecordPerson))?.F_RealName, imangePath = entity.F_ImangePath, memo = entity.F_Memo }; return(Ok(data)); }
public async Task <IActionResult> GetFormJson(string keyValue) { var data = await _infectionApp.GetForm(keyValue); return(Content(data.ToJson())); }