修改
This commit is contained in:
@@ -685,6 +685,10 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
public class AddDoctorCriterionFileDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 文件名称
|
||||
/// </summary>
|
||||
@@ -710,6 +714,8 @@ namespace IRaCIS.Application.Contracts
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
@@ -726,6 +732,8 @@ namespace IRaCIS.Application.Contracts
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
|
||||
@@ -471,7 +471,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加医生标准文件
|
||||
/// 添加修改医生标准文件
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
@@ -479,6 +479,10 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<IResponseOutput> AddDoctorCriterionFile(AddDoctorCriterionFileDto inDto)
|
||||
{
|
||||
|
||||
if (await _doctorCriterionFileRepository.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.FileType == inDto.FileType && x.IsEnable && x.CriterionType == inDto.CriterionType && x.Id != inDto.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准已添加过此类型文件");
|
||||
}
|
||||
var entity = await _doctorCriterionFileRepository.InsertOrUpdateAsync(inDto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user