优化导航属性
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
36c354c8f0
commit
21ded0d466
|
@ -4745,11 +4745,6 @@
|
||||||
文件路径
|
文件路径
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.CreateTime">
|
|
||||||
<summary>
|
|
||||||
创建时间
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.CreateUserId">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.CreateUserId">
|
||||||
<summary>
|
<summary>
|
||||||
创建人
|
创建人
|
||||||
|
|
|
@ -221,7 +221,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public class AnalysisTaskView : ReadingTaskView
|
public class AnalysisTaskView : ReadingTaskView
|
||||||
{
|
{
|
||||||
public bool? IsSelfAnalysis { get; set; }
|
|
||||||
|
|
||||||
public int ConsistentClinicalDataCount { get; set; } = 0;
|
public int ConsistentClinicalDataCount { get; set; } = 0;
|
||||||
|
|
||||||
|
|
|
@ -821,7 +821,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
||||||
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.Uploader.UserName.Contains(inQuery.Uploader))
|
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader))
|
||||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
||||||
.Select(t => new UnionStudyMonitorExportDto()
|
.Select(t => new UnionStudyMonitorExportDto()
|
||||||
|
@ -838,7 +838,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
IsDicom = t.IsDicom,
|
IsDicom = t.IsDicom,
|
||||||
|
|
||||||
Uploader = t.Uploader.UserName,
|
Uploader = t.CreateUser.UserName,
|
||||||
|
|
||||||
IP = t.IP,
|
IP = t.IP,
|
||||||
|
|
||||||
|
|
|
@ -771,10 +771,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
var query = _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == doctorUserId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == isAnalysisCreate)
|
&& t.SourceSubjectVisitId != null && t.DoctorUserId == doctorUserId && t.TaskState == TaskState.Effect)
|
||||||
.ProjectTo<SubjectCRCImageUploadedDto>(_mapper.ConfigurationProvider);
|
.ProjectTo<SubjectCRCImageUploadedDto>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
//这里过滤是否是一致性分析的
|
||||||
var list = await query.Where(t => t.SubjectCode == inQuery.SubjectCode).ToListAsync();
|
var list = await query.Where(t => t.SubjectCode == inQuery.SubjectCode).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
|
|
|
@ -411,7 +411,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = t.Uploader.UserName,
|
Uploader = t.CreateUser.UserName,
|
||||||
|
|
||||||
UploadTime = t.CreateTime
|
UploadTime = t.CreateTime
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
.WhereIf(inQuery.SubjectVisitId != null, t => t.SubjectId == inQuery.SubjectVisitId)
|
||||||
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
.WhereIf(inQuery.IsDicom != null, t => t.IsDicom == inQuery.IsDicom)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.Uploader.UserName.Contains(inQuery.Uploader))
|
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Uploader), t => t.CreateUser.UserName.Contains(inQuery.Uploader))
|
||||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.StudyCode), t => t.StudyCode.Contains(inQuery.StudyCode))
|
||||||
.Select(t => new UnionStudyMonitorModel()
|
.Select(t => new UnionStudyMonitorModel()
|
||||||
|
@ -514,7 +514,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = t.Uploader.UserName,
|
Uploader = t.CreateUser.UserName,
|
||||||
|
|
||||||
UploadTime = t.CreateTime,
|
UploadTime = t.CreateTime,
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<DicomStudy, StudyDTO>().IncludeMembers(t => t.Subject, u => u.SubjectVisit)
|
CreateMap<DicomStudy, StudyDTO>().IncludeMembers(t => t.Subject, u => u.SubjectVisit)
|
||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteName))
|
||||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
|
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.CreateUser.FirstName))
|
||||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.CreateUser.LastName))
|
||||||
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
||||||
|
|
||||||
CreateMap<Subject, StudyDTO>();
|
CreateMap<Subject, StudyDTO>();
|
||||||
|
@ -69,7 +69,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||||
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x => x.ReadingClinicalDataPDFList.Count() == 0)))
|
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x => x.ReadingClinicalDataPDFList.Count() == 0)))
|
||||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName))
|
||||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||||
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t => t.FailedFileCount > 0)))
|
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t => t.FailedFileCount > 0)))
|
||||||
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct())));
|
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct())));
|
||||||
|
|
|
@ -536,7 +536,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
// 一致性核查文件
|
// 一致性核查文件
|
||||||
CreateMap<InspectionFile, GetUserUploadFileDto>()
|
CreateMap<InspectionFile, GetUserUploadFileDto>()
|
||||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.User.FirstName + "/" + t.User.LastName));
|
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.FullName));
|
||||||
|
|
||||||
|
|
||||||
//CRC 质疑列表
|
//CRC 质疑列表
|
||||||
|
|
|
@ -161,11 +161,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public List<string> TrialCriterionNameList { get; set; }
|
public List<string> TrialCriterionNameList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 创建时间
|
|
||||||
/// </summary>
|
|
||||||
public DateTime CreateTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -337,7 +337,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<DicomStudy, SelectStudyView>()
|
CreateMap<DicomStudy, SelectStudyView>()
|
||||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.CreateUser.LastName + " / " + u.CreateUser.FirstName))
|
||||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id));
|
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id));
|
||||||
|
|
||||||
CreateMap<VisitTask, HaveGeneratedTaskDto>()
|
CreateMap<VisitTask, HaveGeneratedTaskDto>()
|
||||||
|
|
|
@ -132,7 +132,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject
|
||||||
|
|
||||||
TrialSiteCode = dicomStudy.Subject.TrialSite.TrialSiteCode,
|
TrialSiteCode = dicomStudy.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = dicomStudy.Uploader.UserName,
|
Uploader = dicomStudy.CreateUser.UserName,
|
||||||
|
|
||||||
UploadTime = dicomStudy.CreateTime
|
UploadTime = dicomStudy.CreateTime
|
||||||
};
|
};
|
||||||
|
|
|
@ -191,8 +191,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<SignDTO, TrialSign>();
|
CreateMap<SignDTO, TrialSign>();
|
||||||
|
|
||||||
CreateMap<TrialStateChange, TrialStateChangeDTO>()
|
CreateMap<TrialStateChange, TrialStateChangeDTO>()
|
||||||
.ForMember(t => t.UserRealName, u => u.MapFrom(c => c.User.FullName))
|
.ForMember(t => t.UserRealName, u => u.MapFrom(c => c.CreateUser.FullName))
|
||||||
.ForMember(t => t.UserName, u => u.MapFrom(c => c.User.UserName));
|
.ForMember(t => t.UserName, u => u.MapFrom(c => c.CreateUser.UserName));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -159,10 +159,10 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
RealName = confirm.User.FullName,
|
RealName = confirm.ConfirmUser.FullName,
|
||||||
UserName = confirm.User.UserName,
|
UserName = confirm.ConfirmUser.UserName,
|
||||||
UserTypeId = confirm.User.UserTypeId,
|
UserTypeId = confirm.ConfirmUser.UserTypeId,
|
||||||
UserTypeShortName = confirm.User.UserTypeRole.UserTypeShortName,
|
UserTypeShortName = confirm.ConfirmUser.UserTypeRole.UserTypeShortName,
|
||||||
|
|
||||||
FullFilePath = sysDoc.Path
|
FullFilePath = sysDoc.Path
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,10 +31,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public User RequestReReadingConfirmUser { get; set; }
|
public User RequestReReadingConfirmUser { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("CreateUserId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public User CreateUser { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete
|
public abstract class BaseAddDeleteAuditEntity : Entity, IAuditAdd, ISoftDelete
|
||||||
|
@ -78,6 +82,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid? DeleteUserId { get; set; }
|
public Guid? DeleteUserId { get; set; }
|
||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("CreateUserId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public User CreateUser { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
||||||
|
@ -87,9 +95,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
//[ForeignKey("CreateUserId")]
|
[ForeignKey("CreateUserId")]
|
||||||
//[JsonIgnore]
|
[JsonIgnore]
|
||||||
//public User CreateUser { get; set; }
|
public User CreateUser { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,6 +110,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("CreateUserId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public User CreateUser { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,6 +124,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class BaseAuditUpdateEntity : Entity, IAuditUpdate
|
public abstract class BaseAuditUpdateEntity : Entity, IAuditUpdate
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("ConfirmUserId")]
|
[ForeignKey("ConfirmUserId")]
|
||||||
public User User { get; set; }
|
public User ConfirmUser { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[ForeignKey("SubjectVisitId")]
|
[ForeignKey("SubjectVisitId")]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User Uploader { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("TrialId")]
|
[ForeignKey("TrialId")]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User Uploader { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Subject Subject { get; set; }
|
public Subject Subject { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public Subject Subject { get; set; }
|
public Subject Subject { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User Uploader { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Guid SeqId { get; set; }
|
public Guid SeqId { get; set; }
|
||||||
|
|
|
@ -15,8 +15,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
|
@ -24,8 +24,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<SystemNoticeUserRead> NoticeUserReadList { get; set; } = new List<SystemNoticeUserRead>();
|
public List<SystemNoticeUserRead> NoticeUserReadList { get; set; } = new List<SystemNoticeUserRead>();
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<VisitTask> VisitTaskList { get; set; }
|
public List<VisitTask> VisitTaskList { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("DoctorId")]
|
|
||||||
public Doctor Doctor { get; set; }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public TrialSite TrialSite { get; set; }
|
public TrialSite TrialSite { get; set; }
|
||||||
[JsonIgnore]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
||||||
public VisitTask VisitTask { get; set; }
|
public VisitTask VisitTask { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
|
|
|
@ -18,8 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public UserTypeEnum UserTypeEnum { get; set; }
|
public UserTypeEnum UserTypeEnum { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public class InspectionFile : BaseAddAuditEntity
|
public class InspectionFile : BaseAddAuditEntity
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User User { get; set; }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public string FileName { get; set; } = string.Empty;
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
|
|
@ -9,9 +9,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("LatestReplyUserId")]
|
[ForeignKey("LatestReplyUserId")]
|
||||||
public User LatestReplyUser { get; set; }
|
public User LatestReplyUser { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
|
@ -9,9 +9,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public QCChallenge QCChallenge { get; set; }
|
public QCChallenge QCChallenge { get; set; }
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public string TalkContent { get; set; } = string.Empty;
|
public string TalkContent { get; set; } = string.Empty;
|
||||||
|
|
|
@ -47,9 +47,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -11,9 +11,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual TrialStatusDetail TrialDetail { get; set; }
|
public virtual TrialStatusDetail TrialDetail { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
[JsonIgnore]
|
|
||||||
public Doctor Doctor { get; set; }
|
public Doctor Doctor { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[ForeignKey("TrialId")]
|
[ForeignKey("TrialId")]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User User { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
|
@ -14,10 +14,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public User User { get; set; }
|
public User User { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<VisitPlanInfluenceStudy> InfluenceStudyList { get; set; } = new List<VisitPlanInfluenceStudy>();
|
public List<VisitPlanInfluenceStudy> InfluenceStudyList { get; set; } = new List<VisitPlanInfluenceStudy>();
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("CreateUserId")]
|
|
||||||
public User CreateUser { get; set; }
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("VisitPlanInfluenceStatId")]
|
[ForeignKey("VisitPlanInfluenceStatId")]
|
||||||
public VisitPlanInfluenceStat VisitPlanInfluenceStat { get; set; }
|
public VisitPlanInfluenceStat VisitPlanInfluenceStat { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
using System.Reflection.Emit;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
||||||
{
|
{
|
||||||
public class SubjectConfigration : IEntityTypeConfiguration<Subject>
|
public class SubjectConfigration : IEntityTypeConfiguration<Subject>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<Subject> builder)
|
public void Configure(EntityTypeBuilder<Subject> builder)
|
||||||
{
|
{
|
||||||
//不能同时配置一对多 和一对一 但是有时表要存储多的最新的 比如受试者 最新的访视 在这里要显示配置
|
//不能同时配置一对多 和一对一 但是有时表要存储多的最新的 比如受试者 最新的访视 在这里要显示配置
|
||||||
builder.HasOne(s => s.LatestSubjectVisit).WithMany().HasForeignKey(t => t.LatestSubjectVisitId);
|
builder.HasOne(s => s.LatestSubjectVisit).WithMany().HasForeignKey(t => t.LatestSubjectVisitId);
|
||||||
builder.HasOne(s => s.FinalSubjectVisit).WithMany().HasForeignKey(t => t.FinalSubjectVisitId);
|
builder.HasOne(s => s.FinalSubjectVisit).WithMany().HasForeignKey(t => t.FinalSubjectVisitId);
|
||||||
builder.HasMany(s => s.SubjectVisitList).WithOne(sv => sv.Subject).HasForeignKey(t => t.SubjectId);
|
builder.HasMany(s => s.SubjectVisitList).WithOne(sv => sv.Subject).HasForeignKey(t => t.SubjectId);
|
||||||
}
|
}
|
||||||
|
@ -48,9 +49,39 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<User> builder)
|
public void Configure(EntityTypeBuilder<User> builder)
|
||||||
{
|
{
|
||||||
|
//User 和VisitTask 存在一对多的关系 这里不显式配置就报错,why?
|
||||||
builder.HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId);
|
builder.HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId);
|
||||||
|
|
||||||
//builder.HasOne(t => t.Doctor).WithOne(t => t.User);
|
//builder.HasOne(t => t.Doctor).WithOne(t => t.User);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SystemDocConfirmedUserConfigration : IEntityTypeConfiguration<SystemDocConfirmedUser>
|
||||||
|
{
|
||||||
|
public void Configure(EntityTypeBuilder<SystemDocConfirmedUser> builder)
|
||||||
|
{
|
||||||
|
//// 配置 CreateUser 关系
|
||||||
|
//builder.HasOne(s => s.CreateUser)
|
||||||
|
// .WithMany() // 假设 User 表没有对应的反向导航属性,如果有,填入属性名
|
||||||
|
// .HasForeignKey(s => s.CreateUserId);
|
||||||
|
////.OnDelete(DeleteBehavior.Restrict); // 可根据业务需求调整删除行为
|
||||||
|
|
||||||
|
// 配置 ConfirmUser 关系
|
||||||
|
builder.HasOne(s => s.ConfirmUser) // ConfirmUser
|
||||||
|
.WithMany(t => t.SystemDocConfirmedList)
|
||||||
|
.HasForeignKey(s => s.ConfirmUserId);
|
||||||
|
//.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialUserConfigration : IEntityTypeConfiguration<TrialUser>
|
||||||
|
{
|
||||||
|
public void Configure(EntityTypeBuilder<TrialUser> builder)
|
||||||
|
{
|
||||||
|
builder.HasOne(s => s.User)
|
||||||
|
.WithMany(t => t.UserTrials)
|
||||||
|
.HasForeignKey(s => s.UserId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue