稽查记录管理修改-是否查看培训记录
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a85cc1236c
commit
c7e29116dd
|
|
@ -84,6 +84,13 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<AuditRecordView>> GetAuditRecordList(AuditRecordQuery inQuery)
|
||||
{
|
||||
var isEA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA;
|
||||
|
||||
//EA 但是没有在进行的培训记录查看权限,那么返回空数据
|
||||
if (isEA && !_auditRecordRepository.Any(t => t.IsViewTrainingRecord && t.AuditState == AuditState.Ongoing))
|
||||
{
|
||||
return new PageOutput<AuditRecordView>();
|
||||
}
|
||||
|
||||
var auditRecordQueryable = _auditRecordRepository
|
||||
.WhereIf(inQuery.BeginAuditTime != null, t => t.AuditTime >= inQuery.BeginAuditTime)
|
||||
|
|
@ -693,7 +700,7 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
|||
public async Task<IResponseOutput> CopyFileOrFolder(MovieFileOrFolderInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var item in inDto.Ids)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public class AuditRecordAddOrEdit
|
|||
|
||||
public AuditType AuditType { get; set; }
|
||||
|
||||
public bool IsViewTrainingRecord { get; set; }
|
||||
|
||||
//public List<Guid> IdnetityUserIdList { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -144,6 +144,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[Comment("稽查形式")]
|
||||
public AuditType AuditType { get; set; }
|
||||
|
||||
public bool IsViewTrainingRecord { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
20347
IRaCIS.Core.Infra.EFCore/Migrations/20251013075721_addTraningView.Designer.cs
generated
Normal file
20347
IRaCIS.Core.Infra.EFCore/Migrations/20251013075721_addTraningView.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addTraningView : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsViewTrainingRecord",
|
||||
table: "AuditRecord",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsViewTrainingRecord",
|
||||
table: "AuditRecord");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -221,6 +221,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<DateTime?>("EndTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("IsViewTrainingRecord")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("UpdateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue