Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
c7a310c1ad
|
@ -17343,11 +17343,32 @@
|
||||||
TrialDocumentService
|
TrialDocumentService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Contracts.ISystemDocumentService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocumentAttachment},IRaCIS.Core.Application.Contracts.ISystemDocumentService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocNeedConfirmedUserType},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SystemDocument},Microsoft.Extensions.DependencyInjection.IServiceScopeFactory,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.IdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDocConfirmedIdentityUser},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||||
<summary>
|
<summary>
|
||||||
TrialDocumentService
|
TrialDocumentService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetTrialDocumentAttachmentList(IRaCIS.Core.Application.Contracts.TrialDocumentAttachmentQuery)">
|
||||||
|
<summary>
|
||||||
|
获取项目文档附件列表
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.AddOrUpdateTrialDocumentAttachment(IRaCIS.Core.Application.Contracts.TrialDocumentAttachmentAddOrEdit)">
|
||||||
|
<summary>
|
||||||
|
添加或更新项目文档附件
|
||||||
|
</summary>
|
||||||
|
<param name="addOrEditTrialDocumentAttachment"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.DeleteTrialDocumentAttachment(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
删除项目文档附件
|
||||||
|
</summary>
|
||||||
|
<param name="trialDocumentAttachmentId"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.PublishTrialDocument(IRaCIS.Core.Application.Contracts.PublishTrialDocumentInDto)">
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.PublishTrialDocument(IRaCIS.Core.Application.Contracts.PublishTrialDocumentInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
发布项目文档
|
发布项目文档
|
||||||
|
|
|
@ -370,6 +370,52 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public List<Guid> Ids { get; set; }
|
public List<Guid> Ids { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TrialDocumentAttachmentView : TrialDocumentAttachmentAddOrEdit
|
||||||
|
{
|
||||||
|
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TrialDocumentAttachmentAddOrEdit
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
public string FileFormat { get; set; }
|
||||||
|
|
||||||
|
public string FileName { get; set; }
|
||||||
|
|
||||||
|
public string FilePath { get; set; }
|
||||||
|
|
||||||
|
public decimal? FileSize { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public bool OffLine { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialDocumentId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TrialDocumentAttachmentQuery : PageInput
|
||||||
|
{
|
||||||
|
public string? FileFormat { get; set; }
|
||||||
|
|
||||||
|
public string? FileName { get; set; }
|
||||||
|
|
||||||
|
public string? FilePath { get; set; }
|
||||||
|
|
||||||
|
public decimal? FileSize { get; set; }
|
||||||
|
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
public bool? OffLine { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialDocumentId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class AddOrEditSystemDocument : SystemDocumentAddOrEdit
|
public class AddOrEditSystemDocument : SystemDocumentAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
public string FullFilePath { get; set; } = String.Empty;
|
public string FullFilePath { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public int AttachmentCount { get; set; }
|
||||||
public bool IsSomeUserSigned { get; set; }
|
public bool IsSomeUserSigned { get; set; }
|
||||||
|
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
|
@ -26,6 +26,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
[ApiExplorerSettings(GroupName = "Trial")]
|
[ApiExplorerSettings(GroupName = "Trial")]
|
||||||
public class TrialDocumentService(IRepository<TrialDocument> _trialDocumentRepository,
|
public class TrialDocumentService(IRepository<TrialDocument> _trialDocumentRepository,
|
||||||
IRepository<Trial> _trialRepository,
|
IRepository<Trial> _trialRepository,
|
||||||
|
IRepository<TrialDocumentAttachment> _trialDocumentAttachmentRepository,
|
||||||
ISystemDocumentService _systemDocumentService,
|
ISystemDocumentService _systemDocumentService,
|
||||||
IRepository<SystemDocConfirmedIdentityUser> _systemDocConfirmedUserRepository,
|
IRepository<SystemDocConfirmedIdentityUser> _systemDocConfirmedUserRepository,
|
||||||
IRepository<SystemDocNeedConfirmedUserType> _systemDocNeedConfirmedUserTypeRepository,
|
IRepository<SystemDocNeedConfirmedUserType> _systemDocNeedConfirmedUserTypeRepository,
|
||||||
|
@ -39,6 +40,55 @@ namespace IRaCIS.Core.Application.Services
|
||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialDocumentService
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ITrialDocumentService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目文档附件列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<PageOutput<TrialDocumentAttachmentView>> GetTrialDocumentAttachmentList(TrialDocumentAttachmentQuery inQuery)
|
||||||
|
{
|
||||||
|
|
||||||
|
var trialDocumentAttachmentQueryable = _trialDocumentAttachmentRepository
|
||||||
|
.WhereIf(inQuery.TrialDocumentId!=null,x=>x.TrialDocumentId==inQuery.TrialDocumentId)
|
||||||
|
.WhereIf(inQuery.Name != null, x => x.Name.Contains(inQuery.Name))
|
||||||
|
.WhereIf(inQuery.FileFormat != null, x => x.FileFormat == inQuery.FileFormat)
|
||||||
|
.ProjectTo<TrialDocumentAttachmentView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
var pageList = await trialDocumentAttachmentQueryable.ToPagedListAsync(inQuery);
|
||||||
|
|
||||||
|
return pageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或更新项目文档附件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="addOrEditTrialDocumentAttachment"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateTrialDocumentAttachment(TrialDocumentAttachmentAddOrEdit addOrEditTrialDocumentAttachment)
|
||||||
|
{
|
||||||
|
// 在此处拷贝automapper 映射
|
||||||
|
|
||||||
|
var entity = await _trialDocumentAttachmentRepository.InsertOrUpdateAsync(addOrEditTrialDocumentAttachment, true);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除项目文档附件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialDocumentAttachmentId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpDelete("{trialDocumentAttachmentId:guid}")]
|
||||||
|
public async Task<IResponseOutput> DeleteTrialDocumentAttachment(Guid trialDocumentAttachmentId)
|
||||||
|
{
|
||||||
|
var success = await _trialDocumentAttachmentRepository.DeleteFromQueryAsync(t => t.Id == trialDocumentAttachmentId, true);
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布项目文档
|
/// 发布项目文档
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -448,15 +498,27 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
|
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
|
||||||
|
|
||||||
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
result.CurrentPageData.ForEach(x =>
|
result.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (sysDataList.Any(y => y.Id == x.Id))
|
if (sysDataList.Any(y => y.Id == x.Id))
|
||||||
{
|
{
|
||||||
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var trialids = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList();
|
||||||
|
|
||||||
|
var trialDataList = await _trialDocumentRepository.Where(x => trialids.Contains(x.Id)).Include(x => x.TrialDocumentAttachmentList).ToListAsync();
|
||||||
|
|
||||||
|
result.CurrentPageData.ForEach(x =>
|
||||||
|
{
|
||||||
|
if (trialDataList.Any(y => y.Id == x.Id))
|
||||||
|
{
|
||||||
|
x.AttachmentCount = trialDataList.Where(y => y.Id == x.Id).Select(x => x.TrialDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var isEn_Us = false;
|
var isEn_Us = false;
|
||||||
|
|
||||||
// 在此处拷贝automapper 映射
|
// 在此处拷贝automapper 映射
|
||||||
|
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentView>();
|
||||||
|
CreateMap<TrialDocumentAttachment, TrialDocumentAttachmentAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentView>();
|
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentView>();
|
||||||
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentAddOrEdit>().ReverseMap();
|
CreateMap<SystemDocumentAttachment, SystemDocumentAttachmentAddOrEdit>().ReverseMap();
|
||||||
|
@ -40,6 +42,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
.ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||||
|
|
||||||
CreateMap<TrialDocument, TrialDocumentView>()
|
CreateMap<TrialDocument, TrialDocumentView>()
|
||||||
|
.ForMember(d => d.AttachmentCount, u => u.MapFrom(s =>s.TrialDocumentAttachmentList.Count()))
|
||||||
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
.ForMember(d => d.FileType, u => u.MapFrom(s => isEn_Us ? s.FileType.Value : s.FileType.ValueCN))
|
||||||
.ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any(t => t.ConfirmTime != null)))
|
.ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any(t => t.ConfirmTime != null)))
|
||||||
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var allfront = await (from data in _frontAuditConfigRepository.AsQueryable()
|
var allfront = await (from data in _frontAuditConfigRepository.Where(x=>x.IsEnable && x.ConfigType == "M")
|
||||||
join dic in _dictionaryRepository.Where(x => x.Parent.Code == "ModuleType" && x.IsEnable) on data.ModuleTypeId equals dic.Id
|
join dic in _dictionaryRepository.Where(x => x.Parent.Code == "ModuleType" && x.IsEnable) on data.ModuleTypeId equals dic.Id
|
||||||
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == inDto.TrialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
|
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == inDto.TrialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
|
||||||
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
|
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
|
||||||
|
@ -1164,7 +1164,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DictionaryValue = _userInfo.IsEn_Us ? dic.Value : dic.ValueCN,
|
DictionaryValue = _userInfo.IsEn_Us ? dic.Value : dic.ValueCN,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var result = allfront.Where(x => x.IsShow).ToList();
|
var result = allfront.Where(x => x.IsShow && x.ParentId!=null).ToList();
|
||||||
FindParent(result, result.Select(x => x.ParentId).ToList());
|
FindParent(result, result.Select(x => x.ParentId).ToList());
|
||||||
void FindParent(List<ModuleTypeData> re, List<Guid?> Parentids)
|
void FindParent(List<ModuleTypeData> re, List<Guid?> Parentids)
|
||||||
{
|
{
|
||||||
|
@ -1202,7 +1202,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var result = from data in _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0)
|
var result = from data in _frontAuditConfigRepository.Where(x =>x.IsEnable && x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0)
|
||||||
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == trialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
|
join trialshow in _trialAuditShowRepository.Where(x => x.TrialId == trialId) on data.Id equals trialshow.FrontAuditConfigId into trialshowtemp
|
||||||
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
|
from lefttrialshow in trialshowtemp.DefaultIfEmpty()
|
||||||
select new
|
select new
|
||||||
|
|
|
@ -1460,7 +1460,26 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto)
|
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto inDto)
|
||||||
{
|
{
|
||||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
|
#region 验证阅片工具配置
|
||||||
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var toolList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||||
|
|
||||||
|
var tabletoolList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||||
|
|
||||||
|
toolList.AddRange(tabletoolList);
|
||||||
|
|
||||||
|
toolList = toolList.Distinct().ToList();
|
||||||
|
|
||||||
|
if (tabletoolList.Except(trialCriterion.ReadingToolList).Count() > 0)
|
||||||
|
{
|
||||||
|
//---问题的阅片工具不在标准配置的阅片工具列表中
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TrialConfig_TableToolNotInStdTool"]);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
if (trialCriterion == null)
|
if (trialCriterion == null)
|
||||||
{
|
{
|
||||||
return NeedSynchronize.NotNeed;
|
return NeedSynchronize.NotNeed;
|
||||||
|
|
|
@ -732,7 +732,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<QuestionMark?> questionMarkList = new List<QuestionMark?>() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement };
|
List<QuestionMark?> questionMarkList = new List<QuestionMark?>() { QuestionMark.FirstMeasurement, QuestionMark.SecondMeasurement, QuestionMark.ThirdMeasurement };
|
||||||
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x => questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
|
var measuredValueList = rowInfo.SelectMany(x => x.TableQuestionList).Where(x =>x.Answer.IsNotNullOrEmpty()&& questionMarkList.Contains(x.QuestionMark)).Select(x => decimal.Parse(x.Answer)).ToList();
|
||||||
if (measuredValueList.Any(x => x > 100))
|
if (measuredValueList.Any(x => x > 100))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);
|
throw new BusinessValidationFailedException(_localizer["MRIPDFF_MeasurementGT100"]);
|
||||||
|
|
|
@ -484,7 +484,7 @@ namespace IRaCIS.Core.Application
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(GetTrialReadingCriterionInfoOutDto, bool)> GetTrialReadingCriterionInfo(GetTrialReadingInfoInDto inDto)
|
public async Task<(GetTrialReadingCriterionInfoOutDto, object)> GetTrialReadingCriterionInfo(GetTrialReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
GetTrialReadingCriterionInfoOutDto result = new GetTrialReadingCriterionInfoOutDto();
|
GetTrialReadingCriterionInfoOutDto result = new GetTrialReadingCriterionInfoOutDto();
|
||||||
result.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ProjectTo<ReadingCriterionPageDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
result.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ProjectTo<ReadingCriterionPageDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
@ -503,7 +503,9 @@ namespace IRaCIS.Core.Application
|
||||||
&& x.ReadingCriterionPageId == null)
|
&& x.ReadingCriterionPageId == null)
|
||||||
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
return (result, true);
|
return (result, new {
|
||||||
|
ReadingVersionEnum= trialCriterion.ReadingVersionEnum
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -553,6 +555,27 @@ namespace IRaCIS.Core.Application
|
||||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region 验证阅片工具配置
|
||||||
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var toolList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||||
|
|
||||||
|
var tabletoolList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).Where(x => x.ImageTool != string.Empty).Select(x => x.ImageTool).ToListAsync();
|
||||||
|
|
||||||
|
toolList.AddRange(tabletoolList);
|
||||||
|
|
||||||
|
toolList = toolList.Distinct().ToList();
|
||||||
|
|
||||||
|
if (tabletoolList.Except(trialCriterion.ReadingToolList).Count() > 0)
|
||||||
|
{
|
||||||
|
//---问题的阅片工具不在标准配置的阅片工具列表中
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TrialConfig_TableToolNotInStdTool"]);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ArbitrationRule arbitration = ArbitrationRule.NA;
|
ArbitrationRule arbitration = ArbitrationRule.NA;
|
||||||
|
|
||||||
if (inDto.IsArbitrationReading)
|
if (inDto.IsArbitrationReading)
|
||||||
|
|
|
@ -12,6 +12,10 @@ public class TrialDocument : BaseFullDeleteAuditEntity
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Trial Trial { get; set; }
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<TrialDocumentAttachment> TrialDocumentAttachmentList { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("FileTypeId")]
|
[ForeignKey("FileTypeId")]
|
||||||
public Dictionary FileType { get; set; }
|
public Dictionary FileType { get; set; }
|
||||||
|
@ -48,3 +52,45 @@ public class TrialDocument : BaseFullDeleteAuditEntity
|
||||||
public bool IsPublish { get; set; } = true;
|
public bool IsPublish { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Comment("项目签署文档附件")]
|
||||||
|
[Table("TrialDocumentAttachment")]
|
||||||
|
public class TrialDocumentAttachment : BaseFullAuditEntity
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("TrialDocumentId")]
|
||||||
|
public TrialDocument TrialDocument { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目文档Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialDocumentId { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件名称
|
||||||
|
/// </summary>
|
||||||
|
public string FileName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否下线
|
||||||
|
/// </summary>
|
||||||
|
public bool OffLine { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件路径
|
||||||
|
/// </summary>
|
||||||
|
[StringLength(1000)]
|
||||||
|
public string FilePath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件大小
|
||||||
|
/// </summary>
|
||||||
|
public decimal? FileSize { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件类型
|
||||||
|
/// </summary>
|
||||||
|
public string FileFormat { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -2018,10 +2018,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
|
||||||
{
|
{
|
||||||
var type = GetEntityAuditOpt(item);
|
var type = GetEntityAuditOpt(item);
|
||||||
|
var extraIdentification = string.Empty;
|
||||||
|
|
||||||
|
switch (_userInfo.RequestUrl)
|
||||||
|
{
|
||||||
|
case "QCOperation/updateModality":
|
||||||
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
|
||||||
|
{
|
||||||
|
extraIdentification = "/2";
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
|
await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
ObjectRelationParentId = x.SubjectVisitId
|
ObjectRelationParentId = x.SubjectVisitId,
|
||||||
|
ExtraIndentification = extraIdentification
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -532,6 +532,8 @@ public class IRaCISDBContext : DbContext
|
||||||
public virtual DbSet<SystemDocument> SystemDocument { get; set; }
|
public virtual DbSet<SystemDocument> SystemDocument { get; set; }
|
||||||
public virtual DbSet<SystemDocumentAttachment> SystemDocumentAttachment { get; set; }
|
public virtual DbSet<SystemDocumentAttachment> SystemDocumentAttachment { get; set; }
|
||||||
public virtual DbSet<TrialDocument> TrialDocument { get; set; }
|
public virtual DbSet<TrialDocument> TrialDocument { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<TrialDocumentAttachment> TrialDocumentAttachment { get; set; }
|
||||||
public virtual DbSet<TrialDocNeedConfirmedUserType> TrialDocUserTypeConfirm { get; set; }
|
public virtual DbSet<TrialDocNeedConfirmedUserType> TrialDocUserTypeConfirm { get; set; }
|
||||||
public virtual DbSet<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserType { get; set; }
|
public virtual DbSet<SystemDocNeedConfirmedUserType> SystemDocNeedConfirmedUserType { get; set; }
|
||||||
|
|
||||||
|
|
19626
IRaCIS.Core.Infra.EFCore/Migrations/20250604061252_TrialDocumentAttachment.Designer.cs
generated
Normal file
19626
IRaCIS.Core.Infra.EFCore/Migrations/20250604061252_TrialDocumentAttachment.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,85 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class TrialDocumentAttachment : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "TrialDocumentAttachment",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TrialDocumentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||||
|
FileName = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||||
|
OffLine = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
FilePath = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
|
||||||
|
FileSize = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
|
||||||
|
FileFormat = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
||||||
|
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_TrialDocumentAttachment", x => x.Id);
|
||||||
|
},
|
||||||
|
comment: "项目签署文档附件");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_SystemDocumentAttachment_TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment",
|
||||||
|
column: "TrialDocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TrialDocumentAttachment_CreateUserId",
|
||||||
|
table: "TrialDocumentAttachment",
|
||||||
|
column: "CreateUserId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TrialDocumentAttachment_TrialDocumentId",
|
||||||
|
table: "TrialDocumentAttachment",
|
||||||
|
column: "TrialDocumentId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment",
|
||||||
|
column: "TrialDocumentId",
|
||||||
|
principalTable: "TrialDocument",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_SystemDocumentAttachment_TrialDocument_TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "TrialDocumentAttachment");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_SystemDocumentAttachment_TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TrialDocumentId",
|
||||||
|
table: "SystemDocumentAttachment");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9790,6 +9790,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid>("SystemDocumentId")
|
b.Property<Guid>("SystemDocumentId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TrialDocumentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<DateTime>("UpdateTime")
|
b.Property<DateTime>("UpdateTime")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
@ -9802,6 +9805,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
|
||||||
b.HasIndex("SystemDocumentId");
|
b.HasIndex("SystemDocumentId");
|
||||||
|
|
||||||
|
b.HasIndex("TrialDocumentId");
|
||||||
|
|
||||||
b.ToTable("SystemDocumentAttachment", t =>
|
b.ToTable("SystemDocumentAttachment", t =>
|
||||||
{
|
{
|
||||||
t.HasComment("后台 - 系统签署文档附件");
|
t.HasComment("后台 - 系统签署文档附件");
|
||||||
|
@ -11786,6 +11791,65 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreateTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("CreateUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("FileFormat")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(400)
|
||||||
|
.HasColumnType("nvarchar(400)");
|
||||||
|
|
||||||
|
b.Property<string>("FileName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(400)
|
||||||
|
.HasColumnType("nvarchar(400)");
|
||||||
|
|
||||||
|
b.Property<string>("FilePath")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(1000)
|
||||||
|
.HasColumnType("nvarchar(1000)");
|
||||||
|
|
||||||
|
b.Property<decimal?>("FileSize")
|
||||||
|
.HasPrecision(18, 2)
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(400)
|
||||||
|
.HasColumnType("nvarchar(400)");
|
||||||
|
|
||||||
|
b.Property<bool>("OffLine")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid>("TrialDocumentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("UpdateTime")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("UpdateUserId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CreateUserId");
|
||||||
|
|
||||||
|
b.HasIndex("TrialDocumentId");
|
||||||
|
|
||||||
|
b.ToTable("TrialDocumentAttachment", t =>
|
||||||
|
{
|
||||||
|
t.HasComment("项目签署文档附件");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
@ -17449,6 +17513,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", null)
|
||||||
|
.WithMany("SystemDocumentAttachmentList")
|
||||||
|
.HasForeignKey("TrialDocumentId");
|
||||||
|
|
||||||
b.Navigation("CreateUserRole");
|
b.Navigation("CreateUserRole");
|
||||||
|
|
||||||
b.Navigation("SystemDocument");
|
b.Navigation("SystemDocument");
|
||||||
|
@ -18087,6 +18155,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Navigation("Trial");
|
b.Navigation("Trial");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDocumentAttachment", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CreateUserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("IRaCIS.Core.Domain.Models.TrialDocument", "TrialDocument")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TrialDocumentId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("CreateUserRole");
|
||||||
|
|
||||||
|
b.Navigation("TrialDocument");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialEmailBlackUser", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig")
|
b.HasOne("IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig", "TrialEmailNoticeConfig")
|
||||||
|
@ -19440,6 +19527,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
{
|
{
|
||||||
b.Navigation("NeedConfirmedUserTypeList");
|
b.Navigation("NeedConfirmedUserTypeList");
|
||||||
|
|
||||||
|
b.Navigation("SystemDocumentAttachmentList");
|
||||||
|
|
||||||
b.Navigation("TrialDocConfirmedUserList");
|
b.Navigation("TrialDocConfirmedUserList");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue