diff --git a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs index 4c6f62376..cef572a42 100644 --- a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs @@ -287,7 +287,6 @@ namespace IRaCIS.Core.Application.Service ForeignKeyText = p.ForeignKeyText, ForeignKeyTable = p.ForeignKeyTable }).ToListAsync(); - list = list.GroupBy(x => new { x.Key }, (key, lst) => new { Key = key.Key, @@ -297,8 +296,6 @@ namespace IRaCIS.Core.Application.Service }).ToList(); - - var JsonDataValue = JsonConvert.DeserializeObject>(json); foreach (var item in list) { @@ -333,27 +330,25 @@ namespace IRaCIS.Core.Application.Service }; JsonDataValue[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery(sql, paravalue).Select(x => x.Text).ToList()); } - } return JsonConvert.SerializeObject(JsonDataValue); - } /// /// 获取枚举 /// - /// 标识 - /// Json对象 + /// 标识 + /// 标识 + /// Json对象 /// - /// - private async Task SetEnum(Guid trilaid, List identification, string json) + private async Task SetEnum(Guid trialId, List identifications, string jsonStr) { - if (json == null || json == "null") + if (jsonStr == null || jsonStr == "null") { return null; } - var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification)) + var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification)) join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId select new { @@ -363,7 +358,7 @@ namespace IRaCIS.Core.Application.Service }).ToListAsync(); // 添加单双审 - var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trilaid).Select(x => x.QCProcessEnum).FirstOrDefaultAsync(); + var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trialId).Select(x => x.QCProcessEnum).FirstOrDefaultAsync(); list.Add(new { @@ -381,7 +376,7 @@ namespace IRaCIS.Core.Application.Service Type = lst.Max(x => x.Type), }).ToList(); - var JsonData = JsonConvert.DeserializeObject>(json); + var JsonData = JsonConvert.DeserializeObject>(jsonStr); foreach (var item in list) { try @@ -461,24 +456,14 @@ namespace IRaCIS.Core.Application.Service { value = b.ValueCN }).Select(x => x.value).FirstOrDefaultAsync(); - } } } catch (Exception) { - - } } - - - return JsonConvert.SerializeObject(JsonData); - - - - } @@ -694,7 +679,6 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task> GetFrontAuditConfigList(FrontAuditConfigQuery iq) { - var query = from data in _repository.GetQueryable() join childrenType in _repository.GetQueryable() on data.ChildrenTypeId equals childrenType.Id into childrenTypetemp from leftchildrenType in childrenTypetemp.DefaultIfEmpty() @@ -752,7 +736,6 @@ namespace IRaCIS.Core.Application.Service DictionaryCode=data.DictionaryCode, DictionaryType=data.DictionaryType, InterfaceName=data.InterfaceName, - }; query = query diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs index cc03e7bd6..b60b65a7e 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs @@ -55,6 +55,26 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } + public class VisitFinishReadingAddReadModuleInDto + { + /// + /// 项目ID + /// + public Guid TrialId { get; set; } + + /// + /// 受试者Id + /// + public Guid SubjectId { get; set; } + + /// + /// 访视Id + /// + public Guid SubjectVisitId { get; set; } + + + } + public class GetReadModuleSingleIndto { public Guid Id { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/PreviousPDFService.cs b/IRaCIS.Core.Application/Service/Reading/PreviousPDFService.cs index 7f56e7d9f..de76fbe96 100644 --- a/IRaCIS.Core.Application/Service/Reading/PreviousPDFService.cs +++ b/IRaCIS.Core.Application/Service/Reading/PreviousPDFService.cs @@ -31,7 +31,9 @@ namespace IRaCIS.Application.Services } + #region 历史 接口名暂未修改 + /// /// 新增或者修改 /// @@ -70,7 +72,7 @@ namespace IRaCIS.Application.Services } - + #endregion /// diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index b1f8197c2..f2dac5d42 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -22,18 +22,21 @@ namespace IRaCIS.Application.Services public IRepository _subjectVisitRepository; private readonly IRepository _subjectRepository; private readonly IRepository _visitstageRepository; + private readonly IRepository _readingPeriodSetRepository; private readonly IRepository _readModuleRepository; public ReadModuleService(IRepository subjectVisitRepository, IRepository subjectRepository, IRepository visitstageRepository, + IRepository readingPeriodSetRepository, IRepository readModuleRepository ) { _subjectVisitRepository = subjectVisitRepository; this._subjectRepository = subjectRepository; this._visitstageRepository = visitstageRepository; + this._readingPeriodSetRepository = readingPeriodSetRepository; this._readModuleRepository = readModuleRepository; } @@ -66,7 +69,6 @@ namespace IRaCIS.Application.Services SubjectCode = y.Subject.Code, // 受试者code SiteCode = x.Site.SiteCode, // 中心Code - IsFinalVisit=y.IsFinalVisit, // 是否为末次评估 OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视 OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称 @@ -118,6 +120,16 @@ namespace IRaCIS.Application.Services }); } + ///// + ///// 访视阅片完成添加阅片期模块 + ///// + ///// + //public async Task VisitFinishReadingAddReadModule(VisitFinishReadingAddReadModuleInDto inDto) + //{ + // var subjectVisit = await _subjectRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == inDto.SubjectVisitId); + // List readingPeriodSets= _readingPeriodSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsTakeEffect=&&(x.ReadingScope==ReadingScopeEnum.All||(x.ReadingScope==ReadingScopeEnum.Site&&x.ReadingPeriodSites.Select(y=>y.SiteId).Contains(subjectVisit.SiteId)))) + //} + /// /// 获取单条信息 /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs index be719d14b..dca29997b 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs @@ -73,5 +73,10 @@ namespace IRaCIS.Core.Domain.Models } + public enum ReadingPeriodSetTakeEffectEnum + { + + } + }