构造函数优化
This commit is contained in:
@@ -17,17 +17,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// 系统模板文档配置表
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class CommonDocumentService : BaseService, ICommonDocumentService
|
||||
public class CommonDocumentService(IRepository<CommonDocument> _commonDocumentRepository) : BaseService, ICommonDocumentService
|
||||
{
|
||||
|
||||
private readonly IRepository<CommonDocument> _commonDocumentRepository;
|
||||
|
||||
public CommonDocumentService(IRepository<CommonDocument> commonDocumentRepository)
|
||||
{
|
||||
_commonDocumentRepository = commonDocumentRepository;
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument)
|
||||
{
|
||||
|
||||
@@ -13,48 +13,21 @@ namespace IRaCIS.Application.Services
|
||||
/// </summary>
|
||||
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class DictionaryService : BaseService, IDictionaryService
|
||||
public class DictionaryService (IRepository<Dictionary> _dicRepository,
|
||||
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
||||
IRepository<TrialDictionary> _trialDictionaryRepository,
|
||||
IRepository<Doctor> _doctorRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository,
|
||||
IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem,
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial
|
||||
) : BaseService, IDictionaryService
|
||||
{
|
||||
private readonly IRepository<Dictionary> _dicRepository;
|
||||
private readonly IRepository<DoctorDictionary> _doctorDictionaryRepository;
|
||||
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
||||
private readonly IRepository<Doctor> _doctorRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
|
||||
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
||||
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
||||
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingSystemCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
||||
|
||||
|
||||
)
|
||||
{
|
||||
_dicRepository = sysDicRepository;
|
||||
_doctorDictionaryRepository = doctorDictionaryRepository;
|
||||
_trialDictionaryRepository = trialDictionaryRepository;
|
||||
_doctorRepository = doctorRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._readingSystemCriterionDictionaryRepository = readingSystemCriterionDictionaryRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加bool
|
||||
|
||||
@@ -878,8 +878,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user