数据库修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4b69e45d44
commit
aec94d0a46
|
@ -1535,7 +1535,7 @@
|
|||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialNormalRecord},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialNormalRecordService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialNormalRecord},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFile},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目-一般文件记录
|
||||
</summary>
|
||||
|
|
|
@ -24,12 +24,13 @@ public class TrialNormalRecordAddOrEdit
|
|||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsAuthorizedView { get; set; }
|
||||
|
||||
public int? ReviewerFileType { get; set; }
|
||||
|
||||
|
||||
public int State { get; set; }
|
||||
|
||||
public TrialFileDto TrialFileRecord { get; set; }
|
||||
public TrialFileDto? TrialFileRecord { get; set; }
|
||||
|
||||
public TrialFileDto? HistoryFile { get; set; }
|
||||
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
|
@ -40,8 +41,6 @@ public class TrialNormalRecordQuery : PageInput
|
|||
{
|
||||
public bool? IsAuthorizedView { get; set; }
|
||||
|
||||
public int? ReviewerFileType { get; set; }
|
||||
|
||||
public int? State { get; set; }
|
||||
|
||||
public string? FileName { get; set; }
|
||||
|
|
|
@ -46,6 +46,7 @@ public class TrialNormalRecordService(IRepository<TrialNormalRecord> _trialNorma
|
|||
public async Task<IResponseOutput> AddOrUpdateTrialNormalRecord(TrialNormalRecordAddOrEdit inDto)
|
||||
{
|
||||
if (inDto.TrialFileRecord != null) inDto.TrialFileRecord.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
if (inDto.HistoryFile != null) inDto.HistoryFile.TrialFileTypeId = inDto.TrialFileTypeId;
|
||||
|
||||
|
||||
if (inDto.Id != null)
|
||||
|
@ -54,6 +55,7 @@ public class TrialNormalRecordService(IRepository<TrialNormalRecord> _trialNorma
|
|||
|
||||
List<Guid?> ids = new List<Guid?>() {
|
||||
trialFinalRecord.TrialFileRecordId,
|
||||
trialFinalRecord.HistoryFileId,
|
||||
};
|
||||
|
||||
var fileIds = ids.Where(x => x != null).Select(x => (Guid)x).ToList();
|
||||
|
|
|
@ -91,20 +91,23 @@ public class TrialNormalRecord : BaseFullAuditEntity
|
|||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 一般文件记录
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialFileRecordId")]
|
||||
public TrialFile TrialFileRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 历史文件记录
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[ForeignKey("HistoryFileId")]
|
||||
public TrialFile HistoryFile { get; set; }
|
||||
|
||||
[Comment("关联项目文件类型")]
|
||||
public Guid TrialFileTypeId { get; set; }
|
||||
|
||||
|
||||
|
||||
[Comment("文件类型,阅片人中使用")]
|
||||
public int? ReviewerFileType { get; set; }
|
||||
|
||||
#region 文件控制
|
||||
public int State { get; set; }
|
||||
|
||||
|
@ -116,6 +119,9 @@ public class TrialNormalRecord : BaseFullAuditEntity
|
|||
[Comment("关联具体的文件记录,记录里面有大小,格式,名称")]
|
||||
public Guid? TrialFileRecordId { get; set; }
|
||||
|
||||
[Comment("历史文件")]
|
||||
public Guid? HistoryFileId { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
19127
IRaCIS.Core.Infra.EFCore/Migrations/20250303054211_TrialNormal.Designer.cs
generated
Normal file
19127
IRaCIS.Core.Infra.EFCore/Migrations/20250303054211_TrialNormal.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,124 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TrialNormal : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReviewerFileType",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "TrialFileRecordId",
|
||||
table: "TrialNormalRecord",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
comment: "关联具体的文件记录,记录里面有大小,格式,名称",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldComment: "关联具体的文件记录,记录里面有大小,格式,名称");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "HistoryFileId",
|
||||
table: "TrialNormalRecord",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
comment: "历史文件");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialNormalRecord_HistoryFileId",
|
||||
table: "TrialNormalRecord",
|
||||
column: "HistoryFileId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialNormalRecord_TrialFileRecordId",
|
||||
table: "TrialNormalRecord",
|
||||
column: "TrialFileRecordId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialFile_TrialFileTypeId",
|
||||
table: "TrialFile",
|
||||
column: "TrialFileTypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TrialFile_TrialFileType_TrialFileTypeId",
|
||||
table: "TrialFile",
|
||||
column: "TrialFileTypeId",
|
||||
principalTable: "TrialFileType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TrialNormalRecord_TrialFile_HistoryFileId",
|
||||
table: "TrialNormalRecord",
|
||||
column: "HistoryFileId",
|
||||
principalTable: "TrialFile",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TrialNormalRecord_TrialFile_TrialFileRecordId",
|
||||
table: "TrialNormalRecord",
|
||||
column: "TrialFileRecordId",
|
||||
principalTable: "TrialFile",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TrialFile_TrialFileType_TrialFileTypeId",
|
||||
table: "TrialFile");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TrialNormalRecord_TrialFile_HistoryFileId",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TrialNormalRecord_TrialFile_TrialFileRecordId",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TrialNormalRecord_HistoryFileId",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TrialNormalRecord_TrialFileRecordId",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TrialFile_TrialFileTypeId",
|
||||
table: "TrialFile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HistoryFileId",
|
||||
table: "TrialNormalRecord");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "TrialFileRecordId",
|
||||
table: "TrialNormalRecord",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
comment: "关联具体的文件记录,记录里面有大小,格式,名称",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true,
|
||||
oldComment: "关联具体的文件记录,记录里面有大小,格式,名称");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ReviewerFileType",
|
||||
table: "TrialNormalRecord",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "文件类型,阅片人中使用");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11935,6 +11935,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("TrialFileTypeId");
|
||||
|
||||
b.ToTable("TrialFile", t =>
|
||||
{
|
||||
t.HasComment("项目文件 - 文件表");
|
||||
|
@ -12231,18 +12233,18 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("HistoryFileId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("历史文件");
|
||||
|
||||
b.Property<bool>("IsAuthorizedView")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否授权查看");
|
||||
|
||||
b.Property<int?>("ReviewerFileType")
|
||||
.HasColumnType("int")
|
||||
.HasComment("文件类型,阅片人中使用");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("TrialFileRecordId")
|
||||
b.Property<Guid?>("TrialFileRecordId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("关联具体的文件记录,记录里面有大小,格式,名称");
|
||||
|
||||
|
@ -12263,6 +12265,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("HistoryFileId");
|
||||
|
||||
b.HasIndex("TrialFileRecordId");
|
||||
|
||||
b.ToTable("TrialNormalRecord", t =>
|
||||
{
|
||||
t.HasComment("项目文件 - 一般文件记录表");
|
||||
|
@ -17390,6 +17396,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b1.Property<string>("EnName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b1.Property<bool>("IsChoose")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
@ -17816,7 +17827,15 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialFileType", "TrialFileType")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrialFileTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("TrialFileType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b =>
|
||||
|
@ -17927,7 +17946,19 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "HistoryFile")
|
||||
.WithMany()
|
||||
.HasForeignKey("HistoryFileId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialFile", "TrialFileRecord")
|
||||
.WithMany()
|
||||
.HasForeignKey("TrialFileRecordId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("HistoryFile");
|
||||
|
||||
b.Navigation("TrialFileRecord");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialPaymentPrice", b =>
|
||||
|
|
Loading…
Reference in New Issue