修改hospital
This commit is contained in:
@@ -35,12 +35,14 @@ namespace IRaCIS.Application.Services
|
||||
VerifyMsg = _localizer["Hospital_DupName"]
|
||||
};
|
||||
|
||||
if (await _hospitalRepository.AnyAsync(x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null))
|
||||
var exp1 = new EntityVerifyExp<Hospital>()
|
||||
{
|
||||
//---当前Site已经添加到其他Hospital了
|
||||
throw new BusinessValidationFailedException(_localizer["Hospital_SiteAdded"]);
|
||||
}
|
||||
VerifyExp = x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null,
|
||||
//---已经存在同名的医院,请确认。
|
||||
VerifyMsg = _localizer["Hospital_SiteAdded"]
|
||||
};
|
||||
|
||||
|
||||
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
|
||||
|
||||
return ResponseOutput.Ok(hospital.Id.ToString());
|
||||
|
||||
Reference in New Issue
Block a user