Uat_Study
hang 2022-07-26 15:17:20 +08:00
parent 5b32340594
commit 2f403394f0
3 changed files with 11 additions and 16 deletions

View File

@ -147,8 +147,6 @@ namespace IRaCIS.Core.Application.ViewModel
public ReadingMethod ReadingType { get; set; }
[NotDefault]
public Guid EnrollId { get; set; }
public Guid? DoctorUserId { get; set; }

View File

@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.Service
{
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
{
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.EnrollId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
VerifyExp = t => t.EnrollId == addOrEditTaskAllocationRule.DoctorUserId && t.TrialId == addOrEditTaskAllocationRule.TrialId,
VerifyMsg = "已有该医生配置,不允许继续增加"
};
@ -127,7 +127,6 @@ namespace IRaCIS.Core.Application.Service
{
TrialId = enroll.TrialId,
ReadingType = enroll.Trial.ReadingType,
EnrollId =enroll.Id,
DoctorUserId = user.Id,
FullName = user.FullName,
UserCode = user.UserCode,
@ -142,14 +141,12 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<List<TrialDoctorUserSelectView>> GetDoctorSelectList(DoctorSelectQuery selectQuery, [FromServices] IRepository<Enroll> _enrollRepository)
{
var query = from enroll in _enrollRepository.Where(t => t.TrialId == selectQuery.TrialId && t.EnrollStatus >= (int)EnrollStatus.ConfirmIntoGroup && t.DoctorUserId !=null)
.WhereIf(selectQuery.ReadingCategory !=null,t=>t.EnrollReadingCategoryList.Any(u=>u.ReadingCategory==selectQuery.ReadingCategory))
join user in _userRepository.AsQueryable() on enroll.DoctorId equals user.DoctorId
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
select new TrialDoctorUserSelectView()
{
TrialId = enroll.TrialId,
ReadingType = enroll.Trial.ReadingType,
EnrollId = enroll.Id,
TrialId = allocationRule.TrialId,
ReadingType = allocationRule.Trial.ReadingType,
DoctorUserId = user.Id,
FullName = user.FullName,
UserCode = user.UserCode,

View File

@ -154,18 +154,18 @@ namespace IRaCIS.Core.Application.Service
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable && t.IsJudgeDoctor == false).Count() < 2)
{
//throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
break;
//break;
}
if (!(assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm1) && allocateSubjectArmList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2)))
{
//throw new BusinessValidationFailedException("该受试者阅片医生未配置完成");
throw new BusinessValidationFailedException("该受试者阅片医生未配置完成");
break;
//break;
}
#endregion
@ -398,9 +398,9 @@ namespace IRaCIS.Core.Application.Service
{
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialId && t.IsEnable).Count() < 2)
{
//throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
throw new BusinessValidationFailedException("能参与读片的医生数量必须>=2,自动分配任务中止");
break;
//break;
}
//配置了医生