From 052bff92471c0e56c1ebc89f3aadcea09b80a81b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 29 Oct 2024 15:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=AF=BC=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/InternationalizationViewModel.cs | 36 +++++++++++++++++++ .../Service/Common/ExcelExportService.cs | 16 +++++---- .../Common/InternationalizationService.cs | 4 +++ .../Service/Common/_MapConfig.cs | 4 +++ .../_IRaCIS/_Config/_StaticData.cs | 2 ++ 5 files changed, 56 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs index 77d83493e..86c3a9e6b 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/InternationalizationViewModel.cs @@ -3,6 +3,8 @@ // 生成时间 2023-06-01 13:38:20 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- +using IRaCIS.Core.Application.Helper; + namespace IRaCIS.Core.Application.ViewModel { /// InternationalizationView 列表视图模型 @@ -19,6 +21,32 @@ namespace IRaCIS.Core.Application.ViewModel } + public class InternationExportDTO + { + public Guid? Id { get; set; } + + [DictionaryTranslateAttribute("InternationalizationKeyState")] + public int State { get; set; } + public string Description { get; set; } = string.Empty; + public string Code { get; set; } = string.Empty; + public string Value { get; set; } = string.Empty; + public string ValueCN { get; set; } = string.Empty; + + public string FrontType { get; set; } = string.Empty; + + [DictionaryTranslateAttribute("InternationalizationType")] + public int InternationalizationType { get; set; } + public string Module { get; set; } = string.Empty; + //关联版本历史记录表Id + public Guid? PublishLogId { get; set; } + + public string Version { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime UpdateTime { get; set; } + } + ///InternationalizationQuery 列表查询参数模型 public class InternationalizationQuery : PageInput { @@ -34,6 +62,14 @@ namespace IRaCIS.Core.Application.ViewModel //关联版本历史记录表Id public Guid? PublishLogId { get; set; } + public DateTime? BeginCreateTime { get; set; } + + public DateTime? EndCreatTime { get; set; } + + public DateTime? BeginUpdateTime { get; set; } + + public DateTime? EndUpdateTime { get; set; } + } /// InternationalizationAddOrEdit 列表查询参数模型 diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index f16898812..59d048b5e 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -1304,7 +1304,11 @@ namespace IRaCIS.Core.Application.Service.Common .WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType) .WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value)) .WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN)) - .ProjectTo(_mapper.ConfigurationProvider); + .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) + .WhereIf(inQuery.EndCreatTime != null, t => t.CreateTime <= inQuery.EndCreatTime) + .WhereIf(inQuery.BeginUpdateTime != null, t => t.UpdateTime >= inQuery.BeginUpdateTime) + .WhereIf(inQuery.EndUpdateTime != null, t => t.UpdateTime <= inQuery.EndUpdateTime) + .ProjectTo(_mapper.ConfigurationProvider); var list = internationalizationQueryable.SortToListAsync(inQuery); @@ -1312,7 +1316,7 @@ namespace IRaCIS.Core.Application.Service.Common exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId); exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); - return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSCPImageUploadList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(InternationalizationView)); + return await ExcelExportHelper.DataExportAsync(StaticData.Export.Internationalization_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(InternationExportDTO)); } @@ -1663,7 +1667,7 @@ namespace IRaCIS.Core.Application.Service.Common if (judegeList.Count > 0) { - var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderByDescending(t=>t.VisitTaskNum).FirstOrDefault(); + var maxFinishedJudge = judegeList.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault(); var maxNotFinishedJudge = judegeList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned).FirstOrDefault(); @@ -2260,7 +2264,7 @@ namespace IRaCIS.Core.Application.Service.Common .GroupBy(t => new { t.SubjectId, t.SourceSubjectVisitId }) .Where(g => g.Count() == 2).Select(g => g.Key.SourceSubjectVisitId).Distinct().Count(); - exportInfo.JudgeVisitCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Judge ).Count(); + exportInfo.JudgeVisitCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Judge).Count(); //3、裁判认同数M:触发裁判的受试者访视中,阅片人被裁判认同的访视数量; //4、总裁判数N:阅片人所阅的受试者访视中,触发裁判的访视数量; @@ -2329,11 +2333,11 @@ namespace IRaCIS.Core.Application.Service.Common //2、总样本量Q:R1,R2均完成阅片的阅片期数量; exportInfo.ReadingPeriodCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Global && t.ReadingTaskState == ReadingTaskState.HaveSigned) - .GroupBy(t => new { t.SubjectId, t.SouceReadModuleId }) + .GroupBy(t => new { t.SubjectId, t.SouceReadModuleId }) .Where(g => g.Count() == 2).Select(g => g.Key.SouceReadModuleId).Distinct().Count(); exportInfo.judgeReadingPeriodCount = _visitTaskRepository.Where(comonTaskFilter).Where(t => t.ReadingCategory == ReadingCategory.Global && t.ReadingTaskState == ReadingTaskState.HaveSigned) - .GroupBy(t => new { t.SubjectId, t.SouceReadModuleId }) + .GroupBy(t => new { t.SubjectId, t.SouceReadModuleId }) .Where(g => g.Count() == 2 && g.Any(c => c.JudgeVisitTaskId != null)).Select(g => g.Key.SouceReadModuleId).Distinct().Count(); //3、裁判认同数J:触发裁判的阅片期中,阅片人被裁判认同的阅片期数量; diff --git a/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs b/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs index 5adee87e1..f7d6a38b0 100644 --- a/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs +++ b/IRaCIS.Core.Application/Service/Common/InternationalizationService.cs @@ -101,6 +101,10 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType) .WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value)) .WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN)) + .WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime) + .WhereIf(inQuery.EndCreatTime != null, t => t.CreateTime <= inQuery.EndCreatTime) + .WhereIf(inQuery.BeginUpdateTime != null, t => t.UpdateTime >= inQuery.BeginUpdateTime) + .WhereIf(inQuery.EndUpdateTime != null, t => t.UpdateTime <= inQuery.EndUpdateTime) .ProjectTo(_mapper.ConfigurationProvider); var pageList = await internationalizationQueryable diff --git a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs index 607f64bfc..8ff1c86e0 100644 --- a/IRaCIS.Core.Application/Service/Common/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Common/_MapConfig.cs @@ -67,6 +67,10 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(o => o.Version, t => t.MapFrom(u => u.PublishLog.Version)); + + CreateMap() + .ForMember(o => o.Version, t => t.MapFrom(u => u.PublishLog.Version)); + CreateMap().ReverseMap(); CreateMap().ReverseMap(); diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs index 6b6add65e..f936d4bfa 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/_Config/_StaticData.cs @@ -240,6 +240,8 @@ public static class StaticData public static string TrialSCPImageUploadPatientList_Export = "TrialSCPImageUploadPatientList_Export"; + public static string Internationalization_Export = "Internationalization_Export"; + //public const string TrialRECIST1Point1SelfAnalysisList_Export = "TrialRECIST1Point1SelfAnalysisList_Export"; //public const string TrialRECIST1Point1GroupAnalysisList_Export = "TrialRECIST1Point1GroupAnalysisList_Export";