From 970d5c1800587d3a634a716a13a3092f59785b11 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 15 七月 2024 14:12:48 +0800
Subject: [PATCH] 波次管理页面和拣货明细页面接口方法更改

---
 Wms/Wms/Controllers/BllSoController.cs |   62 ++++++++++--------------------
 1 files changed, 21 insertions(+), 41 deletions(-)

diff --git a/Wms/Wms/Controllers/BllSoController.cs b/Wms/Wms/Controllers/BllSoController.cs
index 0b4b20c..271a503 100644
--- a/Wms/Wms/Controllers/BllSoController.cs
+++ b/Wms/Wms/Controllers/BllSoController.cs
@@ -522,18 +522,13 @@
         /// <param name="model"></param>
         /// <returns></returns>
         [HttpPost]
-        public IActionResult GetExportAllotList(GetExportAllotVm model)
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList> GetExportAllotList(GetExportAllotVm model)
         {
-            try
-            {
-                var bolls = _exAllotSvc.GetExportAllotList(model.SoNo, model.WaveNo, model.PalletNo, model.SkuNo, model.SkuName, model.LotNo, model.Status,model.BoxNo, model.Page, model.Limit, out int count);
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _exAllotSvc.GetExportAllotList(model, count);
 
-                return Ok(new { code = 0, count, msg = "鍑哄簱鍒嗛厤淇℃伅", data = bolls });
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = e.Message });
-            }
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
 
         /// <summary>
@@ -577,18 +572,13 @@
         /// <param name="model"></param>
         /// <returns></returns>
         [HttpPost]
-        public IActionResult GetCompleteDetailList(GetCompleteDetailVm model)
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList> GetCompleteDetailList(GetCompleteDetailVm model)
         {
-            try
-            {
-                var bolls = _comDetailSvc.GetCompleteDetailList(model.Id,model.Page, model.Limit, out int count);
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _comDetailSvc.GetCompleteDetailList(model, count);
 
-                return Ok(new { code = 0, count, msg = "鎷h揣鏄庣粏淇℃伅", data = bolls });
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = e.Message });
-            }
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
 
         [HttpGet]
@@ -615,19 +605,14 @@
         /// </summary>
         /// <param name="model"></param>
         /// <returns></returns>
-        [HttpPost] 
-        public IActionResult GetPalletNoOutList(GetPalletNoOutVm model)
+        [HttpPost]
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList> GetPalletNoOutList(GetPalletNoOutVm model)
         {
-            try
-            {
-                var bolls = _exNoticeSvc.GetPalletNoOutList(model.SkuNo,model.SkuName,model.PalletNo,model.LotNo,model.InspectMark,model.BitPalletMark,model.Page,model.Limit,out int count);
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _exNoticeSvc.GetPalletNoOutList(model, count);
 
-                return Ok(new { code = 0, count, msg = "鑾峰彇鎵樼洏鍑哄簱鏁版嵁寮傚父", data = bolls});
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = "鎵樼洏鍑哄簱鏁版嵁" + e.Message });
-            }
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
 
         /// <summary>
@@ -909,18 +894,13 @@
         /// <param name="model"></param>
         /// <returns></returns>
         [HttpPost]
-        public IActionResult GetWaveMageList(GetWaveMageVm model)
+        [ServiceFilter(typeof(ApiResponseActionFilter))]
+        public async Task<SqlSugarPagedList> GetWaveMageList(GetWaveMageVm model)
         {
-            try
-            {
-                var bolls = _waveSvc.GetWaveMageList(model.WaveNo, model.Status, model.LotNo, model.LogisticsId, model.Page, model.Limit, out int count);
+            RefAsync<int> count = new RefAsync<int>();
+            var bolls = await _waveSvc.GetWaveMageList(model, count);
 
-                return Ok(new { code = 0, count, msg = "鍑哄簱鍗曚俊鎭�", data = bolls });
-            }
-            catch (Exception e)
-            {
-                return Ok(new { code = 1, msg = e.Message });
-            }
+            return new SqlSugarPagedList() { Items = bolls, Total = count };
         }
 
         /// <summary>

--
Gitblit v1.8.0