From 3a050b4d542dd2aefa65de27a6acecca1d9dda3d Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期日, 25 五月 2025 14:27:04 +0800
Subject: [PATCH] 修改问题

---
 Wms/Wms/Controllers/PdaAsnController.cs |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index 889437b..3987256 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -1,5 +1,7 @@
 锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Identity;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
 using Model.InterFaceModel;
 using Model.ModelDto.BllAsnDto;
 using Model.ModelDto.DataDto;
@@ -11,6 +13,7 @@
 using System.Security.Claims;
 using Utility;
 using Utility.Tools;
+using Wms.Tools;
 using WMS.BLL.LogServer;
 using WMS.Entity.BllAsnEntity;
 using WMS.Entity.DataEntity;
@@ -23,11 +26,15 @@
     [Authorize]
     public class PdaAsnController : ControllerBase
     {
+        private readonly ApiUrlConfig _config; //鎺ュ彛浜や簰璺緞
         private readonly IPdaAsnServer _PdaAsnSvc;
+        private readonly UserManager _userManager;
 
-        public PdaAsnController(IPdaAsnServer pdaAsnSvc)
+        public PdaAsnController(IOptions<ApiUrlConfig> setting, IPdaAsnServer pdaAsnSvc,UserManager userManager)
         {
-            _PdaAsnSvc = pdaAsnSvc;
+            _config = setting.Value;
+            _PdaAsnSvc = pdaAsnSvc; 
+            _userManager = userManager;
         }
         
 
@@ -175,7 +182,7 @@
         {
             try
             {
-                var models = _PdaAsnSvc.GetBindBoxInfos(model);
+                var models = _PdaAsnSvc.GetBindBoxInfos(model, _config.BoxHost + _config.GetBoxUrl);
 
                 return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models });
             }
@@ -212,9 +219,53 @@
             }
         }
 
+
+        /// <summary>
+        /// 鏍规嵁鍗曟嵁鑾峰彇鏍囩鏁伴噺
+        /// </summary>
+        /// <param name="model">ASNNo锛氬叆搴撳崟銆丄SNDetailNo锛氬叆搴撳崟鏄庣粏鍙�</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetBoxCountByAsn(PalletBindVm model)
+        {
+            try
+            {
+                var list = _PdaAsnSvc.GetBoxCountByAsn(model.ASNNo,model.ASNDetailNo);
+
+                 
+                return Ok(new { code = 0, msg = "鏍规嵁鍗曟嵁鑾峰彇鏍囩鏁伴噺", data= list});
+                 
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+
         //---------------------------------------------鐢宠鍏ュ簱椤甸潰----------------------------------------------------------------------
 
-          
+
+        /// <summary>
+        /// 淇濆瓨鎸囧畾鐨勫偍浣�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult SaveAppointLocate(PalletBindVm model)
+        {
+            try
+            {
+                _PdaAsnSvc.SaveAppointLocate(model.PalletNo, model.LocatNo, _userManager.UserId);
+
+                return Ok(new HttpReturnModel{ Success = "0", Message = "鎴愬姛鎸囧畾鍌ㄤ綅" });
+
+            }
+            catch (Exception e)
+            {
+                return Ok(new HttpReturnModel { Success = "1", Message = e.Message });
+            }
+        }
 
 
         #endregion

--
Gitblit v1.8.0