public void Write(Lib.XmlExporter xml) { xml.Writer.WriteStartElement("NAZ"); #if FOMS xml.Writer.WriteElementString("NAZ_N", Index.ToString()); #else // Здесь опечатка? В приказе тут есть пробел: NAZ N xml.Writer.WriteElementString("NAZN", Index.ToString()); #endif xml.Writer.WriteElementString("NAZ_R", RouteCode.ToString()); xml.WriteIfValid("NAZ_IDDOKT", DoctorSpeciality); xml.WriteIfValid("NAZ_V", StudyKind); xml.WriteIfValid("NAZ_USL", ServiceCode); if (!string.IsNullOrEmpty(TargetClinic)) { xml.Writer.WriteElementString("NAPR_DATE", DirectionDate.AsXml()); xml.Writer.WriteElementString("NAPR_MO", TargetClinic); } xml.WriteIfValid("NAZ_PMP", AidProfile); xml.WriteIfValid("NAZ_PK", BedProfile); xml.Writer.WriteEndElement(); }
public async Task <IActionResult> PostTaskInfoAsync([FromHeader] String source, [FromRoute] RouteCode route, [FromBody] TaskItem item) { var response = new Response <Object>(); try { var result = await _ITaskInfoApp.AddTasks(route.code, item); response.Code = result.Item1; response.Message = result.Item2; response.Data = result.Item3; } catch (Exception ex) { response.SetError(ex, this._ILogger); } return(response.ToHttpResponse()); }
public async Task <IActionResult> GetMemberReadSumsAsync([FromHeader] String source, [FromRoute] RouteIdInt route, [FromQuery] RouteCode item) { var response = new Response <object>(); try { response.Code = true; response.Data = await _IMemberIncomeRepository.Query(a => a.MemberId == route.id && a.TaskCode == item.code && a.CreateTime.Value.ToString("yyyy-MM-dd") == System.DateTime.Now.ToString("yyyy-MM-dd") && a.Status == 0) .SumAsync(a => a.ReadTime) / 60; } catch (Exception ex) { response.SetError(ex, this._ILogger); } return(response.ToHttpResponse()); }
public async Task <IActionResult> GetVersionAsync([FromHeader] String source, [FromRoute] RouteCode route) { var response = new Response <Object>(); try { var result = await _IAppInfoRepository.Query(a => a.Code == route.code && a.Status == 1 && a.IsEnable == 1). OrderByDescending(i => i.CreateTime). Select(a => new AppInfoDto { Code = a.Code, LogoUrl = a.LogoUrl, PackageName = a.PackageName, Version = a.Version, VersionSize = a.VersionSize, VersionCode = a.VersionCode, AppName = a.AppName, AppUrl = a.AppUrl, Introduction = a.Introduction, UpdateLog = a.UpdateLog, IsMandatory = a.IsMandatory, UpdateTime = a.CreateTime //更新时间 }). FirstOrDefaultAsync(); if (result == null) { return(NotFound()); } response.Code = true; response.Message = "Success"; response.Data = result; } catch (Exception ex) { response.SetError(ex, this._ILogger); } return(response.ToHttpResponse()); }