增加项目任务配置
This commit is contained in:
@@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||
{
|
||||
|
||||
|
||||
Task<List<TaskAllocationRuleView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule);
|
||||
//Task<List<TaskAllocationRuleView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule);
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
@@ -20,22 +22,31 @@ namespace IRaCIS.Core.Application.Service
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
private readonly IRepository<User> _userRepository;
|
||||
|
||||
public TaskAllocationRuleService(IRepository<TaskAllocationRule> taskAllocationRuleRepository, IRepository<User> userRepository)
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
|
||||
|
||||
|
||||
public TaskAllocationRuleService(IRepository<TaskAllocationRule> taskAllocationRuleRepository, IRepository<User> userRepository, IRepository<Trial> trialRepository)
|
||||
{
|
||||
_taskAllocationRuleRepository = taskAllocationRuleRepository;
|
||||
_userRepository = userRepository;
|
||||
_trialRepository= trialRepository;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<List<TaskAllocationRuleView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
|
||||
public async Task<(List<TaskAllocationRuleView>,object)> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
|
||||
{
|
||||
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t=>t.TrialId== queryTaskAllocationRule.TrialId)
|
||||
.ProjectTo<TaskAllocationRuleView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await taskAllocationRuleQueryable.ToListAsync();
|
||||
|
||||
var trialTaskConfig= _trialRepository.Where(t=>t.Id==queryTaskAllocationRule.TrialId).ProjectTo<TrialTaskConfig>(_mapper.ConfigurationProvider);
|
||||
return (await taskAllocationRuleQueryable.ToListAsync(), trialTaskConfig);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTaskAllocationRule(TaskAllocationRuleAddOrEdit addOrEditTaskAllocationRule)
|
||||
{
|
||||
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
|
||||
|
||||
@@ -49,6 +49,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 给医生用户 分配任务
|
||||
///// </summary>
|
||||
///// <param name="queryVisitTaskId"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<IResponseOutput> AllocateDoctorUserTask(string queryVisitTaskId)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user