From 9c7ff006100d327b1b60615304de348f5ad36c63 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 16 八月 2023 09:06:14 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService --- DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs | 22 ++++ DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs | 1 DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs | 26 +++++ DocumentServiceAPI.Application/DocManage/DocManageAppService.cs | 110 ++++++++++++++++++++++ DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml | 11 ++ DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs | 71 ++++++++++++++ DocumentServiceAPI.Application/UserAndLogin/LogInController.cs | 2 DocumentServiceAPI.Model/Oder/Oder.cs | 18 +++ DocumentServiceAPI.Utility/PageBaseSearch.cs | 5 - 9 files changed, 258 insertions(+), 8 deletions(-) diff --git a/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs b/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs new file mode 100644 index 0000000..f09fa68 --- /dev/null +++ b/DocumentServiceAPI.Application/DocManage/DocManageAppService.cs @@ -0,0 +1,110 @@ +锘縰sing DocumentServiceAPI.Application.DocManage.Dtos; +using DocumentServiceAPI.Application.DocManage.Services; +using DocumentServiceAPI.Model.cyDocumentModel; +using DocumentServiceAPI.Utility; + +namespace DocumentServiceAPI.Application.DocManage +{ + /// <summary> + /// 璧勬枡鍒嗙被绠$悊 + /// </summary> + public class DocManageAppService : IDynamicApiController + { + private readonly DocClassificationService _classificationService; + + public DocManageAppService(DocClassificationService classificationService) + { + _classificationService = classificationService; + } + + /// <summary> + /// 鏍规嵁ID鏌ヨ瀵硅薄 + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + public async Task<IActionResult> GetInfo(int id) + { + var model =await _classificationService.GetByIdAsync(id); + return new JsonResult(model); + } + + /// <summary> + /// 鏍规嵁鍒嗛〉鏉′欢鏌ヨ鍒嗛〉鏁版嵁 + /// </summary> + /// <param name="page"></param> + /// <returns></returns> + public async Task<IActionResult> PostListPage(DocClassificationPageSearch page) + { + PageModel pg = new PageModel(); + pg.PageSize = page.PageSize; + pg.PageIndex = page.PageIndex; + + PageResult<Doc_Classification> result = new PageResult<Doc_Classification>(); + if (page.Status.HasValue) + { + result.Items = await _classificationService.GetPageListAsync(c => c.status ==page.Status && c.parent_code == page.Code, pg); + } + else + { + result.Items = await _classificationService.GetPageListAsync(c => c.parent_code == page.Code, pg); + } + result.TotalCount = pg.TotalCount; + result.PageIndex = pg.PageIndex; + result.PageSize = pg.PageSize; + return new JsonResult(result); + } + + /// <summary> + /// 娣诲姞鏁版嵁 + /// </summary> + /// <param name="info"></param> + /// <returns></returns> + public async Task<IActionResult> PostAddInfo(Classification_Submit_Dto info) + { + Doc_Classification doc = new Doc_Classification(); + doc.add_time = DateTime.Now; + doc.doc_classification = info.name; + doc.doc_classification_code = ""; + doc.is_system = false; + doc.parent_code = info.code; + doc.sort_id = 99; + doc.status = info.status; + doc.tenant_code = ""; + + var msg =await _classificationService.InsertAsync(doc); + return new JsonResult(msg); + } + + /// <summary> + /// 淇敼鏁版嵁 + /// </summary> + /// <param name="info"></param> + /// <returns></returns> + public async Task<IActionResult> PostEdtInfo(Classification_Submit_Dto info) + { + var msg = false; + var model = await _classificationService.GetByIdAsync(info.id); + if (model != null) + { + model.add_time = DateTime.Now; + model.doc_classification = info.name; + model.status = info.status; + + msg = await _classificationService.UpdateAsync(model); + } + + return new JsonResult(msg); + } + + /// <summary> + /// 鍒犻櫎鏁版嵁 + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + public async Task<IActionResult> PostDelInfo(int id) + { + var msg = await _classificationService.DeleteByIdAsync(id); + return new JsonResult(msg); + } + } +} diff --git a/DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs b/DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs new file mode 100644 index 0000000..cfd30fd --- /dev/null +++ b/DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs @@ -0,0 +1,22 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocumentServiceAPI.Application.DocManage.Dtos +{ + public class Classification_Submit_Dto + { + public int id { get; set; } + + public string name { get; set; } + + /// <summary> + /// 鐖剁骇缂栫爜 + /// </summary> + public string code { get; set; } + + public int status { get; set; } + } +} diff --git a/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs new file mode 100644 index 0000000..675d4d3 --- /dev/null +++ b/DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs @@ -0,0 +1,26 @@ +锘縰sing DocumentServiceAPI.Core; +using DocumentServiceAPI.Model.cyDocumentModel; +using DocumentServiceAPI.Utility; + +namespace DocumentServiceAPI.Application.DocManage.Services +{ + public class DocClassificationPageSearch : PageBaseSearch + { + /// <summary> + /// 鍒嗙被浠g爜 + /// </summary> + public string Code { get; set; } + + /// <summary> + /// 鐘舵�� + /// </summary> + public int? Status { get; set; } + } + + /// <summary> + /// 鏂囨。鍒嗙被 + /// </summary> + public class DocClassificationService : BaseRepository<Doc_Classification>, ITransient + { + } +} diff --git a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml index 8808cf3..3e6503b 100644 --- a/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml +++ b/DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml @@ -1,4 +1,4 @@ -<?xml version="1.0"?> +锘�<?xml version="1.0"?> <doc> <assembly> <name>DocumentServiceAPI.Application</name> @@ -556,6 +556,15 @@ Default: Nullable:True </summary> + <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.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs index af4662b..3478ee1 100644 --- a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs +++ b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs @@ -31,8 +31,6 @@ /// </summary> /// <returns>鐧诲綍淇℃伅</returns> [HttpPost("LogoIn")] - - public async Task<RetLoginVM> LogoIn (LoginPsWordIN Parma) { bool needtoken=false; diff --git a/DocumentServiceAPI.Model/Oder/Oder.cs b/DocumentServiceAPI.Model/Oder/Oder.cs new file mode 100644 index 0000000..214e718 --- /dev/null +++ b/DocumentServiceAPI.Model/Oder/Oder.cs @@ -0,0 +1,18 @@ +锘縰sing DocumentServiceAPI.Enum; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocumentServiceAPI.Model.Oder +{ + /// <summary> + /// 璁㈠崟绫� + /// </summary> + public class Oder:BaseModel + { + + + } +} 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;} } + } diff --git a/DocumentServiceAPI.Utility/PageBaseSearch.cs b/DocumentServiceAPI.Utility/PageBaseSearch.cs index 120752f..6411526 100644 --- a/DocumentServiceAPI.Utility/PageBaseSearch.cs +++ b/DocumentServiceAPI.Utility/PageBaseSearch.cs @@ -49,11 +49,6 @@ public int PageSize { get; set; } /// <summary> - /// 椤垫�绘暟 - /// </summary> - public int TotalPage { get; set; } - - /// <summary> /// 璁板綍鎬绘暟 /// </summary> public int TotalCount { get; set; } -- Gitblit v1.9.1