diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index f12d748c1..aaacd0f7d 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1473,6 +1473,13 @@ + + + 获取项目文件类型数据 + + + + 项目定稿记录 @@ -14169,6 +14176,11 @@ TrialEmailNoticeConfigAddOrEdit 列表查询参数模型 + + + 显示顺序 + + SystemAnonymizationView 列表视图模型 diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs index 05131a2ed..96df40538 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs @@ -20,6 +20,25 @@ public class TrialFileTypeView : TrialFileTypeAddOrEdit } +public class GetTrialFileTypeDataOutDto +{ + public List TrialFileTypeDataList { get; set; } +} + +public class TrialFileTypeData +{ + public ArchiveType ArchiveTypeEnum { get; set; } + + public List TrialFileTypeList { get; set; } +} + + +public class GetTrialFileTypeDataInDto +{ + public Guid TrialId { get; set; } + + public bool IsCheck { get; set; } = false; +} public class CopySystemFileTypeToTrialInDto { public Guid TrialId { get; set; } @@ -62,6 +81,11 @@ public class TrialFileTypeAddOrEdit public Guid? SysFileTypeId { get; set; } public Guid TrialId { get; set; } + + /// + /// 显示顺序 + /// + public int ShowOrder { get; set; } } public class TrialFileTypeQuery : PageInput diff --git a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs index b4322306a..76ee14301 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs @@ -125,6 +125,34 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos return ResponseOutput.Ok(); } + /// + /// 获取项目文件类型数据 + /// + /// + /// + [HttpPost] + public async Task GetTrialFileTypeData(GetTrialFileTypeDataInDto inDto) + { + await this.CopySystemFileTypeToTrial(new CopySystemFileTypeToTrialInDto() + { + TrialId = inDto.TrialId + }); + var trialFileTypeList = await _trialFileTypeRepository.Where(x=>x.TrialId==inDto.TrialId) + .WhereIf(inDto.IsCheck, x => x.IsEnable) + .OrderBy(x=>x.ShowOrder) + .ProjectTo(_mapper.ConfigurationProvider) + .ToListAsync(); + + List result= trialFileTypeList.GroupBy(x =>new { x.ArchiveTypeEnum},(key,list)=>new TrialFileTypeData() { + ArchiveTypeEnum= key.ArchiveTypeEnum, + TrialFileTypeList=list.OrderBy(y=>y.ShowOrder).ToList(), + }).OrderBy(x=>x.ArchiveTypeEnum).ToList(); + + return new GetTrialFileTypeDataOutDto() { TrialFileTypeDataList = result }; + + + } + } diff --git a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs index 0f86638f3..1d56898c1 100644 --- a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs @@ -100,6 +100,7 @@ namespace IRaCIS.Core.Application.Service CreateMap().ReverseMap(); CreateMap(); + CreateMap().ReverseMap(); CreateMap();