修改影像查询
parent
0eef2991df
commit
297c557c0f
|
@ -108,8 +108,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
//重阅原始编号
|
||||
//public string ReReadingOriginalTaskCode { get; set; }
|
||||
|
||||
//原任务的申请状态 方便PM 找到待审核的
|
||||
public ReReadingApplyState ReReadingApplyState { get; set; }
|
||||
|
||||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
@ -333,8 +332,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
|
||||
|
||||
public List<SubjectUserView> DoctorUserList { get; set; }
|
||||
|
||||
|
||||
public List<SubjectUserView> PreviousDoctorUserList => DoctorUserList.Where(t => t.OrignalSubjectUserId == null).ToList();
|
||||
|
||||
public List<SubjectUserView> NowDoctorUserList => DoctorUserList.Where(t => t.OrignalSubjectUserId != null).ToList();
|
||||
|
||||
//public UserSimpleInfo SingelDoctorUser { get; set; }
|
||||
//public UserSimpleInfo DoubleDoctorUser1 { get; set; }
|
||||
//public UserSimpleInfo DoubleDoctorUser2 { get; set; }
|
||||
|
@ -343,6 +347,23 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
public class SubjectUserView
|
||||
{
|
||||
public DateTime? AssignTime { get; set; }
|
||||
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
public bool IsConfirmed { get; set; }
|
||||
|
||||
//该属性有值 说明该医生被替换了 分配的时候 要过滤掉
|
||||
public Guid? OrignalSubjectUserId { get; set; }
|
||||
|
||||
public UserSimpleInfo DoctorUser { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class SubjectAssignView
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
|
@ -1128,6 +1128,16 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重阅原任务跟踪处理
|
||||
/// </summary>
|
||||
/// <param name="origenalTask"></param>
|
||||
private void ReReadingTaskTrackingDeal(VisitTask origenalTask, ConfirmReReadingCommand agreeReReadingCommand)
|
||||
{
|
||||
origenalTask.ReReadingApplyState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject;
|
||||
origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 确认重阅与否 1同意 2 拒绝
|
||||
/// </summary>
|
||||
|
@ -1145,13 +1155,19 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
foreach (var item in agreeReReadingCommand.ConfirmReReadingList)
|
||||
{
|
||||
var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
//var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id, true).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
////更新原始任务 当前任务处理
|
||||
//origenalTask.ReReadingApplyState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject;
|
||||
//origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState;
|
||||
|
||||
|
||||
//更新原始任务 当前任务处理
|
||||
origenalTask.ReReadingApplyState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? ReReadingApplyState.Agree : ReReadingApplyState.Reject;
|
||||
origenalTask.TaskState = agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree ? TaskState.HaveReturned : origenalTask.TaskState;
|
||||
var origenalTask = (await _visitTaskRepository.Where(t => item.OriginalReReadingTaskId == t.Id).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect;
|
||||
|
||||
//是否是一致性分析任务
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
|
||||
|
||||
//更新申请信息
|
||||
var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id);
|
||||
|
@ -1301,21 +1317,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
#region 有序 IR 申请 重阅 影响的其他访视查询
|
||||
|
||||
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect;
|
||||
|
||||
//是否是一致性分析任务
|
||||
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
|
||||
|
||||
switch (origenalTask.ReadingCategory)
|
||||
{
|
||||
case ReadingCategory.Visit:
|
||||
//影响后续访视已经读完的,未读的不做处理 以及其他类型任务
|
||||
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId &&
|
||||
(t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned ||
|
||||
t.ReadingCategory == ReadingCategory.Global ||
|
||||
t.ReadingCategory == ReadingCategory.Oncology ||
|
||||
t.ReadingCategory == ReadingCategory.Judge)
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
||||
((t.DoctorUserId == origenalTask.DoctorUserId && ((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned) || t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology))
|
||||
||
|
||||
(t.ReadingCategory == ReadingCategory.Judge))
|
||||
)
|
||||
;
|
||||
break;
|
||||
|
@ -1323,24 +1335,20 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
case ReadingCategory.Global:
|
||||
|
||||
//全局不影响后续访视任务
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId &&
|
||||
(
|
||||
t.ReadingCategory == ReadingCategory.Global ||
|
||||
t.ReadingCategory == ReadingCategory.Oncology ||
|
||||
t.ReadingCategory == ReadingCategory.Judge)
|
||||
);
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
|
||||
(t.DoctorUserId == origenalTask.DoctorUserId && (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology) || (t.ReadingCategory == ReadingCategory.Judge)));
|
||||
break;
|
||||
|
||||
case ReadingCategory.Oncology:
|
||||
|
||||
//仅仅影响自己 后续任务如果是访视任务、全局任务或裁判任务,均不处理
|
||||
filterExpression = filterExpression.And(t => /*t.Id == origenalTask.Id*/ t.Id == Guid.Empty);
|
||||
filterExpression = filterExpression.And(t => t.Id == origenalTask.Id );
|
||||
break;
|
||||
|
||||
case ReadingCategory.Judge:
|
||||
|
||||
//裁判的影响自己 和后续肿瘤学阅片
|
||||
filterExpression = filterExpression.And(t => /*(t.Id == origenalTask.Id) ||*/ t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Oncology);
|
||||
filterExpression = filterExpression.And(t => (t.Id == origenalTask.Id) || t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId && t.ReadingCategory == ReadingCategory.Oncology);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -1352,14 +1360,24 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
#endregion
|
||||
|
||||
#region 这里时影响其他的任务 不包括申请的任务 申请的任务,在上面会统一处理
|
||||
|
||||
|
||||
|
||||
#region 这里时影响其他的任务 /*不包括申请的任务 申请的任务,在上面会统一处理*/
|
||||
|
||||
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
|
||||
|
||||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
|
||||
|
||||
//处理申请的任务
|
||||
if (influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
||||
}
|
||||
//处理其他任务
|
||||
else
|
||||
{
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
|
@ -1413,6 +1431,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -1422,26 +1443,56 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
//无序阅片 只会申请访视类型和裁判类型的任务 注意这里有一致性分析的申请同意
|
||||
else
|
||||
{
|
||||
//访视任务产生了裁判
|
||||
if (origenalTask.ReadingCategory == ReadingCategory.Visit && origenalTask.JudgeVisitTaskId != null)
|
||||
{
|
||||
//1.当前任务及裁判任务
|
||||
//2.影响当前阅片人的任务
|
||||
filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.Id == origenalTask.JudgeVisitTaskId);
|
||||
|
||||
//裁判任务是否已阅片完成
|
||||
var judgeTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == origenalTask.JudgeVisitTaskId);
|
||||
|
||||
if (judgeTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
var influenceTaskList = await _visitTaskRepository.Where(filterExpression, true).ToListAsync();
|
||||
|
||||
foreach (var influenceTask in influenceTaskList)
|
||||
{
|
||||
judgeTask.TaskState = TaskState.HaveReturned;
|
||||
//申请原任务处理
|
||||
if (influenceTask.Id == origenalTask.Id)
|
||||
{
|
||||
ReReadingTaskTrackingDeal(influenceTask, agreeReReadingCommand);
|
||||
}
|
||||
//裁判任务未完
|
||||
else
|
||||
{
|
||||
judgeTask.TaskState = TaskState.Adbandon;
|
||||
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
influenceTask.TaskState = TaskState.HaveReturned;
|
||||
}
|
||||
else
|
||||
{
|
||||
influenceTask.TaskState = TaskState.Adbandon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region Old
|
||||
////访视任务产生了裁判
|
||||
//if (origenalTask.ReadingCategory == ReadingCategory.Visit && origenalTask.JudgeVisitTaskId != null)
|
||||
//{
|
||||
|
||||
// //裁判任务是否已阅片完成
|
||||
// var judgeTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == origenalTask.JudgeVisitTaskId);
|
||||
|
||||
// if (judgeTask.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
// {
|
||||
// judgeTask.TaskState = TaskState.HaveReturned;
|
||||
// }
|
||||
// //裁判任务未完
|
||||
// else
|
||||
// {
|
||||
// judgeTask.TaskState = TaskState.Adbandon;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
// 不管是访视还是裁判 都会立马产生的新任务并分配出去
|
||||
|
||||
}
|
||||
|
||||
|
@ -1450,8 +1501,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
#region 申请任务 重新生成 拷贝表单
|
||||
|
||||
|
||||
|
||||
//申请的任务 重新生成
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
TrialId = trialId,
|
||||
|
@ -1490,21 +1539,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
|
||||
}
|
||||
//else if (origenalTask.ReadingCategory == ReadingCategory.Judge)
|
||||
//{
|
||||
// newTask.JudgeResultImagePath = origenalTask.JudgeResultImagePath;
|
||||
// newTask.JudgeResultRemark = origenalTask.JudgeResultRemark;
|
||||
// newTask.JudgeResultTaskId = origenalTask.JudgeResultTaskId;
|
||||
|
||||
// //引起裁判的两个任务的 裁判任务Id 需要更新
|
||||
|
||||
// _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.JudgeVisitTaskId == origenalTask.Id, u => new VisitTask()
|
||||
// {
|
||||
// JudgeVisitTaskId = newTask.Id,
|
||||
// }).Wait();
|
||||
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1833,7 +1868,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
/// 影响提示列表 重阅仅仅针对已完成的任务申请 退回针对的是未完成的(退回仅仅针对是访视类型的)
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <param name="isReReading"></param>
|
||||
/// <param name="isReReading"> 重阅还是直接回退</param>
|
||||
/// <param name="applyId"> 申请记录的Id</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{taskId:guid}/{isReReading:bool}")]
|
||||
public async Task<List<InfluenceTaskInfo>> GetReReadingOrBackInfluenceTaskList(Guid taskId, bool isReReading, Guid? applyId)
|
||||
|
@ -1854,12 +1890,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
if (isReReading)
|
||||
{
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
|
||||
//IR 申请 PM 同意 仅仅影响自己
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
|
||||
if ((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|
||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
{
|
||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
|
@ -1870,11 +1908,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
//影响当前医生 以及当前医生之后的 1、访视任务 已经读完的
|
||||
//2、后续任务如果是全局、肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效;
|
||||
//3、当前任务、后续访视任务或者全局任务触发了裁判任务,若裁判任务状态为阅片完成,则标记为重阅重置;若在阅片中或待阅片,则标记为失效
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && t.DoctorUserId == filterObj.DoctorUserId &&
|
||||
(t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned ||
|
||||
t.ReadingCategory == ReadingCategory.Global ||
|
||||
t.ReadingCategory == ReadingCategory.Oncology ||
|
||||
t.ReadingCategory == ReadingCategory.Judge)
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
((t.DoctorUserId == filterObj.DoctorUserId && ((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned) || t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology))
|
||||
||
|
||||
(t.ReadingCategory == ReadingCategory.Judge))
|
||||
)
|
||||
;
|
||||
break;
|
||||
|
@ -1887,12 +1924,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
//4、后续任务为肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效;
|
||||
|
||||
//全局不影响后续访视任务
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && t.DoctorUserId == filterObj.DoctorUserId &&
|
||||
(
|
||||
t.ReadingCategory == ReadingCategory.Global ||
|
||||
t.ReadingCategory == ReadingCategory.Oncology ||
|
||||
t.ReadingCategory == ReadingCategory.Judge)
|
||||
);
|
||||
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
|
||||
(t.DoctorUserId == filterObj.DoctorUserId && (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology) || (t.ReadingCategory == ReadingCategory.Judge)));
|
||||
break;
|
||||
|
||||
//1、后续任务如果是访视任务、全局任务或裁判任务,均不处理;
|
||||
|
@ -1926,17 +1959,15 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
filterExpression = filterExpression.And(t => t.Id == filterObj.Id || t.Id == filterObj.JudgeVisitTaskId);
|
||||
}
|
||||
|
||||
|
||||
//throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||
}
|
||||
}
|
||||
else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
{
|
||||
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 掉用
|
||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
|
||||
else if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|
||||
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||
{
|
||||
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
{
|
||||
|
@ -1964,17 +1995,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
filterExpression = filterExpression.And(t => t.VisitTaskNum == filterObj.VisitTaskNum || t.VisitTaskNum == judegTaskNum);
|
||||
}
|
||||
|
||||
//throw new BusinessValidationFailedException("仅允许SPM CPM 同意 PM 申请的非 一致性分析的访视任务");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("仅允许SPM CPM 同意 PM 申请的非 一致性分析的访视任务");
|
||||
throw new BusinessValidationFailedException("当前用户查看列表未定义");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("该用户类型查看何种列表未定义");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -2016,7 +2042,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
}
|
||||
|
||||
var list = await _visitTaskRepository.Where(filterExpression).OrderBy(t => t.VisitTaskNum).ProjectTo<InfluenceTaskInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var list = await _visitTaskRepository.Where(filterExpression)
|
||||
//IR 申请的时候,仅仅看到影响自己的
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer, t => t.DoctorUserId == _userInfo.Id)
|
||||
.OrderBy(t => t.VisitTaskNum).ProjectTo<InfluenceTaskInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
#region 影响后的操作
|
||||
|
||||
foreach (var influenceTask in list)
|
||||
{
|
||||
|
@ -2025,7 +2056,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
{
|
||||
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||
if ((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
|
@ -2051,7 +2082,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
}
|
||||
}
|
||||
}
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)
|
||||
if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null) || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||
{
|
||||
//有序
|
||||
if (trialConfig.IsReadingTaskViewInOrder)
|
||||
|
@ -2145,6 +2176,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
return list;
|
||||
|
||||
|
|
|
@ -72,9 +72,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(o => o.VisitTaskTypeCount, t => t.MapFrom(u => u.SubjectVisitTaskList.Where(t=>t.ReadingCategory==ReadingCategory.Visit).Select(t=>t.VisitTaskNum).Distinct().Count()))
|
||||
.ForMember(o => o.GlobalTaskTypeCount, t => t.MapFrom(u => u.SubjectVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Select(t => t.VisitTaskNum).Distinct().Count()))
|
||||
.ForMember(o => o.OncologyTaskTypeCount, t => t.MapFrom(u => u.SubjectVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology).Select(t => t.VisitTaskNum).Distinct().Count()))
|
||||
.ForMember(o => o.JudgeTaskTypeCount, t => t.MapFrom(u => u.SubjectVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.VisitTaskNum).Distinct().Count()));
|
||||
|
||||
.ForMember(o => o.JudgeTaskTypeCount, t => t.MapFrom(u => u.SubjectVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Select(t => t.VisitTaskNum).Distinct().Count()))
|
||||
.ForMember(o => o.DoctorUserList, t => t.MapFrom(u => u.SubjectDoctorList));
|
||||
|
||||
CreateMap<SubjectUser, SubjectUserView>()
|
||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser));
|
||||
|
||||
CreateMap<SubjectVisit, VisitGenerataTaskDTO>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue