diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index e2b0eea08..074ded6e4 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -688,6 +688,25 @@ + + + 医学审核问题导表 + + + + + + + + + 访视影像统计 + + + + + + + 项目参与人员导出 diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index 0b00ab56f..4c004ef01 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -48,7 +48,57 @@ namespace IRaCIS.Core.Application.Service.Common IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService { + /// + /// 医学审核问题导表 + /// + /// + /// + /// + /// + [HttpPost] + public async Task GetReadingMedicineSystemQuestionList_Export(ReadingMedicineSystemQuestionQuery inDto, + [FromServices] IRepository _readingMedicineSystemQuestionRepository, + [FromServices] IDictionaryService _dictionaryService) + { + //避免前端遍历 + var criterionEnum = inDto.TrialReadingCriterionId != null ? _readingQuestionCriterionTrialRepository.Where(t => t.Id == inDto.TrialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefault() : CriterionType.NoCriterion; + var query = _readingMedicineSystemQuestionRepository.AsQueryable() + .WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue)) + .WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue)) + .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName)) + .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type)) + .WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory) + .WhereIf(inDto.CurrentCriterionType != null, x => x.CriterionTypeEnum == null || x.CriterionTypeEnum == inDto.CurrentCriterionType) + .WhereIf(inDto.CriterionTypeEnum != null, x => x.CriterionTypeEnum == inDto.CriterionTypeEnum) + .WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionTypeEnum == criterionEnum || x.IsGeneral == true) + .WhereIf(inDto.IsGeneral != null, x => x.IsGeneral == inDto.IsGeneral) + .WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType!.Value) + .ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder); + + var defalutSortArray = new string[] { nameof(ReadingMedicineSystemQuestionView.LanguageType) + " desc", nameof(ReadingMedicineSystemQuestionView.ShowOrder) }; + + + var list = await query.SortToListAsync(inDto); + + var exportInfo = new ExcelExportInfo(); + + exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); + exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); + + return await ExcelExportHelper.DataExportAsync(StaticData.Export.SystenMedicalQCQuestionsList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingMedicineSystemQuestionView)); + + } + + + /// + /// 访视影像统计 + /// + /// + /// + /// + /// + /// [HttpPost] public async Task GetTrialVisitImageStatList_Export(TrialVisitImageQuery inQuery, [FromServices] IRepository _subjectVisitRepository, diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs index 5867246ff..41bdf0055 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicineQuestionViewModel.cs @@ -1,3 +1,4 @@ +using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; @@ -179,6 +180,7 @@ namespace IRaCIS.Core.Application.ViewModel /// /// 类型 /// + [DictionaryTranslate("QcType")] public string Type { get; set; } /// @@ -194,11 +196,13 @@ namespace IRaCIS.Core.Application.ViewModel /// /// 语言类型 /// + [DictionaryTranslate("LanguageType")] public LanguageType LanguageType { get; set; } = LanguageType.Chinese; /// /// 是否是必须 /// + [DictionaryTranslate("YesOrNo")] public bool IsRequired { get; set; } /// @@ -219,16 +223,19 @@ namespace IRaCIS.Core.Application.ViewModel /// /// 是否启用 /// + [DictionaryTranslate("YesOrNo")] public bool IsEnable { get; set; } /// /// 任务类型 /// + [DictionaryTranslate("ReadingCategory")] public ReadingCategory ReadingCategory { get; set; } - + [DictionaryTranslate("CriterionType")] public CriterionType? CriterionTypeEnum { get; set; } + [DictionaryTranslate("YesOrNo")] public bool IsGeneral { get; set; } } diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs index b63956c40..cdb5e4639 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs @@ -304,6 +304,8 @@ public static class StaticData public const string TrialImageBackRecordList_Export = "TrialImageBackRecordList_Export"; + public const string SystenMedicalQCQuestionsList_Export = "SystenMedicalQCQuestionsList_Export"; + }