DocumentServiceAPI.Application/DocManage/DocManageAppService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/DocumentServiceAPI.Application.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Application/UserAndLogin/LogInController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Model/Oder/Oder.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DocumentServiceAPI.Utility/PageBaseSearch.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DocumentServiceAPI.Application/DocManage/DocManageAppService.cs
New file @@ -0,0 +1,110 @@ using 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); } } } DocumentServiceAPI.Application/DocManage/Dtos/Classification_Submit_Dto.cs
New file @@ -0,0 +1,22 @@ using 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; } } } DocumentServiceAPI.Application/DocManage/Services/DocumentManageService.cs
New file @@ -0,0 +1,26 @@ using DocumentServiceAPI.Core; using DocumentServiceAPI.Model.cyDocumentModel; using DocumentServiceAPI.Utility; namespace DocumentServiceAPI.Application.DocManage.Services { public class DocClassificationPageSearch : PageBaseSearch { /// <summary> /// 分类代码 /// </summary> public string Code { get; set; } /// <summary> /// 状态 /// </summary> public int? Status { get; set; } } /// <summary> /// 文档分类 /// </summary> public class DocClassificationService : BaseRepository<Doc_Classification>, ITransient { } } 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> 分类代码 </summary> </member> <member name="T:DocumentServiceAPI.Application.DocManage.Services.DocClassificationService"> <summary> 文档分类 </summary> </member> <member name="T:DocumentServiceAPI.Application.Repository.EmployeeRepository"> <summary> DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
@@ -31,8 +31,6 @@ /// </summary> /// <returns>登录信息</returns> [HttpPost("LogoIn")] public async Task<RetLoginVM> LogoIn (LoginPsWordIN Parma) { bool needtoken=false; DocumentServiceAPI.Model/Oder/Oder.cs
New file @@ -0,0 +1,18 @@ using 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 { } } DocumentServiceAPI.Model/cyDocumentModel/Doc_Classification.cs
New file @@ -0,0 +1,71 @@ using 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; } } } DocumentServiceAPI.Model/cyDocumentModel/Document_AptitudeType.cs
@@ -66,4 +66,5 @@ public int? OrderItem {get;set;} } } 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; }