Uat_Study
parent
dd7c710c90
commit
73fa081d50
|
@ -290,7 +290,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
await _trialSiteUserRepository.AddRangeAsync(addArray);
|
await _trialSiteUserRepository.AddRangeAsync(addArray);
|
||||||
|
|
||||||
return ResponseOutput.Result(await _trialSiteUserRepository.SaveChangesAsync());
|
await _trialSiteUserRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 删除CRC人员</summary>
|
/// <summary> 删除CRC人员</summary>
|
||||||
|
|
|
@ -62,8 +62,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public TrialUser TrialUser { get; set; }
|
public TrialUser TrialUser { get; set; }
|
||||||
[ForeignKey("UserId")]
|
|
||||||
public UserType UserTypeRole { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,15 +311,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync();
|
entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var user = new User();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (entity.User == null)
|
if (entity.User == null)
|
||||||
{
|
{
|
||||||
entity.User = await _dbContext.User.Where(x => x.Id == entity.UserId).FirstOrDefaultAsync();
|
user = await _dbContext.User.Where(x => x.Id == entity.UserId).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = entity.User;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.UserTypeRole == null)
|
// 这里有问题
|
||||||
{
|
|
||||||
entity.UserTypeRole = await _dbContext.UserType.Where(x => x.Id == entity.User.UserTypeId).FirstOrDefaultAsync();
|
UserType userType = new UserType();
|
||||||
}
|
userType = await _dbContext.UserType.Where(x => x.Id == user.UserTypeId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
await InsertInspection<TrialSiteUser>(item, type, x => new DataInspection()
|
await InsertInspection<TrialSiteUser>(item, type, x => new DataInspection()
|
||||||
{
|
{
|
||||||
|
@ -332,11 +340,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
City = entity.Site.City,
|
City = entity.Site.City,
|
||||||
Country = entity.Site.Country,
|
Country = entity.Site.Country,
|
||||||
Status = entity.IsDeleted ? "禁用" : "启用",
|
Status = entity.IsDeleted ? "禁用" : "启用",
|
||||||
UserName = entity.User.UserName,
|
UserName = user.UserName,
|
||||||
UserRealName = entity.User.FullName,
|
UserRealName = user.FullName,
|
||||||
UserType= entity.UserTypeRole.UserTypeShortName,
|
UserType = userType.UserTypeShortName,
|
||||||
Phone= entity.User.Phone,
|
Phone = user.Phone,
|
||||||
Email= entity.User.EMail,
|
Email = user.EMail,
|
||||||
Organization = entity.User.OrganizationName,
|
Organization = entity.User.OrganizationName,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue