Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
commit
b13976d620
|
@ -275,7 +275,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
var _distributedLockProvider = _serviceProvider.GetService<IDistributedLockProvider>();
|
||||
|
||||
var storeRelativePath = string.Empty;
|
||||
var ossFolderPath = $"{_trialId}/Image/PACS/{_trialSiteId}{studyInstanceUid}";
|
||||
var ossFolderPath = $"{_trialId}/Image/PACS/{_trialSiteId}/{studyInstanceUid}";
|
||||
|
||||
|
||||
long fileSize = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpGet, Route("{studyId:guid}")]
|
||||
public async Task<IResponseOutput<List<DicomSeriesDTO>>> List(Guid studyId)
|
||||
{
|
||||
|
||||
//断点
|
||||
var seriesList = await _seriesRepository.Where(s => s.StudyId == studyId).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
|
||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
|
|
@ -10,6 +10,7 @@ using IRaCIS.Core.Domain.Share;
|
|||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
|
@ -1349,6 +1350,7 @@ namespace IRaCIS.Core.Application
|
|||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<TrialExtraConfig> GetTrialExtralConfig(Guid trialId)
|
||||
{
|
||||
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialObjectNameList }).FirstOrDefault();
|
||||
|
|
|
@ -5,9 +5,6 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
public partial class TrialStatusDetail : BaseAddAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public List<EnrollDetail> IntoGroupDetails { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
#endregion
|
||||
|
|
|
@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Models;
|
|||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure.Encryption;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
@ -77,11 +78,11 @@ public class IRaCISDBContext : DbContext
|
|||
});
|
||||
|
||||
modelBuilder.Entity<Trial>(entity =>
|
||||
{
|
||||
{
|
||||
//项目术语配置
|
||||
entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder =>
|
||||
{
|
||||
ownedNavigationBuilder.ToJson() ;
|
||||
ownedNavigationBuilder.ToJson();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -144,12 +145,60 @@ public class IRaCISDBContext : DbContext
|
|||
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
//软删除筛选器通常依赖于实体模型的完整定义(例如属性映射、继承关系等)
|
||||
|
||||
|
||||
|
||||
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
|
||||
{
|
||||
// 软删除配置
|
||||
if (typeof(ISoftDelete).IsAssignableFrom(entityType.ClrType))
|
||||
{
|
||||
entityType.AddSoftDeleteQueryFilter();
|
||||
//entityType.AddSoftDeleteQueryFilter();
|
||||
|
||||
// 动态创建表达式:e => e.IsDeleted==false
|
||||
var parameter = Expression.Parameter(entityType.ClrType, "e");
|
||||
var property = Expression.Property(parameter, nameof(ISoftDelete.IsDeleted));
|
||||
var filter = Expression.Lambda(
|
||||
Expression.Equal(property, Expression.Constant(false)),
|
||||
parameter);
|
||||
|
||||
// 应用全局查询筛选器
|
||||
modelBuilder.Entity(entityType.ClrType).HasQueryFilter(filter);
|
||||
|
||||
//Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name}");
|
||||
|
||||
}
|
||||
foreach (var navigation in entityType.GetNavigations())
|
||||
{
|
||||
|
||||
if (navigation.IsCollection) continue;
|
||||
|
||||
#region 有问题
|
||||
// 比如 e.SourceSubjectVisit.IsDeleted == False 还会导致 dicom 查询增加额外很多的连表 因为访视 项目 项目中心,dicom 都是软删除
|
||||
//
|
||||
//// 配置基于导航属性的软删除查询筛选器
|
||||
//if (typeof(ISoftDelete).IsAssignableFrom(navigation.TargetEntityType.ClrType))
|
||||
//{
|
||||
// var clrType = entityType.ClrType;
|
||||
// var targetType = navigation.TargetEntityType.ClrType;
|
||||
|
||||
// //e => e.Subject.IsDeleted==false
|
||||
// var parameterNav = Expression.Parameter(clrType, "e");
|
||||
// var navigationProperty = Expression.Property(parameterNav, navigation.Name);
|
||||
// var navigationFilter = Expression.Equal(
|
||||
// Expression.Property(navigationProperty, nameof(ISoftDelete.IsDeleted)),
|
||||
// Expression.Constant(false));
|
||||
|
||||
// var filterNav = Expression.Lambda(navigationFilter, parameterNav);
|
||||
|
||||
// modelBuilder.Entity(clrType).HasQueryFilter(filterNav);
|
||||
|
||||
// Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name} 导航属性{filterNav}");
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -590,7 +639,7 @@ public class TestLength : Entity
|
|||
public string Name { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string[] StringList { get; set; }=new string[] { };
|
||||
public string[] StringList { get; set; } = new string[] { };
|
||||
|
||||
public List<DateTime> DateTimeList { get; set; } = new List<DateTime>();
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ public class DicomStudyConfigration : IEntityTypeConfiguration<DicomStudy>
|
|||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
//builder.HasMany(s => s.InstanceList).WithOne(se => se.DicomStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.SeriesList).WithOne(se => se.DicomStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.DicomStudyMonitorList).WithOne(sm => sm.DicomStudy).HasForeignKey(sm => sm.StudyId).HasPrincipalKey(se => se.Id);
|
||||
|
@ -40,6 +42,8 @@ public class DicomInstanceConfigration : IEntityTypeConfiguration<DicomInstance>
|
|||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.DicomStudy).WithMany().HasForeignKey(t=>t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.ReadingTableAnswerRowInfoList).WithOne(di => di.Instance).HasForeignKey(t => t.InstanceId).HasPrincipalKey(se => se.Id);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue