diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 0be5394f4..86a8c2e1c 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -18817,6 +18817,14 @@ + + + 更新项目额外json 配置 + + + + + 访视 质疑状态 触发修改 diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialDocumentViewModel.cs index d6f281023..25aadfd00 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialDocumentViewModel.cs @@ -43,6 +43,10 @@ namespace IRaCIS.Core.Application.Contracts [NotDefault] public Guid TrialId { get; set; } + public bool? IsPublish { get; set; } + + public string? FileTypeCode { get; set; } + } /// TrialDocumentAddOrEdit 列表查询参数模型 diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index cdd1c622e..bb9bccb2b 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -152,8 +152,10 @@ namespace IRaCIS.Core.Application.Services var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == inQuery.TrialId) .WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name)) .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) - .WhereIf(inQuery.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId)) - .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId)) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.IsPublish != null, t => t.IsPublish == inQuery.IsPublish) + .WhereIf(!string.IsNullOrEmpty(inQuery.FileTypeCode), t => t.FileType.Code== inQuery.FileTypeCode) .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us }); return await trialDocumentQueryable.ToPagedListAsync(inQuery); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index e6dded93e..4e4464529 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -1487,7 +1487,7 @@ namespace IRaCIS.Core.Application var extralConfig = JsonConvert.DeserializeObject(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig(); - var trialConfig = _mapper.Map (extralConfig); + var trialConfig = _mapper.Map(extralConfig); trialConfig.TrialObjectNameList = extralObj.TrialObjectNameList; @@ -1536,5 +1536,23 @@ namespace IRaCIS.Core.Application await _trialRepository.SaveChangesAsync(); return ResponseOutput.Ok(); } + + /// + /// 更新项目额外json 配置 + /// + /// + /// + /// + [HttpPut] + public async Task UpdateTrialExtralConfig(Guid trialId, TrialExtraConfig trialExtralConfig) + { + var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId); + + trial.TrialExtraConfigJsonStr = trialExtralConfig.ToJsonStr(); + + await _trialRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); + } } }