From f2bc08e28dda7022202f07217f6a3c150f818af7 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期一, 20 一月 2025 08:32:16 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/liudongl/jc24-wms --- Wms/Wms/Controllers/BllAsnController.cs | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs index e31f593..d73c8ce 100644 --- a/Wms/Wms/Controllers/BllAsnController.cs +++ b/Wms/Wms/Controllers/BllAsnController.cs @@ -9,6 +9,8 @@ using WMS.IBLL.IBllAsnServer; using WMS.IBLL.ILogServer; using Model.ModelVm.BllAsnVm; +using Wms.Tools; +using Microsoft.Extensions.Options; namespace Wms.Controllers { @@ -18,6 +20,7 @@ public class BllAsnController : ControllerBase { #region 渚濊禆娉ㄥ叆 + private readonly ApiUrlConfig _config; //鎺ュ彛浜や簰璺緞 private readonly IArrivalNoticeServer _arrivalNoticeSvc; // 鍏ュ簱鍗曟嵁Svc private readonly IPalletBindServer _PalletBindSvc; // 鎵樼洏缁戝畾Svc private readonly IBllBoxInfoServer _BoxInfoSvc; @@ -29,8 +32,9 @@ #endregion #region 鏋勯�犲嚱鏁� - public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox) + public BllAsnController(IOptions<ApiUrlConfig> setting, IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox) { + _config = setting.Value; _arrivalNoticeSvc = arrivalNoticeSvc; _PalletBindSvc = palletBindSvc; _BoxInfoSvc = bllBoxInfoSvc; @@ -134,7 +138,7 @@ } model.CreateUser = int.Parse(UserId); - string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model); + string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model, _config.WcsHost + _config.AddOrderTaskUrl); if (strMesage == "") { @@ -362,11 +366,11 @@ } [HttpGet] - public IActionResult GetBoxInfoByBoxNo(string boxNo, string boxNo3) + public IActionResult GetBoxInfoByBoxNo(string bindNo, string boxNo, string boxNo3) { try { - var models = _PalletBindSvc.GetBoxInfoByBoxNo(boxNo, boxNo3); + var models = _PalletBindSvc.GetBoxInfoByBoxNo(bindNo,boxNo, boxNo3); return Ok(new { code = 0, count= models.Count, msg = "绠辨敮鏄庣粏淇℃伅", data = models }); } @@ -991,7 +995,33 @@ return Ok(new { code = 1, count = 0, msg = e.Message }); } } - + + + //缂栬緫鏍囩鏁伴噺 + [HttpPost] + public IActionResult EditLabelQty(EditLabelQtyVm model) + { + try + { + //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D + var claimsIdentity = this.User.Identity as ClaimsIdentity; + if (claimsIdentity == null) + { + return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + } + var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; + if (string.IsNullOrWhiteSpace(userId)) + { + return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + } + _BoxInfoSvc.EditLabelQty(model.Id, model.Qty, int.Parse(userId)); + return Ok(new { code = 0, msg = "缂栬緫鎴愬姛", data = "" }); + } + catch (Exception e) + { + return Ok(new { code = 1, count = 0, msg = e.Message }); + } + } #endregion } -- Gitblit v1.8.0