访视计划修改
parent
d9910a7aad
commit
597eb4a300
|
@ -12,6 +12,7 @@ using Magicodes.ExporterAndImporter.Excel.AspNetCore;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using MassTransit;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -523,8 +524,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
subjectsids.ForEach(y =>
|
subjectsids.ForEach(y =>
|
||||||
{
|
{
|
||||||
var dataindtid = Guid.NewGuid();
|
Guid dataindtid = NewId.NextGuid();
|
||||||
var guid = Guid.NewGuid();
|
Guid guid = NewId.NextGuid();
|
||||||
//
|
//
|
||||||
datas.Add(new DataInspection()
|
datas.Add(new DataInspection()
|
||||||
{
|
{
|
||||||
|
@ -562,12 +563,12 @@ namespace IRaCIS.Application.Services
|
||||||
SiteId = y.SiteId,
|
SiteId = y.SiteId,
|
||||||
SubjectId = y.Id,
|
SubjectId = y.Id,
|
||||||
SubjectVisitId = guid,
|
SubjectVisitId = guid,
|
||||||
|
|
||||||
SubjectCode = y.Code,
|
SubjectCode = y.Code,
|
||||||
BlindName = x.BlindName,
|
BlindName = x.BlindName,
|
||||||
ParentId = dataindtid,
|
ParentId = dataindtid,
|
||||||
SubjectVisitName = x.VisitName,
|
SubjectVisitName = x.VisitName,
|
||||||
IsSign = false,
|
IsSign = false,
|
||||||
|
TrialId=x.TrialId,
|
||||||
CreateTime = createtime.AddMilliseconds(500),
|
CreateTime = createtime.AddMilliseconds(500),
|
||||||
Identification = "Init|Visit|Status|Visit-Image Upload",
|
Identification = "Init|Visit|Status|Visit-Image Upload",
|
||||||
JsonDetail = JsonConvert.SerializeObject(new
|
JsonDetail = JsonConvert.SerializeObject(new
|
||||||
|
@ -579,6 +580,14 @@ namespace IRaCIS.Application.Services
|
||||||
IsBaseLine = x.IsBaseLine,
|
IsBaseLine = x.IsBaseLine,
|
||||||
IsEnrollment = y.IsEnrollment,
|
IsEnrollment = y.IsEnrollment,
|
||||||
IsUrgent = y.IsUrgent,
|
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)
|
foreach (var add in datas)
|
||||||
{
|
{
|
||||||
await SetInspectionNameValue(add);
|
await SetInspectionNameValue(add);
|
||||||
|
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.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.CreateUserId = _userInfo.Id;
|
||||||
add.IP = _userInfo.IP;
|
add.IP = _userInfo.IP;
|
||||||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(add.JsonDetail);
|
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(add.JsonDetail);
|
||||||
|
|
Loading…
Reference in New Issue