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

This commit is contained in:
he
2025-02-25 10:38:14 +08:00
8 changed files with 29 additions and 4 deletions
@@ -311,6 +311,8 @@ namespace IRaCIS.Application.Contracts
public DateTime? BeginLastChangePassWordTime { get; set; }
public DateTime? EndLastChangePassWordTime { get; set; }
public UserCeateSource? UserCeateSource { get; set; }
}
public class UserRoleInfoDTO
@@ -95,6 +95,7 @@ namespace IRaCIS.Core.Application.Contracts
public class UserTypeSelectDto
{
public bool IsDeleted { get; set; }
public Guid UserTypeId { get; set; }
public string UserTypeShortName { get; set; } = string.Empty;
}
@@ -514,6 +514,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState)
.WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser)
.WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun)
.WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource)
.ProjectTo<UserListDTO>(_mapper.ConfigurationProvider);
return await userQueryable.ToPagedListAsync(inQuery);
@@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.Contracts
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin && x.IsEnable==true)
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
@@ -139,6 +139,11 @@ namespace IRaCIS.Application.Contracts
public DateTime? JoinTime { get; set; }
public string Roles => string.Join(',', TrialUserRoleList.Select(t => t.UserTypeShortName));
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
}
public class TrialMaintenanceDTO : UserTrialCommand
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service
}
[HttpPost]
public async Task<PageOutput<IdentityUserJoinedTrialView>> GetUserJoinedTrialList(IdentityUserJoinedTrialQuery inQuery)
public async Task<IResponseOutput<PageOutput<IdentityUserJoinedTrialView>>> GetUserJoinedTrialList(IdentityUserJoinedTrialQuery inQuery)
{
var list = await _trialIdentityUserRepository.Where(t => t.IdentityUserId == inQuery.IdentityUserId, false, true)
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialCode), o => o.Trial.TrialCode.Contains(inQuery.TrialCode))
@@ -50,11 +50,14 @@ namespace IRaCIS.Core.Application.Service
IsDeleted = t.IsDeleted,
JoinTime = t.JoinTime,
RemoveTime = t.RemoveTime,
TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(),
TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { IsDeleted = t.IsDeleted, UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(),
}).ToPagedListAsync(inQuery);
return list;
var info = await _trialIdentityUserRepository.Where(t => t.IdentityUserId == inQuery.IdentityUserId).Select(t =>
new { t.IdentityUser.CreateTime, t.IdentityUser.UserCeateSource, t.Trial.ResearchProgramNo, t.Trial.TrialCode }).FirstOrDefaultAsync();
return ResponseOutput.Ok(list, info);
}
#region