修改项目下拉列表
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
2f57238f66
commit
b25dec68cb
|
@ -961,6 +961,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
question.RelevanceId = copyNewQuestionList.Where(y => x.RelevanceId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
}
|
||||
if (question.GroupId != null)
|
||||
{
|
||||
question.GroupId = copyNewQuestionList.Where(y => x.GroupId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
}
|
||||
needAddDatas.Add(question);
|
||||
};
|
||||
|
||||
|
@ -977,7 +981,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
var tableQuestion = x.Clone();
|
||||
tableQuestion.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||
tableQuestion.Id = NewId.NextGuid();
|
||||
if (tableQuestion.ParentId != null)
|
||||
tableQuestion.ReadingQuestionId = copyNewQuestionList.Where(y => x.ReadingQuestionId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
if (tableQuestion.ParentId != null)
|
||||
{
|
||||
tableQuestion.ParentId = copeNewSystemTableQuestionList.Where(y => x.ParentId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
}
|
||||
|
@ -989,7 +994,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
tableQuestion.DependParentId = copeNewSystemTableQuestionList.Where(y => x.DependParentId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
}
|
||||
needAddTableDatas.Add(tableQuestion);
|
||||
if (tableQuestion.ClassifyTableQuestionId != null)
|
||||
{
|
||||
tableQuestion.ClassifyTableQuestionId = copeNewSystemTableQuestionList.Where(y => x.ClassifyTableQuestionId == y.OriginalId).Select(y => y.Id).FirstOrDefault();
|
||||
}
|
||||
needAddTableDatas.Add(tableQuestion);
|
||||
}
|
||||
await _readingTableQuestionSystemRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.NewSystemCriterionId);
|
||||
await _readingTableQuestionSystemRepository.AddRangeAsync(needAddTableDatas);
|
||||
|
|
|
@ -105,11 +105,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
//过滤废除的项目
|
||||
public async Task<List<TrialSelectDTO>> GetTrialSelect()
|
||||
{
|
||||
|
||||
List<int> sap = new List<int>() { (int)UserTypeEnum.SuperAdmin, (int)UserTypeEnum.Admin, (int)UserTypeEnum.OP };
|
||||
|
||||
List<int> sapp = new List<int>() { (int)UserTypeEnum.SuperAdmin, (int)UserTypeEnum.Admin, (int)UserTypeEnum.OP, (int)UserTypeEnum.ProjectManager };
|
||||
|
||||
return await _trialRepository.AsQueryable()
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP,
|
||||
t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)) && t.IsDeleted == false)
|
||||
.Where(t=>t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))
|
||||
&& (t.TrialStatusStr != StaticData.TrialState.TrialStopped || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager))
|
||||
.WhereIf(sap.Contains(_userInfo.UserTypeEnumInt),x=>x.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt== (int)UserTypeEnum.ProjectManager,t=> t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||
.WhereIf(!sapp.Contains(_userInfo.UserTypeEnumInt), t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))&& t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.ProjectTo<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue