@@ -29,7 +29,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<QCChallenge> _qCChallengeRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
|
||||
IRepository<CheckChallengeDialog> _checkChallengeDialogRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IFrontAuditConfigService
|
||||
{
|
||||
@@ -60,19 +60,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
case AccessToDialogueEnum.Question:
|
||||
|
||||
AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUser).Select(x => new AccessToDialogueOutDto()
|
||||
AccessToDialogueOutDto title = (await _qCChallengeRepository.Where(x => x.Id == inDto.Id).Include(x => x.CreateUserRole).Select(x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.Content,
|
||||
IsTitle = true,
|
||||
}).FirstOrDefaultAsync()) ?? new AccessToDialogueOutDto();
|
||||
|
||||
data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select(
|
||||
data = await _qCChallengeDialogRepository.Where(x => x.QCChallengeId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select(
|
||||
x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.TalkContent
|
||||
}
|
||||
).OrderBy(x => x.CreateTime).ToListAsync();
|
||||
@@ -81,11 +81,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
break;
|
||||
case AccessToDialogueEnum.Consistency:
|
||||
data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUser).Select(
|
||||
data = await _checkChallengeDialogRepository.Where(x => x.SubjectVisitId == inDto.Id && x.CreateTime <= inDto.Createtime).Include(x => x.CreateUserRole).Select(
|
||||
x => new AccessToDialogueOutDto()
|
||||
{
|
||||
CreateTime = x.CreateTime,
|
||||
CreateUserName = x.CreateUser.UserName,
|
||||
CreateUserName = x.CreateUserRole.UserName,
|
||||
TalkContent = x.TalkContent
|
||||
}
|
||||
).OrderBy(x => x.CreateTime).ToListAsync();
|
||||
@@ -401,7 +401,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//用户的数据稽查没有 临时处理
|
||||
|
||||
|
||||
var userObj = await _userRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
||||
var userObj = await _userRoleRepository.Where(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
||||
|
||||
if (userObj != null)
|
||||
{
|
||||
@@ -1074,14 +1074,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
//IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(),
|
||||
IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(),
|
||||
ParentId = item.AddItemGuid,
|
||||
CreateUserId = _userInfo.Id,
|
||||
CreateUserId = _userInfo.UserRoleId,
|
||||
IsEnable = lst.Select(x => x.IsEnable).FirstOrDefault(),
|
||||
DictionaryKey = lst.Select(x => x.DictionaryKey).FirstOrDefault(),
|
||||
EnumType = lst.Select(x => x.EnumType).FirstOrDefault(),
|
||||
UpdateTime = DateTime.Now,
|
||||
ValueCN = lst.Select(x => x.ValueCN).FirstOrDefault(),
|
||||
Value = lst.Max(x => x.Value),
|
||||
UpdateUserId = _userInfo.Id,
|
||||
UpdateUserId = _userInfo.UserRoleId,
|
||||
ChildrenTypeId = additem?.ChildrenTypeId,
|
||||
ModuleTypeId = additem?.ModuleTypeId,
|
||||
ObjectTypeId = additem?.ObjectTypeId,
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
public class InspectionService(IRepository<DataInspection> _dataInspectionRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<TrialSign> _trialSignRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialSite> _trialSiteRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
@@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
from leftsubjectVisit in subjectVisittemp.DefaultIfEmpty()
|
||||
join parent in _dataInspectionRepository.Where() on data.ParentId equals parent.Id into parenttemp
|
||||
from leftparent in parenttemp.DefaultIfEmpty()
|
||||
join user in _userRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp
|
||||
join user in _userRoleRepository.Where().IgnoreQueryFilters() on data.CreateUserId equals user.Id into usertemp
|
||||
from leftuser in usertemp.DefaultIfEmpty()
|
||||
join usertype in _userTypeRepository.Where().IgnoreQueryFilters() on leftuser.UserTypeId equals usertype.Id into usertypetemp
|
||||
from leftusertype in usertypetemp.DefaultIfEmpty()
|
||||
@@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
/// <summary> 验证用户签名信息 </summary> ///
|
||||
public async Task<IResponseOutput> VerifySignatureAsync(SignDTO signDTO)
|
||||
{
|
||||
var user = await _userRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord);
|
||||
var user = await _userRoleRepository.FirstOrDefaultAsync(u => u.UserName == signDTO.UserName && u.Password == signDTO.PassWord);
|
||||
if (user == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["User_CheckNameOrPw"]);
|
||||
|
||||
Reference in New Issue
Block a user