修复bug
parent
c2db091522
commit
c541208290
|
@ -35,10 +35,6 @@ namespace IRaCIS.Core.API
|
|||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.IQC).ToString());
|
||||
});
|
||||
|
||||
options.AddPolicy(IRaCISPolicy.CRC_IQC, policyBuilder =>
|
||||
{
|
||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ClinicalResearchCoordinator).ToString(), ((int)UserTypeEnum.IQC).ToString());
|
||||
});
|
||||
|
||||
options.AddPolicy(IRaCISPolicy.PM, policyBuilder =>
|
||||
{
|
||||
|
@ -66,6 +62,13 @@ namespace IRaCIS.Core.API
|
|||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.SPM).ToString(), ((int)UserTypeEnum.CPM).ToString());
|
||||
});
|
||||
|
||||
options.AddPolicy(IRaCISPolicy.PM_APM_SPM_CPM, policyBuilder =>
|
||||
{
|
||||
policyBuilder.RequireClaim("userTypeEnumInt", ((int)UserTypeEnum.ProjectManager).ToString(), ((int)UserTypeEnum.APM).ToString(),((int)UserTypeEnum.SPM).ToString(), ((int)UserTypeEnum.CPM).ToString());
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ namespace IRaCIS.Core.Application.Filter
|
|||
|
||||
var trialStatusStr = cacheResultDic[trialIdStr];
|
||||
|
||||
|
||||
// 这里是统一拦截 项目有关的操作允许情况(特殊的地方,比如项目配置(有的在多种状态(初始化,ongoing)都可以操作,有的仅仅在Initializing)还有 项目添加和更新,不走这里,特殊处理,不然在这里显得很乱,判断是哪个接口)
|
||||
await next.Invoke();
|
||||
// 这里是统一拦截 项目有关的操作允许情况(特殊的地方,比如项目配置(有的在多种状态(初始化,ongoing)都可以操作,有的仅仅在Initializing)还有 项目添加和更新,不走这里,特殊处理,不然在这里显得很乱,判断是哪个接口)
|
||||
if (trialStatusStr.Value == StaticData.TrialState.TrialOngoing)
|
||||
{
|
||||
|
||||
|
@ -101,7 +101,6 @@ namespace IRaCIS.Core.Application.Filter
|
|||
|
||||
}
|
||||
// 项目停止、或者完成 不允许操作
|
||||
|
||||
else
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("只有项目状态处于进行中时,才允许进行操作"));
|
||||
|
|
|
@ -357,7 +357,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
public async Task SiteSurveyUserJoinEmail(Guid trialId, Guid userId, string baseUrl, string rootUrl)
|
||||
{
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var sysUserInfo = (await _userRepository.Where(t => t.Id == userId).Include(t => t.UserTypeRole).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);
|
||||
|
||||
|
|
|
@ -697,7 +697,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
await GenerateAccountAsync(needGenerateList);
|
||||
await SendSiteSurveyUserJoinEmail(new TrialSiteUserSurveyJoinCommand() { TrialId = trialId, TrialSiteSurveyId = trialSiteSurveyId, RouteUrl = siteSurvyeSubmit.RouteUrl, BaseUrl = siteSurvyeSubmit.BaseUrl, UserList = needGenerateList });
|
||||
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now });
|
||||
|
||||
}
|
||||
await _trialSiteSurveyRepository.SaveChangesAsync();
|
||||
|
@ -783,8 +782,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == userInfo.Id, u => new TrialSiteUserSurvey() { IsJoin = true });
|
||||
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
}
|
||||
await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurvey.Id && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.Id, ReviewerTime = DateTime.Now });
|
||||
await _userRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
|
|
@ -10,7 +10,7 @@ using System.Collections.Generic;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///阅片期设置
|
||||
///阅片期设置 只会设计到所有人 或者某个Site 针对全局
|
||||
///</summary>
|
||||
[Table("ReadingPeriodSet")]
|
||||
public class ReadingPeriodSet : Entity, IAuditAdd
|
||||
|
|
Loading…
Reference in New Issue