From 0f403ac277b9e3b4b39944bddb7442e94836260c Mon Sep 17 00:00:00 2001
From: qwj <qwjzorro@163.com>
Date: 星期二, 08 八月 2023 11:45:01 +0800
Subject: [PATCH] 资质类型

---
 DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs          |    1 
 DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs |   27 +++++++++
 DocumentServiceAPI.Application/DocManage/DocManageAppService.cs            |   62 ++++++++++++++++++++
 DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml          |   10 +++
 DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs             |   71 +++++++++++++++++++++++
 DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj       |    1 
 6 files changed, 172 insertions(+), 0 deletions(-)

diff --git a/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs b/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs
new file mode 100644
index 0000000..05ad3f6
--- /dev/null
+++ b/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs
@@ -0,0 +1,62 @@
+锘縰sing DocumentServiceAPI.Application.System.Services;
+using DocumentServiceAPI.Application.System;
+using DocumentServiceAPI.Utility;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using DocumentServiceAPI.Application.DocManage.Services;
+using DocumentServiceAPI.Model;
+using DocumentServiceAPI.Model.cyDocumentModel;
+
+namespace DocumentServiceAPI.Application.DocManage
+{
+    public class DocManageAppService : IDynamicApiController
+    {
+        private readonly DocClassificationService _classificationService;
+
+        public DocManageAppService(DocClassificationService classificationService)
+        {
+            _classificationService = classificationService;
+        }
+
+        public IActionResult GetInfo()
+        {
+            var person = _classificationService.GetList();
+            return new JsonResult(person);
+        }
+
+        public IActionResult PostListPage(DocClassificationPageSearch page)
+        {
+            PageModel pg = new PageModel();
+            pg.PageSize = page.PageSize;
+            pg.PageIndex = page.PageIndex;
+
+            PageResult<Doc_Classification> result = new PageResult<Doc_Classification>();
+            result.Items = _classificationService.GetPageListAsync(c => c.parent_code==page.Code, pg).Result;
+            result.TotalCount = pg.TotalCount;
+
+            return new JsonResult(result);
+        }
+
+        public IActionResult PostAddTest(Doc_Classification info)
+        {
+            var person = _classificationService.InsertAsync(info);
+            return new JsonResult(person.Result);
+        }
+
+        public IActionResult PostEdtTest(Doc_Classification info)
+        {
+
+            var person = _classificationService.UpdateAsync(info);
+            return new JsonResult(person.Result);
+        }
+
+        public IActionResult PostDelTest(int id)
+        {
+            var person = _classificationService.DeleteByIdAsync(id);
+            return new JsonResult(person.Result);
+        }
+    }
+}
diff --git a/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs
new file mode 100644
index 0000000..8a1e5f1
--- /dev/null
+++ b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs
@@ -0,0 +1,27 @@
+锘縰sing DocumentServiceAPI.Core;
+using DocumentServiceAPI.Model;
+using DocumentServiceAPI.Model.cyDocumentModel;
+using DocumentServiceAPI.Utility;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DocumentServiceAPI.Application.DocManage.Services
+{
+    public class DocClassificationPageSearch : PageBaseSearch
+    {
+        /// <summary>
+        /// 鍒嗙被浠g爜
+        /// </summary>
+        public string Code { get; set; }
+    }
+
+    /// <summary>
+    /// 鏂囨。鍒嗙被
+    /// </summary>
+    public class DocClassificationService : BaseRepository<Doc_Classification>, ITransient
+    {
+    }
+}
diff --git a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj
index a44c6d5..df6912c 100644
--- a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj
+++ b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.csproj
@@ -29,6 +29,7 @@
 	</ItemGroup>
 
 	<ItemGroup>
+	  <Folder Include="DocManage\Dtos\" />
 	  <Folder Include="GlobalServices\" />
 	</ItemGroup>
 
diff --git a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
index 29ebda8..0cf1c1e 100644
--- a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
+++ b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml
@@ -4,6 +4,16 @@
         <name>DocumentServiceAPI.Application</name>
     </assembly>
     <members>
+        <member name="P:DocumentServiceAPI.Application.DocManage.Services.DocClassificationPageSearch.Code">
+            <summary>
+            鍒嗙被浠g爜
+            </summary>
+        </member>
+        <member name="T:DocumentServiceAPI.Application.DocManage.Services.DocClassificationService">
+            <summary>
+            鏂囨。鍒嗙被
+            </summary>
+        </member>
         <member name="T:DocumentServiceAPI.Application.Repository.EmployeeRepository">
             <summary>
             鍛樺伐璇诲彇 
diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs
new file mode 100644
index 0000000..2e1fb59
--- /dev/null
+++ b/DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs
@@ -0,0 +1,71 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Principal;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DocumentServiceAPI.Model.cyDocumentModel
+{
+    ///<summary>
+    ///鏂囨。鍒嗙被
+    ///</summary>
+    [SugarTable("t_doc_classification")]
+    public class Doc_Classification : Doc_Base
+    {
+        public Doc_Classification()
+        {
+        }
+
+        /// <summary>
+        /// id
+        /// </summary>           
+        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+        public int id { get; set; }
+
+        /// <summary>
+        /// 缂栫爜
+        /// </summary>           
+        public string doc_classification_code { get; set; }
+
+        /// <summary>
+        /// 鍚嶇О
+        /// </summary>           
+        public string doc_classification { get; set; }
+
+        /// <summary>
+        /// 鐖剁骇缂栫爜
+        /// </summary>           
+        public string parent_code { get; set; }
+
+        /// <summary>
+        /// 绯荤粺鏍囪瘑
+        /// </summary>
+        public bool is_system { get; set; }
+
+    }
+
+    public abstract class Doc_Base
+    {
+        /// <summary>
+        /// 绉熸埛鏍囪瘑
+        /// </summary>           
+        public string tenant_code { get; set; }
+
+        /// <summary>
+        /// 娣诲姞/鏇存柊鏃堕棿
+        /// </summary>           
+        public DateTime add_time { get; set; }
+
+        /// <summary>
+        /// 鐘舵��
+        /// </summary>           
+        public int status { get; set; }
+
+        /// <summary>
+        /// 鎺掑簭
+        /// </summary>
+        public int sort_id { get; set; }
+    }
+}
diff --git a/DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs b/DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs
index 3f065e1..5a3ff05 100644
--- a/DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs
+++ b/DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs
@@ -66,4 +66,5 @@
            public int? OrderItem {get;set;}
 
     }
+    
 }

--
Gitblit v1.9.1