Uat_Study
parent
39ee653979
commit
0a941cee30
|
@ -5320,6 +5320,13 @@
|
|||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.SynchronizeSystemOrgan(IRaCIS.Core.Application.ViewModel.SynchronizeSystemOrganInDto)">
|
||||
<summary>
|
||||
同步系统器官
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.OrganInfoService.SynchronizeSystemOrganToTrial(IRaCIS.Core.Application.ViewModel.SynchronizeSystemOrganToTrialInDto)">
|
||||
<summary>
|
||||
同步系统器官到项目
|
||||
|
@ -5327,6 +5334,20 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.DeleteSystemCriterionDictionary(IRaCIS.Core.Application.Service.Reading.Dto.DeleteSystemCriterionDictionaryIndto)">
|
||||
<summary>
|
||||
删除系统标准字典Code
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddSystemCriterionDictionaryCode(IRaCIS.Core.Application.Service.Reading.Dto.AddSystemCriterionDictionaryCodeInDto)">
|
||||
<summary>
|
||||
添加系统标准字典Code
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.ResetTrialCriterionAsyncState(System.Guid)">
|
||||
<summary>
|
||||
重置项目标准的重置状态
|
||||
|
@ -8355,7 +8376,7 @@
|
|||
<param name="searchKey"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetCriterionDictionaryList">
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetCriterionDictionaryList(IRaCIS.Application.Contracts.GetCriterionDictionaryListInDto)">
|
||||
<summary>
|
||||
获取标准字典
|
||||
</summary>
|
||||
|
@ -9321,6 +9342,12 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.MaintainTaskRelated">
|
||||
<summary>
|
||||
维护任务关系
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.ChangeCalculationAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangeCalculationAnswerInDto)">
|
||||
<summary>
|
||||
修改计算问题
|
||||
|
|
|
@ -90,7 +90,11 @@ namespace IRaCIS.Application.Contracts
|
|||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCriterionDictionaryListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
}
|
||||
public class GetCriterionDictionaryListOutDto
|
||||
{
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
|
|
@ -20,11 +20,14 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
||||
private readonly IRepository<Doctor> _doctorRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService _readingQuestionService;
|
||||
|
||||
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
||||
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
||||
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IReadingQuestionService readingQuestionService
|
||||
|
||||
|
@ -36,6 +39,7 @@ namespace IRaCIS.Application.Services
|
|||
_trialDictionaryRepository = trialDictionaryRepository;
|
||||
_doctorRepository = doctorRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionService = readingQuestionService;
|
||||
}
|
||||
|
@ -232,9 +236,11 @@ namespace IRaCIS.Application.Services
|
|||
/// 获取标准字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList()
|
||||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
|
||||
{
|
||||
var dictionaryList = await _dicRepository.Where(x => ReadingCommon.CriterionDictionary.CriterionDictionaryCodeList.Contains(x.Code))
|
||||
var codes = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).Select(x => x.Code).ToListAsync();
|
||||
|
||||
var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code))
|
||||
.OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto()
|
||||
{
|
||||
Code = x.Code,
|
||||
|
|
|
@ -205,7 +205,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class SynchronizeSystemOrganInDto
|
||||
{
|
||||
|
||||
[NotDefault]
|
||||
public Guid FromCriterionId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid ToCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -191,6 +191,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<CriterionDictionaryInfo> DictionaryList { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteSystemCriterionDictionaryIndto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class AddSystemCriterionDictionaryCodeInDto
|
||||
{
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public string Code { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SetSystemGlobalInfoInDto
|
||||
{
|
||||
[NotDefault]
|
||||
|
|
|
@ -369,10 +369,30 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
#endregion
|
||||
|
||||
//public async Task<IResponseOutput> SynchronizeSystemOrgan()
|
||||
//{
|
||||
|
||||
//}
|
||||
/// <summary>
|
||||
/// 同步系统器官
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SynchronizeSystemOrgan(SynchronizeSystemOrganInDto inDto)
|
||||
{
|
||||
var organList= await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.FromCriterionId).ToListAsync();
|
||||
|
||||
organList.ForEach(x =>
|
||||
{
|
||||
|
||||
x.SystemCriterionId = inDto.ToCriterionId;
|
||||
x.Id = NewId.NextGuid();
|
||||
|
||||
});
|
||||
|
||||
await _organInfoRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.ToCriterionId);
|
||||
await _organInfoRepository.AddRangeAsync(organList);
|
||||
await _organInfoRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
|
||||
|
@ -32,6 +33,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||
|
@ -45,11 +47,55 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||
this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除系统标准字典Code
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteSystemCriterionDictionary(DeleteSystemCriterionDictionaryIndto inDto)
|
||||
{
|
||||
var criterionDictionaryCode= await _systemCriterionDictionaryCodeRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.ParentCode == criterionDictionaryCode.Code && x.CriterionId == criterionDictionaryCode.SystemCriterionId);
|
||||
|
||||
await _systemCriterionDictionaryCodeRepository.DeleteFromQueryAsync(inDto.Id);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加系统标准字典Code
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddSystemCriterionDictionaryCode(AddSystemCriterionDictionaryCodeInDto inDto)
|
||||
{
|
||||
if (await _systemCriterionDictionaryCodeRepository.AnyAsync(x => x.SystemCriterionId == inDto.SystemCriterionId && x.Code == inDto.Code))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前标准存在此Code");
|
||||
}
|
||||
|
||||
await _systemCriterionDictionaryCodeRepository.AddAsync(new SystemCriterionDictionaryCode()
|
||||
{
|
||||
SystemCriterionId = inDto.SystemCriterionId,
|
||||
Code = inDto.Code
|
||||
});
|
||||
|
||||
await _systemCriterionDictionaryCodeRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置项目标准的重置状态
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2023-02-03 11:20:54
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///SystemCriterionDictionaryCode
|
||||
///</summary>
|
||||
[Table("SystemCriterionDictionaryCode")]
|
||||
public class SystemCriterionDictionaryCode : Entity, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// SystemCriterionId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Code
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2023-02-03 11:21:56
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///TrialCriterionDictionaryCode
|
||||
///</summary>
|
||||
[Table("TrialCriterionDictionaryCode")]
|
||||
public class TrialCriterionDictionaryCode : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TrialCriterionId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid TrialCriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Code
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -32,14 +32,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标准字典需要配置的相
|
||||
/// </summary>
|
||||
public static List<string> CriterionDictionaryCodeList = new List<string>()
|
||||
{
|
||||
"LesionType",
|
||||
"QuestionType"
|
||||
};
|
||||
///// <summary>
|
||||
///// 标准字典需要配置的相
|
||||
///// </summary>
|
||||
//public static List<string> CriterionDictionaryCodeList = new List<string>()
|
||||
//{
|
||||
// "LesionType",
|
||||
// "QuestionType"
|
||||
//};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -209,7 +209,9 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
|
||||
#region Reading
|
||||
public virtual DbSet<TrialCriterionDictionaryCode> TrialCriterionDictionaryCode { get; set; }
|
||||
|
||||
public virtual DbSet<SystemCriterionDictionaryCode> SystemCriterionDictionaryCode { get; set; }
|
||||
public virtual DbSet<ReadingTaskRelation> ReadingTaskRelation { get; set; }
|
||||
public virtual DbSet<OrganInfo> OrganInfo { get; set; }
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||
//表名称用字符串,拼接
|
||||
public static readonly string TableName = "ReadingTaskRelation";
|
||||
public static readonly string TableName = "TrialCriterionDictionaryCode";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
|
Loading…
Reference in New Issue