修改一版
parent
5adb4b16c1
commit
c8f71fa61b
|
@ -287,7 +287,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
ForeignKeyText = p.ForeignKeyText,
|
||||
ForeignKeyTable = p.ForeignKeyTable
|
||||
}).ToListAsync();
|
||||
|
||||
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
||||
{
|
||||
Key = key.Key,
|
||||
|
@ -297,8 +296,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
var JsonDataValue = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);
|
||||
foreach (var item in list)
|
||||
{
|
||||
|
@ -333,27 +330,25 @@ namespace IRaCIS.Core.Application.Service
|
|||
};
|
||||
JsonDataValue[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
|
||||
}
|
||||
|
||||
}
|
||||
return JsonConvert.SerializeObject(JsonDataValue);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取枚举
|
||||
/// </summary>
|
||||
/// <param name="Identification">标识</param>
|
||||
/// <param name="json">Json对象</param>
|
||||
/// <param name="trialId">标识</param>
|
||||
/// <param name="identifications">标识</param>
|
||||
/// <param name="jsonStr">Json对象</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
private async Task<string> SetEnum(Guid trilaid, List<string> identification, string json)
|
||||
private async Task<string> SetEnum(Guid trialId, List<string> identifications, string jsonStr)
|
||||
{
|
||||
if (json == null || json == "null")
|
||||
if (jsonStr == null || jsonStr == "null")
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification))
|
||||
var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification))
|
||||
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable.HasValue && x.IsEnable.Value) on u.Id equals p.ParentId
|
||||
select new
|
||||
{
|
||||
|
@ -363,7 +358,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
}).ToListAsync();
|
||||
|
||||
// 添加单双审
|
||||
var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trilaid).Select(x => x.QCProcessEnum).FirstOrDefaultAsync();
|
||||
var trialtype = await _trialRepository.AsQueryable().Where(x => x.Id == trialId).Select(x => x.QCProcessEnum).FirstOrDefaultAsync();
|
||||
|
||||
list.Add(new
|
||||
{
|
||||
|
@ -381,7 +376,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
Type = lst.Max(x => x.Type),
|
||||
}).ToList();
|
||||
|
||||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);
|
||||
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
|
||||
foreach (var item in list)
|
||||
{
|
||||
try
|
||||
|
@ -461,24 +456,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
value = b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return JsonConvert.SerializeObject(JsonData);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -694,7 +679,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
||||
{
|
||||
|
||||
var query = from data in _repository.GetQueryable<FrontAuditConfig>()
|
||||
join childrenType in _repository.GetQueryable<Dictionary>() on data.ChildrenTypeId equals childrenType.Id into childrenTypetemp
|
||||
from leftchildrenType in childrenTypetemp.DefaultIfEmpty()
|
||||
|
@ -752,7 +736,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
DictionaryCode=data.DictionaryCode,
|
||||
DictionaryType=data.DictionaryType,
|
||||
InterfaceName=data.InterfaceName,
|
||||
|
||||
};
|
||||
|
||||
query = query
|
||||
|
|
|
@ -55,6 +55,26 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
public class VisitFinishReadingAddReadModuleInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受试者Id
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视Id
|
||||
/// </summary>
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class GetReadModuleSingleIndto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
|
|
@ -31,7 +31,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
}
|
||||
|
||||
#region 历史 接口名暂未修改
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增或者修改
|
||||
/// </summary>
|
||||
|
@ -70,7 +72,7 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -22,18 +22,21 @@ namespace IRaCIS.Application.Services
|
|||
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
private readonly IRepository<VisitStage> _visitstageRepository;
|
||||
private readonly IRepository<ReadingPeriodSet> _readingPeriodSetRepository;
|
||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||
|
||||
|
||||
public ReadModuleService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Subject> subjectRepository,
|
||||
IRepository<VisitStage> visitstageRepository,
|
||||
IRepository<ReadingPeriodSet> readingPeriodSetRepository,
|
||||
IRepository<ReadModule> readModuleRepository
|
||||
)
|
||||
{
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
this._subjectRepository = subjectRepository;
|
||||
this._visitstageRepository = visitstageRepository;
|
||||
this._readingPeriodSetRepository = readingPeriodSetRepository;
|
||||
this._readModuleRepository = readModuleRepository;
|
||||
}
|
||||
|
||||
|
@ -66,7 +69,6 @@ namespace IRaCIS.Application.Services
|
|||
SubjectCode = y.Subject.Code, // 受试者code
|
||||
SiteCode = x.Site.SiteCode, // 中心Code
|
||||
|
||||
|
||||
IsFinalVisit=y.IsFinalVisit, // 是否为末次评估
|
||||
OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视
|
||||
OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称
|
||||
|
@ -118,6 +120,16 @@ namespace IRaCIS.Application.Services
|
|||
});
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 访视阅片完成添加阅片期模块
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public async Task<IResponseOutput> VisitFinishReadingAddReadModule(VisitFinishReadingAddReadModuleInDto inDto)
|
||||
//{
|
||||
// var subjectVisit = await _subjectRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == inDto.SubjectVisitId);
|
||||
// List<ReadingPeriodSet> readingPeriodSets= _readingPeriodSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsTakeEffect=&&(x.ReadingScope==ReadingScopeEnum.All||(x.ReadingScope==ReadingScopeEnum.Site&&x.ReadingPeriodSites.Select(y=>y.SiteId).Contains(subjectVisit.SiteId))))
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单条信息
|
||||
/// </summary>
|
||||
|
|
|
@ -73,5 +73,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
}
|
||||
|
||||
|
||||
public enum ReadingPeriodSetTakeEffectEnum
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue