From a541742fd68adfd5d4a77d1f7f0fc69045c72ac2 Mon Sep 17 00:00:00 2001
From: bklLiudl <673013083@qq.com>
Date: 星期五, 12 七月 2024 08:15:16 +0800
Subject: [PATCH] 采购单据,入库单据

---
 Wms/Wms/Controllers/BllAsnController.cs |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 3a703ac..6e6be6f 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -9,12 +9,18 @@
 using WMS.IBLL.IBllAsnServer;
 using WMS.IBLL.ILogServer;
 using Model.ModelVm.BllAsnVm;
+using Utility;
+using Model.ModelDto.BllAsnDto;
+using System.Threading.Tasks;
+using SqlSugar;
+using System.Diagnostics;
 
 namespace Wms.Controllers
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
     [Authorize]
+    
     public class BllAsnController : ControllerBase
     {
         #region 渚濊禆娉ㄥ叆
@@ -1164,40 +1170,36 @@
         /// 鑾峰彇閲囪喘鍗曚俊鎭�
         /// </summary>
         /// <param name="model">鏌ヨ鏉′欢</param>
-        /// <returns>鍏ュ簱鍗曚俊鎭�</returns>
+        /// <returns>閲囪喘鍗曚俊鎭�</returns>
         [HttpPost]
-        public IActionResult GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList>  GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
         {
-            try
-            {
-                var models = _procurePlanSvc.GetProcurePlanNoticeList(model, out int count);
-
-                return Ok(new { code = 0, count, msg = "鍏ュ簱鍗曚俊鎭�", data = models });
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = e.Message });
-            }
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _procurePlanSvc.GetProcurePlanNoticeList(model, count);
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
+
         /// <summary>
         /// 鑾峰彇閲囪喘鍗曟槑缁嗕俊鎭�
         /// </summary>
         /// <param name="model"></param>
         /// <returns></returns>
         [HttpPost]
-        public IActionResult GetProcurePlanNoticeDetailList(ProcurePlanNoticeDetailVm model)
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList> GetProcurePlanNoticeDetailList(ProcurePlanNoticeDetailVm model)
         {
-            try
-            {
-                var models = _procurePlanSvc.GetProcurePlanNoticeDetailList(model, out int count);
+            Stopwatch stopwatch = new Stopwatch();
+            stopwatch.Start();
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _procurePlanSvc.GetProcurePlanNoticeDetailList(model, count);
+            stopwatch.Stop();
 
-                return Ok(new { code = 0, count, msg = "鍏ュ簱鍗曟槑缁嗕俊鎭�", data = models });
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = e.Message });
-            }
+            var time = stopwatch.ElapsedMilliseconds;
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
+
+
         /// <summary>
         /// 閫氳繃閲囪喘鍗曠敓鎴愬叆搴撳崟鎹�
         /// </summary>

--
Gitblit v1.8.0