修复入组bug
This commit is contained in:
@@ -130,8 +130,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid EnrollId { get; set; }
|
||||
//public Guid DoctorUserId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid DoctorUserId { get; set; }
|
||||
|
||||
public int PlanSubjectCount { get; set; }
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpDelete("{taskAllocationRuleId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTaskAllocationRule(Guid taskAllocationRuleId)
|
||||
{
|
||||
if (await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId).AnyAsync(t => t.Enroll.DoctorTrialVisitTaskList.Any()))
|
||||
if (await _taskAllocationRuleRepository.Where(t => t.Id == taskAllocationRuleId).AnyAsync(t => t.DoctorUser.VisitTaskList.Any()))
|
||||
{
|
||||
return ResponseOutput.NotOk("已分配任务给该医生,不允许删除");
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.OrderBy(t => t.ReadingCategory).Select(t=>t.ReadingCategory).ToList()));
|
||||
|
||||
CreateMap<TaskAllocationRule, AssignDoctorStatView>().IncludeBase<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||
.ForMember(o => o.AssignedSubjectCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Select(t=>t.SubjectId).Distinct().Count()))
|
||||
.ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count()))
|
||||
.ForMember(o => o.AssignedSubjectCount, t => t.MapFrom(u => u.DoctorUser.VisitTaskList.Where(t=>t.TrialId==u.TrialId).Select(t=>t.SubjectId).Distinct().Count()))
|
||||
.ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.DoctorUser.VisitTaskList.Where(t => t.TrialId == u.TrialId).Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count()))
|
||||
.ForMember(o => o.WaitDealAllTaskCount, t => t.MapFrom(u => u.DoctorUser.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count()));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user