@@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<Hospital> _hospitalRepository,
|
||||
IRepository<EnrollDetail> _enrollDetailRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<UserRole> _userRoleRepository,
|
||||
IRepository<TrialUser> _userTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IStatisticsService
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
else //不管是精鼎的pm还是我们的pm 还是运维人员 只能看到自己参与项目的统计
|
||||
{
|
||||
List<Guid> trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.Id).Select(u => u.TrialId).ToList();
|
||||
List<Guid> trialIdList = _userTrialRepository.Where(u => u.UserId == _userInfo.UserRoleId).Select(u => u.TrialId).ToList();
|
||||
trialLambda = trialLambda.And(u => trialIdList.Contains(u.Id));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(inQuery.TrialCode))
|
||||
@@ -370,7 +370,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public PageOutput<UserParticipateTrialStat> GetParticipateTrialStat(ParticipateQueryDto param)
|
||||
{
|
||||
|
||||
Expression<Func<User, bool>> userLambda = x => true;
|
||||
Expression<Func<UserRole, bool>> userLambda = x => true;
|
||||
Expression<Func<TrialUser, bool>> userTrialLambda = x => true;
|
||||
if (!string.IsNullOrEmpty(param.UserInfo))
|
||||
{
|
||||
@@ -385,7 +385,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
var userTypeEnumStr = _userInfo.UserTypeEnumStr;
|
||||
var userId = _userInfo.Id;
|
||||
var userId = _userInfo.UserRoleId;
|
||||
|
||||
|
||||
//PM 进来只能看到他负责的项目下的参与人员列表
|
||||
@@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
|
||||
var userQuery = from trialStat in trialStatQuery
|
||||
join user in _userRepository.Where(userLambda) on trialStat.UserId equals user.Id
|
||||
join user in _userRoleRepository.Where(userLambda) on trialStat.UserId equals user.Id
|
||||
select new UserParticipateTrialStat
|
||||
{
|
||||
Email = user.EMail,
|
||||
@@ -441,7 +441,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
Expression<Func<TrialUser, bool>> userTrialLambda = x => x.UserId == userId;
|
||||
|
||||
var userTypeEnum = _userInfo.UserTypeEnumStr;
|
||||
var loginUserId = _userInfo.Id;
|
||||
var loginUserId = _userInfo.UserRoleId;
|
||||
|
||||
|
||||
//PM 进来只能看到他负责的项目下的参与人员列表
|
||||
|
||||
Reference in New Issue
Block a user