修改一版
parent
1923b0eee7
commit
035a3c12d7
|
@ -1,5 +1,6 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Application.Contracts
|
||||
{
|
||||
|
@ -17,6 +18,22 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class GetTrialConfigDictionaryListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
//public
|
||||
}
|
||||
|
||||
public class AddTrialConfigDictionaryListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public List<Guid> DictionaryIds { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class AddOrEditBasicDic
|
||||
{
|
||||
|
|
|
@ -19,10 +19,12 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
||||
private readonly IRepository<Doctor> _doctorRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<TrialConfigDictionary> _trialConfigDictionaryRepository;
|
||||
private readonly IReadingQuestionService _readingQuestionService;
|
||||
|
||||
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
||||
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
||||
IRepository<TrialConfigDictionary> trialConfigDictionaryRepository,
|
||||
IReadingQuestionService readingQuestionService
|
||||
|
||||
|
||||
|
@ -33,6 +35,7 @@ namespace IRaCIS.Application.Services
|
|||
_trialDictionaryRepository = trialDictionaryRepository;
|
||||
_doctorRepository = doctorRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._trialConfigDictionaryRepository = trialConfigDictionaryRepository;
|
||||
this._readingQuestionService = readingQuestionService;
|
||||
}
|
||||
|
||||
|
@ -133,6 +136,32 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量添加项目字典
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddTrialConfigDictionaryList(AddTrialConfigDictionaryListInDto inDto)
|
||||
{
|
||||
|
||||
await _trialConfigDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new TrialConfigDictionary() {
|
||||
TrialId = inDto.TrialId,
|
||||
DictionaryId = x
|
||||
|
||||
}));
|
||||
|
||||
await _trialConfigDictionaryRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
|
||||
//public async Task<> GetTrialConfigDictionaryList()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取子项数组
|
||||
/// </summary>
|
||||
|
|
|
@ -790,6 +790,7 @@ namespace IRaCIS.Application.Services
|
|||
x.ArmEnum == taskInfo.ArmEnum &&
|
||||
x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||
x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId&&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.ReadingCategory == ReadingCategory.Visit) || x.Id == inDto.VisitTaskId)
|
||||
|
|
|
@ -318,6 +318,13 @@ namespace IRaCIS.Core.Application
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
||||
{
|
||||
ArbitrationRule arbitration = ArbitrationRule.NA;
|
||||
|
||||
if (inDto.IsArbitrationReading)
|
||||
{
|
||||
arbitration = inDto.IsGlobalReading ? ArbitrationRule.Reading : ArbitrationRule.Visit;
|
||||
}
|
||||
|
||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
ReadingTool=inDto.ReadingTool,
|
||||
|
@ -329,7 +336,7 @@ namespace IRaCIS.Core.Application
|
|||
IsReadingShowPreviousResults = inDto.IsReadingShowPreviousResults,
|
||||
GlobalUpdateType=inDto.GlobalUpdateType,
|
||||
ImagePlatform=inDto.ImagePlatform,
|
||||
ArbitrationRule= inDto.IsReadingTaskViewInOrder? ArbitrationRule.Visit:ArbitrationRule.NA,
|
||||
ArbitrationRule= arbitration,
|
||||
ReadingType = inDto.ReadingType,
|
||||
IsGlobalReading = inDto.IsGlobalReading,
|
||||
IsArbitrationReading = inDto.IsArbitrationReading,
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///TrialConfigDictionary
|
||||
///</summary>
|
||||
[Table("TrialConfigDictionary")]
|
||||
public class TrialConfigDictionary : Entity, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// TrialId
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DictionaryId
|
||||
/// </summary>
|
||||
public Guid DictionaryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("DictionaryId")]
|
||||
public Dictionary Dictionary { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -319,7 +319,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
#region Trial
|
||||
public virtual DbSet<Trial> Trial { get; set; }
|
||||
|
||||
|
||||
public virtual DbSet<TrialConfigDictionary> TrialConfigDictionary { get; set; }
|
||||
public virtual DbSet<TrialDictionary> TrialDictionary { get; set; }
|
||||
public virtual DbSet<TrialStatusDetail> TrialDetail { get; set; }
|
||||
public virtual DbSet<TrialUser> UserTrial { 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 = "SystemClinicalDataCriterion,TrialClinicalDataCriterion";
|
||||
public static readonly string TableName = "TrialConfigDictionary";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
|
Loading…
Reference in New Issue