From 09743f7153455430c9eba5f684417901fb086b27 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 13:47:54 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/WorkLoad/DoctorWorkloadService.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index f37274b12..4376ce2bb 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -116,8 +116,18 @@ namespace IRaCIS.Application.Services { if (item.Id == null) { - await _enrollReadingCriterionRepository.InsertFromDTOAsync(item); + //配合前端,没有传id的时候,查询数据库判断一下 + var find= await _enrollReadingCriterionRepository.FirstOrDefaultAsync(t=>t.TrialReadingCriterionId==item.TrialReadingCriterionId && t.EnrollId==item.EnrollId); + if (find == null) + { + await _enrollReadingCriterionRepository.InsertFromDTOAsync(item); + + } + else + { + find.IsJoinAnalysis = item.IsJoinAnalysis; + } } else { From cd5e0405de2a8ca38f2d7bbde1360e6e326ab14a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 14:02:37 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E5=88=86?= =?UTF-8?q?=E6=9E=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskConsistentRuleService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index dfeb6e08b..8e9a951fb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray); - var trialTaskConfig = _repository.Where(t => t.Id == queryVisitTask.TrialId).Select(t => new { t.ReviewMode, t.VitrualSiteCode }).FirstOrDefault(); + var trialTaskConfig = _repository.Where(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion=t.ReadingQuestionCriterionTrialList.Any(t=>t.IsSigned && t.IsConfirm && t.ReadingType==ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault(); return ResponseOutput.Ok(pageList, trialTaskConfig); } From 44ae7bde5685d887a3ceb9ed41a52178ca3f19e2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 14:08:51 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E5=88=86?= =?UTF-8?q?=E6=9E=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 2 +- .../Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index ce41554fd..6e21bef2c 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service.Allocation var list = await _repository.Where(t => t.TrialId == trialId && t.IsConfirm) .OrderBy(t => t.ShowOrder) - .Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, IsAutoCreate = t.IsAutoCreate, IsAdditionalAssessment = t.IsAdditionalAssessment, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime }) + .Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, IsAutoCreate = t.IsAutoCreate, IsAdditionalAssessment = t.IsAdditionalAssessment, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime , IsReadingPeriod= t.IsReadingPeriod }) .ToListAsync(); //if (list.Count == 0) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs b/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs index 290cf8500..ac6bcaf26 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs @@ -373,6 +373,8 @@ namespace IRaCIS.Application.Contracts public bool IsOncologyReading { get; set; } + + public bool IsReadingPeriod { get; set; } } public class TrialCriterionReadingCategory From 4f725af6cd0d201b67c5871c38be1cb02ae5c330 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 15:55:37 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=80=A7=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskConsistentRuleService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 8e9a951fb..39fcddffb 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -277,7 +277,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery) + public async Task> > GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery) { var trialId = inQuery.TrialId; @@ -286,7 +286,7 @@ namespace IRaCIS.Core.Application.Service if (filterObj == null) { - return new PageOutput(); + return ResponseOutput.Ok(new PageOutput()) ; } var query = await GetGroupConsistentQueryAsync(filterObj); @@ -294,7 +294,8 @@ namespace IRaCIS.Core.Application.Service var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc); - return pagedList; + var rule = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + return ResponseOutput.Ok(pagedList); } From 0a45638bacc9aecf8d5651b623c79159e173a15d Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 16:31:11 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/TaskConsistentRuleService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 39fcddffb..69ded0934 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -295,7 +295,7 @@ namespace IRaCIS.Core.Application.Service var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc); var rule = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); - return ResponseOutput.Ok(pagedList); + return ResponseOutput.Ok(pagedList, rule); } @@ -843,7 +843,7 @@ namespace IRaCIS.Core.Application.Service public async Task> GetUpdateVirtualSiteCodeList(Guid trialId) { - var list = await _trialVirtualSiteCodeUpdateRepository.Where(t => t.TrialId == trialId).Select(t => new UpdateTrialSiteCodeCommandView() { TrialId = trialId, VirtualSiteCode = t.VirturalSiteCode, Creatime = t.CreateTime }).ToListAsync(); + var list = await _trialVirtualSiteCodeUpdateRepository.Where(t => t.TrialId == trialId).Select(t => new UpdateTrialSiteCodeCommandView() { TrialId = trialId, VirtualSiteCode = t.VirturalSiteCode, Creatime = t.CreateTime }).OrderByDescending(t=>t.Creatime).ToListAsync(); return list; } From df79b7b57b322d70f187343e3876237c23354d55 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 17:00:43 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/DTO/TaskConsistentRuleViewModel.cs | 2 -- .../Service/Allocation/TaskConsistentRuleService.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs index e2c1b3ef3..6b4716442 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs @@ -314,8 +314,6 @@ namespace IRaCIS.Core.Application.ViewModel [NotDefault] public Guid TrialId { get; set; } - public bool IsSelfAnalysis { get; set; } - [NotDefault] public Guid TrialReadingCriterionId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index 69ded0934..f07af24dc 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -815,7 +815,7 @@ namespace IRaCIS.Core.Application.Service var list= await taskConsistentRuleQueryable.ToListAsync(); - var rule= await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == inQuery.IsSelfAnalysis && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + var rule= await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == true && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); return ResponseOutput.Ok(list, rule); } From 292140454040f9ae6049074b4979ad6055be0faf Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Mar 2024 17:08:32 +0800 Subject: [PATCH 7/7] x --- .../Service/Allocation/DTO/TaskConsistentRuleViewModel.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs index 6b4716442..e2c1b3ef3 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs @@ -314,6 +314,8 @@ namespace IRaCIS.Core.Application.ViewModel [NotDefault] public Guid TrialId { get; set; } + public bool IsSelfAnalysis { get; set; } + [NotDefault] public Guid TrialReadingCriterionId { get; set; }