diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 89b498ac5..2566f292e 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -213,13 +213,6 @@ - - - 提交阅片裁判表单 - - - - 配置 基础逻辑信息并确认 diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index b727a5120..1d3f28ed6 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -855,7 +855,7 @@ 裁决日期 CODTC - + 获取中心设备信息 @@ -10522,21 +10522,6 @@ 默认SegmentName - - - 仲裁模式 - - - - - 裁判规则 - - - - - 仲裁对象 - - 返回对象 @@ -11982,31 +11967,6 @@ 阅片期名称 - - - 类型 - - - - - 问题类型 - - - - - 字典code - - - - - 单位 - - - - - 答案组合 - - 标准ID @@ -12368,21 +12328,6 @@ 仲裁规则 - - - 仲裁模式 - - - - - 裁判规则 - - - - - 裁判任务生成 - - 需要 @@ -14413,11 +14358,6 @@ - - - 编辑裁判规则配置 - - 新增修改项目问题标准(项目) @@ -14519,22 +14459,11 @@ 阅片问题.标准 - + 阅片问题.标准 - - - 获取项目阅片标准各访视的裁判规则配置。 - 未配置规则的访视问题也会返回,供前端直接进行配置。 - - - - - 编辑项目阅片标准各访视的裁判规则配置。 - - 设置项目问题导出 @@ -14904,7 +14833,7 @@ - + IR影像阅片 @@ -15334,30 +15263,6 @@ - - - 获取单访视裁判答案 - - - - - - - 获取裁判表单 - - - - - 编辑裁判表单 - - - - - 提交裁判表单 - - - - 获取裁判阅片任务信息 @@ -15391,16 +15296,6 @@ - - - 应用访视裁判规则 以及剔除排除的问题 - - - - - 应用访视裁判规则 以及剔除排除的问题 - - 发送微信通知 diff --git a/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs index c8438f4f8..6e274233c 100644 --- a/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs @@ -85,9 +85,23 @@ namespace IRaCIS.Core.Application.Service.Common [HttpPost] public async Task GetSiteSurveyEquipmentList_Export(SiteSurveyEquipmentQuery inQuery, [FromServices] IRepository _trialSiteEquipmentSurveyRepository, + [FromServices] IRepository _trialSiteSurveyRepository, [FromServices] IDictionaryService _dictionaryService) { + + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var query = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + .IgnoreQueryFilters().Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) + .WhereIf(inQuery.IsDeleted != null, t => t.TrialSiteSurvey.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.TrialSiteSurvey.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -99,7 +113,7 @@ namespace IRaCIS.Core.Application.Service.Common var config = JsonConvert.DeserializeObject(siteSurveryConfig) ?? new TrialExtraConfig(); - var fields = new List<(string FieldName, int excelIndex)>() + var fields = new List<(string FieldName, int excelIndex)>() { ("Parameters", 8), @@ -118,7 +132,7 @@ namespace IRaCIS.Core.Application.Service.Common var viewNameList = config.EquipmentControlFieldList.Where(t => t.IsView == true).Select(t => t.FiledName).ToList(); - var columnsToDelete = fields.Where(f => !viewNameList.Any(t=>f.FieldName==t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList(); + var columnsToDelete = fields.Where(f => !viewNameList.Any(t => f.FieldName == t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList(); //var defalutSortArray = new string[] { /*nameof(TrialSiteSurveyView.LanguageType) + " desc", nameof(TrialSiteSurveyView.ShowOrder)*/ }; @@ -145,7 +159,18 @@ namespace IRaCIS.Core.Application.Service.Common [FromServices] IRepository _trialSiteSurveyRepository, [FromServices] IDictionaryService _dictionaryService) { - var query = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var query = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .Where(t => groupSelectIdQuery.Contains(t.Id)) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -167,7 +192,7 @@ namespace IRaCIS.Core.Application.Service.Common ("EfficacyEvaluatorType", 9), ("IsFollowStudyParameters", 10), ("NotFollowReson", 10), - + ("IsRoutineMRIPDEE", 11), ("MRIPDFFScanTime", 12), diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index 96cc917a4..08500b416 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -507,6 +507,12 @@ namespace IRaCIS.Core.Application.Contracts public string UserName { get; set; } = string.Empty; public string Phone { get; set; } = string.Empty; public string Email { get; set; } = string.Empty; + + [DictionaryTranslate("YesOrNo")] + public bool IsDeleted { get; set; } + + [DictionaryTranslate("ResearchRecord")] + public TrialSiteSurveyEnum State { get; set; } } public class SiteSurveyEquipmentQuery : PageInput @@ -518,6 +524,10 @@ namespace IRaCIS.Core.Application.Contracts public string? TrialSiteCode { get; set; } public string? TrialSiteName { get; set; } + + public bool? IsDeleted { get; set; } + + public TrialSiteSurveyEnum? State { get; set; } } public class SiteSurveyInfoQuery : PageInput @@ -530,6 +540,10 @@ namespace IRaCIS.Core.Application.Contracts public string? TrialSiteCode { get; set; } public string? TrialSiteName { get; set; } + + public bool? IsDeleted { get; set; } + + public TrialSiteSurveyEnum? State { get; set; } } public class SiteSurveyInfoDto diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index fd935ace9..f82748440 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1489,7 +1489,9 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyEquipmentList(SiteSurveyEquipmentQuery inQuery) { - var pageList = await _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + var pageList = await _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .WhereIf(inQuery.IsDeleted != null, t => t.TrialSiteSurvey.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.TrialSiteSurvey.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -1511,7 +1513,9 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyInfoList(SiteSurveyInfoQuery inQuery) { - var pageList = await _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + var pageList = await _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs index a15587eb9..cf1575976 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs @@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.AutoMapper CreateMap(); CreateMap() + .ForMember(d => d.IsDeleted, u => u.MapFrom(s => s.TrialSiteSurvey.IsDeleted)) + .ForMember(d => d.State, u => u.MapFrom(s => s.TrialSiteSurvey.State)) .ForMember(d => d.Email, u => u.MapFrom(s => s.TrialSiteSurvey.Email)) .ForMember(d => d.Phone, u => u.MapFrom(s => s.TrialSiteSurvey.Phone)) .ForMember(d => d.UserName, u => u.MapFrom(s => s.TrialSiteSurvey.UserName))