增加用户映射
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2024-12-25 17:55:49 +08:00
parent 473e218b2b
commit 53bcdaa6ce
4 changed files with 46 additions and 32 deletions

View File

@ -163,6 +163,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<UserRole, IdentityUserTypeDTO>() CreateMap<UserRole, IdentityUserTypeDTO>()
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName)); .ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
CreateMap<UserBasicInfoCommand, IdentityUser>();
} }
} }

View File

@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service
var doctorIntoGroupQueryable = var doctorIntoGroupQueryable =
from intoGroup in _enrollRepository.Where(x => x.TrialId == trialId && x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup) from intoGroup in _enrollRepository.Where(x => x.TrialId == trialId && x.EnrollStatus >= EnrollStatus.ConfirmIntoGroup)
join allocateRule in _taskAllocationRuleRepository.AsQueryable() on intoGroup.Id equals allocateRule.EnrollId join allocateRule in _taskAllocationRuleRepository.Where(x => x.TrialId == trialId) on intoGroup.Id equals allocateRule.EnrollId
join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id
join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc
from attachment in cc.DefaultIfEmpty() from attachment in cc.DefaultIfEmpty()

View File

@ -161,6 +161,8 @@ namespace IRaCIS.Core.Application.Service
{ {
_userInfo.IsNotNeedInspection = true; _userInfo.IsNotNeedInspection = true;
if ((await _identityUserRepository.FirstOrDefaultAsync()) == null)
{
var userList = _userRoleRepository.Where().ToList(); var userList = _userRoleRepository.Where().ToList();
foreach (var item in userList.GroupBy(t => t.EMail.Trim())) foreach (var item in userList.GroupBy(t => t.EMail.Trim()))
@ -179,6 +181,9 @@ namespace IRaCIS.Core.Application.Service
} }
await _identityUserRepository.SaveChangesAsync(); await _identityUserRepository.SaveChangesAsync();
}
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }
@ -192,6 +197,9 @@ namespace IRaCIS.Core.Application.Service
{ {
_userInfo.IsNotNeedInspection = true; _userInfo.IsNotNeedInspection = true;
if ((await _trialIdentityUserRepository.FirstOrDefaultAsync()) == null)
{
var list = _trialUserRoleReposiotry.Where().Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime }).ToList(); var list = _trialUserRoleReposiotry.Where().Select(t => new { t.TrialId, t.UserRole.IdentityUserId, t.UserId, t.JoinTime, t.RemoveTime }).ToList();
@ -223,6 +231,9 @@ namespace IRaCIS.Core.Application.Service
} }
await _trialIdentityUserRepository.SaveChangesAsync(); await _trialIdentityUserRepository.SaveChangesAsync();
}
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }

View File

@ -52,6 +52,8 @@ public partial class Enroll : BaseFullAuditEntity
public int? Global { get; set; } public int? Global { get; set; }
public int? Downtime { get; set; } public int? Downtime { get; set; }
[Comment("生成账号 加入到项目中后 赋值")] [Comment("生成账号 加入到项目中后 赋值")]
public Guid? DoctorUserId { get; set; } public Guid? DoctorUserId { get; set; }
} }