修改一版

This commit is contained in:
he
2022-06-17 14:30:49 +08:00
parent 3f573d6c11
commit 665ca1b7ae
11 changed files with 227 additions and 59 deletions
@@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Contracts;
namespace IRaCIS.Application.Services
{
@@ -18,15 +19,21 @@ namespace IRaCIS.Application.Services
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
private readonly IRepository<Doctor> _doctorRepository;
private readonly IRepository<Trial> _trialRepository;
private readonly IReadingQuestionService _readingQuestionService;
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository)
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
IReadingQuestionService readingQuestionService
)
{
_dicRepository = sysDicRepository;
_doctorDictionaryRepository = doctorDictionaryRepository;
_trialDictionaryRepository = trialDictionaryRepository;
_doctorRepository = doctorRepository;
_trialRepository = trialRepository;
this._readingQuestionService = readingQuestionService;
}
/// <summary>
@@ -101,8 +108,16 @@ namespace IRaCIS.Application.Services
VerifyMsg = $"已有{addOrEditBasic.Code}名称的字典",
IsVerify= addOrEditBasic.ParentId ==null
};
// 验证阅片标准是否可禁用
if (!addOrEditBasic.IsEnable&&addOrEditBasic.Id!=null)
{
var result = await _readingQuestionService.SetSystemCriterionDisable(addOrEditBasic.Id.Value,addOrEditBasic.ParentId);
if (!result.IsSuccess)
{
return result;
}
}
var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true, verifyExp1);
return ResponseOutput.Ok(entity.Id.ToString());
}
@@ -187,7 +202,6 @@ namespace IRaCIS.Application.Services
return searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
}
#region
/// <summary>