后处理非dicom检查bug
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-09-10 14:25:25 +08:00
parent 36acbc1df8
commit f6bcff7e13
10 changed files with 205 additions and 74 deletions

View File

@ -585,7 +585,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
}
else
{
await _noneDicomStudyFileReposiotry.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId && t.NoneDicomStudyId == noneDicomStudyId);
await _noneDicomStudyFileReposiotry.BatchDeleteNoTrackingAsync(t => t.VisitTaskId == visitTaskId && t.OriginNoneDicomStudyId == noneDicomStudyId);
}
return ResponseOutput.Ok();

View File

@ -7,13 +7,9 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{
public class SubjectVisitConfigration : IEntityTypeConfiguration<SubjectVisit>
{
public void Configure(EntityTypeBuilder<SubjectVisit> builder)
{
builder.HasOne(s => s.Subject).WithMany(sv => sv.SubjectVisitList);
}
}

View File

@ -1,38 +0,0 @@
using IRaCIS.Core.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{
public class TrialDocUserTypeConfirmConfigration : IEntityTypeConfiguration<TrialDocNeedConfirmedUserType>
{
public void Configure(EntityTypeBuilder<TrialDocNeedConfirmedUserType> builder)
{
////项目文档 需要确认的用户类型 找到项目下对应用户类型的用户 用UserTypeId 关联
//builder
// .HasMany(dd => dd.TrialUserList)
// .WithOne(d => d.TrialDocNeedConfirmedUserType)
// .HasForeignKey(s => new {/* s.TrialId,*/ s.User.UserTypeId })
// .HasPrincipalKey(c => new { /*c.TrialDocument.TrialId,*/ c.NeedConfirmUserTypeId });
}
}
public class TrialDocConfirmUserConfigration : IEntityTypeConfiguration<TrialDocConfirmedUser>
{
public void Configure(EntityTypeBuilder<TrialDocConfirmedUser> builder)
{
//builder
// .HasOne(dd => dd.TrialUser)
// .WithMany(d => d.TrialDocUserConfirmedList)
// .HasForeignKey(s => new { s.TrialDocument.TrialId, s.ConfirmUserId })
// .HasPrincipalKey(c => new { c.TrialId, c.UserId });
}
}
}

View File

@ -5,16 +5,6 @@ using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{
public class TrialSiteConfigration : IEntityTypeConfiguration<TrialSite>
{
public void Configure(EntityTypeBuilder<TrialSite> builder)
{
}
}
public class SubjectCriteriaEvaluationConfigration : IEntityTypeConfiguration<SubjectCriteriaEvaluation>
{

View File

@ -1,18 +0,0 @@
using IRaCIS.Core.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
{
public class TrialSiteSurveyConfigration : IEntityTypeConfiguration<TrialSiteSurvey>
{
public void Configure(EntityTypeBuilder<TrialSiteSurvey> builder)
{
}
}
}

View File

@ -7,4 +7,8 @@ https://www.cnblogs.com/cqpanda/p/16815263.html
# 该目录下如果有多个上下文,需要手动指定
# dotnet ef migrations add 签名名字 -p 项目名 -c 上下文名 -o 迁移文件生成目录
dotnet ef migrations add Initial -p IRaCIS.Core.Test -c IRCContext -o CodeFirstTest/MSSQL/Migrations
dotnet ef database update -p IRaCIS.Core.Test -c IRCContext

View File

@ -0,0 +1,119 @@
// <auto-generated />
using System;
using IRaCIS.Core.Test.CodeFirstTest.MSSQL;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
{
[DbContext(typeof(IRCContext))]
[Migration("20240910055957_navigateTest")]
partial class navigateTest
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TestName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<Guid>("TrialImageDownloadId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("TrialImageDownloadId");
b.ToTable("TestNew");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DownloadEndTime")
.HasColumnType("datetime2");
b.Property<DateTime>("DownloadStartTime")
.HasColumnType("datetime2");
b.Property<int>("ImageCount")
.HasColumnType("int");
b.Property<long>("ImageSize")
.HasColumnType("bigint");
b.Property<int>("ImageType")
.HasColumnType("int");
b.Property<bool>("IsSuccess")
.HasColumnType("bit");
b.Property<Guid>("SubjectVisitId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("TrialImageDownload");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", null)
.WithMany("TestNewList")
.HasForeignKey("TrialImageDownloadId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Navigation("TestNewList");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,51 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
{
/// <inheritdoc />
public partial class navigateTest : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "TrialImageDownloadId",
table: "TestNew",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.CreateIndex(
name: "IX_TestNew_TrialImageDownloadId",
table: "TestNew",
column: "TrialImageDownloadId");
migrationBuilder.AddForeignKey(
name: "FK_TestNew_TrialImageDownload_TrialImageDownloadId",
table: "TestNew",
column: "TrialImageDownloadId",
principalTable: "TrialImageDownload",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_TestNew_TrialImageDownload_TrialImageDownloadId",
table: "TestNew");
migrationBuilder.DropIndex(
name: "IX_TestNew_TrialImageDownloadId",
table: "TestNew");
migrationBuilder.DropColumn(
name: "TrialImageDownloadId",
table: "TestNew");
}
}
}

View File

@ -38,6 +38,9 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<Guid>("TrialImageDownloadId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
@ -46,6 +49,8 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
b.HasKey("Id");
b.HasIndex("TrialImageDownloadId");
b.ToTable("TestNew");
});
@ -91,6 +96,20 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
b.ToTable("TrialImageDownload");
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TestNew", b =>
{
b.HasOne("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", null)
.WithMany("TestNewList")
.HasForeignKey("TrialImageDownloadId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("IRaCIS.Core.Test.CodeFirstTest.MSSQL.TrialImageDownload", b =>
{
b.Navigation("TestNewList");
});
#pragma warning restore 612, 618
}
}

View File

@ -25,6 +25,12 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
public int ImageCount { get; set; }
public long ImageSize { get; set; }
#region 测试导航属性
public List<TestNew> TestNewList { get; set; }
#endregion
}
public enum ImageType
@ -33,8 +39,10 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
NoneDIcom = 2
};
public class TestNew: BaseFullAuditEntity
public class TestNew : BaseFullAuditEntity
{
public Guid TrialImageDownloadId { get; set; }
[StringLength(100)]
public string TestName { get; set; }
}