From 5a03e3053f7958f78f280f6da3c8b68cd0b491dc Mon Sep 17 00:00:00 2001 From: Demo <Demo@DESKTOP-CPA90BF> Date: 星期五, 02 二月 2024 16:46:04 +0800 Subject: [PATCH] Merge branch 'csc' --- Wms/Wms/Controllers/BllAsnController.cs | 30 +++++++++++++++++++++++++++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs index fee616f..f1e307f 100644 --- a/Wms/Wms/Controllers/BllAsnController.cs +++ b/Wms/Wms/Controllers/BllAsnController.cs @@ -849,11 +849,11 @@ #region 绠辩爜鏍囩 [HttpPost] - public IActionResult GetLabelBoxList(LabelBoxVm model) + public IActionResult GetLabelBoxList(LabelBoxInfoVm model) { try { - var list = _labelBox.GetLabelBoxList(model, out int count); + var list = _BoxInfoSvc.GetLabelBoxList(model, out int count); return Ok(new { code = 0, count, msg = "绠辩爜鏍囩鍒楄〃", data = list }); } catch (Exception e) @@ -867,7 +867,7 @@ { try { - var list = _labelBox.GetLabelBoxModel(id); + var list = _BoxInfoSvc.GetLabelBoxModel(id); return Ok(new { code = 0, msg = "绠辩爜妯℃澘淇℃伅", data = list }); } catch (Exception e) @@ -876,6 +876,30 @@ } } + [HttpPost] + public IActionResult AddLabelBox(AddLabelBoxInfoVm 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 = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + } + var list = _BoxInfoSvc.AddLabelBoxReturn(model.Id, model.IsReset, decimal.Parse(model.ArriveQty), model.ProductionTime, model.ExpirationTime, model.StoreTime, int.Parse(userId)); + return Ok(new { code = 0, msg = "绠辩爜鏍囩鍒楄〃", data = list }); + } + catch (Exception e) + { + return Ok(new { code = 1, count = 0, msg = e.Message }); + } + } #endregion } -- Gitblit v1.8.0