From c4539a7d9ab3591e4ace9ba1dba03f37533fd4e8 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Thu, 12 Dec 2024 15:57:13 +0800 Subject: [PATCH] 1 --- .../PacsDataMigrateAppService.cs | 26 +++++++++++++++++++ .../BigtextResultTemplate.cs | 12 +-------- .../BigtextResultTypes/BigtextResultType.cs | 4 +-- src/Shentun.Pacs.Domain/ItemTypes/ItemType.cs | 4 +-- .../BigtextResultTypeDbMapping.cs | 10 +++---- .../Migrations/PeisDbContextModelSnapshot.cs | 17 +----------- 6 files changed, 35 insertions(+), 38 deletions(-) create mode 100644 src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs diff --git a/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs b/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs new file mode 100644 index 0000000..9700aa9 --- /dev/null +++ b/src/Shentun.Pacs.Application/PacsDataMigrates/PacsDataMigrateAppService.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Shentun.Pacs.PacsDataMigrates +{ + /// + /// 迁移老数据 + /// + [ApiExplorerSettings(GroupName = "Work")] + //[Authorize] + public class PacsDataMigrateAppService : ApplicationService + { + + public PacsDataMigrateAppService() + { + } + + + } +} diff --git a/src/Shentun.Pacs.Domain/BigtextResultTemplates/BigtextResultTemplate.cs b/src/Shentun.Pacs.Domain/BigtextResultTemplates/BigtextResultTemplate.cs index b4388be..8140a2e 100644 --- a/src/Shentun.Pacs.Domain/BigtextResultTemplates/BigtextResultTemplate.cs +++ b/src/Shentun.Pacs.Domain/BigtextResultTemplates/BigtextResultTemplate.cs @@ -43,17 +43,7 @@ namespace Shentun.Pacs.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } - //[Column("last_modifier_id")] - //public Guid LastModifierId { get; set; } - //[Column("last_modification_time", TypeName = "timestamp without time zone")] - //public DateTime LastModificationTime { get; set; } - //[Column("creator_id")] - //public Guid CreatorId { get; set; } - //[Column("creation_time", TypeName = "timestamp without time zone")] - //public DateTime CreationTime { get; set; } - //[Column("concurrency_stamp")] - //[StringLength(40)] - //public string ConcurrencyStamp { get; set; } = null!; + [ForeignKey(nameof(BigtextResultTypeId))] [InverseProperty("BigtextResultTemplates")] diff --git a/src/Shentun.Pacs.Domain/BigtextResultTypes/BigtextResultType.cs b/src/Shentun.Pacs.Domain/BigtextResultTypes/BigtextResultType.cs index 03e7c46..44e6f0f 100644 --- a/src/Shentun.Pacs.Domain/BigtextResultTypes/BigtextResultType.cs +++ b/src/Shentun.Pacs.Domain/BigtextResultTypes/BigtextResultType.cs @@ -54,9 +54,7 @@ namespace Shentun.Pacs.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } - [ForeignKey(nameof(ItemTypeId))] - [InverseProperty("BigtextResultTypes")] - public virtual ItemType ItemType { get; set; } = null!; + [InverseProperty(nameof(BigtextResultTemplate.BigtextResultType))] public virtual ICollection BigtextResultTemplates { get; set; } diff --git a/src/Shentun.Pacs.Domain/ItemTypes/ItemType.cs b/src/Shentun.Pacs.Domain/ItemTypes/ItemType.cs index 49435f8..e95b043 100644 --- a/src/Shentun.Pacs.Domain/ItemTypes/ItemType.cs +++ b/src/Shentun.Pacs.Domain/ItemTypes/ItemType.cs @@ -26,7 +26,6 @@ namespace Shentun.Pacs.Models : base(id) { Asbitems = new HashSet(); - BigtextResultTypes = new HashSet(); Diagnoses = new HashSet(); Items = new HashSet(); Rooms = new HashSet(); @@ -121,8 +120,7 @@ namespace Shentun.Pacs.Models public virtual MedicalReportType MedicalReportType { get; set; } = null!; [InverseProperty(nameof(Asbitem.ItemType))] public virtual ICollection Asbitems { get; set; } - [InverseProperty(nameof(BigtextResultType.ItemType))] - public virtual ICollection BigtextResultTypes { get; set; } + [InverseProperty(nameof(Diagnosis.ItemType))] public virtual ICollection Diagnoses { get; set; } [InverseProperty(nameof(Item.ItemType))] diff --git a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/BigtextResultTypes/BigtextResultTypeDbMapping.cs b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/BigtextResultTypes/BigtextResultTypeDbMapping.cs index 27c3a75..28bfe0f 100644 --- a/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/BigtextResultTypes/BigtextResultTypeDbMapping.cs +++ b/src/Shentun.Pacs.EntityFrameworkCore/DbMapping/BigtextResultTypes/BigtextResultTypeDbMapping.cs @@ -24,11 +24,11 @@ namespace Shentun.Pacs.DbMapping //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - entity.HasOne(d => d.ItemType) - .WithMany(p => p.BigtextResultTypes) - .HasForeignKey(d => d.ItemTypeId) - .OnDelete(DeleteBehavior.ClientSetNull) - .HasConstraintName("fk_bigtext"); + //entity.HasOne(d => d.ItemType) + // .WithMany(p => p.BigtextResultTypes) + // .HasForeignKey(d => d.ItemTypeId) + // .OnDelete(DeleteBehavior.ClientSetNull) + // .HasConstraintName("fk_bigtext"); entity.ConfigureByConvention(); } diff --git a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 6b62cfe..5513240 100644 --- a/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Pacs.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -1081,8 +1081,6 @@ namespace Shentun.Pacs.Migrations b.HasKey("Id"); - b.HasIndex("ItemTypeId"); - b.ToTable("bigtext_result_type"); b.HasComment("大文本结果类别"); @@ -12906,7 +12904,7 @@ namespace Shentun.Pacs.Migrations .HasColumnName("method_name"); b.Property("Parameters") - .HasMaxLength(2000) + .HasMaxLength(50000) .HasColumnType("text") .HasColumnName("parameters"); @@ -14436,17 +14434,6 @@ namespace Shentun.Pacs.Migrations b.Navigation("BigtextResultType"); }); - modelBuilder.Entity("Shentun.Pacs.Models.BigtextResultType", b => - { - b.HasOne("Shentun.Pacs.Models.ItemType", "ItemType") - .WithMany("BigtextResultTypes") - .HasForeignKey("ItemTypeId") - .IsRequired() - .HasConstraintName("fk_bigtext"); - - b.Navigation("ItemType"); - }); - modelBuilder.Entity("Shentun.Pacs.Models.CardBill", b => { b.HasOne("Shentun.Pacs.Models.CardRegister", "CardRegister") @@ -16021,8 +16008,6 @@ namespace Shentun.Pacs.Migrations { b.Navigation("Asbitems"); - b.Navigation("BigtextResultTypes"); - b.Navigation("Diagnoses"); b.Navigation("Items");