修改裁判任务分配
This commit is contained in:
@@ -74,7 +74,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public string Modalitys { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TrialProcessConfig
|
||||
@@ -123,7 +123,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool? IsClinicalReading { get; set; }
|
||||
|
||||
|
||||
public int ArbitrationRule { get; set; }
|
||||
public int ArbitrationRule { get; set; }
|
||||
|
||||
public int? DigitPlaces { get; set; }
|
||||
|
||||
@@ -144,10 +144,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TrialTaskConfigView : TrialTaskConfig
|
||||
{
|
||||
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
|
||||
|
||||
public bool IsReadingTaskViewInOrder { get; set; } = true;
|
||||
|
||||
public bool IsFollowJudgeTaskAutoAssign { get; set; }
|
||||
|
||||
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
|
||||
}
|
||||
|
||||
public class TrialReadingTaskViewConfig
|
||||
@@ -159,6 +168,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool IsReadingTaskViewInOrder { get; set; } = true;
|
||||
}
|
||||
|
||||
public class TrialJudgeTaskConfig
|
||||
{
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public bool IsFollowJudgeTaskAutoAssign { get; set; }
|
||||
|
||||
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
|
||||
}
|
||||
|
||||
public class TrialUrgentConfig
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -181,7 +200,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class TrialStateChangeDTO
|
||||
public class TrialStateChangeDTO
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -223,7 +242,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string SignCode { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TrialConfigDTO: BasicTrialConfig
|
||||
public class TrialConfigDTO : BasicTrialConfig
|
||||
{
|
||||
|
||||
|
||||
@@ -271,7 +290,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool? IsClinicalReading { get; set; }
|
||||
|
||||
|
||||
public int ArbitrationRule { get; set; }
|
||||
public int ArbitrationRule { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
_mapper.Map(trialConfig, trialInfo);
|
||||
|
||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable).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");
|
||||
}
|
||||
@@ -416,7 +416,7 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 配置项目赌片规则信息
|
||||
/// 配置项目读片查看规则
|
||||
/// </summary>
|
||||
/// <param name="trialConfig"></param>
|
||||
/// <returns></returns>
|
||||
@@ -430,6 +430,28 @@ namespace IRaCIS.Core.Application
|
||||
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置项目 裁判任务 分配规则
|
||||
/// </summary>
|
||||
/// <param name="trialConfig"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> ConfigJudgeTaskAllocateRule(TrialJudgeTaskConfig trialConfig)
|
||||
{
|
||||
var trialInfo = (await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialConfig.TrialId)).IfNullThrowException();
|
||||
|
||||
_mapper.Map(trialConfig, trialInfo);
|
||||
|
||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor ).Sum(t => t.PlanReadingRatio) != 100)
|
||||
{
|
||||
return ResponseOutput.NotOk("已启用医生比率不为百分之100");
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,11 +17,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
//CreateMap<TrialAttachmentCommand, TrialAttachment>().ForMember(t => t.UserTypes, u => u.MapFrom(k => string.Join(',', k.UserTypeList)));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<TrialTaskConfigView, Trial>().ForMember(d => d.Id, u => u.MapFrom(s => s.TrialId)).ReverseMap();
|
||||
CreateMap<TrialTaskConfig, Trial>().ForMember(d => d.Id, u => u.MapFrom(s => s.TrialId)).ReverseMap();
|
||||
|
||||
CreateMap<TrialReadingTaskViewConfig, Trial>().ForMember(d => d.Id, u => u.MapFrom(s => s.TrialId)).ReverseMap();
|
||||
|
||||
CreateMap<TrialJudgeTaskConfig, Trial>().ForMember(d => d.Id, u => u.MapFrom(s => s.TrialId));
|
||||
|
||||
|
||||
|
||||
CreateMap<UserTrialCommand, TrialUser>();
|
||||
|
||||
Reference in New Issue
Block a user