From 15e3b389165216f38af62e5521f03946824751c0 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期四, 11 四月 2024 16:34:11 +0800
Subject: [PATCH] 附件增加标签

---
 Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileStdDto.cs                    |    6 +
 Yw.Service.DOCS.Core/01-entity/SysCommFile.cs                                 |   12 +-
 Yw.Service.DOCS.Core/05-service/00-core/DALCreateHelper.cs                    |    0 
 Yw.Service.DOCS.Core/05-service/00-core/CacheHelper.cs                        |    0 
 Yw.Dto.DOCS.Core/02-sys-attach-file/UpdateSysAttachFileInput.cs               |    5 +
 Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile_Instance.cs      |    5 +
 Yw.Application.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user |    3 
 Yw.Service.DOCS.Core/05-service/00-core/Extensions.cs                         |    0 
 Yw.Service.DOCS.Core/04-dal/02-postgresql/SysAttachFile.cs                    |    3 
 Yw.Service.DOCS.Core/02-model/SysCommFile.cs                                  |   14 +-
 Yw.Dto.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user         |    3 
 Yw.Service.DOCS.Core/02-model/SysAttachFile.cs                                |    9 ++
 Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_Controller.cs           |   11 ++
 Yw.Dto.DOCS.Core/02-sys-attach-file/AddSysAttachFileInput.cs                  |    5 +
 Yw.Dto.DOCS.Core/Yw.Dto.DOCS.Core.csproj                                      |    5 
 Yw.Application.DOCS.Core/00-core/Mapper.cs                                    |    6 +
 Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_StdController.cs        |   25 ++++++
 Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileDto.cs                       |    6 +
 Yw.Service.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user     |    3 
 Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile.cs               |   26 ++++++
 Yw.Service.DOCS.Core/01-entity/SysAttachFile.cs                               |    8 +
 Yw.Service.DOCS.Core/Yw.Service.DOCS.Core.csproj                              |    6 
 Yw.Service.DOCS.Core/04-dal/03-sqlite/SysAttachFile.cs                        |    2 
 Yw.Dto.DOCS.Core/99-model/attach/AttachAndFlagsInput.cs                       |   13 +++
 Yw.Application.DOCS.Core/Yw.Application.DOCS.Core.csproj                      |    4 
 Yw.Service.DOCS.Core/04-dal/01-interface/ISysAttachFile.cs                    |    2 
 Yw.Service.DOCS.Core/paras_docs_settings.json                                 |    4 
 27 files changed, 152 insertions(+), 34 deletions(-)

diff --git a/Yw.Application.DOCS.Core/00-core/Mapper.cs b/Yw.Application.DOCS.Core/00-core/Mapper.cs
index 5ff373b..e61dc78 100644
--- a/Yw.Application.DOCS.Core/00-core/Mapper.cs
+++ b/Yw.Application.DOCS.Core/00-core/Mapper.cs
@@ -25,9 +25,11 @@
 
             #region 2-attach-file
 
-            config.ForType<AddSysAttachFileInput, Model.SysAttachFile>();
+            config.ForType<AddSysAttachFileInput, Model.SysAttachFile>()
+                .Map(dest => dest.Flags, src => src.Flags);
 
-            config.ForType<UpdateSysAttachFileInput, Model.SysAttachFile>();
+            config.ForType<UpdateSysAttachFileInput, Model.SysAttachFile>()
+                .Map(dest => dest.Flags, src => src.Flags);
 
             config.ForType<Model.SysAttachFile, SysAttachFileDto>();
 
diff --git a/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_Controller.cs b/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_Controller.cs
index 97b5c90..5464ca2 100644
--- a/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_Controller.cs
+++ b/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_Controller.cs
@@ -153,6 +153,17 @@
             return bol;
         }
 
+        /// <summary>
+        /// 鏇存柊 Flags 
+        /// </summary>
+        [Route("UpdateFlags@V1.0")]
+        [HttpPut]
+        public bool UpdateFlags([Required] UpdateFlagsInput input)
+        {
+            var bol = _service.UpdateFlags(input.ID, input.Flags);
+            return bol;
+        }
+
         #endregion
 
         #region Exist
diff --git a/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_StdController.cs b/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_StdController.cs
index aab4ed9..882f5a1 100644
--- a/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_StdController.cs
+++ b/Yw.Application.DOCS.Core/02-attach-file/SysAttachFile_StdController.cs
@@ -29,6 +29,31 @@
             return vm_list;
         }
 
+        /// <summary>
+        /// 閫氳繃 AttachType 鍜� AttachID 鑾峰彇(鍖呭惈鏍囩)
+        /// </summary>
+        [Route("GetByAttachTypeAndAttachIDContainsFlags@V1.0")]
+        [HttpGet]
+        public List<SysAttachFileStdDto> GetByAttachTypeAndAttachIDContainsFlags([FromQuery][Required] AttachAndFlagsInput input)
+        {
+            var flags = FlagsHelper.ToList(input.Flags);
+            var list = new Yw.Service.SysAttachFile().GetByAttachTypeAndAttachIDContainsFlags(input.AttachType, input.AttachID, flags);
+            var vmList = list?.Select(x => new SysAttachFileStdDto(x)).ToList();
+            return vmList;
+        }
+
+        /// <summary>
+        /// 閫氳繃 AttachType 鍜� AttachID 鑾峰彇(鍖呭惈鏍囩)榛樿
+        /// </summary>
+        [Route("GetDefaultByAttachTypeAndAttachIDContainsFlags@V1.0")]
+        [HttpGet]
+        public SysAttachFileStdDto GetDefaultByAttachTypeAndAttachIDContainsFlags([FromQuery][Required] AttachAndFlagsInput input)
+        {
+            var flags = FlagsHelper.ToList(input.Flags);
+            var list = new Yw.Service.SysAttachFile().GetByAttachTypeAndAttachIDContainsFlags(input.AttachType, input.AttachID, flags);
+            var model = list?.FirstOrDefault();
+            return model == null ? null : new SysAttachFileStdDto(model);
+        }
 
     }
 }
\ No newline at end of file
diff --git a/Yw.Application.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user b/Yw.Application.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
index 0f6b73e..b8987d1 100644
--- a/Yw.Application.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/Yw.Application.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -4,6 +4,7 @@
 -->
 <Project>
   <PropertyGroup>
-    <History>True|2024-03-30T09:47:59.4165130Z;True|2024-03-26T10:54:35.0772427+08:00;True|2024-03-26T10:46:03.8699187+08:00;True|2024-03-08T16:21:49.0840402+08:00;True|2024-01-27T12:13:58.4697704+08:00;True|2024-01-21T15:19:50.6566650+08:00;True|2023-11-30T15:54:23.5609269+08:00;True|2023-11-30T15:39:50.5144968+08:00;True|2023-11-15T09:23:23.1277615+08:00;True|2023-11-13T11:14:23.7047654+08:00;True|2023-11-07T15:28:54.3174797+08:00;True|2023-10-27T13:22:55.8696581+08:00;True|2023-10-21T18:17:31.4681547+08:00;True|2023-10-18T17:29:57.6963038+08:00;True|2023-09-15T12:09:34.4888678+08:00;True|2023-09-14T15:15:33.6113596+08:00;True|2023-08-21T13:09:54.7440181+08:00;True|2023-07-25T15:08:42.3375388+08:00;True|2023-07-17T10:31:53.5181752+08:00;True|2023-07-17T10:31:44.6652344+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History>
+    <History>True|2024-04-11T08:33:31.8807722Z;True|2024-03-30T17:47:59.4165130+08:00;True|2024-03-26T10:54:35.0772427+08:00;True|2024-03-26T10:46:03.8699187+08:00;True|2024-03-08T16:21:49.0840402+08:00;True|2024-01-27T12:13:58.4697704+08:00;True|2024-01-21T15:19:50.6566650+08:00;True|2023-11-30T15:54:23.5609269+08:00;True|2023-11-30T15:39:50.5144968+08:00;True|2023-11-15T09:23:23.1277615+08:00;True|2023-11-13T11:14:23.7047654+08:00;True|2023-11-07T15:28:54.3174797+08:00;True|2023-10-27T13:22:55.8696581+08:00;True|2023-10-21T18:17:31.4681547+08:00;True|2023-10-18T17:29:57.6963038+08:00;True|2023-09-15T12:09:34.4888678+08:00;True|2023-09-14T15:15:33.6113596+08:00;True|2023-08-21T13:09:54.7440181+08:00;True|2023-07-25T15:08:42.3375388+08:00;True|2023-07-17T10:31:53.5181752+08:00;True|2023-07-17T10:31:44.6652344+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History>
+    <LastFailureDetails />
   </PropertyGroup>
 </Project>
\ No newline at end of file
diff --git a/Yw.Application.DOCS.Core/Yw.Application.DOCS.Core.csproj b/Yw.Application.DOCS.Core/Yw.Application.DOCS.Core.csproj
index 43b1c93..26b8e72 100644
--- a/Yw.Application.DOCS.Core/Yw.Application.DOCS.Core.csproj
+++ b/Yw.Application.DOCS.Core/Yw.Application.DOCS.Core.csproj
@@ -7,7 +7,7 @@
     <RootNamespace>Yw.Application</RootNamespace>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
     <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-    <Version>3.0.2</Version>
+    <Version>3.0.3</Version>
     <Description>寮曠敤鍗囩骇</Description>
   </PropertyGroup>
 
@@ -31,7 +31,7 @@
 
   <ItemGroup>
     <PackageReference Include="Yw.Application.Core" Version="3.0.5" />
-    <PackageReference Include="Yw.Dto.DOCS.Core" Version="3.0.2" />
+    <PackageReference Include="Yw.Dto.DOCS.Core" Version="3.0.3" />
   </ItemGroup>
 
 </Project>
diff --git a/Yw.Dto.DOCS.Core/02-sys-attach-file/AddSysAttachFileInput.cs b/Yw.Dto.DOCS.Core/02-sys-attach-file/AddSysAttachFileInput.cs
index 268f754..beafc6d 100644
--- a/Yw.Dto.DOCS.Core/02-sys-attach-file/AddSysAttachFileInput.cs
+++ b/Yw.Dto.DOCS.Core/02-sys-attach-file/AddSysAttachFileInput.cs
@@ -35,6 +35,11 @@
         public eFileFormat FileFormat { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 璇存槑
         /// </summary>	
         public string Description { get; set; }
diff --git a/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileDto.cs b/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileDto.cs
index b81b693..1b04506 100644
--- a/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileDto.cs
+++ b/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileDto.cs
@@ -25,6 +25,7 @@
             this.FileSuffix = rhs.FileSuffix;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags;
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -80,6 +81,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭鐮�
         /// </summary>	
         public int SortCode { get; set; }
diff --git a/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileStdDto.cs b/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileStdDto.cs
index ce19d02..ea39d76 100644
--- a/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileStdDto.cs
+++ b/Yw.Dto.DOCS.Core/02-sys-attach-file/SysAttachFileStdDto.cs
@@ -25,6 +25,7 @@
             this.FileSuffix = rhs.FileSuffix;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags;
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -80,6 +81,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭鐮�
         /// </summary>	
         public int SortCode { get; set; }
diff --git a/Yw.Dto.DOCS.Core/02-sys-attach-file/UpdateSysAttachFileInput.cs b/Yw.Dto.DOCS.Core/02-sys-attach-file/UpdateSysAttachFileInput.cs
index ab68136..7d1cd8a 100644
--- a/Yw.Dto.DOCS.Core/02-sys-attach-file/UpdateSysAttachFileInput.cs
+++ b/Yw.Dto.DOCS.Core/02-sys-attach-file/UpdateSysAttachFileInput.cs
@@ -28,6 +28,11 @@
         public eFileFormat FileFormat { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 璇存槑
         /// </summary>	
         public string Description { get; set; }
diff --git a/Yw.Dto.DOCS.Core/99-model/attach/AttachAndFlagsInput.cs b/Yw.Dto.DOCS.Core/99-model/attach/AttachAndFlagsInput.cs
new file mode 100644
index 0000000..5de318c
--- /dev/null
+++ b/Yw.Dto.DOCS.Core/99-model/attach/AttachAndFlagsInput.cs
@@ -0,0 +1,13 @@
+锘縩amespace Yw.Dto.DOCS
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class AttachAndFlagsInput : AttachInput
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public string Flags { get; set; }
+    }
+}
diff --git a/Yw.Dto.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user b/Yw.Dto.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
index 59154c4..30e4138 100644
--- a/Yw.Dto.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/Yw.Dto.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -4,6 +4,7 @@
 -->
 <Project>
   <PropertyGroup>
-    <History>True|2024-03-30T09:45:46.7835114Z;True|2024-03-26T10:53:48.1669252+08:00;True|2024-03-26T10:42:55.4895504+08:00;</History>
+    <History>True|2024-04-11T08:28:03.4130404Z;True|2024-03-30T17:45:46.7835114+08:00;True|2024-03-26T10:53:48.1669252+08:00;True|2024-03-26T10:42:55.4895504+08:00;</History>
+    <LastFailureDetails />
   </PropertyGroup>
 </Project>
\ No newline at end of file
diff --git a/Yw.Dto.DOCS.Core/Yw.Dto.DOCS.Core.csproj b/Yw.Dto.DOCS.Core/Yw.Dto.DOCS.Core.csproj
index 130df59..7ff7a7d 100644
--- a/Yw.Dto.DOCS.Core/Yw.Dto.DOCS.Core.csproj
+++ b/Yw.Dto.DOCS.Core/Yw.Dto.DOCS.Core.csproj
@@ -4,12 +4,13 @@
     <TargetFramework>net6.0</TargetFramework>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>disable</Nullable>
-    <Version>3.0.2</Version>
+    <Version>3.0.3</Version>
+    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
   </PropertyGroup>
 
   <ItemGroup>
     <PackageReference Include="Yw.Dto.Core" Version="3.0.5" />
-    <PackageReference Include="Yw.Service.DOCS.Core" Version="3.0.2" />
+    <PackageReference Include="Yw.Service.DOCS.Core" Version="3.0.3" />
   </ItemGroup>
 
 </Project>
diff --git a/Yw.Service.DOCS.Core/01-entity/SysAttachFile.cs b/Yw.Service.DOCS.Core/01-entity/SysAttachFile.cs
index 07a35e6..dc2f058 100644
--- a/Yw.Service.DOCS.Core/01-entity/SysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/01-entity/SysAttachFile.cs
@@ -4,7 +4,7 @@
     /// 绯荤粺闄勫姞鏂囦欢
     /// </summary>
     [SugarTable("sys_attach_file")]
-    public class SysAttachFile : BaseEntity, ISorter, System.ICloneable
+    public class SysAttachFile : BaseEntity, IFlags, ISorter, System.ICloneable
     {
         /// <summary>
         /// 
@@ -25,6 +25,7 @@
             this.FileSuffix = rhs.FileSuffix;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags;
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -75,6 +76,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public string Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭鐮�
         /// </summary>	
         public int SortCode { get; set; }
diff --git a/Yw.Service.DOCS.Core/01-entity/SysCommFile.cs b/Yw.Service.DOCS.Core/01-entity/SysCommFile.cs
index e70a10b..ab37319 100644
--- a/Yw.Service.DOCS.Core/01-entity/SysCommFile.cs
+++ b/Yw.Service.DOCS.Core/01-entity/SysCommFile.cs
@@ -22,9 +22,9 @@
             this.FileSize = rhs.FileSize;
             this.FileSuffix = rhs.FileSuffix;
             this.Catagory = rhs.Catagory;
-            this.Flags = rhs.Flags;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags;
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -60,11 +60,6 @@
         public string Catagory { get; set; }
 
         /// <summary>
-        /// 鏍囩
-        /// </summary>
-        public string Flags { get; set; }
-
-        /// <summary>
         /// 瀛樺偍浠撳簱
         /// </summary>	
         public string StorageHouse { get; set; }
@@ -75,6 +70,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public string Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭
         /// </summary>
         public int SortCode { get; set; }
diff --git a/Yw.Service.DOCS.Core/02-model/SysAttachFile.cs b/Yw.Service.DOCS.Core/02-model/SysAttachFile.cs
index 0a44c16..d328325 100644
--- a/Yw.Service.DOCS.Core/02-model/SysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/02-model/SysAttachFile.cs
@@ -3,7 +3,7 @@
     /// <summary>
     /// 绯荤粺闄勫姞鏂囦欢
     /// </summary>
-    public class SysAttachFile : BaseModel, ISorter, System.ICloneable
+    public class SysAttachFile : BaseModel, IFlags, ISorter, System.ICloneable
     {
         /// <summary>
         /// 
@@ -24,6 +24,7 @@
             this.FileSuffix = rhs.FileSuffix;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags?.ToList();
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -43,6 +44,7 @@
             this.FileSuffix = rhs.FileSuffix;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags?.ToList();
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -93,6 +95,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭鐮�
         /// </summary>	
         public int SortCode { get; set; }
diff --git a/Yw.Service.DOCS.Core/02-model/SysCommFile.cs b/Yw.Service.DOCS.Core/02-model/SysCommFile.cs
index 035b2ed..d13875d 100644
--- a/Yw.Service.DOCS.Core/02-model/SysCommFile.cs
+++ b/Yw.Service.DOCS.Core/02-model/SysCommFile.cs
@@ -21,9 +21,9 @@
             this.FileSize = rhs.FileSize;
             this.FileSuffix = rhs.FileSuffix;
             this.Catagory = rhs.Catagory;
-            this.Flags = rhs.Flags;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags?.ToList();
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -40,9 +40,9 @@
             this.FileSize = rhs.FileSize;
             this.FileSuffix = rhs.FileSuffix;
             this.Catagory = rhs.Catagory;
-            this.Flags = rhs.Flags;
             this.StorageHouse = rhs.StorageHouse;
             this.StorageCode = rhs.StorageCode;
+            this.Flags = rhs.Flags?.ToList();
             this.SortCode = rhs.SortCode;
             this.Description = rhs.Description;
         }
@@ -78,11 +78,6 @@
         public string Catagory { get; set; }
 
         /// <summary>
-        /// 鏍囩
-        /// </summary>
-        public List<string> Flags { get; set; }
-
-        /// <summary>
         /// 瀛樺偍浠撳簱
         /// </summary>	
         public string StorageHouse { get; set; }
@@ -93,6 +88,11 @@
         public string StorageCode { get; set; }
 
         /// <summary>
+        /// 鏍囩
+        /// </summary>
+        public List<string> Flags { get; set; }
+
+        /// <summary>
         /// 鎺掑簭
         /// </summary>
         public int SortCode { get; set; }
diff --git a/Yw.Service.DOCS.Core/04-dal/01-interface/ISysAttachFile.cs b/Yw.Service.DOCS.Core/04-dal/01-interface/ISysAttachFile.cs
index dffffc8..0e342a3 100644
--- a/Yw.Service.DOCS.Core/04-dal/01-interface/ISysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/04-dal/01-interface/ISysAttachFile.cs
@@ -3,7 +3,7 @@
     /// <summary>
     /// 
     /// </summary>
-    public interface ISysAttachFile : IBaseDAL<Entity.SysAttachFile>, IUpdateSorter
+    public interface ISysAttachFile : IBaseDAL<Entity.SysAttachFile>, IUpdateFlags, IUpdateSorter
     {
 
 
diff --git a/Yw.Service.DOCS.Core/04-dal/02-postgresql/SysAttachFile.cs b/Yw.Service.DOCS.Core/04-dal/02-postgresql/SysAttachFile.cs
index 76638f9..6b17c29 100644
--- a/Yw.Service.DOCS.Core/04-dal/02-postgresql/SysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/04-dal/02-postgresql/SysAttachFile.cs
@@ -3,7 +3,7 @@
     /// <summary>
     /// 
     /// </summary>
-    public partial class SysAttachFile : BaseDAL_Sorter<Entity.SysAttachFile>, ISysAttachFile
+    public partial class SysAttachFile : BaseDAL_Flags_Sorter<Entity.SysAttachFile>, ISysAttachFile
     {
         /// <summary>
         /// 
@@ -11,7 +11,6 @@
         public override ConnectionConfig ConnectionConfig
         {
             get { return ConfigHelper.PostgreSqlConnectionConfig; }
-
         }
 
 
diff --git a/Yw.Service.DOCS.Core/04-dal/03-sqlite/SysAttachFile.cs b/Yw.Service.DOCS.Core/04-dal/03-sqlite/SysAttachFile.cs
index c45eb2c..67f36fb 100644
--- a/Yw.Service.DOCS.Core/04-dal/03-sqlite/SysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/04-dal/03-sqlite/SysAttachFile.cs
@@ -3,7 +3,7 @@
     /// <summary>
     /// 
     /// </summary>
-    public partial class SysAttachFile : BaseDAL_Sorter<Entity.SysAttachFile>, ISysAttachFile
+    public partial class SysAttachFile : BaseDAL_Flags_Sorter<Entity.SysAttachFile>, ISysAttachFile
     {
         /// <summary>
         /// 
diff --git a/Yw.Service.DOCS.Core/05-service/00-helper/CacheHelper.cs b/Yw.Service.DOCS.Core/05-service/00-core/CacheHelper.cs
similarity index 100%
rename from Yw.Service.DOCS.Core/05-service/00-helper/CacheHelper.cs
rename to Yw.Service.DOCS.Core/05-service/00-core/CacheHelper.cs
diff --git a/Yw.Service.DOCS.Core/05-service/00-helper/DALCreateHelper.cs b/Yw.Service.DOCS.Core/05-service/00-core/DALCreateHelper.cs
similarity index 100%
rename from Yw.Service.DOCS.Core/05-service/00-helper/DALCreateHelper.cs
rename to Yw.Service.DOCS.Core/05-service/00-core/DALCreateHelper.cs
diff --git a/Yw.Service.DOCS.Core/05-service/00-helper/Extensions.cs b/Yw.Service.DOCS.Core/05-service/00-core/Extensions.cs
similarity index 100%
rename from Yw.Service.DOCS.Core/05-service/00-helper/Extensions.cs
rename to Yw.Service.DOCS.Core/05-service/00-core/Extensions.cs
diff --git a/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile.cs b/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile.cs
index 4fc6e0c..b9c7500 100644
--- a/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile.cs
+++ b/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile.cs
@@ -121,6 +121,15 @@
         }
 
         /// <summary>
+        /// 閫氳繃 AttachType 鍜� AttachID 鑾峰彇(鍖呭惈鏍囩)
+        /// </summary>
+        public List<Model.SysAttachFile> GetByAttachTypeAndAttachIDContainsFlags(string AttachType, long AttachID, List<string> Flags)
+        {
+            var all = GetByAttachTypeAndAttachID(AttachType, AttachID);
+            return all?.Where(x => x.Flags.ContainsC(Flags)).ToList();
+        }
+
+        /// <summary>
         /// 鑾峰彇鏈�澶ф帓搴忕爜
         /// </summary>
         public int GetMaxSortCode(string AttachType, long AttachID)
@@ -132,7 +141,6 @@
             }
             return all.Max(x => x.SortCode);
         }
-
 
         #endregion
 
@@ -251,6 +259,22 @@
             return bol;
         }
 
+        /// <summary>
+        /// 鏇存柊 Flags
+        /// </summary>
+        public bool UpdateFlags(long ID, List<string> Flags)
+        {
+            if (ID < 1)
+                return default;
+            var dal = DALCreateHelper.CreateDAL<Yw.DAL.ISysAttachFile>();
+            var bol = dal.UpdateFlags(ID, FlagsHelper.ToString(Flags));
+            if (bol)
+            {
+                UpdateCache(ID);
+            }
+            return bol;
+        }
+
         #endregion
 
         #region Exist
diff --git a/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile_Instance.cs b/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile_Instance.cs
index 1d6d7eb..387852c 100644
--- a/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile_Instance.cs
+++ b/Yw.Service.DOCS.Core/05-service/02-attach-file/SysAttachFile_Instance.cs
@@ -8,6 +8,7 @@
             if (entity == null)
                 return default;
             var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.SysAttachFile, Model.SysAttachFile>()
+            .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags)))
             ).CreateMapper();
             var model = mapper.Map<Entity.SysAttachFile, Model.SysAttachFile>(entity);
             return model;
@@ -18,6 +19,7 @@
             if (entities == null || entities.Count() < 1)
                 return default;
             var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Entity.SysAttachFile, Model.SysAttachFile>()
+            .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToList(src.Flags)))
             ).CreateMapper();
             var models = mapper.Map<List<Entity.SysAttachFile>, List<Model.SysAttachFile>>(entities);
             return models;
@@ -29,6 +31,7 @@
             if (model == null)
                 return default;
             var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.SysAttachFile, Entity.SysAttachFile>()
+            .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags)))
             ).CreateMapper();
             var entity = mapper.Map<Model.SysAttachFile, Entity.SysAttachFile>(model);
             return entity;
@@ -40,6 +43,7 @@
             if (models == null || models.Count < 1)
                 return default;
             var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.SysAttachFile, Entity.SysAttachFile>()
+            .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags)))
             ).CreateMapper();
             var entities = mapper.Map<List<Model.SysAttachFile>, List<Entity.SysAttachFile>>(models);
             return entities;
@@ -51,6 +55,7 @@
             if (model == null || entity == null)
                 return;
             var mapper = new MapperConfiguration(cfg => cfg.CreateMap<Model.SysAttachFile, Entity.SysAttachFile>()
+             .ForMember(d => d.Flags, opt => opt.MapFrom(src => FlagsHelper.ToString(src.Flags)))
              ).CreateMapper();
             mapper.Map(model, entity);
         }
diff --git a/Yw.Service.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user b/Yw.Service.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
index 606905e..75d6b55 100644
--- a/Yw.Service.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/Yw.Service.DOCS.Core/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -4,6 +4,7 @@
 -->
 <Project>
   <PropertyGroup>
-    <History>True|2024-03-30T09:44:15.2174811Z;True|2024-03-26T10:52:55.1864173+08:00;True|2024-03-26T10:36:12.1865987+08:00;True|2024-03-08T16:21:03.1209195+08:00;True|2024-01-21T15:16:55.1926207+08:00;True|2023-11-30T15:37:07.6925176+08:00;True|2023-11-30T15:35:38.6518588+08:00;True|2023-11-13T11:13:38.2876503+08:00;True|2023-11-07T15:26:15.8664916+08:00;True|2023-10-27T13:21:57.8245827+08:00;True|2023-10-21T18:15:57.8975745+08:00;True|2023-10-18T17:28:42.7347523+08:00;True|2023-09-15T12:08:33.6892307+08:00;True|2023-09-14T15:13:47.6095636+08:00;True|2023-08-21T13:08:28.2298969+08:00;True|2023-07-17T10:30:15.0370305+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History>
+    <History>True|2024-04-11T08:24:26.5911873Z;False|2024-04-11T16:23:59.8389908+08:00;True|2024-03-30T17:44:15.2174811+08:00;True|2024-03-26T10:52:55.1864173+08:00;True|2024-03-26T10:36:12.1865987+08:00;True|2024-03-08T16:21:03.1209195+08:00;True|2024-01-21T15:16:55.1926207+08:00;True|2023-11-30T15:37:07.6925176+08:00;True|2023-11-30T15:35:38.6518588+08:00;True|2023-11-13T11:13:38.2876503+08:00;True|2023-11-07T15:26:15.8664916+08:00;True|2023-10-27T13:21:57.8245827+08:00;True|2023-10-21T18:15:57.8975745+08:00;True|2023-10-18T17:28:42.7347523+08:00;True|2023-09-15T12:08:33.6892307+08:00;True|2023-09-14T15:13:47.6095636+08:00;True|2023-08-21T13:08:28.2298969+08:00;True|2023-07-17T10:30:15.0370305+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History>
+    <LastFailureDetails />
   </PropertyGroup>
 </Project>
\ No newline at end of file
diff --git a/Yw.Service.DOCS.Core/Yw.Service.DOCS.Core.csproj b/Yw.Service.DOCS.Core/Yw.Service.DOCS.Core.csproj
index f05e192..d198b4c 100644
--- a/Yw.Service.DOCS.Core/Yw.Service.DOCS.Core.csproj
+++ b/Yw.Service.DOCS.Core/Yw.Service.DOCS.Core.csproj
@@ -7,7 +7,7 @@
 		<RootNamespace>Yw</RootNamespace>
 		<GenerateDocumentationFile>True</GenerateDocumentationFile>
 		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
-		<Version>3.0.2</Version>
+		<Version>3.0.3</Version>
 		<Description>寮曠敤鍗囩骇</Description>
 	</PropertyGroup>
 
@@ -27,8 +27,8 @@
 	</ItemGroup>
 
 	<ItemGroup>
-	  <PackageReference Include="Yw.DAL.PostgreSql.Core" Version="3.0.0" />
-	  <PackageReference Include="Yw.DAL.SQLite.Core" Version="3.0.0" />
+	  <PackageReference Include="Yw.DAL.PostgreSql.Core" Version="3.0.2" />
+	  <PackageReference Include="Yw.DAL.SQLite.Core" Version="3.0.2" />
 	  <PackageReference Include="Yw.DALFactory.Core" Version="3.0.0" />
 	  <PackageReference Include="Yw.Service.Core" Version="3.0.2" />
 	</ItemGroup>
diff --git a/Yw.Service.DOCS.Core/paras_docs_settings.json b/Yw.Service.DOCS.Core/paras_docs_settings.json
index 9e645f8..0368c2b 100644
--- a/Yw.Service.DOCS.Core/paras_docs_settings.json
+++ b/Yw.Service.DOCS.Core/paras_docs_settings.json
@@ -4,7 +4,7 @@
 
   "DOCS": {
     "DataBase": {
-      "DbType": "PostgreSql", //PostgreSql、SQLite
+      "DbType": "PostgreSql", //PostgreSql銆丼QLite
       "Factory": {
         "EnableCache": true,
         "CacheTime": 10
@@ -18,7 +18,7 @@
     },
     "DataFolder": "DOCS",
     "CAL": {
-      "CALType": "HttpClient", //HttpClient、LocalClient
+      "CALType": "HttpClient", //HttpClient銆丩ocalClient
       "HttpClient": {
         "HttpUrl": "http://101.133.133.173:97"
       },

--
Gitblit v1.9.3