From 157abc191c34e57c1b958ae74fc3de6518ca8a30 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期五, 28 二月 2025 11:06:36 +0800 Subject: [PATCH] 修改客户需求 --- Wms/Wms/Controllers/PdaAsnController.cs | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 55 insertions(+), 3 deletions(-) diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs index 80c67b6..8e48743 100644 --- a/Wms/Wms/Controllers/PdaAsnController.cs +++ b/Wms/Wms/Controllers/PdaAsnController.cs @@ -1,10 +1,12 @@ 锘縰sing Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; using Model.ModelVm; using Model.ModelVm.BllAsnVm; using Model.ModelVm.PdaVm; using System; using System.Security.Claims; +using Wms.Tools; using WMS.Entity.BllAsnEntity; using WMS.IBLL.IPdaServer; @@ -17,10 +19,12 @@ { #region 渚濊禆娉ㄥ叆 private readonly IPdaAsnServer _PdaAsnSvc; + private readonly ApiUrlConfig _config; //鎺ュ彛浜や簰璺緞 - public PdaAsnController(IPdaAsnServer pdaAsnSvc) + public PdaAsnController(IPdaAsnServer pdaAsnSvc, IOptions<ApiUrlConfig> setting) { - _PdaAsnSvc = pdaAsnSvc; + _PdaAsnSvc = pdaAsnSvc; + _config = setting.Value; } #endregion @@ -116,6 +120,33 @@ { return Ok(new { code = 1, msg = strMsg }); } + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + /// <summary> + /// 鍒ゆ柇鎵樼洏鏄惁鍙敤 + /// </summary> + /// <param name="model">PalletNo锛氭墭鐩樻潯鐮�</param> + /// <returns></returns> + [HttpPost] + public IActionResult IsEnableLocatNo(PalletBindVm model) + { + try + { + var strMsg = _PdaAsnSvc.IsEnableLocatNo(model.LocatNo); + + if (strMsg == "") + { + return Ok(new { code = 0, msg = "鍦扮爜鍙敤!" }); + } + else + { + return Ok(new { code = 1, msg = strMsg }); + } } catch (Exception e) { @@ -524,7 +555,7 @@ { try { - var models = _PdaAsnSvc.GetBindBoxInfos(model); + var models = _PdaAsnSvc.GetBindBoxInfos(model, _config.BoxHost + _config.FuMaGetBoxUrl, _config.BoxHost + _config.FuMaGetTokenUrl); return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models }); } @@ -533,6 +564,27 @@ return Ok(new { code = 1, msg = e.Message }); } } + + /// <summary> + /// 鏍规嵁绠辩爜鑾峰彇鏍囩鏈�灏忚拷婧爜淇℃伅 + /// </summary> + /// <param name="model">BoxNo:绠卞彿</param> + /// <returns></returns> + [HttpPost] + public IActionResult GetBindBoxInfo2s(BoxInfoVm model) + { + try + { + var models = _PdaAsnSvc.GetBindBoxInfo2s(model, _config.BoxHost + _config.FuMaGetBoxUrl, _config.BoxHost + _config.FuMaGetTokenUrl); + + return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + [HttpPost] public IActionResult GetBindArrivalNoticeDetails(ArrivalNoticeVm model) { -- Gitblit v1.8.0