From dbb562890133eeb111f729241e0660239d3ebe18 Mon Sep 17 00:00:00 2001 From: qwj <qwjzorro@163.com> Date: 星期四, 27 七月 2023 10:02:14 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService --- DocumentServiceAPI.Application/System/OrganizationAppService.cs | 63 +++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/DocumentServiceAPI.Application/System/OrganizationAppService.cs b/DocumentServiceAPI.Application/System/OrganizationAppService.cs new file mode 100644 index 0000000..30da06e --- /dev/null +++ b/DocumentServiceAPI.Application/System/OrganizationAppService.cs @@ -0,0 +1,63 @@ +锘縰sing DocumentServiceAPI.Application.System.Services; +using DocumentServiceAPI.Model; +using DocumentServiceAPI.Utility; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocumentServiceAPI.Application.System +{ + public class OrganizationPageSearch: PageBaseSearch + { + + } + + public class OrganizationAppService : IDynamicApiController + { + private readonly OrganizationService _businessService; + + public OrganizationAppService(OrganizationService businessService) + { + _businessService = businessService; + } + + public IActionResult GetInfo() + { + var person = _businessService.GetList(); + return new JsonResult(person); + } + + public IActionResult PostInfoPage(OrganizationPageSearch page) + { + PageModel pg = new PageModel(); + pg.PageSize = page.PageSize; + pg.PageIndex = page.PageIndex; + + PageResult<Document_TenderUnit> result = new PageResult<Document_TenderUnit>(); + result.Items = _businessService.GetPageListAsync(c => c.UnitId > 0, pg).Result; + result.TotalCount = pg.TotalCount; + + return new JsonResult(result); + } + + public IActionResult PostAddTest(Document_TenderUnit info) + { + var person = _businessService.InsertAsync(info); + return new JsonResult(person.Result); + } + + public IActionResult PostEdtTest(Document_TenderUnit info) + { + var person = _businessService.UpdateAsync(info); + return new JsonResult(person.Result); + } + + public IActionResult PostDelTest(int id) + { + var person = _businessService.DeleteByIdAsync(id); + return new JsonResult(person.Result); + } + } +} -- Gitblit v1.9.1