访视计划修改
parent
d9910a7aad
commit
597eb4a300
|
@ -12,6 +12,7 @@ using Magicodes.ExporterAndImporter.Excel.AspNetCore;
|
|||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -523,8 +524,8 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
subjectsids.ForEach(y =>
|
||||
{
|
||||
var dataindtid = Guid.NewGuid();
|
||||
var guid = Guid.NewGuid();
|
||||
Guid dataindtid = NewId.NextGuid();
|
||||
Guid guid = NewId.NextGuid();
|
||||
//
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
@ -562,12 +563,12 @@ namespace IRaCIS.Application.Services
|
|||
SiteId = y.SiteId,
|
||||
SubjectId = y.Id,
|
||||
SubjectVisitId = guid,
|
||||
|
||||
SubjectCode = y.Code,
|
||||
BlindName = x.BlindName,
|
||||
ParentId = dataindtid,
|
||||
SubjectVisitName = x.VisitName,
|
||||
IsSign = false,
|
||||
TrialId=x.TrialId,
|
||||
CreateTime = createtime.AddMilliseconds(500),
|
||||
Identification = "Init|Visit|Status|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
|
@ -579,6 +580,14 @@ namespace IRaCIS.Application.Services
|
|||
IsBaseLine = x.IsBaseLine,
|
||||
IsEnrollment = y.IsEnrollment,
|
||||
IsUrgent = y.IsUrgent,
|
||||
VisitNum = x.VisitNum,
|
||||
VisitDay = x.VisitDay,
|
||||
VisitExecuted = false,
|
||||
VisitWindowLeft = x.VisitWindowLeft,
|
||||
VisitWindowRight = x.VisitWindowRight,
|
||||
IsFinalVisit = false,
|
||||
IsLostVisit = false,
|
||||
PDState = trial.IsPDProgressView,
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
@ -159,7 +159,11 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
foreach (var add in datas)
|
||||
{
|
||||
await SetInspectionNameValue(add);
|
||||
add.ParentId = (await _dbContext.DataInspection.AsQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
||||
if (add.ParentId == null)
|
||||
{
|
||||
add.ParentId = (await _dbContext.DataInspection.AsQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
||||
|
||||
}
|
||||
add.CreateUserId = _userInfo.Id;
|
||||
add.IP = _userInfo.IP;
|
||||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(add.JsonDetail);
|
||||
|
|
Loading…
Reference in New Issue