Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
8ce1bdf21c
|
@ -477,6 +477,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
&& t.TrialUserRoleList.AsQueryable().Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId))
|
||||
)
|
||||
.Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true)
|
||||
.Where(t => inQuery.UserTypeId != null ? t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == inQuery.UserTypeId) : true)
|
||||
|
||||
|
||||
join confirm in _trialDocConfirmedUserRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) on
|
||||
new { trialUser.IdentityUserId, TrialDocumentId = trialDoc.Id } equals new { IdentityUserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
@ -514,10 +516,11 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var systemDocQuery =
|
||||
from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(u => trialInfo.TrialFinishedTime != null ? u.CreateTime < trialInfo.TrialFinishedTime : true)
|
||||
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
||||
from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId
|
||||
&& t.TrialUserRoleList.Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId)))
|
||||
.Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true)
|
||||
|
||||
.Where(t => inQuery.UserTypeId != null ? t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == inQuery.UserTypeId) : true)
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = trialUser.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
/// </summary>
|
||||
public string OpByUserName { get; set; } = string.Empty;
|
||||
|
||||
public string? CreateUserName { get; set; }
|
||||
public string? CreateUserRealName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅读片人
|
||||
|
|
|
@ -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)
|
||||
|
@ -198,7 +198,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
.WhereIf(inQuery.ModuleType != null, x => x.ModuleTypeId == inQuery.ModuleType)
|
||||
.WhereIf(!inQuery.Description.IsNullOrEmpty(), x => x.Description.Contains(inQuery.Description) || x.DescriptionCN.Contains(inQuery.Description))
|
||||
.WhereIf(!inQuery.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(inQuery.OpByUserName))
|
||||
.WhereIf(!inQuery.CreateUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(inQuery.CreateUserName) || x.CreateUserRealName.Contains(inQuery.CreateUserName))
|
||||
.WhereIf(!inQuery.CreateUserRealName.IsNullOrEmpty(), x => x.CreateUserName.Contains(inQuery.CreateUserRealName) || x.CreateUserRealName.Contains(inQuery.CreateUserRealName))
|
||||
|
||||
//.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
|
||||
.WhereIf(inQuery.IsSign != null, x => x.IsSign == inQuery.IsSign);
|
||||
|
|
|
@ -56,12 +56,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
public UserTypeEnum? LoginUserTypeEnum { get; set; }
|
||||
public string? LoginUserType { get; set; }
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
public Guid? IdentityUserId { get; set; }
|
||||
|
||||
public Guid? TargetIdentityUserId { get; set; }
|
||||
|
||||
public bool? IsLoginUncommonly { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IRepository<IdentityUser> _identityUserRepository,
|
||||
IRepository<Doctor> _doctorRepository,
|
||||
|
||||
ISearcher _searcher, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IUserService
|
||||
{
|
||||
|
||||
|
@ -942,9 +941,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
DateTime? trialCreateTime = inQuery.TrialId != null ? _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.CreateTime).FirstOrDefault() : null;
|
||||
|
||||
|
||||
|
||||
var userLogQueryable =
|
||||
_userLogRepository.AsQueryable().IgnoreQueryFilters()
|
||||
.WhereIf(inQuery.IdentityUserId != null, t => t.ActionIdentityUserId == inQuery.IdentityUserId || t.TargetIdentityUserId == inQuery.IdentityUserId)
|
||||
.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))
|
||||
.WhereIf(trialCreateTime != null, t => t.CreateTime >= trialCreateTime)
|
||||
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
|
||||
|
@ -954,7 +956,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.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!))
|
||||
.WhereIf(inQuery.LoginUserTypeEnum != null, t => t.CreateUserRole.UserTypeEnum == inQuery.LoginUserTypeEnum)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserType), t => t.ActionUserType == inQuery.LoginUserType)
|
||||
.WhereIf(inQuery.UserTypeId != null, t => t.CreateUserRole.UserTypeId == inQuery.UserTypeId)
|
||||
|
||||
.ProjectTo<UserLogView>(_mapper.ConfigurationProvider);
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue