|
|
|
|
@ -849,7 +849,7 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var list = _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
|
|
|
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.Id, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
|
|
|
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.HospitalGroupId, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
|
|
|
|
|
|
|
|
|
item.CurrentUserHospitalGroupList = list;
|
|
|
|
|
|
|
|
|
|
@ -981,7 +981,7 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
[FromServices] IRepository<SCPStudyHospitalGroup> _scpStudyHospitalGroupRepository)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var existList = _scpStudyHospitalGroupRepository.Where(t => t.SCPStudyId == scpStudyId).Select(t => t.HospitalGroupId).ToList();
|
|
|
|
|
var existList = _scpStudyHospitalGroupRepository.Where(t => t.SCPStudyId == scpStudyId && t.HospitalGroup.IsEnable).Select(t => t.HospitalGroupId).ToList();
|
|
|
|
|
|
|
|
|
|
var isAdminOrOAOrGA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.Admin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA
|
|
|
|
|
|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.GA;
|
|
|
|
|
@ -991,7 +991,7 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
.Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true).Select(t => t.HospitalGroupId).ToList();
|
|
|
|
|
|
|
|
|
|
// abc 课题组,人属于AB 课题组,删除仅仅删除这个标签 直接返回
|
|
|
|
|
if (!isAdminOrOAOrGA && existList.Count >= currentPMHospitalGroupIdList.Count)
|
|
|
|
|
if (!isAdminOrOAOrGA && existList.Count > currentPMHospitalGroupIdList.Count)
|
|
|
|
|
{
|
|
|
|
|
//同课题组其他项目绑定了,那么这个绑定关系也不能删除
|
|
|
|
|
|
|
|
|
|
@ -3619,7 +3619,7 @@ namespace IRaCIS.Application.Services
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var list = _identityUserReposiotry.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList).Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable == true)
|
|
|
|
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.Id, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
|
|
|
|
.Select(t => new HospitalGroupInfo() { Code = t.HospitalGroup.Code, Id = t.HospitalGroupId, Name = t.HospitalGroup.Name, IsManager = t.IsManager }).ToList();
|
|
|
|
|
|
|
|
|
|
item.CurrentUserHospitalGroupList = list;
|
|
|
|
|
|
|
|
|
|
|