修改项目配置

Uat_Study
hang 2022-07-22 13:49:32 +08:00
parent eeb70778b9
commit 5342d4d470
9 changed files with 52 additions and 18 deletions

View File

@ -189,6 +189,13 @@
<param name="command"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.GetDoctorSubjectStat(System.Guid)">
<summary>
阅片人维度 Subject统计表
</summary>
<param name="trialId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.GetSubjectAssignList(IRaCIS.Core.Application.ViewModel.SubjectAssignQuery)">
<summary>
获取手动分配 未分配的Subject列表(IsHaveAssigned 传递false)

View File

@ -105,6 +105,15 @@ namespace IRaCIS.Core.Application.ViewModel
}
public class AssignDoctorStatView : TaskAllocationRuleDTO
{
public int? AssignedSubjectCount { get; set; }
public int? WaitDealTrialTaskCount { get; set; }
public int? WaitDealAllTaskCount { get; set; }
}
///<summary> TaskAllocationRuleAddOrEdit 列表查询参数模型</summary>
public class TaskAllocationRuleAddOrEdit
{

View File

@ -96,16 +96,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
return ResponseOutput.Ok();
}
///// <summary>
///// 阅片人维度 Subject统计表
///// </summary>
///// <param name="command"></param>
///// <returns></returns>
//public async Task<IResponseOutput> GetDoctorSubjectStat(Guid trialId )
//{
// var query= from enroll in _repository.Where<Enroll>(t=>t.TrialId==trialId)
// join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
//}
/// <summary>
/// 阅片人维度 Subject统计表
/// </summary>
/// <param name="trialId"></param>
/// <returns></returns>
public async Task<List<AssignDoctorStatView>> GetDoctorSubjectStat(Guid trialId)
{
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider).ToListAsync();
return list;
}

View File

@ -69,7 +69,12 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.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.WaitDealAllTaskCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count()))
.ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count()));
CreateMap<Subject, SubjectAssignStat>()

View File

@ -171,7 +171,9 @@ namespace IRaCIS.Core.Application.Contracts
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; }
public bool IsFollowJudgeTaskAutoAssign { get; set; }
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
}

View File

@ -615,10 +615,10 @@ namespace IRaCIS.Core.Application
_mapper.Map(trialConfig, trialInfo);
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor==false).Sum(t => t.PlanReadingRatio) != 100)
{
return ResponseOutput.NotOk("已启用医生比率不为百分之100");
}
//if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor==false).Sum(t => t.PlanReadingRatio) != 100)
//{
// return ResponseOutput.NotOk("已启用医生比率不为百分之100");
//}
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
}

View File

@ -98,7 +98,9 @@ namespace IRaCIS.Core.Domain.Models
public TaskConsistentRule TaskConsistentRule { get; set; }
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
//public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
public Enroll Enroll { get; set; }
public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }

View File

@ -66,7 +66,10 @@ namespace IRaCIS.Core.Domain.Models
public User DoctorUser { get; set; }
public TaskAllocationRule TaskAllocationRule { get; set; }
public List<VisitTask> DoctorTrialVisitTaskList { get; set; } = new List<VisitTask>();
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }

View File

@ -88,7 +88,12 @@ namespace IRaCIS.Core.Infra.EFCore
//modelBuilder.HasDbFunction(typeof(DbContext).GetMethod(nameof(GetTableList)));
modelBuilder.Entity<TaskAllocationRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
modelBuilder.Entity<Enroll>().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.Enroll).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
//modelBuilder.Entity<TaskAllocationRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskAllocationRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });
modelBuilder.Entity<TaskMedicalReviewRule>().HasMany(t => t.DoctorVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });