修改项目配置
parent
eeb70778b9
commit
5342d4d470
|
@ -189,6 +189,13 @@
|
||||||
<param name="command"></param>
|
<param name="command"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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)">
|
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.GetSubjectAssignList(IRaCIS.Core.Application.ViewModel.SubjectAssignQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
获取手动分配 未分配的Subject列表(IsHaveAssigned 传递false)
|
获取手动分配 未分配的Subject列表(IsHaveAssigned 传递false)
|
||||||
|
|
|
@ -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>
|
///<summary> TaskAllocationRuleAddOrEdit 列表查询参数模型</summary>
|
||||||
public class TaskAllocationRuleAddOrEdit
|
public class TaskAllocationRuleAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,16 +96,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
/// <summary>
|
||||||
///// 阅片人维度 Subject统计表
|
/// 阅片人维度 Subject统计表
|
||||||
///// </summary>
|
/// </summary>
|
||||||
///// <param name="command"></param>
|
/// <param name="trialId"></param>
|
||||||
///// <returns></returns>
|
/// <returns></returns>
|
||||||
//public async Task<IResponseOutput> GetDoctorSubjectStat(Guid trialId )
|
public async Task<List<AssignDoctorStatView>> GetDoctorSubjectStat(Guid trialId)
|
||||||
//{
|
{
|
||||||
// var query= from enroll in _repository.Where<Enroll>(t=>t.TrialId==trialId)
|
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
// join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
|
||||||
//}
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
.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()));
|
.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()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; }
|
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; }
|
||||||
|
|
||||||
|
public bool IsFollowJudgeTaskAutoAssign { get; set; }
|
||||||
|
|
||||||
|
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -615,10 +615,10 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
_mapper.Map(trialConfig, trialInfo);
|
_mapper.Map(trialConfig, trialInfo);
|
||||||
|
|
||||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor==false).Sum(t => t.PlanReadingRatio) != 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.NotOk("已启用医生比率不为百分之100");
|
||||||
}
|
//}
|
||||||
|
|
||||||
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public TaskConsistentRule TaskConsistentRule { get; set; }
|
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; }
|
public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public User DoctorUser { get; set; }
|
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; }
|
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,12 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
//modelBuilder.HasDbFunction(typeof(DbContext).GetMethod(nameof(GetTableList)));
|
//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 });
|
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 });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue