代码修改
parent
adaa672185
commit
06e319cf09
|
@ -50,6 +50,8 @@ public class SysFileTypeQuery : PageInput
|
|||
{
|
||||
public ArchiveType? ArchiveTypeEnum { get; set; }
|
||||
|
||||
public SysTemplateType? SysTemplateTypeEnum { get; set; }
|
||||
|
||||
public bool? IsConfirmRecord { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
|
|
@ -17,6 +17,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
public int AttachmentCount { get; set; }
|
||||
|
||||
public List<NeedConfirmedUserTypeView> NeedConfirmedUserTypeList { get; set; } = new List<NeedConfirmedUserTypeView>();
|
||||
}
|
||||
|
||||
|
@ -46,6 +48,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public class UnionDocumentWithConfirmInfoView : UnionDocumentView
|
||||
{
|
||||
|
||||
public DateTime UserCreateTime { get; set; }
|
||||
|
||||
|
||||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
|
||||
|
@ -58,6 +63,24 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string RealName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public int AttachmentCount { get; set; }
|
||||
|
||||
public DateTime? SuggestFinishTime { get {
|
||||
|
||||
if (this.CreateTime > this.UserCreateTime && this.CurrentStaffTrainDays != null)
|
||||
{
|
||||
return this.CreateTime.AddDays(this.CurrentStaffTrainDays.Value);
|
||||
}
|
||||
|
||||
if (this.CreateTime < this.UserCreateTime && this.NewStaffTrainDays != null)
|
||||
{
|
||||
return this.UserCreateTime.AddDays(this.NewStaffTrainDays.Value);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
} }
|
||||
|
||||
public string DocTypeCode { get; set; }
|
||||
|
||||
public List<string> UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List<string>();
|
||||
|
|
|
@ -33,6 +33,7 @@ public class SysFileTypeService(IRepository<SysFileType> _sysFileTypeRepository,
|
|||
|
||||
var sysFileTypeQueryable = _sysFileTypeRepository
|
||||
.WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum)
|
||||
.WhereIf(inQuery.SysTemplateTypeEnum != null, t => t.SysTemplateTypeEnum == inQuery.SysTemplateTypeEnum)
|
||||
.WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord)
|
||||
.WhereIf(inQuery.SubIdentificationEnum != null, t => t.SubIdentificationEnum == inQuery.SubIdentificationEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
|
|
|
@ -164,9 +164,12 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
AttachmentCount=sysDoc.SystemDocumentAttachmentList.Count(),
|
||||
IsSystemDoc = true,
|
||||
|
||||
CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays,
|
||||
NewStaffTrainDays = sysDoc.NewStaffTrainDays,
|
||||
Id = sysDoc.Id,
|
||||
UserCreateTime= user.CreateTime,
|
||||
CreateTime = sysDoc.CreateTime,
|
||||
IsDeleted = sysDoc.IsDeleted,
|
||||
SignViewMinimumMinutes = sysDoc.SignViewMinimumMinutes,
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<AuditDocument, AuditDocumentData>();
|
||||
CreateMap<AuditDocument, AuditDocumentAddOrEdit>().ReverseMap();
|
||||
CreateMap<SystemDocument, SystemDocumentView>()
|
||||
.ForMember(d => d.AttachmentCount, u => u.MapFrom(s => s.SystemDocumentAttachmentList.Count()))
|
||||
.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));
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ public class SystemDocument : BaseFullDeleteAuditEntity
|
|||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public List<SystemDocConfirmedIdentityUser> SystemDocConfirmedUserList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SystemDocumentAttachment> SystemDocumentAttachmentList { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<SystemDocNeedConfirmedUserType> NeedConfirmedUserTypeList { get; set; }
|
||||
[JsonIgnore]
|
||||
|
@ -35,12 +39,18 @@ public class SystemDocument : BaseFullDeleteAuditEntity
|
|||
/// 新员工培训天数
|
||||
/// </summary>
|
||||
public int? NewStaffTrainDays { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
[Comment("后台 - 系统签署文档附件")]
|
||||
[Table("SystemDocumentAttachment")]
|
||||
public class SystemDocumentAttachment : BaseFullAuditEntity
|
||||
{
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SystemDocumentId")]
|
||||
public SystemDocument SystemDocument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统文档Id
|
||||
/// </summary>
|
||||
|
|
|
@ -530,6 +530,7 @@ public class IRaCISDBContext : DbContext
|
|||
|
||||
#region Document
|
||||
public virtual DbSet<SystemDocument> SystemDocument { get; set; }
|
||||
public virtual DbSet<SystemDocumentAttachment> SystemDocumentAttachment { get; set; }
|
||||
public virtual DbSet<TrialDocument> TrialDocument { get; set; }
|
||||
public virtual DbSet<TrialDocNeedConfirmedUserType> TrialDocUserTypeConfirm { get; set; }
|
||||
public virtual DbSet<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserType { get; set; }
|
||||
|
|
19412
IRaCIS.Core.Infra.EFCore/Migrations/20250414032353_SystemDocumentAttachment1.Designer.cs
generated
Normal file
19412
IRaCIS.Core.Infra.EFCore/Migrations/20250414032353_SystemDocumentAttachment1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SystemDocumentAttachment1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SystemDocumentAttachment",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SystemDocumentId = table.Column<Guid>(type: "uniqueidentifier", 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_SystemDocumentAttachment", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SystemDocumentAttachment_User_CreateUserId",
|
||||
column: x => x.CreateUserId,
|
||||
principalTable: "User",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
},
|
||||
comment: "后台 - 系统签署文档附件");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SystemDocumentAttachment_CreateUserId",
|
||||
table: "SystemDocumentAttachment",
|
||||
column: "CreateUserId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SystemDocumentAttachment");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9700,6 +9700,58 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", 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<bool>("OffLine")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid>("SystemDocumentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("UpdateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.ToTable("SystemDocumentAttachment", t =>
|
||||
{
|
||||
t.HasComment("后台 - 系统签署文档附件");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
@ -17279,6 +17331,17 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Navigation("FileType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemDocumentAttachment", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreateUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.SystemNotice", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
|
|
Loading…
Reference in New Issue