Uat_Study
parent
3dff501386
commit
7fc970dacc
|
@ -513,12 +513,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
public async Task<IResponseOutput> UploadVisitCheckExcel(Guid trialId )
|
||||
{
|
||||
if (_repository.Where<TaskAllocationRule>(t => t.TrialId == trialId && t.IsEnable).Count() <2)
|
||||
{
|
||||
return ResponseOutput.NotOk("能参与读片的医生数量必须大于2");
|
||||
}
|
||||
|
||||
|
||||
|
||||
var (serverFilePath, relativePath, fileName) = (string.Empty, string.Empty, string.Empty);
|
||||
await FileUploadAsync(async (realFileName) =>
|
||||
{
|
||||
|
|
|
@ -49,6 +49,11 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
if (context.UnmodifiedEntity?.CheckState != subjectVisit.CheckState && subjectVisit.CheckState == CheckStateEnum.CVPassed)
|
||||
{
|
||||
|
||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == subjectVisit.TrialId && t.IsEnable).Count() < 2)
|
||||
{
|
||||
throw new BusinessValidationFailedException("能参与读片的医生数量必须大于2");
|
||||
}
|
||||
|
||||
var dbMaxCode = _visitTaskRepository.Where(t => t.TrialId == subjectVisit.TrialId).Select(t => t.Code).DefaultIfEmpty().Max();
|
||||
|
||||
var cacheMaxCodeInt = _provider.Get<int>($"{subjectVisit.TrialId }_{ StaticData.CacheKey.TaskMaxCode}").Value;
|
||||
|
|
Loading…
Reference in New Issue