Uat_Study
parent
e515970a30
commit
32466cd16d
|
@ -207,7 +207,6 @@
|
|||
申请重阅 1:IR 2:PM
|
||||
</summary>
|
||||
<param name="applyReReadingCommand"></param>
|
||||
<param name="_visitTaskCommonService"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.VisitTaskService.ConfirmReReading(IRaCIS.Core.Application.ViewModel.ConfirmReReadingCommand,IRaCIS.Core.Application.Service.IVisitTaskHelpeService)">
|
||||
|
|
|
@ -251,8 +251,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
//public Guid SiteId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
public String TrialSiteCode { get; set; } = String.Empty;
|
||||
public string SubjectCode { get; set; } = String.Empty;
|
||||
public String TrialSiteCode => VisitTaskList.Select(t=>t.TrialSiteCode).First();
|
||||
public string SubjectCode => VisitTaskList.Select(t => t.TrialSiteCode).First();
|
||||
|
||||
public int? VisitValidTaskCount { get; set; }
|
||||
|
||||
|
@ -263,20 +263,23 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class VisitTaskSimpleView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Arm ArmEnum { get; set; }
|
||||
public string TaskCode { get; set; }
|
||||
public Arm? ArmEnum { get; set; }
|
||||
public string? TaskCode { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
public string TaskBlindName { get; set; }
|
||||
public string? TaskName { get; set; }
|
||||
public string? TaskBlindName { get; set; }
|
||||
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
|
||||
public TaskState TaskState { get; set; }
|
||||
public TaskState? TaskState { get; set; }
|
||||
|
||||
public String? TrialSiteCode { get; set; } = String.Empty;
|
||||
public string? SubjectCode { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -241,15 +241,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.Where(t => t.ReReadingApplyState != ReReadingApplyState.Agree)
|
||||
.WhereIf(inQuery.IsHaveReadingPeriod == false, t => t.ReadingCategory == ReadingCategory.Visit)
|
||||
.WhereIf(inQuery.IsHaveReadingPeriod == true, t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global)
|
||||
.GroupBy(t => new { t.SubjectId, /*t.TrialId, t.Subject.SiteId,*/ t.Subject.Code, t.Subject.TrialSite.TrialSiteCode })
|
||||
.GroupBy(t => t.SubjectId)
|
||||
.Select(g => new SelfConsistentView()
|
||||
{
|
||||
SubjectId = g.Key.SubjectId,
|
||||
//TrialId = g.Key.TrialId,
|
||||
//SiteId = g.Key.SiteId,
|
||||
|
||||
SubjectCode = g.Key.Code,
|
||||
TrialSiteCode = g.Key.TrialSiteCode,
|
||||
SubjectId = g.Key,
|
||||
|
||||
VisitTaskList = g.OrderBy(t => t.SubjectVisit.VisitNum).Select(c => new VisitTaskSimpleView()
|
||||
{
|
||||
|
@ -261,13 +256,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
TaskState = c.TaskState,
|
||||
ArmEnum = c.ArmEnum,
|
||||
SubjectId = c.SubjectId,
|
||||
TrialId = c.TrialId
|
||||
}).ToList(),
|
||||
TrialId = c.TrialId,
|
||||
SubjectCode = c.Subject.Code,
|
||||
TrialSiteCode = c.Subject.TrialSite.TrialSiteCode,
|
||||
}).Take(2).ToList(),
|
||||
|
||||
VisitValidTaskCount = g.Count()
|
||||
|
||||
});
|
||||
|
||||
|
||||
var count = query.Count();
|
||||
|
||||
var list= query.Skip(0).Take(10).ToList();
|
||||
|
||||
|
||||
|
||||
return query.ToList();
|
||||
}
|
||||
|
||||
|
@ -968,7 +972,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// 申请重阅 1:IR 2:PM
|
||||
/// </summary>
|
||||
/// <param name="applyReReadingCommand"></param>
|
||||
/// <param name="_visitTaskCommonService"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
|
@ -1094,7 +1097,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var origenalAnswerList = _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == origenalTask.Id).ToList();
|
||||
|
||||
origenalAnswerList.ForEach(t => { t.VisitTaskId = newTask.Id; });
|
||||
origenalAnswerList.ForEach(t => { t.VisitTaskId = newTask.Id; t.Id=Guid.Empty });
|
||||
|
||||
_readingTaskQuestionAnswerRepository.AddRangeAsync(origenalAnswerList);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue