修改合并
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
1856ef9483
|
@ -1450,7 +1450,7 @@
|
|||
<param name="_userInfo"></param>
|
||||
<param name="_localizer"></param>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFileType},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialFileTypeService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialFileType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SysFileType},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
项目文件类型
|
||||
</summary>
|
||||
|
|
|
@ -33,7 +33,7 @@ public class SysFileTypeAddOrEdit
|
|||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
public int SubIdentification { get; set; }
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
}
|
||||
|
||||
public class SysFileTypeQuery : PageInput
|
||||
|
@ -48,7 +48,7 @@ public class SysFileTypeQuery : PageInput
|
|||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public int? SubIdentification { get; set; }
|
||||
public SubIdentification? SubIdentificationEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@ public class TrialFileTypeView : TrialFileTypeAddOrEdit
|
|||
|
||||
}
|
||||
|
||||
public class CopySystemFileTypeToTrialInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialFileTypeSelectView
|
||||
{
|
||||
|
@ -53,7 +57,7 @@ public class TrialFileTypeAddOrEdit
|
|||
|
||||
public string NameCN { get; set; }
|
||||
|
||||
public int SubIdentification { get; set; }
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
|
||||
public Guid? SysFileTypeId { get; set; }
|
||||
|
||||
|
@ -76,8 +80,7 @@ public class TrialFileTypeQuery : PageInput
|
|||
|
||||
public string? NameCN { get; set; }
|
||||
|
||||
public int? SubIdentification { get; set; }
|
||||
|
||||
public SubIdentification? SubIdentificationEnum { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
|
@ -34,7 +34,7 @@ public class SysFileTypeService(IRepository<SysFileType> _sysFileTypeRepository,
|
|||
var sysFileTypeQueryable = _sysFileTypeRepository
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentification != null, t => t.SubIdentification == inQuery.SubIdentification)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN))
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace IRaCIS.Core.Application.Service;
|
|||
/// <param name="_localizer"></param>
|
||||
[ApiExplorerSettings(GroupName = "FileRecord")]
|
||||
public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepository,
|
||||
IRepository<SysFileType> _sysFileTypeRepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialFileTypeService
|
||||
{
|
||||
|
||||
|
@ -35,7 +36,7 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
|
|||
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentification != null, t => t.SubIdentification == inQuery.SubIdentification)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN))
|
||||
|
@ -103,6 +104,27 @@ public class TrialFileTypeService(IRepository<TrialFileType> _trialFileTypeRepos
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 复制系统数据到项目
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> CopySystemFileTypeToTrial(CopySystemFileTypeToTrialInDto inDto)
|
||||
{
|
||||
if (!(await _trialFileTypeRepository.AnyAsync(x => x.TrialId == inDto.TrialId)))
|
||||
{
|
||||
var trialFileTypeList = await _sysFileTypeRepository
|
||||
.ProjectTo<TrialFileType>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
|
||||
trialFileTypeList.ForEach(x => x.TrialId = inDto.TrialId);
|
||||
|
||||
await _trialFileTypeRepository.AddRangeAsync(trialFileTypeList, true);
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||
|
||||
|
||||
CreateMap<SysFileType, TrialFileType>()
|
||||
.ForMember(d => d.SysFileTypeId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.IsSelfDefine, u => u.MapFrom(s => false))
|
||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||
|
||||
CreateMap<TrialDocument, TrialDocumentView>()
|
||||
.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)))
|
||||
|
|
|
@ -7,22 +7,74 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public enum ArchiveType
|
||||
{
|
||||
//报告
|
||||
/// <summary>
|
||||
/// 报告
|
||||
/// </summary>
|
||||
Report = 1,
|
||||
|
||||
//文档
|
||||
/// <summary>
|
||||
/// 文档
|
||||
/// </summary>
|
||||
Doc = 2,
|
||||
|
||||
//记录
|
||||
/// <summary>
|
||||
/// 记录
|
||||
/// </summary>
|
||||
Record = 3,
|
||||
|
||||
//阅片人
|
||||
|
||||
/// <summary>
|
||||
/// 阅片人
|
||||
/// </summary>
|
||||
Reviewer = 4,
|
||||
|
||||
Template=5
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
Template = 5,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文档子类标识
|
||||
/// </summary>
|
||||
public enum SubIdentification
|
||||
{
|
||||
/// <summary>
|
||||
/// 报告
|
||||
/// </summary>
|
||||
Report = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 文档
|
||||
/// </summary>
|
||||
Doc = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 一般文件记录
|
||||
/// </summary>
|
||||
GeneralFile = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 系统数据记录
|
||||
/// </summary>
|
||||
SystemDataRecord = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
Train = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 系统数据
|
||||
/// </summary>
|
||||
SystemData = 5,
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,10 +96,15 @@ public class SysFileType : BaseFullAuditEntity
|
|||
|
||||
|
||||
[Comment("子类标识,是取那个表的数据")]
|
||||
public int SubIdentification { get; set; }
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示顺序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
}
|
||||
|
||||
[Comment("项目文件 - 文件类型表")]
|
||||
|
@ -79,10 +136,15 @@ public class TrialFileType : BaseFullAuditEntity
|
|||
|
||||
|
||||
[Comment("子类标识,是取那个表的数据")]
|
||||
public int SubIdentification { get; set; }
|
||||
public SubIdentification SubIdentificationEnum { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示顺序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
18921
IRaCIS.Core.Infra.EFCore/Migrations/20250224054151_SysFileType.Designer.cs
generated
Normal file
18921
IRaCIS.Core.Infra.EFCore/Migrations/20250224054151_SysFileType.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,60 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SysFileType : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SubIdentification",
|
||||
table: "TrialFileType",
|
||||
newName: "SubIdentificationEnum");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SubIdentification",
|
||||
table: "SysFileType",
|
||||
newName: "SubIdentificationEnum");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ShowOrder",
|
||||
table: "TrialFileType",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ShowOrder",
|
||||
table: "SysFileType",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShowOrder",
|
||||
table: "TrialFileType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShowOrder",
|
||||
table: "SysFileType");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SubIdentificationEnum",
|
||||
table: "TrialFileType",
|
||||
newName: "SubIdentification");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "SubIdentificationEnum",
|
||||
table: "SysFileType",
|
||||
newName: "SubIdentification");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8938,7 +8938,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<int>("SubIdentification")
|
||||
b.Property<int>("ShowOrder")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SubIdentificationEnum")
|
||||
.HasColumnType("int")
|
||||
.HasComment("子类标识,是取那个表的数据");
|
||||
|
||||
|
@ -11804,191 +11807,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFile", 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<string>("FileSize")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid>("TrialFileTypeId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("关联项目文件类型");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.ToTable("TrialFile", t =>
|
||||
{
|
||||
t.HasComment("项目文件 - 文件表");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFileType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ArchiveTypeEnum")
|
||||
.HasColumnType("int")
|
||||
.HasComment("报告、文档、记录");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateOnly>("FirstFinalDate")
|
||||
.HasColumnType("date")
|
||||
.HasComment("首次定稿日期");
|
||||
|
||||
b.Property<bool>("IsConfirmRecord")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否确认收入项");
|
||||
|
||||
b.Property<bool>("IsEnable")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsSelfDefine")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否自定义");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("NameCN")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<int>("SubIdentification")
|
||||
.HasColumnType("int")
|
||||
.HasComment("子类标识,是取那个表的数据");
|
||||
|
||||
b.Property<Guid?>("SysFileTypeId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("关联系统文件类型");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.ToTable("TrialFileType", t =>
|
||||
{
|
||||
t.HasComment("项目文件 - 文件类型表");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialFinalRecord", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("HistoryFileRecordId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("历史记录");
|
||||
|
||||
b.Property<bool>("IsAuthorizedView")
|
||||
.HasColumnType("bit")
|
||||
.HasComment("是否授权查看");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid>("PDFFileRecordId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("定稿PDF");
|
||||
|
||||
b.Property<Guid>("SignFileRecordId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("签名页");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("TrialFileTypeId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("关联项目文件类型");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Version")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid>("WordFileRecordId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("定稿Word");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.ToTable("TrialFinalRecord", t =>
|
||||
{
|
||||
t.HasComment("项目文件 - 定稿记录表");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialIdentityUser", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
Loading…
Reference in New Issue