修改任务配置

This commit is contained in:
2022-10-12 10:36:35 +08:00
parent c04c58e8dc
commit 626b83850b
9 changed files with 102 additions and 78 deletions
@@ -45,14 +45,14 @@ namespace IRaCIS.Core.Application.Service
/// </summary>
/// <param name="trialId"></param>
/// <returns></returns>
public async Task<(List<TaskAllocationRuleDTO>, object?)> GetDoctorPlanAllocationRuleList(Guid trialId)
public async Task<List<TaskAllocationRuleDTO>> GetDoctorPlanAllocationRuleList(Guid trialId)
{
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<TaskAllocationRuleDTO>(_mapper.ConfigurationProvider).ToListAsync();
var trialTaskConfig = _trialRepository.Where(t => t.Id == trialId).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstOrDefault();
//var trialTaskConfig = _trialRepository.Where(t => t.Id == trialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
return (list, trialTaskConfig);
return /*(*/list/*, trialTaskConfig)*/;
}
@@ -137,15 +137,15 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
[Obsolete]
public async Task<(List<DoctorVisitTaskStatView>, object?)> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
public async Task<List<DoctorVisitTaskStatView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
{
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == queryTaskAllocationRule.TrialId /*&& t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor*/)
.ProjectTo<DoctorVisitTaskStatView>(_mapper.ConfigurationProvider);
var trialTaskConfig = _trialRepository.Where(t => t.Id == queryTaskAllocationRule.TrialId).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault();
//var trialTaskConfig = _trialRepository.Where(t => t.Id == queryTaskAllocationRule.TrialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault();
return (await taskAllocationRuleQueryable.ToListAsync(), trialTaskConfig);
return await taskAllocationRuleQueryable.ToListAsync();
}