超窗导出影响列表修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e10bca6892
commit
fd3f76d35c
|
@ -7,6 +7,7 @@ using IRaCIS.Core.Application.MediatR.CommandAndQueries;
|
|||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using MiniExcelLibs;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -479,21 +480,24 @@ namespace IRaCIS.Application.Services
|
|||
return list;
|
||||
}
|
||||
|
||||
//[HttpGet("{visitPlanInfluenceStatId:guid}")]
|
||||
//public async Task<IActionResult> DownloadInflunceStudyList(Guid visitPlanInfluenceStatId)
|
||||
//{
|
||||
// var list = _influnceRepository.Where(t => t.VisitPlanInfluenceStatId == visitPlanInfluenceStatId)
|
||||
// .ProjectTo<VisitPlanInfluenceSubjectVisitDTO>(_mapper.ConfigurationProvider).ToList();
|
||||
[HttpGet("{visitPlanInfluenceStatId:guid}")]
|
||||
public async Task<IActionResult> DownloadInflunceStudyList(Guid visitPlanInfluenceStatId)
|
||||
{
|
||||
var list = _influnceRepository.Where(t => t.VisitPlanInfluenceStatId == visitPlanInfluenceStatId)
|
||||
.ProjectTo<VisitPlanInfluenceSubjectVisitDTO>(_mapper.ConfigurationProvider).ToList();
|
||||
|
||||
// IExporter exporter = new ExcelExporter();
|
||||
var memoryStream = new MemoryStream();
|
||||
memoryStream.SaveAs(list);
|
||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
FileDownloadName = _localizer["VisitPlan_CheckExport", DateTime.Now.ToString("yyyy-MM-dd:hh:mm:ss")]
|
||||
};
|
||||
|
||||
// var result = await exporter.ExportAsByteArray(list);
|
||||
|
||||
// //$"检查导出_{DateTime.Now.ToString("yyyy-MM-dd:hh:mm:ss")}.xlsx"
|
||||
// return new XlsxFileResult(bytes: result, fileDownloadName: _localizer["VisitPlan_CheckExport", DateTime.Now.ToString("yyyy-MM-dd:hh:mm:ss")]);
|
||||
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -127,48 +127,49 @@ namespace IRaCIS.Core.Application.MediatR.CommandAndQueries
|
|||
|
||||
public class VisitPlanInfluenceSubjectVisitDTO
|
||||
{
|
||||
//[ExporterHeader(IsIgnore = true)]
|
||||
[ExcelColumn(Ignore = true)]
|
||||
public Guid StudyId { get; set; }
|
||||
|
||||
//[ExporterHeader(IsIgnore = true)]
|
||||
[ExcelColumn(Ignore = true)]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
//[ExporterHeader(IsIgnore = true)]
|
||||
[ExcelColumn(Ignore = true)]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
//[ExporterHeader(DisplayName = "中心编号")]
|
||||
[ExcelColumnName("中心编号")]
|
||||
public string TrialSiteCode { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(DisplayName = "受试者")]
|
||||
[ExcelColumnName("受试者")]
|
||||
public string SubjectCode { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(DisplayName = "访视名称")]
|
||||
[ExcelColumnName("访视名称")]
|
||||
public string VisitName { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(DisplayName = "检查时间", Format = "yyyy-MM-dd HH:mm:ss")]
|
||||
[ExcelColumn(Name = "检查时间", Format = "yyyy-MM-dd HH:mm:ss")]
|
||||
public DateTime StudyTime { get; set; }
|
||||
|
||||
//[ExporterHeader(DisplayName = "检查技术")]
|
||||
[ExcelColumnName("检查技术")]
|
||||
public string Modality { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(IsIgnore = true)]
|
||||
[ExcelColumn(Ignore = true)]
|
||||
public bool IsDicomStudy { get; set; }
|
||||
|
||||
//[ExporterHeader(DisplayName = "影像类型")]
|
||||
|
||||
[ExcelColumnName("影像类型")]
|
||||
public string ImageType => IsDicomStudy ? "Dicom" : "非Dicom";
|
||||
|
||||
//[ExporterHeader(DisplayName = "历史窗口")]
|
||||
[ExcelColumnName("历史窗口")]
|
||||
public string HistoryWindow { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(DisplayName = "之前超窗调整后没超窗")]
|
||||
//[ValueMapping(text: "yes", true)]
|
||||
//[ValueMapping(text: "no", false)]
|
||||
|
||||
[ExcelColumnName("之前超窗调整后没超窗")]
|
||||
|
||||
public bool IsOverWindowNowNotOverWindow { get; set; }
|
||||
|
||||
//[ExporterHeader(DisplayName = "目前窗口")]
|
||||
[ExcelColumnName("目前窗口")]
|
||||
public string NowWindow { get; set; } = string.Empty;
|
||||
|
||||
//[ExporterHeader(IsIgnore = true)]
|
||||
[ExcelColumn(Ignore =true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue