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