Compare commits

...

2 Commits

Author SHA1 Message Date
hang da27b65e56 用户登录日志 项目参与用户修改
continuous-integration/drone/push Build is passing Details
2025-02-14 16:11:48 +08:00
hang bb493fe827 修改日志,和稽查查询 2025-02-14 16:02:49 +08:00
4 changed files with 42 additions and 24 deletions

View File

@ -106,7 +106,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
//OptType = data.OptType,
IP = data.IP,
Reason = data.Reason,
IsSign = leftfrontAuditConfig.IsHaveSign && lefttrialSign.SignText!=null&& lefttrialSign.SignText!=string.Empty,
IsSign = leftfrontAuditConfig.IsHaveSign && lefttrialSign.SignText != null && lefttrialSign.SignText != string.Empty,
SignId = data.SignId,
ParentId = data.ParentId,
ChildrenTypeId = data.ChildrenTypeId,
@ -190,7 +190,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
.WhereIf(!inQuery.TaskName.IsNullOrEmpty(), x => x.TaskName.Contains(inQuery.TaskName) || x.BlindName.Contains(inQuery.TaskName))
.WhereIf(!inQuery.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(inQuery.SubjectInfo))
.WhereIf(!inQuery.RoleName.IsNullOrEmpty(), x => x.RoleName.Contains(inQuery.RoleName))
.WhereIf(!inQuery.RoleName.IsNullOrEmpty(), x => x.RoleName == inQuery.RoleName)
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
.WhereIf(inQuery.StartTime != null, x => x.CreateTime >= inQuery.StartTime)

View File

@ -94,6 +94,15 @@ namespace IRaCIS.Application.Contracts
public Guid UserId { get; set; }
}
public class TrialIdentityUserBasicInfo
{
public Guid IdentityUserId { get; set; }
public string UserName { get; set; }
public string FullName { get; set; }
}
public class TrialMaintenanceDTO : UserTrialCommand
{

View File

@ -21,10 +21,10 @@ namespace IRaCIS.Core.Application.Service
{
[HttpGet]
public async Task<List<TrialUserBasicInfo>> GetTrialUserList(Guid trialId)
public async Task<List<TrialIdentityUserBasicInfo>> GetTrialUserList(Guid trialId)
{
return await _trialUseRoleRepository.Where(t => t.TrialId == trialId, ignoreQueryFilters: true)
.Select(t => new TrialUserBasicInfo() { FullName = t.UserRole.FullName, UserId = t.UserId, UserTypeId = t.UserRole.UserTypeId, UserName = t.UserRole.IdentityUser.UserName })
return await _trialIdentityUserRepository.Where(t => t.TrialId == trialId, ignoreQueryFilters: true)
.Select(t => new TrialIdentityUserBasicInfo() { FullName = t.IdentityUser.FullName, IdentityUserId = t.IdentityUserId, UserName = t.IdentityUser.UserName })
.ToListAsync();
}

View File

@ -22,6 +22,12 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
{
if (userlog.TargetIdentityUserId != null)
{
//判断是否需要记录详情
if (userlog.OptType == UserOptType.AddUser || userlog.OptType == UserOptType.UpdateUser || userlog.OptType == UserOptType.UpdateUserRole
|| userlog.OptType == UserOptType.AccountEnable || userlog.OptType == UserOptType.AccountLocked)
{
var obj = await _identityUserRepository.Where(t => t.Id == userlog.TargetIdentityUserId).Select(t => new UserLogJsonObj()
{
@ -48,6 +54,9 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
userlog.JsonObj = obj.ToJsonStr();
}
}