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 passing Details

Test_IRC_Net8
hang 2025-06-06 11:12:51 +08:00
commit c7a310c1ad
15 changed files with 20045 additions and 9 deletions

View File

@ -17343,11 +17343,32 @@
TrialDocumentService
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Contracts.ISystemDocumentService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocumentAttachment},IRaCIS.Core.Application.Contracts.ISystemDocumentService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
<summary>
TrialDocumentService
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetTrialDocumentAttachmentList(IRaCIS.Core.Application.Contracts.TrialDocumentAttachmentQuery)">
<summary>
获取项目文档附件列表
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.AddOrUpdateTrialDocumentAttachment(IRaCIS.Core.Application.Contracts.TrialDocumentAttachmentAddOrEdit)">
<summary>
添加或更新项目文档附件
</summary>
<param name="addOrEditTrialDocumentAttachment"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.DeleteTrialDocumentAttachment(System.Guid)">
<summary>
删除项目文档附件
</summary>
<param name="trialDocumentAttachmentId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.PublishTrialDocument(IRaCIS.Core.Application.Contracts.PublishTrialDocumentInDto)">
<summary>
发布项目文档

View File

@ -370,6 +370,52 @@ namespace IRaCIS.Core.Application.Contracts
public List<Guid> Ids { get; set; }
}
public class TrialDocumentAttachmentView : TrialDocumentAttachmentAddOrEdit
{
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
}
public class TrialDocumentAttachmentAddOrEdit
{
public Guid? Id { get; set; }
public string FileFormat { get; set; }
public string FileName { get; set; }
public string FilePath { get; set; }
public decimal? FileSize { get; set; }
public string Name { get; set; }
public bool OffLine { get; set; }
public Guid TrialDocumentId { get; set; }
}
public class TrialDocumentAttachmentQuery : PageInput
{
public string? FileFormat { get; set; }
public string? FileName { get; set; }
public string? FilePath { get; set; }
public decimal? FileSize { get; set; }
public string? Name { get; set; }
public bool? OffLine { get; set; }
public Guid? TrialDocumentId { get; set; }
}
public class AddOrEditSystemDocument : SystemDocumentAddOrEdit
{

View File

@ -13,6 +13,7 @@ namespace IRaCIS.Core.Application.Contracts
{
public string FullFilePath { get; set; } = String.Empty;
public int AttachmentCount { get; set; }
public bool IsSomeUserSigned { get; set; }
public DateTime CreateTime { get; set; }

View File

@ -26,6 +26,7 @@ namespace IRaCIS.Core.Application.Services
[ApiExplorerSettings(GroupName = "Trial")]
public class TrialDocumentService(IRepository<TrialDocument> _trialDocumentRepository,
IRepository<Trial> _trialRepository,
IRepository<TrialDocumentAttachment> _trialDocumentAttachmentRepository,
ISystemDocumentService _systemDocumentService,
IRepository<SystemDocConfirmedIdentityUser> _systemDocConfirmedUserRepository,
IRepository<SystemDocNeedConfirmedUserType> _systemDocNeedConfirmedUserTypeRepository,
@ -39,6 +40,55 @@ namespace IRaCIS.Core.Application.Services
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialDocumentService
{
/// <summary>
/// 获取项目文档附件列表
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<TrialDocumentAttachmentView>> GetTrialDocumentAttachmentList(TrialDocumentAttachmentQuery inQuery)
{
var trialDocumentAttachmentQueryable = _trialDocumentAttachmentRepository
.WhereIf(inQuery.TrialDocumentId!=null,x=>x.TrialDocumentId==inQuery.TrialDocumentId)
.WhereIf(inQuery.Name != null, x => x.Name.Contains(inQuery.Name))
.WhereIf(inQuery.FileFormat != null, x => x.FileFormat == inQuery.FileFormat)
.ProjectTo<TrialDocumentAttachmentView>(_mapper.ConfigurationProvider);
var pageList = await trialDocumentAttachmentQueryable.ToPagedListAsync(inQuery);
return pageList;
}
/// <summary>
/// 添加或更新项目文档附件
/// </summary>
/// <param name="addOrEditTrialDocumentAttachment"></param>
/// <returns></returns>
public async Task<IResponseOutput> AddOrUpdateTrialDocumentAttachment(TrialDocumentAttachmentAddOrEdit addOrEditTrialDocumentAttachment)
{
// 在此处拷贝automapper 映射
var entity = await _trialDocumentAttachmentRepository.InsertOrUpdateAsync(addOrEditTrialDocumentAttachment, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除项目文档附件
/// </summary>
/// <param name="trialDocumentAttachmentId"></param>
/// <returns></returns>
[HttpDelete("{trialDocumentAttachmentId:guid}")]
public async Task<IResponseOutput> DeleteTrialDocumentAttachment(Guid trialDocumentAttachmentId)
{
var success = await _trialDocumentAttachmentRepository.DeleteFromQueryAsync(t => t.Id == trialDocumentAttachmentId, true);
return ResponseOutput.Ok();
}
/// <summary>
/// 发布项目文档
/// </summary>
@ -448,15 +498,27 @@ namespace IRaCIS.Core.Application.Services
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
result.CurrentPageData.ForEach(x =>
{
if (sysDataList.Any(y => y.Id == x.Id))
{
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
}
});
var trialids = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList();
var trialDataList = await _trialDocumentRepository.Where(x => trialids.Contains(x.Id)).Include(x => x.TrialDocumentAttachmentList).ToListAsync();
result.CurrentPageData.ForEach(x =>
{
if (trialDataList.Any(y => y.Id == x.Id))
{
x.AttachmentCount = trialDataList.Where(y => y.Id == x.Id).Select(x => x.TrialDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
}
});
#endregion

View File

@ -16,6 +16,8 @@ namespace IRaCIS.Core.Application.Service
var isEn_Us = false;
// 在此处拷贝automapper 映射
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentView>();
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentAddOrEdit>().ReverseMap();
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentView>();
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentAddOrEdit>().ReverseMap();
@ -40,6 +42,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
CreateMap<TrialDocument, TrialDocumentView>()
.ForMember(d => d.AttachmentCount, u => u.MapFrom(s =>s.TrialDocumentAttachmentList.Count()))
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
.ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any(t => t.ConfirmTime != null)))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));

View File

@ -1150,7 +1150,7 @@ namespace IRaCIS.Core.Application.Service
var allfront = await (from data in _frontAuditConfigRepository.AsQueryable()
var allfront = await (from data in _frontAuditConfigRepository.Where(x=>x.IsEnable && x.ConfigType == "M")
join dic in _dictionaryRepository.Where(x => x.Parent.Code == "ModuleType" && x.IsEnable) on data.ModuleTypeId equals dic.Id
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == inDto.TrialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
@ -1164,7 +1164,7 @@ namespace IRaCIS.Core.Application.Service
DictionaryValue = _userInfo.IsEn_Us ? dic.Value : dic.ValueCN,
}).ToListAsync();
var result = allfront.Where(x => x.IsShow).ToList();
var result = allfront.Where(x => x.IsShow && x.ParentId!=null).ToList();
FindParent(result, result.Select(x => x.ParentId).ToList());
void FindParent(List<ModuleTypeData> re, List<Guid?> Parentids)
{
@ -1202,7 +1202,7 @@ namespace IRaCIS.Core.Application.Service
{
var result = from data in _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0)
var result = from data in _frontAuditConfigRepository.Where(x =>x.IsEnable && x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0)
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == trialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
select new

View File

@ -1460,7 +1460,26 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto)
{
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
#region 验证阅片工具配置
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
var toolList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
var tabletoolList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
toolList.AddRange(tabletoolList);
toolList = toolList.Distinct().ToList();
if (tabletoolList.Except(trialCriterion.ReadingToolList).Count() > 0)
{
//---问题的阅片工具不在标准配置的阅片工具列表中
throw new BusinessValidationFailedException(_localizer["TrialConfig_TableToolNotInStdTool"]);
}
#endregion
if (trialCriterion == null)
{
return NeedSynchronize.NotNeed;

View File

@ -732,7 +732,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
try
{
List<QuestionMark?> questionMarkList = new List<QuestionMark?>() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement };
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x => questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x =>x.Answer.IsNotNullOrEmpty()&& questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
if (measuredValueList.Any(x => x > 100))
{
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);

View File

@ -484,7 +484,7 @@ namespace IRaCIS.Core.Application
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<(GetTrialReadingCriterionInfoOutDto, bool)> GetTrialReadingCriterionInfo(GetTrialReadingInfoInDto inDto)
public async Task<(GetTrialReadingCriterionInfoOutDto, object)> GetTrialReadingCriterionInfo(GetTrialReadingInfoInDto inDto)
{
GetTrialReadingCriterionInfoOutDto result = new GetTrialReadingCriterionInfoOutDto();
result.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ProjectTo<ReadingCriterionPageDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
@ -503,7 +503,9 @@ namespace IRaCIS.Core.Application
&& x.ReadingCriterionPageId == null)
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
return (result, true);
return (result, new {
ReadingVersionEnum= trialCriterion.ReadingVersionEnum
});
}
@ -553,6 +555,27 @@ namespace IRaCIS.Core.Application
[TrialGlobalLimit("AfterStopCannNotOpt")]
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
{
#region 验证阅片工具配置
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
var toolList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
var tabletoolList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
toolList.AddRange(tabletoolList);
toolList = toolList.Distinct().ToList();
if (tabletoolList.Except(trialCriterion.ReadingToolList).Count() > 0)
{
//---问题的阅片工具不在标准配置的阅片工具列表中
throw new BusinessValidationFailedException(_localizer["TrialConfig_TableToolNotInStdTool"]);
}
#endregion
ArbitrationRule arbitration = ArbitrationRule.NA;
if (inDto.IsArbitrationReading)

View File

@ -12,6 +12,10 @@ public class TrialDocument : BaseFullDeleteAuditEntity
[JsonIgnore]
public Trial Trial { get; set; }
[JsonIgnore]
public List<TrialDocumentAttachment> TrialDocumentAttachmentList { get; set; }
[JsonIgnore]
[ForeignKey("FileTypeId")]
public Dictionary FileType { get; set; }
@ -48,3 +52,45 @@ public class TrialDocument : BaseFullDeleteAuditEntity
public bool IsPublish { get; set; } = true;
}
[Comment("项目签署文档附件")]
[Table("TrialDocumentAttachment")]
public class TrialDocumentAttachment : BaseFullAuditEntity
{
[JsonIgnore]
[ForeignKey("TrialDocumentId")]
public TrialDocument TrialDocument { get; set; }
/// <summary>
/// 项目文档Id
/// </summary>
public Guid TrialDocumentId { get; set; }
public string Name { get; set; } = string.Empty;
/// <summary>
/// 文件名称
/// </summary>
public string FileName { get; set; } = string.Empty;
/// <summary>
/// 是否下线
/// </summary>
public bool OffLine { get; set; }
/// <summary>
/// 文件路径
/// </summary>
[StringLength(1000)]
public string FilePath { get; set; } = string.Empty;
/// <summary>
/// 文件大小
/// </summary>
public decimal? FileSize { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FileFormat { get; set; } = string.Empty;
}

View File

@ -2018,10 +2018,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
{
var type = GetEntityAuditOpt(item);
var extraIdentification = string.Empty;
switch (_userInfo.RequestUrl)
{
case "QCOperation/updateModality":
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
{
extraIdentification = "/2";
}
break;
}
await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = x.SubjectVisitId
ObjectRelationParentId = x.SubjectVisitId,
ExtraIndentification = extraIdentification
});
}

View File

@ -532,6 +532,8 @@ public class IRaCISDBContext : DbContext
public virtual DbSet<SystemDocument> SystemDocument { get; set; }
public virtual DbSet<SystemDocumentAttachment> SystemDocumentAttachment { get; set; }
public virtual DbSet<TrialDocument> TrialDocument { get; set; }
public virtual DbSet<TrialDocumentAttachment> TrialDocumentAttachment { get; set; }
public virtual DbSet<TrialDocNeedConfirmedUserType> TrialDocUserTypeConfirm { get; set; }
public virtual DbSet<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserType { get; set; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class TrialDocumentAttachment : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "TrialDocumentId",
table: "SystemDocumentAttachment",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateTable(
name: "TrialDocumentAttachment",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TrialDocumentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
OffLine = table.Column<bool>(type: "bit", nullable: false),
FilePath = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
FileSize = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
FileFormat = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialDocumentAttachment", x => x.Id);
},
comment: "项目签署文档附件");
migrationBuilder.CreateIndex(
name: "IX_SystemDocumentAttachment_TrialDocumentId",
table: "SystemDocumentAttachment",
column: "TrialDocumentId");
migrationBuilder.CreateIndex(
name: "IX_TrialDocumentAttachment_CreateUserId",
table: "TrialDocumentAttachment",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_TrialDocumentAttachment_TrialDocumentId",
table: "TrialDocumentAttachment",
column: "TrialDocumentId");
migrationBuilder.AddForeignKey(
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
table: "SystemDocumentAttachment",
column: "TrialDocumentId",
principalTable: "TrialDocument",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
table: "SystemDocumentAttachment");
migrationBuilder.DropTable(
name: "TrialDocumentAttachment");
migrationBuilder.DropIndex(
name: "IX_SystemDocumentAttachment_TrialDocumentId",
table: "SystemDocumentAttachment");
migrationBuilder.DropColumn(
name: "TrialDocumentId",
table: "SystemDocumentAttachment");
}
}
}

View File

@ -9790,6 +9790,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("SystemDocumentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TrialDocumentId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
@ -9802,6 +9805,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasIndex("SystemDocumentId");
b.HasIndex("TrialDocumentId");
b.ToTable("SystemDocumentAttachment", t =>
{
t.HasComment("后台 - 系统签署文档附件");
@ -11786,6 +11791,65 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("FileFormat")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<string>("FilePath")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)");
b.Property<decimal?>("FileSize")
.HasPrecision(18, 2)
.HasColumnType("decimal(18,2)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<bool>("OffLine")
.HasColumnType("bit");
b.Property<Guid>("TrialDocumentId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("UpdateTime")
.HasColumnType("datetime2");
b.Property<Guid>("UpdateUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CreateUserId");
b.HasIndex("TrialDocumentId");
b.ToTable("TrialDocumentAttachment", t =>
{
t.HasComment("项目签署文档附件");
});
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
{
b.Property<Guid>("Id")
@ -17449,6 +17513,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", null)
.WithMany("SystemDocumentAttachmentList")
.HasForeignKey("TrialDocumentId");
b.Navigation("CreateUserRole");
b.Navigation("SystemDocument");
@ -18087,6 +18155,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("Trial");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
.WithMany()
.HasForeignKey("CreateUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument")
.WithMany()
.HasForeignKey("TrialDocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreateUserRole");
b.Navigation("TrialDocument");
});
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
{
b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig")
@ -19440,6 +19527,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
{
b.Navigation("NeedConfirmedUserTypeList");
b.Navigation("SystemDocumentAttachmentList");
b.Navigation("TrialDocConfirmedUserList");
});