Uat_Study
parent
30e7addc3b
commit
93735fe203
|
@ -79,18 +79,13 @@
|
|||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetGroupConsistentRuleSubjectList(IRaCIS.Core.Application.ViewModel.GroupConsistentQuery)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetIQueryableDoctorSelfConsistentSubjectView(IRaCIS.Core.Domain.Models.TaskConsistentRule,System.Guid,System.Collections.Generic.List{System.Guid})">
|
||||
<summary>
|
||||
组间一致性分析 选择Subejct 列表
|
||||
仅仅组内一致性时使用(
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.ConfirmGenerateGroupConsistentTask(IRaCIS.Core.Application.ViewModel.GroupConsistentConfirmGenrateCommand,IRaCIS.Core.Application.Service.IVisitTaskHelpeService)">
|
||||
<summary>
|
||||
确认生成自身一致性分析任务
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="filterObj"></param>
|
||||
<param name="doctorUserId"></param>
|
||||
<param name="subejctIdList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetSelfConsistentDoctorStatList(IRaCIS.Core.Application.ViewModel.TaskConsistentRuleQuery)">
|
||||
|
|
|
@ -118,10 +118,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string BlindSubjectCode { get; set; } = string.Empty;
|
||||
public string BlindTrialSiteCode { get; set; } = string.Empty;
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public Guid? DoctorUserId { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
public Guid? TaskConsistentRuleId { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -128,7 +128,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
blindSubjectCode = (maxCodeInt + 1).ToString($"D{filterObj.BlindSubjectNumberOfPlaces}");
|
||||
}
|
||||
|
||||
subject.VisitTaskList.Take(filterObj.PlanVisitCount).ForEach(t =>
|
||||
subject.VisitTaskList= subject.VisitTaskList.Take(filterObj.PlanVisitCount).ToList();
|
||||
|
||||
subject.VisitTaskList.ForEach(t =>
|
||||
{
|
||||
t.DoctorUserId = doctorUserId;
|
||||
t.TaskConsistentRuleId = filterObj.Id;
|
||||
|
@ -138,7 +140,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
//最后一个访视添加全局
|
||||
var globalTask = (subject.VisitTaskList[filterObj.PlanVisitCount - 1]).Clone();
|
||||
|
||||
var globalTask = (subject.VisitTaskList.Last()).Clone();
|
||||
globalTask.ReadingCategory = ReadingCategory.Global;
|
||||
globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
||||
subject.VisitTaskList.Add(globalTask);
|
||||
|
@ -172,7 +175,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
//[HttpPost]
|
||||
//public async Task<PageOutput<DoctorSelfConsistentSubjectView>> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
||||
//{
|
||||
// var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis==false);
|
||||
// var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false);
|
||||
|
||||
|
||||
|
||||
|
||||
// var pagedList = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj).ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
||||
|
||||
|
@ -181,58 +187,60 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 确认生成自身一致性分析任务
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||
{
|
||||
throw new BusinessValidationFailedException("正在更新开发ing,不允许操作");
|
||||
|
||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inCommand.TrialId && t.IsSelfAnalysis==false);
|
||||
|
||||
var list = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, null, inCommand.SubejctIdList).ToListAsync();
|
||||
|
||||
|
||||
|
||||
foreach (var subject in list)
|
||||
{
|
||||
|
||||
|
||||
//subject.VisitTaskList.Take(filterObj.PlanVisitCount).ForEach(t =>
|
||||
///// <summary>
|
||||
///// 确认生成组间一致性分析任务
|
||||
///// </summary>
|
||||
///// <param name="inCommand"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost]
|
||||
//public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||
//{
|
||||
// t.DoctorUserId = doctorUserId;
|
||||
// t.TaskConsistentRuleId = filterObj.Id;
|
||||
// throw new BusinessValidationFailedException("正在更新开发ing,不允许操作");
|
||||
|
||||
//});
|
||||
// var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inCommand.TrialId && t.IsSelfAnalysis==false);
|
||||
|
||||
// var list = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, null, inCommand.SubejctIdList).ToListAsync();
|
||||
|
||||
|
||||
//最后一个访视添加全局
|
||||
//var globalTask = (subject.VisitTaskList[filterObj.PlanVisitCount - 1]).Clone();
|
||||
//globalTask.ReadingCategory = ReadingCategory.Global;
|
||||
//globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
||||
//subject.VisitTaskList.Add(globalTask);
|
||||
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
TrialId = filterObj.TrialId,
|
||||
|
||||
ReadingCategory = GenerateTaskCategory.SelfConsistent,
|
||||
// foreach (var subject in list)
|
||||
// {
|
||||
|
||||
|
||||
//产生的过滤掉已经生成的
|
||||
GenerataConsistentTaskList = subject.VisitTaskList.Where(t => t.IsHaveGeneratedTask == false).ToList()
|
||||
});
|
||||
// //subject.VisitTaskList.Take(filterObj.PlanVisitCount).ForEach(t =>
|
||||
// //{
|
||||
// // t.DoctorUserId = doctorUserId;
|
||||
// // t.TaskConsistentRuleId = filterObj.Id;
|
||||
|
||||
}
|
||||
// //});
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
// //最后一个访视添加全局
|
||||
// //var globalTask = (subject.VisitTaskList[filterObj.PlanVisitCount - 1]).Clone();
|
||||
// //globalTask.ReadingCategory = ReadingCategory.Global;
|
||||
// //globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
||||
// //subject.VisitTaskList.Add(globalTask);
|
||||
|
||||
// await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
// {
|
||||
// TrialId = filterObj.TrialId,
|
||||
|
||||
// ReadingCategory = GenerateTaskCategory.SelfConsistent,
|
||||
|
||||
|
||||
// //产生的过滤掉已经生成的
|
||||
// GenerataConsistentTaskList = subject.VisitTaskList.Where(t => t.IsHaveGeneratedTask == false).ToList()
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// return ResponseOutput.Ok();
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -484,6 +492,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
VerifyMsg = "已有该项目配置,不允许继续增加"
|
||||
};
|
||||
|
||||
if( await _visitTaskRepository.AnyAsync(t=>t.IsSelfAnalysis==addOrEditTaskConsistentRule.IsSelfAnalysis && t.TrialId == addOrEditTaskConsistentRule.TrialId))
|
||||
{
|
||||
return ResponseOutput.NotOk("已有Subject 生成了任务,不允许修改配置");
|
||||
}
|
||||
|
||||
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
|
Loading…
Reference in New Issue