From 2f93a490f02dfcf40d33a9ffd419dd14e191aab9 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Mon, 24 Feb 2025 16:14:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=A1=B9=E7=9B=AE=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 ++++++
.../Document/DTO/TrialFileTypeViewModel.cs | 24 +++++++++++++++++++
.../Service/Document/TrialFileTypeService.cs | 24 +++++++++++++++++++
.../Service/Document/_MapConfig.cs | 1 +
4 files changed, 56 insertions(+)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 8e1e76138..f12d748c1 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1466,6 +1466,13 @@
+
+
+ 复制系统数据到项目
+
+
+
+
项目定稿记录
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..6e7e1644c 100644
--- a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs
+++ b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs
@@ -125,6 +125,30 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos
return ResponseOutput.Ok();
}
+ ///
+ /// 获取项目文件类型数据
+ ///
+ ///
+ ///
+ public async Task GetTrialFileTypeData(GetTrialFileTypeDataInDto inDto)
+ {
+
+ 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();