修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fa0e4f7326
commit
b610143e33
|
@ -262,14 +262,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var exists = await _doctorSummarizeRepository
|
|
||||||
.WhereIf(_userInfo.IsEn_Us, x=>x.IndicationEn == inDto.IndicationEn)
|
|
||||||
.WhereIf(!_userInfo.IsEn_Us, x=>x.Indication == inDto.Indication)
|
|
||||||
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null);
|
|
||||||
if (exists)
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inDto.TrialId != null && inDto.SaveSummarizeInfoType!= SaveSummarizeInfo.SaveSelf)
|
if (inDto.TrialId != null && inDto.SaveSummarizeInfoType!= SaveSummarizeInfo.SaveSelf)
|
||||||
{
|
{
|
||||||
|
@ -286,6 +279,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
break;
|
break;
|
||||||
case SaveSummarizeInfo.SaveAndAdd:
|
case SaveSummarizeInfo.SaveAndAdd:
|
||||||
|
|
||||||
|
|
||||||
|
var exists = await _doctorSummarizeRepository
|
||||||
|
.WhereIf(_userInfo.IsEn_Us, x => x.IndicationEn == inDto.IndicationEn)
|
||||||
|
.WhereIf(!_userInfo.IsEn_Us, x => x.Indication == inDto.Indication)
|
||||||
|
.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null);
|
||||||
|
if (exists)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);
|
||||||
|
}
|
||||||
await _doctorSummarizeRepository.BatchDeleteNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId);
|
await _doctorSummarizeRepository.BatchDeleteNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue