Test_IRC_Net8
he 2025-04-09 09:45:49 +08:00
parent 8213c6d10f
commit 68d69181a9
8 changed files with 19247 additions and 14 deletions

View File

@ -16,30 +16,30 @@ namespace IRaCIS.Core.API;
public enum SwaggerVersion
{
[Description("文件记录")]
[Description("文件记录(FileRecord)")]
FileRecord = -1,
[Description("医生模块")]
[Description("医生模块(Reviewer)")]
Reviewer = 1,
[Description("项目模块")]
[Description("项目模块(Trial)")]
Trial = 2,
[Description("入组模块")]
[Description("入组模块(Enroll)")]
Enroll = 3,
[Description("工作量模块")]
[Description("工作量模块(Workload)")]
Workload = 4,
[Description("通用信息获取")]
[Description("通用信息获取(Common)")]
Common = 5,
[Description("机构信息模块")]
[Description("机构信息模块(Institution)")]
Institution = 6,
[Description("统计模块")]
[Description("统计模块(DashboardStatistics)")]
DashboardStatistics = 7,
[Description("财务模块")]
[Description("财务模块(Financial)")]
Financial = 8,
[Description("管理模块")]
[Description("管理模块(Management)")]
Management =9,
[Description("影像模块")]
[Description("影像模块(Image)")]
Image =10,
[Description("读片模块")]
[Description("读片模块(Reading)")]
Reading =11
};

View File

@ -2645,6 +2645,13 @@
<returns></returns>
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserService.SetIsIgnoreUncommonly(IRaCIS.Core.Application.ViewModel.SetIsIgnoreUncommonlyInDto)">
<summary>
设置是否忽略异地登录
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.UserService.GetUserLoginRoleList(IRaCIS.Application.Contracts.IRCLoginDto,IRaCIS.Core.Application.Auth.ITokenService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
<summary>
账号验证,获取账号角色信息 获取临时token

View File

@ -27,6 +27,7 @@ namespace IRaCIS.Core.Application.ViewModel
public bool IsLoginUncommonly { get; set; }
public bool IsIgnoreUncommonly { get; set; }
public string JsonObj { get; set; }
@ -43,6 +44,13 @@ namespace IRaCIS.Core.Application.ViewModel
public UserMFAType MFAType { get; set; } = UserMFAType.Login;
}
public class SetIsIgnoreUncommonlyInDto
{
public Guid Id { get; set; }
public bool IsIgnoreUncommonly { get; set; }
}
///<summary>UserLogQuery 列表查询参数模型</summary>
public class UserLogQuery : PageInput
{
@ -50,10 +58,13 @@ namespace IRaCIS.Core.Application.ViewModel
public List<UserOptType>? OptTypeList { get; set; }
public List<UserOptType> OptTypeList { get; set; } = new List<UserOptType>();
public string? IP { get; set; }
public string? LoginFaildName { get; set; }
public string? LoginUserName { get; set; }
public DateTime? BeginDate { get; set; }

View File

@ -835,7 +835,17 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok();
}
/// <summary>
/// 设置是否忽略异地登录
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SetIsIgnoreUncommonly(SetIsIgnoreUncommonlyInDto inDto)
{
await _userLogRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new UserLog() { IsIgnoreUncommonly = inDto.IsIgnoreUncommonly }, true);
return ResponseOutput.Ok();
}
[HttpPost]
public async Task<PageOutput<UserLogView>> GetUserLogList(UserLogQuery inQuery)
@ -846,6 +856,7 @@ namespace IRaCIS.Core.Application.Service
var userLogQueryable =
_userLogRepository.AsQueryable().IgnoreQueryFilters()
.WhereIf(inQuery.OptTypeList.Count()>0, t => inQuery.OptTypeList.Contains(t.OptType))
.WhereIf(inQuery.IdentityUserId != null, t => t.ActionIdentityUserId == inQuery.IdentityUserId)
.WhereIf(inQuery.TargetIdentityUserId != null, t => t.TargetIdentityUserId == inQuery.TargetIdentityUserId)
.WhereIf(inQuery.TrialId != null, t => t.ActionIdentityUser.UserTrialList.Any(c => c.TrialId == inQuery.TrialId) || t.TargetIdentityUser.UserTrialList.Any(c => c.TrialId == inQuery.TrialId))
@ -853,7 +864,8 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.OptTypeList != null && inQuery.OptTypeList.Count > 0, t => inQuery.OptTypeList.Contains(t.OptType))
.WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
.WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate)
.WhereIf(inQuery.IsLoginUncommonly != null, t => t.IsLoginUncommonly == inQuery.IsLoginUncommonly)
.WhereIf(inQuery.IsLoginUncommonly != null && inQuery.IsLoginUncommonly.Value, t => t.IsLoginUncommonly&&!t.IsIgnoreUncommonly)
.WhereIf(inQuery.IsLoginUncommonly != null && !inQuery.IsLoginUncommonly.Value, t => !t.IsLoginUncommonly || t.IsIgnoreUncommonly)
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!))

View File

@ -44,6 +44,9 @@ public class UserLog : BaseAddAuditEntity
[Comment("异地登录")]
public bool IsLoginUncommonly { get; set; }
[Comment("是否忽略异地登录")]
public bool IsIgnoreUncommonly { get; set; }
#region 后续删除

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class IsIgnoreUncommonly : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsIgnoreUncommonly",
table: "UserLog",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否忽略异地登录");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsIgnoreUncommonly",
table: "UserLog");
}
}
}

View File

@ -13549,6 +13549,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b.Property<bool>("IsIgnoreUncommonly")
.HasColumnType("bit")
.HasComment("是否忽略异地登录");
b.Property<bool>("IsLoginUncommonly")
.HasColumnType("bit")
.HasComment("异地登录");