From 11e33a74de3948ac8e82ba21ef0a37227f6b6f87 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 28 Jun 2022 11:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E4=BC=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 3 +++ .../Allocation/VisitTaskHelpeService.cs | 6 +++-- .../Service/Allocation/VisitTaskService.cs | 23 ++++++++++++++++--- .../Allocation/VisitTaskReReading.cs | 3 +++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 76e4805f5..c8b7f3b74 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -96,6 +96,8 @@ namespace IRaCIS.Core.Application.ViewModel public RequestReReadingType RequestReReadingType { get; set; } + public string RequestReReadingRejectReason { get; set; } = string.Empty; + public DateTime? RequestReReadingTime { get; set; } public string RequestReReadingReason { get; set; } = string.Empty; @@ -439,6 +441,7 @@ namespace IRaCIS.Core.Application.ViewModel public List ConfirmReReadingList { get; set; } + public string RequestReReadingRejectReason { get; set; } = string.Empty; public RequestReReadingResult RequestReReadingResultEnum { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 69aa7896a..e172923f5 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -326,10 +326,11 @@ namespace IRaCIS.Core.Application.Service TaskState = TaskState.NotEffect, Code = currentMaxCodeInt + 1, TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)), - AllocateTime = DateTime.Now, - DoctorUserId = reReadingVisitTask.DoctorUserId, + // AllocateTime = DateTime.Now, + //DoctorUserId = reReadingVisitTask.DoctorUserId, + }); var rootReReadingTaskId = await _visitTaskReReadingRepository.Where(t => t.NewReReadingTaskId == reReadingVisitTask.Id).Select(u => u.RootReReadingTaskId).FirstOrDefaultAsync(); @@ -348,6 +349,7 @@ namespace IRaCIS.Core.Application.Service RequestReReadingUserId = _userInfo.Id, RequestReReadingReason = generateTaskCommand.ReReadingApplyGenerateTaskCommand.RequestReReadingReason, RequestReReadingType = generateTaskCommand.ReReadingApplyGenerateTaskCommand.RequestReReadingType, + }); //是否增加任务类别 diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 4cbdf3213..252d98e23 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -967,12 +967,29 @@ namespace IRaCIS.Core.Application.Service { RequestReReadingConfirmUserId=_userInfo.Id, RequestReReadingResultEnum= agreeReReadingCommand.RequestReReadingResultEnum, + RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason }); - await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask() + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer) { - TaskState = TaskState.Effect - }); + await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask() + { + TaskState = TaskState.Effect + }); + } + //立即分配 + else if(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) + { + await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask() + { + TaskState = TaskState.Effect, + + DoctorUserId=_userInfo.Id, + + AllocateTime= DateTime.Now, + }); + } + } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs b/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs index ff1d390ff..e7ad11a13 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTaskReReading.cs @@ -44,6 +44,9 @@ namespace IRaCIS.Core.Domain.Models public string RequestReReadingReason { get; set; } = string.Empty; + + public string RequestReReadingRejectReason { get; set; } = string.Empty; + public RequestReReadingResult RequestReReadingResultEnum { get; set; }